API documentation
Method list
Test your request
Changelog


getCourierFields
The method allows you to retrieve the form fields for creating shipments for the selected courier.


Input parameters
courier_codevarchar(20)Courier code



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
multi_packagesboolDoes the courier support multiple shipments (0/1).
fieldsarrayAn array with a list of fields to create a shipment containing the fields listed below.
| - idvarchar(50)The field ID
| - namevarchar(50)The field name
| - typevarchar(10)Field type (available select, checkbox, text, date)
| - desctextAdditional field description
| - optionsarrayList of available options (appears for select, checkbox).
The key to each element is the option id (varchar)
The value is the option name (varchar)
| - show_fieldarrayList of additional fields that are available for the selected option.
The key for each element is (varchar) - id of the option for which additional fields (varchar) are to be available
The value is the list of fields that are available for this option (array)
| - valuevarchar(50)Default value for a field
| - functionvarchar(20)If this value is not empty, it means that the field has dynamic options and in order to download the current options for a particular order, you should retrieve with the getCourierServices" request
package_fieldsarrayAn array with a list of fields to create packages containing the fields listed below. The completed list of these fields must be provided to the createPackage method under the packages key as an array of objects.
| - idvarchar(50)The field ID
| - namevarchar(50)The field name
| - typevarchar(10)Field type (available select, checkbox, text)



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