Fetchply Docs

Cash-on-delivery metrics

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

Outcome counts, upsell revenue per currency, 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
  },
  "upsellRevenue": [
    {
      "currency": "string",
      "upsellRevenueMinor": 0,
      "upsellCount": 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"
    }
  ]
}