Parcel tracking

Each merchant order has a parcel resource created, once it gets sent. This resource is used to give information regarding the shipment tracking.


Parcel

When a merchant order is marked as processed, a default parcel is created. The parcel resource is described in this call:

  
  GET {{api_url}}/v1/parcel/schema/

To retrieve the parcels of a merchant order:

  
  GET {{api_url}}/v1/parcel/?merchant_order={{MERCHANT_ORDER_ID}}

To edit a parcel and add the tracking number:

  
  PATCH {{api_url}}/v1/parcel/{{PARCEL_ID}}/

with the body:

 
   {
    "tracking_number": "my tracking number"
   }

Note :

It’s possible to update other information about the parcel with this call by adding updated information in the body.

To ship a parcel:

  
  POST {{api_url}}/v1/parcel/{{PARCEL_ID}}/ship/

with an empty body.


List merchant order shipping options

To retrieve the carriers and shipping options of a merchant_order:

  
  GET {{api_url}}/v1/merchant_order/{{MERCHANT_ORDER_ID}}/shipping_options/


Create a new parcel

Parcel creation:

  
  POST {{api_url}}/v1/parcel/

with the body:

  
  {
    "application": "/v1/application/{{APPLICATION_ID}}/",
    "carrier": "/v1/carrier/{{CARRIER_ID}}/",
    "merchant_order": "/v1/merchant_order/{{MERCHANT_ORDER_ID}}/",
    "order_shipping_choice": "/v1/order_shipping_choice/{{ORDER_SHIPPING_CHOICE_ID}}/",
    "tracking_number": "my-tracking-number"
  }

where:

  • MERCHANT_ORDER_ID: the identifier of the merchant order
  • ORDER_SHIPPING_CHOICE_ID: the identifier of the shipping option retrieved in the previous section


Add an item to a parcel: create a parcel assignment

It’s possible to add an item to a parcel with the following request:

  
  POST {{api_url}}/v1/parcel_assignment/

with the body:

 
   {
    "parcel": "/v1/parcel/{{PARCEL_ID}}/",
    "order_item": "/v1/order_item/{{ORDER_ITEM_ID}}/",
    "quantity": 1
   }


Remove an item from a parcel: delete a parcel assignment

It’s possible to remove an item from a parcel with the following request:

  
  DELETE {{api_url}}/v1/parcel_assignment/{PARCEL_ASSIGNMENT_ID}

with an empty body.


Delete a parcel

It’s possible to delete a parcel with the following request:

  
  DELETE {{api_url}}/v1/parcel/{PARCEL_ID}

with an empty body.

Note :

It is not possible to delete a parcel once it is marked as shipped.

Mark a parcel as delivered

Usually parcels get marked as delivered automatically based on the informations which are retreived via the tracking-number. If there is no tracking number available (for example for forwarding shipping) you can mark parcels also manually as delivered by using the following API request:

  
  POST {{api_url}}/v1/parcel/{{PARCEL_ID}}/receive/

with an empty body.

Note :

If you dont assign a delivery date using the corresponding PATCH request, the current date is used as delivery date when you carry out the above request.