Shipment Create
Allows customers to create a new shipment. Required fields are in bold text.
Access
To get access to this API, please fill in the Developer Registration form
Resource URI
Make an HTTP POST request to:
Environment | URL | |||||
---|---|---|---|---|---|---|
LIVE | https://api.mainfreight.com/transport/1.0/customer/shipment?region={region} | |||||
UAT | https://apitest.mainfreight.com/transport/1.0/customer/shipment?region={region} |
Resource Information
Type | Value | ||
---|---|---|---|
Authentication | API Key | ||
Response Formats | JSON / XML | ||
HTTP Methods | POST | ||
API Version | 1.0 |
HTTP Headers
You must add the following HTTP Headers to your request:
Header | Description | Type | Required |
---|---|---|---|
Content-Type | Request content type. Supported types are "application/json" or "application/xml" | string | Yes |
Authorization |
The word " Secret" followed by a space, then your unique API key e.g: Secret wdnOId93-VXZECxvVRPQEJZNxPB5XZ... |
string | Yes |
Accept |
Result content type. Supported types are "application/json" or "application/xml" |
string | No |
Parameters
You must provide the parameters marked as required:
HTTP Request Parameters
Header | Description | Type | Required |
---|---|---|---|
region |
Region code, a list of available regions can be found here |
string | Yes |
Request Body
Field | Description | Type | Length | Required |
---|---|---|---|---|
account | Account involved in the shipment | object | Yes | |
code | Shorthand code to identify the account | string | 50 | Yes |
housebillNumber | A reference that identifies the shipment | string | 50 | Yes |
serviceLevel | An entity used to express the duration of transportation (available codes can be found here) | object | Yes | |
code | Shortland code to identify the service level | string | 50 | Yes |
transportMode | A term used to distinguish between different ways of transportation of goods (available codes can be found here) | string | 50 | Yes |
freightTerms | An entity used to express how the shipment starts and ends (available codes can be found here) | string | 50 | Yes |
routingType | An entity used to express the optimal carrier and mode to ship a shipment (available codes can be found here) | string | 50 | Yes |
systemOfMeasurement | What measurement type the units are specified on the shipment (available codes can be found here) | string | 50 | |
origin | Defines the specifics of the starting point of the shipment | object | Yes | |
sender | The owner of the goods that need to be shipped | object | Yes | |
code | Shortland code of the sender | string | 50 | |
name | Full name of the sender | string | 200 | |
address | Physical address | object | Yes | |
premises | Indicates a named location, usually a building or collection of buildings with a common name | string | 200 | |
streetNumber | Indicates a street number | string | 20 | |
address1 | Indicates a street name | string | 200 | |
address2 | Indicates other address identifiers | string | 200 | |
residential | Indicates whether a residential address | boolean | ||
suburb | Indicates the suburb | string | 500 | Yes |
postCode | Indicates the postcode | string | 10 | Yes (AU) |
town | Indicates the town | string | 50 | |
city | Indicates the city/place | string | 50 | Yes |
stateCode | Shorthand code to identify the state | string | 50 | Yes (AU) |
countryCode | Shorthand code to identify the country (available codes can be found here) | string | 50 | |
geometry | Contains GPS location information | object | ||
location | Contains the geocoded latitude, longitude value | object | ||
latitude | Latitude value | decimal | ||
longitude | Longitude value | decimal | ||
contact | Contact point for sender | object | ||
name | Full name of the contact | string | 200 | |
phone | Phone number of the contact | string | 150 | |
phoneExtension | Phone number extension of the contact | string | 20 | |
emailAddress | Email address of the contact | string | 200 | |
pickupTime | Indicates pickup time information for sender | object | Yes | |
fromDateTime |
The from date time of the pickup Required format: yyyy-MM-ddThh:mm:ss |
dateTime | ||
toDateTime |
The end date time of the pickup Required format: yyyy-MM-ddThh:mm:ss |
dateTime | Yes | |
referenceNumber | Indicates reference corresponding to the sender | string | 50 | |
instructions | Indicates an instruction note corresponding to the sender | string | 200 | |
destination | Defines the specifics of the ending point of the shipment | object | Yes | |
receiver | The party who physically receives the goods | object | Yes | |
name | Full name of the receiver | string | 200 | |
address | Physical address | object | Yes | |
premises | Indicates a named location, usually a building or collection of buildings with a common name | string | 200 | |
streetNumber | Indicates a street number | string | 20 | |
address1 | Indicates a street name | string | 200 | |
address2 | Indicates other address identifiers | string | 200 | |
residential | Indicates whether a residential address | boolean | ||
suburb | Indicates the suburb | string | 50 | Yes |
town | Indicates the postcode | string | 10 | |
postCode | Indicates the town | string |
50 |
Yes (AU) |
city | Indicates the city/place | string | 50 | Yes |
stateCode | Shorthand code to identify the state | string | 50 | Yes (AU) |
countryCode | Shorthand code to identify the country (available codes can be found here) | string | 50 | |
geometry | Contains GPS location information | object | ||
location | Contains the geocoded latitude, longitude value | object | ||
latitude | Latitude value | decimal | ||
longitude | Longitude value | decimal | ||
contact | Contact point for receiver | object | ||
name | Full name of the contact | string | 200 | |
phone | Phone number of the contact | string | 150 | |
phoneExtension | Phone number extension of the contact | string | 20 | |
emailAddress | Email address of the contact | string | 200 | |
deliveryTime | Indicates delivery time information for receiver | object | ||
toDateTime |
The end date time of the delivery time Required format: yyyy-MM-ddThh:mm:ss |
dateTime | ||
referenceNumber | Indicates reference corresponding to the receiver | string | 50 | |
instructions | Indicates an instruction note corresponding to the receiver | string | 500 | |
freightDetails | Defines information about types and dimensions of goods shipped on this shipment | array of objects | Yes | |
freightDetail | Defines a single goods line of all goods on the shipment | object | Yes | |
ssccNumber | Serial Shipping Container Code can be used to identify a logistic unit | string | 18 | |
customerItemNumber | Customer Unique Item Number | string | 50 | |
packTypeCode | Shorthand code identifying the type of goods on the freight line (available codes can be found here) | string | 50 | Yes |
description | Description of the goods on the freight line | string | 200 | |
weight | Physical weight of the goods on the freight line | integer | ||
volume | Physical volume of the goods on the freight line | decimal | ||
length | Length of goods on the freight line | decimal | ||
width | Width of goods on the freight line | decimal | ||
height | Height of goods on the freight line | decimal | ||
stackable | Whether the goods on the freight line can be stacked | boolean | ||
freightClass | Freight classification code | string | 50 | |
foodGrade | Whether the freight line satisfy the classification of highest standard of internal cleanliness | boolean | ||
itemLines | Further breakdown of freight line (Said to Contain) | array of objects | ||
itemLine | One single Item line | object | ||
units | Units | integer | ||
packTypeCode | Shorthand code identifying the type of goods on the item line (available codes can be found here) | string | 50 | |
description | Description of the goods on the item line | string | 500 | |
dangerousGoodsLines | Identification of materials or items with hazardous properties | array of objects | ||
dangerousGoodsLine | Identifies one line of dangerous goods (DG) | object | ||
class | Classification of DG Class | string | 50 | |
unNumber | A four-digit code used to identify hazardous materials and articles | string | 50 | |
variant | Identify variant of DG | string | 50 | |
properName | Identification of proper name of DG | string | 255 | |
technicalName | Identification of technical name of DG | string | 255 | |
commonName | Identification of common name of DG | string | 50 | |
subRisk | Identification of hazards referred to as Subsidiary Risks | string | 50 | |
tertiarySubRisk | Another breakdown of sub risk | string | 50 | |
hazChem | hazardous chemicals | string | 50 | |
packingGroup | Packing group indicates the degree of danger | string | 50 | |
flashPoint | In Centigrade | string | 50 | |
additionalInfo | Additional notes associated with DG | string | 255 | |
packageType | How DG is contained | string | 50 | |
packageInstruction | Instructions regarding package | string | 50 | |
marinePollutant | Whether DG is a Marine Pollutant | boolean | ||
acid | Whether DG is acidic | boolean | 50 | |
alkali | Whether DG is alkali | boolean | 50 | |
grossWeight | Physical weight of the goods on the DG line | integer | ||
volume | Physical volume of the goods on the DG line | decimal | ||
units | Units of DG line | integer | ||
description | Description of the goods on the DG line | string | ||
hireLines | Define information about Hire on the shipment | array of objects | ||
hireLine | Identifies one line of hire | object | ||
supplier | Supplier of hire (available codes can be found here) | string | 50 | |
palletType | Type of pallet (available codes can be found here) | string | 50 | |
toAccount | To account of hire | string | 50 | |
fromAccount | From account of hire | string | 50 | |
transactionType | Transaction type of hire (available codes can be found here) | string | 50 | |
quantity | Quantity of pallets of hire | integer | ||
references | Reference types that goes against the shipment | array of objects | ||
reference | Single reference type line | object | ||
type | Shorthand code of reference type | string | 50 | |
value | Reference value | string | 50 | |
notes | Note type that goes against the shipment | array of objects | ||
note | Single note type line | object | ||
type | Shorthand code of note type | string | 50 | |
value | Note value | string | 255 | |
dangerousGoodsSignatory | Identifier party responsible for signing for DG | object | ||
name | Name of person | string | 200 | |
title | Title of person | string | 10 | |
location | Location of person | string | 50 | |
signature | Name on signature | string | 200 | |
emergencyPhone | Phone number of person | string | 150 | |
cover | Identifies Cover related information | object | ||
insuredType | Type of Insurance (available codes can be found here) | string | 50 | |
insuredValue | Value of Insurance | decimal | ||
declaredValue | The amount stated to be the value of cover | decimal | ||
notifications | Identifies a list of notifications to be subscribed | array of objects | ||
transport | Identifies the notification transport | object | ||
code | Shorthand code identifying the transport code (available codes can be found here) | string | 50 | |
destination | Delivery destination of transport | string | 255 | |
events | List of events | array of objects | ||
event | Identifies the event | object | ||
code | Shorthand code that identifies the notification event (available codes can be found here) | string | 50 |
Response Body
Field | Description | Type | Length | |
---|---|---|---|---|
id | Identifier that can be used to update and delete this shipment | string | ||
account | Account involved in the shipment | object | Yes | |
code | Shorthand code to identify the account | string | 50 | Yes |
housebillNumber | A reference that identifies the shipment | string | 50 | Yes |
serviceLevel | An entity used to express the duration of transportation (available codes can be found here) | object | Yes | |
code | Shortland code to identify the service level | string | 50 | Yes |
transportMode | A term used to distinguish between different ways of transportation of goods (available codes can be found here) | string | 50 | Yes |
freightTerms | An entity used to express how the shipment starts and ends (available codes can be found here) | string | 50 | Yes |
routingType | An entity used to express the optimal carrier and mode to ship a shipment (available codes can be found here) | string | 50 | Yes |
systemOfMeasurement | What measurement type the units are specified on the shipment (available codes can be found here) | string | 50 | |
origin | Defines the specifics of the starting point of the shipment | object | Yes | |
sender | The owner of the goods that need to be shipped | object | Yes | |
code | Shortland code of the sender | string | 50 | |
name | Full name of the sender | string | 200 | |
address | Physical address | object | Yes | |
premises | Indicates a named location, usually a building or collection of buildings with a common name | string | 200 | |
streetNumber | Indicates a street number | string | 20 | |
address1 | Indicates a street name | string | 200 | |
address2 | Indicates other address identifiers | string | 200 | |
residential | Indicates whether a residential address | boolean | ||
suburb | Indicates the suburb | string | 50 | Yes |
postCode | Indicates the postcode | string | 10 | Yes (AU) |
town | Indicates the town | string | 50 | |
city | Indicates the city/place | string | 50 | Yes |
stateCode | Shorthand code to identify the state | string | 50 | Yes (AU) |
countryCode | Shorthand code to identify the country (available codes can be found here) | string | 50 | |
contact | Contact point for sender | object | ||
name | Full name of the contact | string | 200 | |
phone | Phone number of the contact | string | 150 | |
phoneExtension | Phone number extension of the contact | string | 20 | |
emailAddress | Email address of the contact | string | 200 | |
pickupTime | Indicates pickup time information for sender | object | Yes | |
toDateTime | The end date time of the pickup time | dateTime | Yes | |
destination | Defines the specifics of the ending point of the shipment | object | Yes | |
receiver | The party who physically receives the goods | object | Yes | |
name | Full name of the receiver | string | 200 | |
address | Physical address | object | Yes | |
premises | Indicates a named location, usually a building or collection of buildings with a common name | string | 200 | |
streetNumber | Indicates a street number | string | 20 | |
address1 | Indicates a street name | string | 200 | |
address2 | Indicates other address identifiers | string | 200 | |
residential | Indicates whether a residential address | boolean | ||
suburb | Indicates the suburb | string | 50 | Yes |
town | Indicates the postcode | string | 10 | |
postCode | Indicates the town | string | 50 | Yes (AU) |
city | Indicates the city/place | string | 50 | Yes |
stateCode | Shorthand code to identify the state | string | 50 | Yes (AU) |
countryCode | Shorthand code to identify the country (available codes can be found here) | string | 50 | |
contact | Contact point for receiver | object | ||
name | Full name of the contact | string | 200 | |
phone | Phone number of the contact | string | 150 | |
phoneExtension | Phone number extension of the contact | string | 20 | |
emailAddress | Email address of the contact | string | 200 | |
deliveryTime | Indicates delivery time information for receiver | object | Yes | |
toDateTime | The end date time of the delivery time | dateTime | Yes |
Code samples
To Generate a Shipment in JSON format you will need to POST a JSON object:
- URL
https://api.mainfreight.com/transport/1.0/customer/shipment?region=NZ
You are going to send a JSON object similar to this:
- REQUEST JSON
{ "account": { "code": "{YOUR_ACCOUNT_CODE}" }, "housebillNumber": "{YOUR_HOUSEBILLNUMBER}", "serviceLevel": { "code": "LCL" }, "transportMode": "ROAD", "freightTerms": "D2D", "routingType": "LCL", "systemOfMeasurement": "Metric", "origin": { "sender": { "code": null, "name": "TEST SENDER" }, "address": { "premises": null, "streetNumber": "42", "address1": "O'Rorke Road", "address2": null, "residential": false, "suburb": "Penrose", "postCode": "1061", "town": null, "city": "Auckland", "stateCode": null, "countryCode":"NZ", "geometry": { "location": { "latitude": null, "longitude": null } } }, "contact": { "name": "John Doe", "phone": "+64 000 000000", "phoneExtension": "856", "emailAddress": "example@email.com" }, "pickupTime": { "fromDateTime": "2023-06-18T09:00:00" "toDateTime": "2023-06-18T09:00:00" }, "referenceNumber": "OriginReferenceNumber", "instructions": "Origin Instructions" }, "destination": { "receiver": { "name": "TEST RECEIVER" }, "address": { "premises": null, "streetNumber": "21", "address1": "Hayton Road", "address2": null, "residential": false, "suburb": "Wigram", "postCode": "8042", "town": null, "city": "Christchurch", "stateCode": null, "countryCode": "NZ", "geometry": { "location": { "latitude": -43.542202, "longitude": 172.558036 } } }, "contact": { "name": "Jim Doe", "phone": "+64 000 000000", "phoneExtension": "856", "emailAddress": "example@email.com" }, "referenceNumber": "DestinationReferenceNumber", "instructions": "Destination Instructions" }, "freightDetails": [{ "ssccNumber": "123456789012345678", "customerItemNumber": "TEST1111", "packTypeCode": "Bag", "description": "These are the goods", "weight": 50, "volume": 0.5, "length": 0.2, "width": 0.25, "height": 0.15, "stackable": true, "freightClass": "100", "foodGrade": false, "itemLines": [{ "units": 100, "packTypeCode": "CTN", "description": "These are the detailed descriptions of the goods", "dangerousGoodsLines": [{ "class": "3", "unNumber": "1123", "variant": "1", "properName": "Butyl", "technicalName": "Desmoph", "commonName": "Desmoph", "subRisk": "1", "tertiarySubRisk": "2", "hazChem": "3[Y]", "packingGroup": "III", "flashPoint": "52", "additionalInfo": "Do not store in dir", "packageType": "Metal Drum", "packageInstruction": "DangerousGoodsLine PackageInstruction", "marinePollutant": false, "acid": false, "alkali": false, "grossWeight": 10, "volume": 0.2, "units": 2, "description": "DangerousGoodsLine Description" } ] } ], "hireLines": [{ "supplier": "C", "palletType": "B", "toAccount": "0000000000", "fromAccount": "111111111", "transactionType": "T", "quantity": 10 } ] } ], "references": [{ "type": "ReceiverReference", "value": "ReceiverReference" }, { "type": "SenderReference", "value": "SenderReference" } ], "dangerousGoodsSignatory": { "name": "Example DG", "title": "Dispatch", "location": "160 Plank Ave", "signature": "Example DG", "emergencyPhone": "6400000000" }, "cover": { "insuredType": "DV", "insuredValue": 1000.00, "declaredValue": 1000.00 }, "notifications": [{ "eventTypeCode": "StatusUpdate", "transport": { "code": "Email", "destination": "noemail@mainfreight.com" }, "events": [{ "code": "StatusUpdateShipmentPODReceived" } ] } ] }
You are going get another JSON object similar to this:
- RESPONSE JSON
{ "id": "4438CF5B-DD3D-441B-B76D-24AABCA73A71", "account": { "code": "{YOUR_ACCOUNT_CODE}" }, "housebillNumber": "{YOUR_HOUSEBILLNUMBER}", "shipmentNumber": "01031111182", "serviceLevel": { "code": "LCL" }, "transportMode": "ROAD", "freightTerms": "D2D", "routingType": "LCL", "systemOfMeasurement": "metric", "origin": { "sender": { "name": "TEST SENDER" }, "address": { "streetNumber": "42", "address1": "O'Rorke Road", "residential": false, "suburb": "PENROSE", "city": "AUCKLAND", "stateCode": "NI", "countryCode": "NZ" }, "contact": { "name": "John Doe", "phone": "+64 000 000000", "phoneExtension": "856", "emailAddress": "example@email.com" }, "appointment": {}, "pickupTime": { "timeslot": false, "fromDateTime": "2023-06-18T09:00:00" "toDateTime": "2023-06-18T09:00:00" }, "extras": [], "accessorials": [] }, "destination": { "receiver": { "name": "TEST RECEIVER" }, "address": { "streetNumber": "21", "address1": "Hayton Road", "residential": false, "suburb": "WIGRAM", "city": "CHRISTCHURCH", "stateCode": "SI", "countryCode": "NZ" }, "contact": { "name": "Jim Doe", "phone": "+64 000 000000", "phoneExtension": "856", "emailAddress": "example@email.com" }, "appointment": {}, "deliveryTime": { "timeslot": false, "toDateTime": "2023-06-26T17:00:00" }, "extras": [], "accessorials": [] } }
To Generate a Shipment in XML format, you will need to POST XML object.
- URL
https://api.mainfreight.com/transport/1.0/customer/shipment?region=NZ
You are going to send an XML document similar to this:
- XML REQUEST
<shipment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <account> <code>{YOUR_ACCOUNT_CODE}</code> </account> <housebillNumber>{YOUR_HOUSEBILLNUMBER}</housebillNumber> <serviceLevel> <code>LCL</code> </serviceLevel> <transportMode>ROAD</transportMode> <freightTerms>D2DP</freightTerms> <routingType>LCL</routingType> <systemOfMeasurement>Metric</systemOfMeasurement> <origin> <sender> <code>TESTSENDER</code> <name>Test Sender</name> </sender> <address> <premises xsi:nil="true"/> <streetNumber>42</streetNumber> <address1>O'Rorke Road</address1> <address2 xsi:nil="true"/> <residential>false</residential> <suburb>Penrose</suburb> <postCode>1061</postCode> <town xsi:nil="true"/> <city>Auckland</city> <stateCode xsi:nil="true"/> <countryCode>NZ</countryCode> <geometry> <location> <latitude>-36.914914</latitude> <longitude>174.817803</longitude> </location> </geometry> </address> <contact> <name>John Doe</name> <phone>+64 000 000000</phone> <phoneExtension>856</phoneExtension> <emailAddress>example@email.com</emailAddress> </contact> <pickupTime> <fromDateTime>2023-05-18T09:00:00</fromDateTime> <toDateTime>2023-05-18T09:00:00</toDateTime> </pickupTime> <referenceNumber>OriginReferenceNumber</referenceNumber> <instructions>Origin Instructions</instructions> </origin> <destination> <receiver> <name>Test Receiver</name> </receiver> <address> <premises xsi:nil="true"/> <streetNumber>21</streetNumber> <address1>Hayton Road</address1> <address2 xsi:nil="true"/> <residential>false</residential> <suburb>Wigram</suburb> <postCode>8042</postCode> <town xsi:nil="true"/> <city>Christchurch</city> <stateCode xsi:nil="true"/> <countryCode>NZ</countryCode> <geometry> <location> <latitude>-43.542202</latitude> <longitude>172.558036</longitude> </location> </geometry> </address> <contact> <name>John Doe</name> <phone>+64 000 000000</phone> <phoneExtension>856</phoneExtension> <emailAddress>example@email.com</emailAddress> </contact> <referenceNumber>Destination Reference Number</referenceNumber> <instructions>Destination Instructions</instructions> </destination> <freightDetails> <freightDetail> <ssccNumber>1111</ssccNumber> <customerItemNumber>TEST1111</customerItemNumber> <packTypeCode>Bag</packTypeCode> <description>These are the goods</description> <weight>50</weight> <volume>0.5</volume> <length>0.2</length> <width>0.25</width> <height>0.15</height> <stackable>true</stackable> <nationalMotorFreightClassification>123456-78</nationalMotorFreightClassification> <freightClass>100</freightClass> <foodGrade>false</foodGrade> <itemLines> <itemLine> <units>100</units> <packTypeCode>CTN</packTypeCode> <description>These are the detailed descriptions of the goods</description> <dangerousGoodsLines> <dangerousGoodsLine> <class>3</class> <unNumber>1123</unNumber> <variant>1</variant> <properName>Butyl</properName> <technicalName>Desmoph</technicalName> <commonName>Desmoph</commonName> <subRisk>1</subRisk> <tertiarySubRisk>2</tertiarySubRisk> <hazChem>3[Y]</hazChem> <packingGroup>III</packingGroup> <flashPoint>52</flashPoint> <additionalInfo>Do not store in dir</additionalInfo> <packageType>Metal Drum</packageType> <packageInstruction>DangerousGoodsLine PackageInstruction</packageInstruction> <marinePollutant>false</marinePollutant> <acid>false</acid> <alkali>false</alkali> <grossWeight>10</grossWeight> <volume>0.2</volume> <units>2</units> <description>DangerousGoodsLine Description</description> </dangerousGoodsLine> </dangerousGoodsLines> </itemLine> </itemLines> <hireLines> <hireLine> <supplier>C</supplier> <palletType>B</palletType> <toAccount>0000000000</toAccount> <fromAccount>111111111</fromAccount> <transactionType>T</transactionType> <quantity>10</quantity> </hireLine> </hireLines> </freightDetail> </freightDetails> <references> <reference> <type>ReceiverReference</type> <value>ReceiverReference</value> </reference> <reference> <type>SenderReference</type> <value>SenderReference</value> </reference> </references> <dangerousGoodsSignatory> <name>Example DG</name> <title>Dispatch</title> <location>160 Plank Ave</location> <signature>Example DG</signature> <emergencyPhone>6402112345</emergencyPhone> </dangerousGoodsSignatory> <notifications> <notification> <transport> <code>Email</code> <destination>example@email.com</destination> </transport> <events> <event> <code>StatusUpdateShipmentPODReceived</code> </event> </events> </notification> </notifications> </shipment>
You are going to get an XML document similar to this:
- XML RESPONSE
<shipment xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <id>2A77498C-05FA-4298-BB06-13BC3DD59156</id> <account> <code>{YOUR_ACCOUNT_CODE}</code> </account> <housebillNumber>01NZ0000000</housebillNumber> <serviceLevel> <code>LCL</code> </serviceLevel> <transportMode>ROAD</transportMode> <freightTerms>D2DP</freightTerms> <routingType>LCL</routingType> <systemOfMeasurement>metric</systemOfMeasurement> <origin> <sender> <name>DAILYFREIGHT DEPOT</name> </sender> <address> <streetNumber>42</streetNumber> <address1>O'Rorke Road</address1> <residential>false</residential> <suburb>PENROSE</suburb> <city>AUCKLAND</city> <stateCode>NI</stateCode> <countryCode>NZ</countryCode> </address> <contact> <name>John Doe</name> <phone>+64 220 012345</phone> <phoneExtension>856</phoneExtension> <emailAddress>example@email.com</emailAddress> </contact> <pickupTime> <fromDateTime>2023-05-18T09:00:00</fromDateTime> <toDateTime>2023-05-18T09:00:00</toDateTime> </pickupTime> </origin> <destination> <receiver> <name>MAINFREIGHT TRANSPORT</name> </receiver> <address> <streetNumber>21</streetNumber> <address1>Hayton Road</address1> <residential>false</residential> <suburb>WIGRAM</suburb> <city>CHRISTCHURCH</city> <stateCode>SI</stateCode> <countryCode>NZ</countryCode> </address> <contact> <name>John Doe</name> <phone>+64 221 012345</phone> <phoneExtension>856</phoneExtension> <emailAddress>example@email.com</emailAddress> </contact> </destination> </shipment>