Welcome to the guide on international consignments using the MachShip API. This document serves as a companion to our main guide on Creating Consignments and focuses specifically on the additional considerations and steps required when shipping dangerous goods.
International consignments are consignments where either the from OR to location is a country outside of Australia. MachShip does not support shipments where both to and from are outside of Australia - either the from OR to country must be Australia.
In the context of MachShip, an international consignment includes all the standard consignment information (pick-up location, delivery location, items) plus additional details regarding the goods being sent.
When creating an international consignment via the MachShip API, there are several key differences compared to standard consignments:
/apiv2/consignments/createConsignmentwithComplexItems
endpoint instead of the standard consignment creation endpoint. This endpoint is not limited for use with international consignments and can be used to create any consignment - it simply has additional fields.The process of creating an international consignment is similar to creating a standard consignment, with some additional steps and parameters.
When preparing your request to the /apiv2/consignments/createConsignmentwithComplexItems
endpoint for an international consignment, you'll need to include additional information beyond what's required for standard consignments.
This is a required field for all consignments being shipped internationally. You must set this to true
for international consignments:
{
"isInternational": true
}
For an International location consignment, there must be either the pickup or the delivery address as an international location.
You can provide one of either:
Note: that the country codes will be the 3 alpha country codes
Example Export to the Texas United States:
{
...
"fromName": "My Warehouse",
"fromContact": "Bob Jones",
"fromPhone": "123123123",
"fromEmail": "test@test.com",
"fromAddressLine1": "testAddressLine1",
"fromAddressLine2": "testAddressLine2",
"isInternational": true,
"internationalFromCity": "Texas",
"internationalFromPostcode": "73301",
"fromCountryCode": "USA",
"toName": "Customers House",
"toContact": "Stacy Smith",
"toPhone": "123123123",
"toEmail": "test@test.com",
"toAddressLine1": "testAddressLine1",
"toAddressLine2": "testAddressLine2",
"toLocation": {
"suburb": "Sydney",
"postcode": "2000"
},
...
}
Users must also provide a valid phone number
In order to allow for a smooth transfer through customs, it is very important that you supply the customs fields in the item contents section - please note that you will only be able to proceed to a quote if you provide this information.
Details to supply will be:
{
"items": [
{
"itemType": "Carton",
"name": "Test Carton",
"sku": "CART",
"quantity": 1,
"standardItem": {
"height": 25,
"weight": 5,
"length": 20,
"width": 20
},
"consignmentItemContents": [
{
"description": "Tshirts",
"reference1": "INV123456",
"reference2": "OR9876",
"reference3": "PO1234",
"quantity": 5,
"dollarValue": 5,
"ciMarksAndNumbers": null,
"harmonizedCode": "61091000 ",
"partNumber": null,
"purpose": "Sale",
"countryOfManufactureCode": "USA"
}
]
}
]
}
Once you've prepared all the necessary information, including the international fields and details, you're ready to send your request. Here's an example of what a complete request for an international consignment might look like:
POST https://live.machship.com/apiv2/consignments/createConsignmentwithComplexItems HTTP/1.1
Host: live.machship.com
token: <api_token>
body:
{
"dgsDeclaration": false,
"items": [
{
"itemType": "carton",
"name": "Test Carton",
"sku": "CART",
"quantity": 1,
"standardItem": {
"height": 25,
"weight": 5,
"length": 20,
"width": 20
},
"consignmentItemContents": [
{
"description": "test item content",
"reference1": "Test Ref 1",
"reference2": "Test Ref 2",
"reference3": "Test Ref 3",
"quantity": 1,
"dollarValue": 5.0,
"ciMarksAndNumbers": "CI Test Mark Num",
"harmonizedCode": "12345",
"partNumber": "TEST Part No",
"purpose": "BUSINESS",
"countryOfManufactureCode": "USA"
}
]
}
],
"carrierId": 11,
"carrierServiceId": 123,
"carrierAccountId": 456,
"fromName": "My Warehouse",
"fromContact": "Bob Jones",
"fromPhone": "123123123",
"fromEmail": "test@test.com",
"fromAddressLine1": "testAddressLine1",
"fromAddressLine2": "testAddressLine2",
"fromLocation": {
"suburb": "melbourne",
"postcode": "3000"
},
"toName": "Customers House",
"toContact": "Stacy Smith",
"toPhone": "123123123",
"toEmail": "test@test.com",
"toAddressLine1": "testAddressLine1",
"toAddressLine2": "testAddressLine2",
"internationalToCity": "Beverly Hills",
"internationalToPostcode": "90210",
"internationalToProvince": "CA",
"toCountryCode": "USA",
"isInternational": true,
"specialInstructions": "leave at front door"
}
The response for a consignment includes:
id
: Unique identifier for the consignmentcarrierConsignmentId
: Carrier's referencestatus
: Usually "Unmanifested" for new consignmentsconsignmentTotal
: Breakdown of pricing and surchargesitems
: Detailed item informationCommon international-specific errors include:
For more information on handling API errors, refer to our Common API Errors guide.