getPackageDetails
This method allows to get detailed information about a package. If the package contains multiple subpackages, information about all of them is included in the response.
Input parameters
| package_id | int | Shipment ID |
Output data
The method returns the data in JSON format.
| status | varchar(30) | SUCCESS - request executed correctly ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code |
| package_details | array | List of shipments details |
| | - weight | float | Package weight |
| | - weight_unit | text | Unit of package weight ("kg", "g", "lb", "oz", "") |
| | - length | float | Package length |
| | - width | float | Package width |
| | - height | float | Package height |
| | - size_unit | text | Unit of package size ("cm", "in", "") |
| | - size_template | varchar(255) | Size template identifier if used, otherwise empty |
| | - is_custom | bool | True if package dimensions are custom, false otherwise |
| | - cod_value | float | Cash on delivery (COD) value |
| | - cod_currency | varchar(3) | Currency of COD value |
| | - insurance_value | float | Insurance value of the package |
| | - insurance_currency | varchar(3) | Currency of insurance value |
| | - cost_value | float | Shipping cost declared for the package |
| | - cost_currency | varchar(3) | Currency of shipping cost |
| | - type | text | Type of packaging used ("package", "dox", "pallet", "") |
| | - pickup_date | int | Date of dispatch (unix time format) |
| | - service | varchar(255) | Courier service used for the package |
| | - additional_services | array | Courier additional services used for the package |
| | - courier_packaging_type | varchar(256) | Courier-specific packaging type code |
| additional_fields | array | Courier-specific shipment information, where the key is the field identifier and the value is the field content. Empty when the courier does not expose additional information or no value is available. shipment_notice indicates products that were not fully shipped and uses the "SKU shipped/ordered" format. |
Sample
Input data:Output data:
A sample request in PHP: