CreateShipment Method
This method allows shipments to be created in the DHL24 system. All validation rules used on the website apply. If the validation process has failed, an error structure will be returned with an appropriate message describing the cause of the problem.
The following conditions must be met to create a shipment:
- the selected shipping service must be available (at the indicated hours) for the specific postal code, it may be helpful to check the postal code with getPostalCodeServices
- parcels must meet the general criteria set out in the Price List
In the text mode, the method validates the input data without checking the actual availability of services or payment methods. It returns an output structure or error structures.
Input Parameters
Field Name | Type | Required? | Description |
---|---|---|---|
authData | AuthData | Yes | Authorisation structure |
shipments | Array of structures ShipmentFullData | Yes | An array with at least one structure defining the shipment (maximum of three structures) |
Output Parameters
Field Name | Type | Required? | Description |
---|---|---|---|
shipments | ShipmentBasicData | Yes | An array of ShipmentBasicData structures or error structures |
Examples of Calls
<createShipments> <authData> <username>testan</username> <password>testington</password> </authData> <shipments> <item> <shipper> <name>Testan</name> <postalCode>00909</postalCode> <city>Warsaw</city> <street>WÄ…wozowa</street> <houseNumber>2</houseNumber> <contactPhone>123456789</contactPhone> </shipper> <receiver> <addressType>B</addressType> <country>PL</country> <name>Receiver</name> <postalCode>24100</postalCode> <city>Pulawy</city> <street>Wroblewskiego</street> <houseNumber>7</houseNumber> <contactPerson>Joe Shmoe</contactPerson> <contactPhone>818765432</contactPhone> <contactEmail>recipient@gmail.com</contactEmail> </receiver> <pieceList> <item> <type>PALLET</type> <width>40</width> <height>100</height> <length>60</length> <weight>250</weight> <quantity>1</quantity> <nonStandard>true</nonStandard> <blpPieceId>JJD111100022203041</blpPieceId> </item> <item> <type>ENVELOPE</type> <quantity>1</quantity> </item> </pieceList> <payment> <paymentMethod>BANK_TRANSFER</paymentMethod> <payerType>SHIPPER</payerType> <accountNumber>1234567</accountNumber> <costsCenter>501502</costsCenter> </payment> <service> <product>AH</product> <collectOnDelivery>true</collectOnDelivery> <collectOnDeliveryValue>2199.99</collectOnDeliveryValue> <collectOnDeliveryForm>BANK_TRANSFER</collectOnDeliveryForm> <insurance>true</insurance> <insuranceValue>2500</insuranceValue> </service> <shipmentDate>2012-12-24</shipmentDate> <content>household appliances</content> <servicePointAccountNumber></servicePointAccountNumber> </item> </shipments> </createShipments>