getCourierServices
The method allows you to retrieve additional courier services, which depend on other shipment settings. Used only for X-press, BrokerSystem, WysyĆam z Allegro, ErliPRO couriers. Not applicable to other couriers whose forms have fixed options. The details of the package should be sent with the method (the format as in createPackage) in order to receive a list of additional services
Input parameters
Output data:
A sample request in PHP:
courier_code | varchar(20) | Courier code |
order_id | int | Order identifier |
account_id | int | (optional) Courier API account id for the courier accounts retrieved from the request getCourierAccounts If blank, the first account will be used. |
fields | array | Fields same as in createPackage" function |
packages | array | Fields same as in createPackage" function |
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 |
services | array | List of available services. The key to each element is the service id (varchar) Value is the name of the service (varchar) |
Sample
Input data:Output data:
A sample request in PHP: