How a Carrier can connect to the MachShip API for Tracking, PODs and Lat - Longs

How a Carrier can connect to the MachShip API for Tracking, PODs and Lat - Longs

If a carrier wishes to integrate their system into MachShip to allow them to send through tracking updates via API please follow the below steps:

1. Authentication

Authentication with the carrier tracking API keys is via an api token provided by the MachShip support team. They can be contacted at carriers@support.machship.com where you would request a carrier tracking api token. 

This token is then provided as a header to any request with the key api-token

2. Status Tracking

Status events and updates are made via a POST call to the below endpoint

  1. [
      {
        "TrackingStatusCode": "InTransit",
        "TrackingStatusName": "In Transit",
        "TrackingTimeLocal": "2019-11-20T08:30:00",
        "NewCarrierConsignmentReference": "optional",
        "NewEtaLocal": "2019-11-20T12:30:00", /* optional */
        "NewEtaUtc": "2019-11-20T02:30:00", /* optional */
        "NewDespatchLocal": "2019-11-20T12:30:00", /* optional */
        "NewDespatchUtc": "2019-11-20T02:30:00", /* optional */
        "ConsignmentId": 3123456, /* optional */
        "MachshipConsignmentId": "3123456", /* optional */
        "CarrierConsignmentReference": "CON12345"
      },
      {
        "TrackingStatusCode": "Complete",
        "TrackingStatusName": "Completed",
        "TrackingTimeLocal": "2019-11-20T11:30:00",
        "CarrierConsignmentReference": "CON12345"
      }
    ]

Required fields are:
TrackingStatusCode -  This will be the short hand code you use to indicate that state - if there is not shorthand code then please just send it as the status name itself - i.e S.I.D could be a code for Scanned Into Depot
TrackingStatusName -  This will be the string name of the status itself - i.e Scanned into Depot
TrackingTimeLocal  - This will be the date time of the status update in local time
CarrierConsignmentReference -  Also known as consignment number - will be your reference number for this consignment

Optional Fields are:
NewCarrierConsignmentReference - If the consignment number has been changed, you can update this via sending through the request with the new consignment number. Note that this will require the Consignmentid or MachShipConsignmentid to be provided

NewEtaLocal - If the ETA of the consignment has changed and you need to advise the client you can pass through the new date and time 
NewEtaUtc -  If the ETA of the consignment has changed and you need to advise the client you can pass through the new date and time in UTC format. 
NewDespatchLocal -  if the despatch time for the consignment has changed pass through the date time of the new Despatch here. This would be in local timezone. 
NewDespatchUtc -  If the despatch time for the consignment has changed pass through the date time here in UTC timezone
ConsignmentId -  This internal MachShip Id of the consignment
MachshipConsignmentId - The internal MachShip reference for the consignment - also referred to as the MS number

3. Attachment Tracking
Status events and updates are made via a POST call to the below endpoint

  1. [
  2.   {
  3.     "AttachmentBytes": "VGhpcyBpcyBhIHRlc3QgZmlsZQ==",
  4.     "Filename": "CON12345.POD.txt",
  5.     "MachshipConsignmentId": "3987654", /* optional */
  6.     "CarrierConsignmentReference": "CON12345"
  7.   },
  8.   {
  9.     "AttachmentBytes": "VGhpcyBpcyBhIHRlc3QgZmlsZQ==",
  10.     "Filename": "CON45678.POD.pdf",
  11.     "MachshipConsignmentId": "3123456", /* optional */
  12.     "CarrierConsignmentReference": "CON45678"
  13.   },
Fields

AttachmentBytes - This would be the Base64 encoded file for the attachment
Filename - file name for the base64 encoded file above. Note that the file extension will tell MachShip how to decode the encoded image above
MachshipConsignmentId - MachShip consignment id 
CarrierConsignmentReference - Also known as consignment number - will be your reference number for this consignment

4. GPS Tracking

  1. [
     {
            "latitude": 0.00001,
            "longitude": 0.00001,
            "trackingDateTimeLocal": "2037-07-20T00:00:00",
            "MachshipConsignmentId":    "50847756",
             "CarrierConsignmentReference": "CON45678"
     }
    ]

Fields

latitude- Latitude of the vehicle
longitude- Longitude of the vehicle
trackingDateTimeLocal - The date time of the gps co-ordinate

MachshipConsignmentId - MachShip consignment id 
CarrierConsignmentReference - Also known as consignment number - will be your reference number for this consignment
    • Related Articles

    • How to create a Carrier Account with Tas Connect Logistics

      When looking to set up a new account with Tas Connect Logistics, you will need to contact your account manager and advise them that you are looking to despatch your account through MachShip. Please cc integrations@machship.com in your email. Your ...
    • How to create a Carrier Account with Allied Express (API)

      When looking to set up a new account with Allied Express you will need to contact their IT department and advise them that you are looking to despatch your account through MachShip. This team can be contacted at ...
    • How to create a Carrier Account

      A Carrier Account in MachShip stores the specific settings that exist to connect your company to a carrier. This includes the fuel levy, rates as well as any IT related information such as tracking usernames and passwords, booking usernames and ...
    • How to create a Carrier Account with Couriers Please

      When looking to set up a new account with Couriers Please you will need to contact their IT department and advise them that you are looking to despatch your account through MachShip. This team can be contacted at connect@couriersplease.com.au. Please ...
    • How to Create a Carrier Account with Symes Transport

      When looking to set up a new account with Symes Transport you will need to contact your Account Manager and advise that you are looking to despatch your account through MachShip. Please cc integrations@machship.com in your email. Your email should be ...