API documentation
Method list
Test your request
Changelog


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
courier_codevarchar(20)Courier code
package_idsarrayArray of shipments ID, optional if package_numbers was provided
package_numbersarrayArray of shipments number (consignment number), optional if package_ids was provided
account_idintCourier API account id for the courier accounts retrieved from the request getCourierAccounts
fieldsarrayList 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.
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
pickup_numbervarchar(50)The parcel pickup number provided by the courier API



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