MachShip provides comprehensive tracking capabilities through our RESTful API, allowing you to:
This guide explains how to effectively use these features in your integration.
MachShip offers several endpoints for retrieving consignment information, each suited for different use cases:
/apiv2/consignments/getConsignment?id=<Integer>
- Query by MachShip consignment ID/apiv2/consignments/getConsignmentByPendingConsignmentId?id=<Integer>
- Query by MachShip pending consignment ID/apiv2/consignments/returnConsignments
- Query by MachShip consignment IDs/apiv2/consignments/returnConsignmentsByCarrierConsignmentId
- Query by carrier consignment numbers/apiv2/consignments/returnConsignmentsByReference1
- Query by Reference 1 field/apiv2/consignments/returnConsignmentsByReference2
- Query by Reference 2 field/apiv2/consignments/returnConsignmentsByPendingConsignmentIds
- Query consignments by their original pending consignment IDs/apiv2/consignments/getRecentlyCreatedOrUpdatedConsignments
- Query all consignments with any status change within a time periodThe recent updates endpoint accepts these parameters:
companyId
(Optional) - Filter by companyfromDateUtc
(Required) - Start of query periodtoDateUtc
(Optional) - End of query periodstartIndex
(Optional) - For pagination, start from this indexretrieveSize
(Optional) - Number of results (40-200, default 40)carrierId
(Optional) - Filter by carrierincludeChildCompanies
(Optional) - Include child company consignmentsExample URL:
GET https://live.machship.com/apiv2/consignments/getRecentlyCreatedOrUpdatedConsignments?companyId=123&fromDateUtc=2023-01-01T00:00:00&toDateUtc=2023-01-02T00:00:00&includeChildCompanies=true
The API response includes a list of consignments and their details:
{
.........
"carrierConsignmentId": "ABC123456",
"status": {
"id": 7,
"name": "Complete",
"description": "Complete"
},
"manifestId": 12365,
"bookedDate": "2014-11-13T00:05:00.000",
"completedDate": "2014-11-18T11:00:00.00",
"completedDateUtc": "2014-11-18T00:00:00.00",
"attachmentCount": 1,
"important": false,
"carrierName": "VT Freight Express",
"statusHistory": [
{
"consignmentId": 12345,
"createdByName": "",
"statusIsPartial": false,
"consignmentTrackingStatus": {
"id": 2,
"name": "Unmanifested",
"description": "Unmanifested"
},
"statusDateLocal": "2014-11-12T17:00:00.000",
"statusDateUtc": null,
"carrierStatus": null,
"carrierStatusDescription": null,
"createdByUserId": 123398,
"statusInformation": null
},
{
"consignmentId": 12345,
"createdByName": "",
"statusIsPartial": false,
"consignmentTrackingStatus": {
"id": 3,
"name": "Manifested",
"description": "Manifested"
},
"statusDateLocal": "2014-11-13T16:00:00.000",
"statusDateUtc": null,
"carrierStatus": null,
"carrierStatusDescription": null,
"createdByUserId": 123398,
"statusInformation": null
},
{
"consignmentId": 12345,
"createdByName": "",
"statusIsPartial": false,
"consignmentTrackingStatus": {
"id": 5,
"name": "In Transit",
"description": "In Transit"
},
"statusDateLocal": "2014-11-17T12:00:00.000",
"statusDateUtc": null,
"carrierStatus": null,
"carrierStatusDescription": null,
"createdByUserId": 123398,
"statusInformation": null
},
{
"consignmentId": 12345,
"createdByName": "",
"statusIsPartial": false,
"consignmentTrackingStatus": {
"id": 7,
"name": "Complete",
"description": "Complete"
},
"statusDateLocal": "2014-11-18T11:00:00.000",
"statusDateUtc": null,
"carrierStatus": null,
"carrierStatusDescription": null,
"createdByUserId": 123398,
"statusInformation": null
}
],
.......
Includes all status events with:
{
"consignmentTotal": {
"sellPricesCleared": false,
"totalSellPrice": 12.86,
"totalBaseSellPrice": 10.62,
"totalTaxSellPrice": 1.17,
"sellFuelLevyPrice": 1.07,
"consignmentRouteSellPrice": 10.62,
"totalSellBeforeTax": 11.68
}
}
{
"totalWeight": 1,
"totalCubic": 0.75,
"totalVolume": 0.003,
"heaviestWeight": 1,
"totalItemCount": 1
}
For instructions on how to obtain a tracking link, view our guide here.
A POD is a file that is uploaded by a carrier once the goods have been delivered. Some carriers will also upload proof of pick up as well.
These files are file attachments linked to the consignment - and there are two options for retrieval:
We suggest you try downloading both before deciding which POD format to download and use for your integration.
PODs can be retrieved in bulk for multiple consignments, or individually.
The steps for retrieving PODs individually are: 1. Check to see if there is a POD available
Using getConsignment, or another tracking method such as "getRecentlyCreatedOrUpdatedConsignments", confirm the consignment has a status of "COMPLETE" and attachmentCount > 0.
2. List the attachments
POST /apiv2/consignments/getAttachments
BODY
consignmentId = {your consignment id}
This will return a list of attachments on the consignment as follows:
{
"object": [
{
"id": 1212,
"fileName": "CON1232_POD.jpeg",
"dateAdded": "2025-01-20T05:48:37.492Z"
}
],
"errors": [
{
"memberNames": [
"string"
],
"errorMessage": "string",
"validationType": 0
}
]
}
You can filter these as you see fit, then take the id returned for the next endpoint.
3. Retreive the attachments
You can use either of the following endpoints to return your POD:
Use the following endpoint to retrieve POD documents in their raw format for multiple consignments:
GET https://live.machship.com/apiv2/attachments/getAttachmentsByConsignmentIds?ids=<Integer>
For multiple consignments (recommended limit: 10):
GET https://live.machship.com/apiv2/attachments/getAttachmentsByConsignmentIds?ids=<Integer>&ids=<Integer>
The response will be: