| Creates a shipping label against the Shipping Information of a Shipping Provider for a document. | Uses your API Key, a valid DocumentId, and optionally a ShippingInfo object to create a shipping label for the specified document.
The NotifyCustomer flag is used to inform external integrations such as Magento, WooCommerce, or Shopify when the label is created.
If ShippingInfo is omitted, the document's existing ShippingInfo (if any) will be used.
A. Create a shipping label using existing ShippingInfo for DocumentId = 12345 and notify external integrations
Value:
{
"DocumentId": 12345,
"NotifyCustomer": true
}
B. Create a shipping label with a custom ShippingInfo
Value:
{
"DocumentId": 12345,
"ShippingInfo": {
"ProviderInfo": {
"ProviderId": 2018,
"ServiceId": "EXPRESS",
"PackageId": "PKG001"
},
"CostInfo": {
"ShippingCost": 6.00,
"OtherCosts": 1.00,
"TotalCost": 7.00
},
"WeightInfo": {
"Weight": 1.5,
"WeightUnitId": 1
},
"ShipmentDimensionsInfo": {
"ShipmentDimensionsLength": 35.0,
"ShipmentDimensionsWidth": 22.0,
"ShipmentDimensionsHeight": 12.0,
"ShipmentDimensionsUnit": "cm"
},
"ShipDateInfo": {
"ShipDate": "2024-05-18"
},
"GenericAftersalesProServicesInfo": {
"COD": false,
"GTEEC": false,
"Protocol": false
},
"TrackingId": "TRK-000999888777",
"LockerId": 42
},
"NotifyCustomer": true
}
Response:
{
"ShippingInfo": {
"ProviderInfo": {
"ProviderId": 2018,
"ServiceId": "EXPRESS",
"PackageId": "PKG001"
},
"CostInfo": {
"ShippingCost": 6.00,
"OtherCosts": 1.00,
"TotalCost": 7.00
},
"WeightInfo": {
"Weight": 1.5,
"WeightUnitId": 1
},
"ShipmentDimensionsInfo": {
"ShipmentDimensionsLength": 35.0,
"ShipmentDimensionsWidth": 22.0,
"ShipmentDimensionsHeight": 12.0,
"ShipmentDimensionsUnit": "cm"
},
"ShipDateInfo": {
"ShipDate": "2024-05-18"
},
"GenericAftersalesProServicesInfo": {
"COD": false,
"GTEEC": false,
"Protocol": false
},
"TrackingId": "TRK-000999888777",
"LockerId": 42
},
"LabelURL": "https://URLPATH/123456789_shipping-label.pdf",
"ResponseStatus": {
"ErrorCode": "0",
"Message": ""
}
}
A valid DocumentId is required. ShippingInfo is optional; if omitted, the document's existing ShippingInfo will be used. NotifyCustomer indicates whether external integrations such as Magento, WooCommerce, or Shopify should be informed. If an invalid DocumentId is provided, the response will contain an appropriate error message. |