Sipariş ve teklif bilgileri ile gönderi oluşturma:

  • Teklif servisinden alınan offer_code ve id değerleri ve gönderilmek istenen sipariş id'si kullanılarak gönderi oluşturulur.

Endpoint: /api/v1/shipping/pts/shipment/create_with_selected_offer/?send_shipment=true&send_cargo_info=true (pts kısmı kullanılacak olan kargo platformuna göre güncellenecek)

Method: POST

Url Parametreleri:

  • send_shipment: true gönderilirse Propars sisteminde oluşturulan shipment senkron olarak kargo platformuna aynı request içinde iletilir. true gönderilmediği durumlarda shipment Propars'ta oluştuktan sonra bu shipment'ın platforma iletilebilmesi için ikinci bir api isteği gerekecektir.


  • send_cargo_info : true gönderilirse ve send_shipment da true gönderilmiş ise; kargo platformundan takip bilgilerini senkron şekilde alabildiğimiz durumlarda takip bilgileri pazar yerine hemen iletilir, kargo platformundan takip bilgilerini asenkron olarak alabildiğimiz durumlarda ise takip bilgileri alınır alınmaz otomatik olarak pazaryerine iletilmesini sağlar. true gönderilmezse bu işlemler için bazı api istekleri yapmak gerekecektir.

Request Data:

{
"account_id":1,
"provider_key":"pts",
"destination_country":"DE",
"offer":26,
"offer_code":"L",
"sale":353,
"parcel":"1",
"currency":3,
"sale_items":[677],
"ddp":"1",
"eori_number":"12345",
"payment_type":"1",
"doc_type":"3",
"ioss_number":"IM2760000742",
"custom_invoice_number": "ABC2024012345678",
"custom_invoice_date": "2024-07-01",
"custom_invoice_pdf_url": "https://ornek.com/fatura.pdf"
}
  • account_id: Kargoyu gönderimek için kullanılacak olan kargo hesabının id'si
  • provider_key: Kargoyu gönderimek için kullanılacak olan kargo platformunun kodu
  • destination_country: Kargonun gönderileceği hedef ülke iso kodu
  • offer: Teklif id
  • offer_code: Teklif kodu
  • currency: Kargo ücreti dövizinin id'si (offer'da dönülen değer kullanılabilir ya da statik kullanılabilir)
  • sale_items: Oluşturulacak olan gönderide gönderilmesi planlanan sipariş satırlarının id'lerinin listesi
  • custom_invoice_number: Harici fatura numarası
  • custom_invoice_date: Harici fatura tarihi
  • custom_invoice_pdf_url: Harici fatura pdf url
  • ddp: Gümrük ödemesi ('0': alıcı öder, '1': satıcı öder)
  • eori_number: EORI numarası
  • payment_type: Kargo ödemesi ('1': Gönderici öder, '2': Alıcı öder, '3': Kapıda ödeme)
  • doc_type: Kargo tipi ('1': Döküman, '2': Döküman harici, '3': Mikro ihracat)
  • ioss_number: Pazaryeri IOSS numarası

Response (shipment):

{
    "id": 14,
    "mp_cargo_info_support": true,
    "can_send_mp_cargo_info": false,
    "can_send_shipment_data": true,
    "order_number": "order-123",
    "customer_name": null,
    "sale_items_detail": [
        {
            "product_name": "Sipariş satırı ürün adı",
            "product_code": "889-22-7697-665-11-9593",
            "barcode": "727-09-9954-796-85-1898",
            "quantity": 3.0,
            "price": 6700.194939
        }
    ],
    "offer_name": "PTS Flex",
    "offer_code": "L",
    "origin_country": "TR",
    "parcel": "1",
    "price": "8.2377",
    "ddp": "1",
    "eori_number": "12345",
    "ioss_number": "IM2760000742",
    "vat_number": null,
    "payment_type": "1",
    "doc_type": "3",
    "auto_send_mp_cargo_info": false,
    "create_time": "2024-07-25T17:38:00.607977Z",
    "update_time": "2024-07-25T17:38:00.607989Z",
    "uuid": "c8e9ff98-ce24-4609-a9c7-b7504e96863f",
    "shipment_provider_code": null,
    "destination_country": "DE",
    "tracking_code": null,
    "tracking_url": null,
    "carrier_name": null,
    "ticket_url": null,
    "waybill_url": null,
    "ticket_printed": false,
    "waybill_printed": false,
    "shipping_status": "PENDING",
    "sending_time": null,
    "error_message": null,
    "ticket_status": "PENDING",
    "ticket_error_message": null,
    "mp_cargo_info_id": null,
    "mp_cargo_info_status": "PENDING",
    "mp_error_message": null,
    "custom_invoice_number": "ABC2024012345678",
    "custom_invoice_date": "2024-07-01",
    "custom_invoice_pdf_url": "https://ornek.com/fatura.pdf"
    "currency": 3,
    "sale": 353,
    "mp_cargo_info_model": null,
    "account": 1,
    "warehouse": null,
    "sale_items": [
        677
    ]
}