Tracking API

Inbound endpoint for attaching a tracking number to an order

POST /api/tracking

Endpoint

POST http://localhost:3000/api/tracking

Matches an order by SalesOrderNumber or DespatchNumber and attaches the supplied tracking number to its parcel. The tracking number then appears on the order. Accepts either of two body shapes.

The order must already be Despatched — tracking can't be added to an order that hasn't shipped (returns 207 with a "not despatched" message).

A · Simple shape

{
  "salesOrderNumber": "EXP-001001",
  "trackingNumber": "JD0002270000123GB",
  "carrier": "Royal Mail"
}

carrier is optional. Only salesOrderNumber and trackingNumber are required.

B · Shipster shape

Modelled on OddWare.Core Vardells TrackingUpdate.

{
  "Order": [
    {
      "OrderNumber": "EXP-001001",
      "CarrierName": "Royal Mail",
      "Packages": {
        "DespatchPackage": [
          { "PackageNumber": "1", "TrackingNumber": "JD0002270000123GB" }
        ]
      }
    }
  ]
}

curl

curl -X POST http://localhost:3000/api/tracking \
  -H "Content-Type: application/json" \
  -d '{"salesOrderNumber":"EXP-001001","trackingNumber":"JD0002270000123GB"}'

Try it

Edit the JSON and send it to the live endpoint to attach a tracking number.