requestParcelPickup
The method allows you to request a parcel pickup for previously created shipments. The method sends a parcel pickup request to courier API if the courier API allows it
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 |
fields | array | List of form fields retrieved from the request getRequestParcelPickupFields For checkbox with multiple selection, the information should be sent in separate arrays e.g. [ { "id":"pickup_date", "value":"1642416311" }, { "id":"shipments_weight", "value":"40" }, ] |
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 |
pickup_number | varchar(50) | The parcel pickup number provided by the courier API |
Sample
Input data:Output data:
A sample request in PHP: