API documentation
Method list
Test your request
Changelog


getPricePackage
Returns available shipment quotations for a shipment handled by the selected courier.


Input parameters
order_idintOrder identifier
courier_codevarchar(20)Courier code. Available only for selected integrations.
account_idint(optional) Courier API account id for the courier accounts retrieved from the request getCourierAccounts
If omitted, the first account will be used.
fieldsarrayList of form fields retrieved from the request getCourierFields
Each element must contain the field ID and a value compatible with its returned type. Dates must be provided as Unix timestamp integers in seconds. For a checkbox with multiple selections, each selected option must be sent as a separate array element. Numeric values must be sent as JSON numbers, not strings. The value "auto" can be used for cod, insurance and value_price when supported by the courier.
packagesarrayArray of shipments. Required only when getCourierFields returns package_fields. When package_fields contains weight, the first shipment must include weight. Use field IDs returned in package_fields by getCourierFields as keys and values compatible with their returned types. Numeric values must be sent as JSON numbers and respect the decimal_places limit. Height, length and width must be sent in centimeters and weight in kilograms.



Output data
The method returns the data in JSON format.
statusvarchar(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
pricesarrayList of available shipment quotations returned by the courier.
| - nametextService or carrier name returned by the courier
| - pricefloatShipment price
| - currencytextPrice currency code
| - infotextAdditional quotation details returned by the courier, such as surcharges
| - selectedboolTrue when this quotation matches the service selected in the request. Returned only for that quotation.
headertextAdditional heading returned by the courier for the quotation result. Returned only when available.
noticesarrayAdditional transport information returned by the courier. Returned only when available.



Sample
Input data:
Output data:
A sample request in PHP: