/shipments
This endpoint creates a new shipment in Carriyo. User may specify the concrete carrier on shipment creation or it will be assigned automatically based on the rules configured at the merchant level.
In response to the create shipment request Carriyo returns the shipment object with a unique Carriyo shipment ID in the “pending” status, and asynchronously sends the booking request to assigned carrier. The carrier creates the shipment in its system and returns the AWB or tracking number, the AWB label, the status, and any other attributes available.
Once the shipment is successfully booked at the carrier, the status of the shipment is updated to “booked”. However if the shipment booking fails for some reason, its status is updated to “error”.
Shipment webhooks may be configured for the merchant at Carriyo to notify the client about any status of the shipment.
Authorization
Request Parameters
Request Body
Merchant is mandatory for the most of Carriyo APIs. If it is not specified, the default merchant configured for a tenant will be used.
Should contain carrier account ID and/or carrier account name. Carrier ID takes precedence.
Tenant provided references for a shipment. The partner_shipment_reference
is not mandatory but is expected to be unique. If partner_shipment_reference
is not passed, then the partner_order_reference
is used as the partner_shipment_reference
. The partner_shipment_reference
is useful to provide a tenant defined reference for each shipment if a single order has multiple shipments.
For the reverse-shipment payment_mode
and pending_amount
are not required and will be set to PRE_PAID
and 0
accordingly.
Pickup request must contain all the neccessary information about the sender: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: partner_location_id
, partner_location_name
, partner_location_code
.
Dropoff request must contain all the neccessary information about the receiver: their name, phone number, email, address, city and country. These properties will be given from the corresponding partner location, if either of following fields are specified instead: partner_location_id
, partner_location_name
, partner_location_code
.
Merchant defined custom attributes in the form of a map:
{"attribute1" : ["value1", "value2"], "attribute2" : ["value1", "value2"]}
Must be a date in ISO 8601 format. Example: 2020-09-03T17:07:05.000Z
Must be a two letter ISO 639-1 code. Example: en
Responses
For the reverse-shipment payment_mode
and pending_amount
are not required and will be set to PRE_PAID
and 0
accordingly.