Changing Consignment Status Via API


Overview

MachShip provides the ability to manually update consignment statuses through the API. A "manual" status is one that is not triggered from an external carrier's system but rather one that has come to MachShip from its own API, or the interface.

Limitations

There are several important limitations to consider when updating consignment statuses:

  1. Only manifested consignments can be updated, not unmanifested.
  2. Only brokers OR enterprise clients can perform status updates - broker clients and their API keys cannot
  3. Status date/time cannot be in the future (the timezone used is based on the location):
    • For completed statuses, the 'to' location timezone is used
    • For other statuses, the 'from' location timezone is used
  4. Cannot change a consignment back to unmanifested status

Via The API

To update consignment statuses, use the following endpoint:

POST https://live.machship.com/apiv2/consignments/updateConsignmentStatuses

Request Body

{
  "consignmentId": 123456,
  "status": 5,
  "statusDateTimeLocal": "2025-02-18T11:00:00",
  "itemReference": "ITEM001",
  "extraInformation": "Delayed due to weather conditions"
}

Field Descriptions

Field Type Required Description
consignmentId integer Yes The ID of the consignment in MachShip
status integer Yes The tracking status enum value (see status codes below)
statusDateTimeLocal string No The local date/time of the status change (must not be in future)
itemReference string No When present, this tracking status relates to a specific item on the consignment. When absent, it relates to the consignment as a whole
extraInformation string No Additional information about this status - shown in MachShip when viewing the tracking history

Status Codes

Code Status
1 Quote
2 Unmanifested
3 Manifested
4 Booked
5 InTransit
6 Delayed
7 Complete
8 Lost
9 Damaged
10 Cancelled
13 OnForDelivery
14 AddedToMachship
15 PickedUp
16 ScannedIntoDepot
17 DeliveryAttempted
18 SortedForDelivery
19 PartialDelivery
20 DeliveryTimeScheduled
21 Deleted
22 AtDelivery
23 PartialOnForDelivery
24 AtPickup
25 Manifesting
26 TrackingExpired
27 FailedPickup
28 FailedDelivery
29 AwaitingCollection
30 CompleteReturnedToSender