getProtocol
The method allows you to download a parcel protocol for selected shipments if the protocol is available for chosen courier
Input parameters
Output data:
A sample request in PHP:
courier_code | varchar(20) | Courier code |
package_ids | array | Array of shipments ID, optional if package_numbers was provided |
package_numbers | array | Array of shipments number (consignment number), optional if package_ids was provided |
account_id | int | Courier API account id for the courier accounts retrieved from the request getCourierAccounts |
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 |
extension | varchar(4) | Protocol file extension (pdf, html). |
protocol | text | Protocol encoded with base64 algorithm. |
Sample
Input data:Output data:
A sample request in PHP: