- You can purchase the shipment object you created in the last step
- You can purchase a label without a shipment object in a single call
HTTP Method
POSTURL
Purchase from created Shipment
This is a flow where we first create a shipment object (and get rates for a given shipment). Then, we purchase a label for the providedrate.
Request Payload
| Parameter | Description |
|---|---|
| rate* | object_id of the rate object we get in the create shipments call response. |
| label_file_type* | Allowed values: PDF, PDF_A4, PDF_A6, PDF_4x6, PDF_4x8, PNG, ZPLII |
| async | Set to true if you want to poll for the result and receive faster response |
Example
Request Sample
cURL
Response Sample
Purchase label in one call
This is a flow where we create a shipment object from the request payload and return label for it in one callRequest Payload
| Parameter | Description |
|---|---|
| shipment* | Refer to the Shipment object. |
| carrier_account* | object_id of the carrier account to be used for purchasing this label. This carrier account object_id is available when an account is created. |
| servicelevel_token* | Name of the service level to use. Must be one of the following: colissimo_home, colissimo_pick_up_point, colissimo_return_mainland_france. These are case-sensitive. |
| label_file_type* | Allowed values: PDF, PDF_A4, PDF_A6, PDF_4x6, PDF_4x8, PNG, ZPLII |
Shipment
| Parameter | Description |
|---|---|
| address_from* | Refer to the Address object |
| address_to* | Refer to the Address object |
| parcels* | List of Parcel objects. Refer Parcel object |
| extra | Refer to the Extra object |
| customs_declaration* | Refer to the Customs declaration object. Required for international shipments |
Examples
Request sample for a domestic shipment
cURL
Response sample for a domestic shipment
Request sample for an international shipment
cURL