> For the complete documentation index, see [llms.txt](https://docs.sendstackhq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sendstackhq.com/delivery-api/status-tracking/track-delivery-status.md).

# Track Delivery Status

## Track Delivery Status

<mark style="color:blue;">`GET`</mark> `{baseUrl}/deliveries/track`

Track the status and get details of a delivery using the batch ID or tracking ID

#### Query Parameters

| Name       | Type   | Description                            |
| ---------- | ------ | -------------------------------------- |
| batchId    | string | The batch ID of the delivery request   |
| trackingId | string | The tracking ID of a specific delivery |

#### Headers

| Name                                          | Type   | Description |
| --------------------------------------------- | ------ | ----------- |
| app\_id<mark style="color:red;">\*</mark>     | String |             |
| app\_secret<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="200 Delivery details retrieved." %}

```json
{
  "status": true,
  "message": "Deliveries successfully retrieved",
  "data": {
    "id": "65fc04820686cd2854e20bf0",
    "trackingUrl": "https://app.sendstack.africa/tracking?batchId=OLN9HI",
    "paymentStatus": "PAID",
    "paymentSource": "self",
    "messageDropAfterPickup": false,
    "batchId": "OLN9HI",
    "initiator": "65fc04750686cd2854e20a92",
    "isSameDayDelivery": false,
    "hasLockerBooking": false,
    "totalAmount": 1500,
    "manager": {
      "id": "65fc04750686cd2854e20a92",
      "name": "Ginger Dibbert",
      "email": "makayla_corwin15@gmail.com"
    },
    "pickup": {
      "address": "8504 Collier Plaza",
      "locationCode": "01",
      "pickupName": "Karen Casper",
      "pickupNumber": "+2348010988866",
      "pickupDate": "2024-03-22T00:00:00.000Z",
      "state": "Lagos",
      "zone": "zone_1",
      "lga": "Location 1",
      "long": 3.345006,
      "lat": 6.602928
    },
    "drops": [
      {
        "id": "65fc07e59d2de436cc08b56a",
        "trips": [],
        "processed": true,
        "customFields": { 
            "pickup": {
                "pickup_house_number": 1
            },
            "drop": {
                "dropoff_house_number": 2
            }
         }
        //...truncated for brevity
      }
    ],
    "createdAt": "2024-03-21T09:57:22.070Z"
  }
}

```

{% endtab %}

{% tab title="400 Invalid batchId or trackingId" %}

```
{
    "status": false,
    "message": "Delivery details not found",
    "data": {}
}
```

{% endtab %}
{% endtabs %}

### Sample Success Data

```
// Sample Request Information
Url: https://sandbox.sendstack.africa/api/v1/deliveries/track?batchId={{batchId}}&trackingId={{trackingId}}
NB: Replace {{batchId}} and {{trackingId}} with their respective string values
Method: GET
Headers: 
 - app_id: "your app_id"
 - app_secret: "your app_secret"
```

```json
//Sample Response Body - 200 OK
{
  "status": true,
  "message": "Deliveries successfully retrieved",
  "data": {
    "id": "65fc04820686cd2854e20bf0",
    "trackingUrl": "https://app.sendstack.africa/tracking?batchId=OLN9HI",
    "paymentStatus": "PAID",
    "paymentSource": "self",
    "messageDropAfterPickup": false,
    "batchId": "OLN9HI",
    "initiator": "65fc04750686cd2854e20a92",
    "isSameDayDelivery": false,
    "hasLockerBooking": false,
    "totalAmount": 1500,
    "manager": {
      "id": "65fc04750686cd2854e20a92",
      "name": "Ginger Dibbert",
      "email": "makayla_corwin15@gmail.com"
    },
    "pickup": {
      "address": "8504 Collier Plaza",
      "locationCode": "01",
      "pickupName": "Karen Casper",
      "pickupNumber": "+2348010988866",
      "pickupDate": "2024-03-22T00:00:00.000Z",
      "state": "Lagos",
      "zone": "zone_1",
      "lga": "Location 1",
      "long": 3.345006,
      "lat": 6.602928
    },
    "drops": [
      {
        "id": "65fc07e59d2de436cc08b56a",
        "trips": [],
        "processed": true,
        //...truncated for brevity
      }
    ],
    "createdAt": "2024-03-21T09:57:22.070Z"
  }
}

```

### Sample Error Data

```
// Sample Request Information
Url: https://sandbox.sendstack.africa/api/v1/deliveries/track?batchId=invalidBatchId&trackingId=invalidTrackingId
Method: GET
Headers: 
 - app_id: "your app_id"
 - app_secret: "your app_secret"
```

```json
//Sample Response Body - 400 Bad Request
{
    "status": false,
    "message": "Invalid batchId or trackingId"
}
```
