The objective of this guide is to help you to implement a pending (or draft) consignment workflow.
The primary reasons you would use this workflow over a create consignment workflow are:
Here is a summary of the workflow:
Here is a demo of the workflow in action:
[Add Video Here]
MachShip provides flexible methods for importing consignment data into the platform. Whether you need to upload files manually through our web interface or automate the process through folder monitoring, MachShip supports both standard CSV formats and custom file structures through workflow tasks. This guide helps you understand the available options and choose the right approach for your shipping workflow.
For detailed instructions on how to import consignments, see our import guide here.
Once you've got your file importer setup, you can then automate the pick up of your files using our printer app.
For detailed instructions on how to automate your imports using our printer app, read our printer app import guide here.
Example 1 - Full From & To Address, No Items
POST https://live.machship.com/apiv2/pendingConsignments/createPendingConsignment HTTP/1.1
token: <api_token>
{
//the MachShip entity (warehouse and/or brand) to allocate the consignment to
//only required if you have more than one entity
"companyId":"1234",
"fromName":"The Big Store",
"fromContact":"Bob Smith",
"fromPhone":"1234567",
"fromAddressLine1":"1212 The Big AVENUE",
"fromAddressLine2":"",
"fromLocation":{
"suburb":"MILDURA",
"postcode":"3500"
},
"customerReference":"8855292845",
"customerReference2":"Test00014",
"specialInstructions": "string",
"toName":"The Company",
"toContact":"Mary Jones",
"toPhone":"0422 222 222",
"toAddressLine1":"1212 SMALL AVENUE",
"toLocation":{
"suburb":"CROYDON",
"postcode":"3136"
},
//adds surcharges for tailgate and residential fees respectively
"questionIds": [7,13]
}
Example 2 - Stored From Address, To Address & Items
POST https://live.machship.com/apiv2/pendingConsignments/createPendingConsignment HTTP/1.1
token: <api_token>
{
//the MachShip entity (warehouse and/or brand) to allocate the consignment to
//only required if you have more than one entity
"companyId":"1234",
//a stored address in MachShip
"fromCompanyLocationId": "1638944",
"customerReference":"8855292845",
"customerReference2":"Test00014",
"specialInstructions": "string",
"toName":"The Company",
"toContact":"Mary Jones",
"toPhone":"0422 222 222",
"toAddressLine1":"1212 SMALL AVENUE",
"toLocation":{
"suburb":"CROYDON",
"postcode":"3136"
},
"questionIds": [7,13],
//optionall allocate items
"items": [
{
"itemType": "Carton",
"name": "Box 1",
"quantity": 1,
"height": 10,
"weight": 20,
"length": 30,
"width": 40,
}
],
//optionally pre-allocate a carrier
"carrierId": 0,
//optionally pre-allocate a service
"carrierServiceId": 0
}
Further documentation on the fields available can be found in our documentation here and our full API specification here.
API Response
Machship will return the following after creating your pending consignment:
{
"object": {
"id": 12345,
"consignmentNumber": "PC12345"
},
"errors": [
{
"memberNames": [
"string"
],
"errorMessage": "string",
"validationType": 0
}
]
}
This pending consignment id can be stored by your system, so you can later use it to find the consignment this pending consignment was created from.
Tracking & Pending Consignments
Pending consignments are "transformed" into consignments by a user in MachShip, at which time the pending consignment is deleted, and the consignment is created.
The consignment is tagged with the originating pending consignment Id, allowing you to marry up your original request with the final consignment.
You can also use the reference fields as a way of matching your original request to the final consignment created.
There are variety of fields and endpoints you can use to track consignments, which is covered in depth in this article on tracking via the api
A common way is to hit the "catch all" endpoint - getRecentlyCreatedOrUpdatedConsignments - which returns a list of consignments which were created or updated inside a time period.
GET https://live.machship.com/apiv2/consignments/getRecentlyCreatedOrUpdatedConsignments?companyId=123&fromDateUtc=2023-01-01T00:00:00&toDateUtc=2023-01-02T00:00:00&includeChildCompanies=true
You could poll this daily, or hourly to get updates about all your consignments in a single request - the response would look like:
{
"object": [
{
"id": 1234567,
"consignmentTrackingStatus": {
"id": 2,
"name": "Unmanifested",
},
"carrierConsignmentId": "AUSP1234567",
"customerReference": "ORDER1234",
"customerReference2": "PO123",
"pendingConsignmentIds": [
12345
],
...//rest of payload
},
{
"id": 1234568,
"consignmentTrackingStatus": {
"id": 7,
"name": "Complete",
},
"carrierConsignmentId": "MS1234568",
"customerReference": "ORDER1235",
"customerReference2": "PO124",
"pendingConsignmentIds": [
12346
],
...//rest of payload
}
],
"errors": [
{
"memberNames": [
"string"
],
"errorMessage": "string",
"validationType": 0
}
],
"totalItems": 0,
"startIndex": 0,
"retrievalSize": 0
}
You can also utilise this response to build the tracking link to send to your platform.
For details on how to do this, read our guide here.
For pending consignments, printing is handled automatically through the MachShip printer app. The setup is straightforward:
For single-printer warehouses, you can simplify this by setting up a warehouse-wide rule instead of per-user rules. This means all created consignments will print to the same printer regardless of which user finalizes them.
How can I get the carrier consignment id after creating a pending consignment? You will not be able to get the carrier consignment id until the pending has been turned into a consignment.
Once there, you can use:
All of these endpoints will return the carrier consignment id.