Cases

Base URL: $CONSUMER_API

The object

idstring · required
tenant_idstring · required
customer_idstring · required
customer_namestring · optional

Display name of the referenced customer. Omitted when unknown.

account_idstring · required
account_numberstring · optional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · optional

Display name of the customer who holds the referenced account. Omitted when unknown.

total_debt_centsinteger (int64) · required
currencystring · required
aging_bucketstring · required

one of current, 30_days, 60_days, 90_days, 120_days_plus

statusstring · required

one of open, notice_sent, payment_plan_active, enforcement_requested, resolved, written_off

notesstring · optional

The case log rendered as text, one note per line. Kept for older clients and search; prefer note_entries.

note_entriesarray of CollectionCaseNote · optional

The case log as entries, oldest first. A case written before entries existed has its whole notes text as one entry without a code.

Show child attributes
atstring (date-time) · required
actor_idstring · optional
codestring · optional

Stable code of a note the server wrote (collection.case.opened_for_cutoff, collection.case.resolved, collection.case.enforcement_requested, collection.case.reopened_reversal); clients word it and fall back to text. Absent for notes people typed.

paramsobject · optional

Values the code's wording fills in: reason (resolved, enforcement_requested), payment (reopened_reversal).

textstring · required

The note as typed, or the server's wording of code.

dunning_levelinteger · required
dunning_statusstring · optional

one of in_notice, cutoff_pending, disconnected, settled

connection_idstring · optional
connection_holder_namestring · optional

Display name of the customer who holds the referenced connection. Omitted when unknown.

cutoff_order_idstring · optional
reconnect_order_idstring · optional
created_atstring (date-time) · required
updated_atstring (date-time) · required
The object
{
  "id": "col_2Zzko7TconRiwLFAepryspvaAXL",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "total_debt_cents": 125000,
  "currency": "MZN",
  "aging_bucket": "current",
  "status": "open",
  "notes": "Leitura confirmada no local.",
  "note_entries": [
    {
      "at": "2026-11-19T09:30:00Z",
      "actor_id": "act_2HXCuXB4S938w5lomxpoS73e8fr",
      "code": "COD-2026-000142",
      "params": {
        "key": "value"
      },
      "text": "text"
    }
  ],
  "dunning_level": 1,
  "dunning_status": "in_notice",
  "connection_id": "con_2wuJTWy9FOCTPGA3noGbHegbLaU",
  "connection_holder_name": "Ana Matsinhe",
  "cutoff_order_id": "cut_242PpqM5vCQBPkUpDe2pnkSb7MC",
  "reconnect_order_id": "rec_2WinfG4fbWCx7oAXJyqJniKJdW2",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

List collection cases for consumer

Logs

GET /cases

Pages the collection (debt) cases on accounts linked to the caller, across tenants unless X-Tenant-ID selects one. Filter with account_id (which must be one of the caller's accounts) and status; pagination uses limit and after.

Parameters

limitinteger · query · optional

Maximum resources to return (default 20, maximum 100).

afterstring · query · optional

Opaque cursor returned by the previous page.

Returns

200 Collection cases

curl -X GET "$CONSUMER_API/cases" \
  -H "Authorization: Bearer sk_test_..."
Response 200

Collection cases

Get a collection case on one of the caller's accounts

Logs

GET /cases/{id}

Returns one collection (debt) case, with its debt, aging bucket, status, dunning state and notes, when it belongs to an account on which the caller holds the invoice.read account permission. The lookup searches every tenant where the caller holds such an account, unless X-Tenant-ID narrows it to one of them. A case on any other account, in any other tenant, or that does not exist returns 404, so existence never leaks. No staff scope is involved for a consumer caller; the access check is the account membership.

Parameters

idstring · path · required

Id of the collection case (prefix col).

X-Tenant-IDstring · header · optional

Narrow the lookup to one of the caller's tenants; a tenant the caller has no account in finds nothing.

Returns

200 Collection case on one of the caller's accounts

Show attributes
idstring · required
tenant_idstring · required
customer_idstring · required
customer_namestring · optional

Display name of the referenced customer. Omitted when unknown.

account_idstring · required
account_numberstring · optional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · optional

Display name of the customer who holds the referenced account. Omitted when unknown.

total_debt_centsinteger (int64) · required
currencystring · required
aging_bucketstring · required

one of current, 30_days, 60_days, 90_days, 120_days_plus

statusstring · required

one of open, notice_sent, payment_plan_active, enforcement_requested, resolved, written_off

notesstring · optional

The case log rendered as text, one note per line. Kept for older clients and search; prefer note_entries.

note_entriesarray of CollectionCaseNote · optional

The case log as entries, oldest first. A case written before entries existed has its whole notes text as one entry without a code.

Show child attributes
atstring (date-time) · required
actor_idstring · optional
codestring · optional

Stable code of a note the server wrote (collection.case.opened_for_cutoff, collection.case.resolved, collection.case.enforcement_requested, collection.case.reopened_reversal); clients word it and fall back to text. Absent for notes people typed.

paramsobject · optional

Values the code's wording fills in: reason (resolved, enforcement_requested), payment (reopened_reversal).

textstring · required

The note as typed, or the server's wording of code.

dunning_levelinteger · required
dunning_statusstring · optional

one of in_notice, cutoff_pending, disconnected, settled

connection_idstring · optional
connection_holder_namestring · optional

Display name of the customer who holds the referenced connection. Omitted when unknown.

cutoff_order_idstring · optional
reconnect_order_idstring · optional
created_atstring (date-time) · required
updated_atstring (date-time) · required

Errors 401 · 403 · 404

curl -X GET "$CONSUMER_API/cases/{id}" \
  -H "Authorization: Bearer sk_test_..."
Response 200
{
  "id": "col_2Zzko7TconRiwLFAepryspvaAXL",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "customer_name": "Ana Matsinhe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "total_debt_cents": 125000,
  "currency": "MZN",
  "aging_bucket": "current",
  "status": "open",
  "notes": "Leitura confirmada no local.",
  "note_entries": [
    {
      "at": "2026-11-19T09:30:00Z",
      "actor_id": "act_2HXCuXB4S938w5lomxpoS73e8fr",
      "code": "COD-2026-000142",
      "params": {
        "key": "value"
      },
      "text": "text"
    }
  ],
  "dunning_level": 1,
  "dunning_status": "in_notice",
  "connection_id": "con_2wuJTWy9FOCTPGA3noGbHegbLaU",
  "connection_holder_name": "Ana Matsinhe",
  "cutoff_order_id": "cut_242PpqM5vCQBPkUpDe2pnkSb7MC",
  "reconnect_order_id": "rec_2WinfG4fbWCx7oAXJyqJniKJdW2",
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}