Cash on delivery

Read cash-on-delivery order confirmations and their results.

GET
/api/v1/agents/{id}/cod-confirmations

List cash-on-delivery order confirmations, newest first, paged with limit/offset and filterable by status and an inclusive startDate/endDate range (YYYY-MM-DD). Buyer phone numbers are never returned. Requires the read:cod permission.

Authorization

BearerAuth read:cod
AuthorizationBearer <token>

In: header

Scope: read:cod

Path Parameters

id*string

Query Parameters

limit?integer
offset?integer
status?string
startDate?string
endDate?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/agents/string/cod-confirmations"
{
  "items": [
    {
      "id": "c7f1a2b3-4d5e-6f70-8192-a3b4c5d6e7f8",
      "agentId": "a1b2c3d4e5",
      "orderNumber": "#1042",
      "orderId": "gid://shopify/Order/5544332211",
      "status": "confirmed",
      "suppressedReason": null,
      "currency": "PKR",
      "orderTotal": "2499.00",
      "changeRequest": null,
      "remindersSent": 1,
      "orderPlacedAt": "2026-08-15T10:00:00.000Z",
      "firstContactedAt": "2026-08-15T10:00:12.000Z",
      "decidedAt": "2026-08-15T10:41:03.000Z",
      "createdAt": "2026-08-15T10:00:05.000Z"
    }
  ],
  "total": 0,
  "limit": 0,
  "offset": 0
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
GET
/api/v1/agents/{id}/cod-confirmations/metrics

Outcome counts, the estimated shipping cost avoided, a daily trend, and why any confirmations never reached a customer. Defaults to the trailing 30 days. shippingSaved.estimatedMinor is null when the store has not supplied an average shipping cost — treat that as unknown, not zero. Requires the read:cod permission.

Authorization

BearerAuth read:cod
AuthorizationBearer <token>

In: header

Scope: read:cod

Path Parameters

id*string

Query Parameters

startDate?string
endDate?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/agents/string/cod-confirmations/metrics"
{
  "agentId": "string",
  "range": {
    "startDate": "string",
    "endDate": "string"
  },
  "summary": {
    "total": 0,
    "confirmed": 0,
    "cancelled": 0,
    "awaiting": 0,
    "changeRequested": 0,
    "expired": 0,
    "suppressed": 0,
    "confirmationRate": 0
  },
  "shippingSaved": {
    "estimatedMinor": 0,
    "cancelledBeforeShipping": 0,
    "averageShippingCostMinor": 0,
    "currency": "string"
  },
  "series": [
    {
      "date": "string",
      "confirmed": 0,
      "cancelled": 0,
      "awaiting": 0
    }
  ],
  "suppressionReasons": [
    {
      "reason": "string",
      "count": 0
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
GET
/api/v1/agents/{id}/cod-confirmations/{confirmationId}

Read one cash-on-delivery confirmation: its order reference, state, decision time, and any requested change. Buyer phone numbers are never returned. Requires the read:cod permission.

Authorization

BearerAuth read:cod
AuthorizationBearer <token>

In: header

Scope: read:cod

Path Parameters

id*string
confirmationId*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/agents/string/cod-confirmations/string"
{
  "id": "c7f1a2b3-4d5e-6f70-8192-a3b4c5d6e7f8",
  "agentId": "a1b2c3d4e5",
  "orderNumber": "#1042",
  "orderId": "gid://shopify/Order/5544332211",
  "status": "confirmed",
  "suppressedReason": null,
  "currency": "PKR",
  "orderTotal": "2499.00",
  "changeRequest": null,
  "remindersSent": 1,
  "orderPlacedAt": "2026-08-15T10:00:00.000Z",
  "firstContactedAt": "2026-08-15T10:00:12.000Z",
  "decidedAt": "2026-08-15T10:41:03.000Z",
  "createdAt": "2026-08-15T10:00:05.000Z"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}