Skip to main content
Apocor responses are predictable. Resource endpoints wrap their payload in a data envelope; authentication endpoints return the token object directly; errors use an error envelope.

Single resource

{
  "data": {
    "id": "card_abc123",
    "status": "ACTIVE",
    "lastFour": "4242"
  }
}

Collection

Lists return an array under data.
{
  "data": [
    { "id": "card_abc123", "status": "ACTIVE" },
    { "id": "card_def456", "status": "FROZEN" }
  ]
}

Token (authentication)

POST /v1/oauth/token and the login endpoints return the token object without a data wrapper:
{ "access_token": "eyJ…", "token_type": "Bearer", "expires_in": 3600 }

Empty

Some actions (e.g. revoking an API key) return 204 No Content with an empty body.

Error

{ "error": { "code": "NOT_FOUND", "message": "Card not found" } }
See Error codes for the full list and HTTP status mapping.

Amounts & timestamps

Monetary amounts are integers in minor units (cents). Timestamps are ISO 8601 strings in UTC.