# Track a shipment

`GET https://api.mothership.com/beta/tracking/{shipmentId}`

Sandbox: `https://sandbox.api.mothership.com/beta/tracking/{shipmentId}`

Lists the tracking events for a shipment.

Each result is one tracking event. `proNumber` appears once a carrier is assigned, and `city` and `state` when the carrier reports a location. See [Getting tracking information](https://developers.mothership.com/docs/tracking-request) for when to check for updates.

## Authorization

Send your API token as a Bearer token: `Authorization: Bearer <token>`.

## Path parameters

- `shipmentId` (string, required): ID of the shipment to track.

## Responses

### 200

Tracking events, in an array named `results`.

- `data` (object, optional)
  - `results` (array of objects, required)
    - `eventType` (string, required): Type of tracking event.
    - `shipmentReferenceNumber` (string, required): Reference number that identifies the shipment.
    - `timestamp` (string, required): When the tracking event took place, as an ISO 8601 string.
    - `city` (string, optional): City the shipment is in.
    - `state` (string, optional): State the shipment is in.
    - `deliveryLocationName` (string, optional): Name of the location the shipment is being delivered to, when one is recorded.
    - `pickupLocationName` (string, optional): Name of the location the shipment is being picked up from, when one is recorded.
    - `proNumber` (string, optional): Pro number for the shipment, if one is available from the provider.
    - `status` (string, optional): New status of the shipment, or a description of how the shipment is progressing from an integrated carrier.
    - `description` (string, optional): Carrier-supplied description of the shipment's progress, when the integrated carrier provides one.
    - `timezone` (string, optional): IANA timezone where the event took place, such as America/Los_Angeles. Use it to convert the UTC timestamp to local time.

## Example request

```bash
curl --request GET \
  --url 'https://sandbox.api.mothership.com/beta/tracking/MS5016101' \
  --header "Authorization: Bearer $MOTHERSHIP_API_TOKEN" \
  --header 'Accept: application/json'
```

## Example response (200)

```json
{
  "data": {
    "results": [
      {
        "eventType": "shipmentBooked",
        "shipmentReferenceNumber": "MS5016101",
        "timestamp": "2019-03-19T17:03:24.542Z",
        "status": "Unallocated",
        "description": "Shipment booked and awaiting carrier assignment",
        "timezone": "America/Los_Angeles"
      },
      {
        "eventType": "statusUpdated",
        "shipmentReferenceNumber": "MS5016101",
        "proNumber": "1234567890",
        "timestamp": "2019-03-19T18:12:40.310Z",
        "status": "DriverAllocated",
        "description": "Carrier assigned",
        "timezone": "America/Los_Angeles"
      },
      {
        "eventType": "statusUpdated",
        "shipmentReferenceNumber": "MS5016101",
        "proNumber": "1234567890",
        "timestamp": "2019-03-19T19:31:11.124Z",
        "status": "EnrouteToPickup",
        "description": "Carrier is en route to the pickup location",
        "city": "Los Angeles",
        "state": "CA",
        "pickupLocationName": "Griffith Observatory",
        "timezone": "America/Los_Angeles"
      }
    ]
  }
}
```