BookCourier Method

This method is used for booking a courier to collect predefined shipments on a particular day and within specified hours. After receiving a request, the method checks the input data: whether a courier can arrive at the indicated time and whether all the indicated shipments can be collected in one place (consistency of shipping addresses). In case of an error, a feedback message will indicate the cause of the problem.

A courier can be booked

  • for a list of previously prepared shipments (by providing shipment IDs in the shipmentIdList parameter)
  • without specifying shipments - then a shipmentOrderInfo structure with basic order details is required.

Note - if you book a courier without specifying a shipment list, such order will not be visible in the shipment list on the website.

Input Parameters

Field Name Type Required? Description
authData AuthData Yes Authorisation structure
pickupDate string Yes Date in YYYY-MM-DD format
pickupTimeFrom string Yes Time from which the shipment is ready to be collected (in HH:MM format)
pickupTimeTo string Yes Time until which the shipment can be collected (in HH:MM format)
additionalInfo string(50) No Additional information for the courier
shipmentIdList array Yes(*) Array of string-type items containing shipment IDs
shipmentOrderInfo shipmentOrderInfo Yes(*) Summary data on the sender and the number and weight of shipments.
courierWithLabel boolean No Should the courier come with a label

(*) - only one of these elements (list of defined shipments or basic shipment data) is required. If both are provided, the shipmentOrderInfo structure is ignored.

Output Parameters

Field Name Type Required? Description
orderId array Yes Array of string-type items with order numbers

Examples of calls

Ordering a courier for three previously created shipments

<authData>
    <username>testan</username>
    <password>testington</password>
</authData>
<pickupDate>2012-10-23</pickupDate>
<pickupTimeFrom>10:00</pickupTimeFrom>
<pickupTimeTo>14:00</pickupTimeTo>
<additionalInfo>Caution, packages contain glass</additionalInfo>
<shipmentIdList>
    <item>1234567</item>
    <item>1234568</item>
    <item>1234569</item>
</shipmentIdList>

Ordering a courier without specifying parcels

<authData>
    <username>testan</username>
    <password>testington</password>
</authData>
<pickupDate>2012-10-23</pickupDate>
<pickupTimeFrom>10:00</pickupTimeFrom>
<pickupTimeTo>14:00</pickupTimeTo>
<additionalInfo>Caution, packages contain glass</additionalInfo>
<shipmentOrderInfo>
    <shipper>
        <name>Testan Testington</name>
        <postalCode>02796</postalCode>
        <city>Warsaw</city>
        <street>WÄ…wozowa</street>
        <houseNumber>2</houseNumber>
        <contactPerson>Testan Testington</contactPerson>
        <contactEmail>testan@anydomain.eu</contactEmail>
    </shipper>
    <numberOfExPieces>3</numberOfExPieces>
    <numberOfDrPieces>0</numberOfDrPieces>
    <totalWeight>40</totalWeight>
    <heaviestPieceWeight>15</heaviestPieceWeight>
</shipmentOrderInfo>
Go back to topic list