PT EN

Casos de cobrança

URL base: $BUSINESS_API

O objecto

idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

account_idstring · obrigatório
account_numberstring · opcional

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

account_holder_namestring · opcional

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

total_debt_centsinteger (int64) · obrigatório
currencystring · obrigatório
aging_bucketstring · obrigatório

um de current, 30_days, 60_days, 90_days, 120_days_plus

statusstring · obrigatório

um de open, notice_sent, payment_plan_active, enforcement_requested, resolved, written_off

notesstring · opcional

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

note_entriesarray of CollectionCaseNote · opcional

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

Mostrar atributos filhos
atstring (date-time) · obrigatório
actor_idstring · opcional
codestring · opcional

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 · opcional

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

textstring · obrigatório

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

dunning_levelinteger · obrigatório
dunning_statusstring · opcional

um de in_notice, cutoff_pending, disconnected, settled

connection_idstring · opcional
connection_holder_namestring · opcional

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

cutoff_order_idstring · opcional
reconnect_order_idstring · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
O objecto
{
  "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"
}

Listar casos de cobrança

Registos

GET /cases

Returns a cursor-paginated list of the tenant's debt collection cases. Results can be narrowed by customer_id, account_id, status and aging_bucket, and search also matches accounts by holder name; page with limit (default 20, max 100) and the after cursor from the previous page. Requires collections:read.

Parâmetros

limitinteger · consulta · opcional

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

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

Devolve

200 Collection cases

Mostrar atributos
dataarray of CollectionCase · obrigatório
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

account_idstring · obrigatório
account_numberstring · opcional

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

account_holder_namestring · opcional

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

total_debt_centsinteger (int64) · obrigatório
currencystring · obrigatório
aging_bucketstring · obrigatório

um de current, 30_days, 60_days, 90_days, 120_days_plus

statusstring · obrigatório

um de open, notice_sent, payment_plan_active, enforcement_requested, resolved, written_off

notesstring · opcional

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

note_entriesarray of CollectionCaseNote · opcional

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

Mostrar atributos filhos
atstring (date-time) · obrigatório
actor_idstring · opcional
codestring · opcional

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 · opcional

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

textstring · obrigatório

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

dunning_levelinteger · obrigatório
dunning_statusstring · opcional

um de in_notice, cutoff_pending, disconnected, settled

connection_idstring · opcional
connection_holder_namestring · opcional

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

cutoff_order_idstring · opcional
reconnect_order_idstring · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
has_moreboolean · obrigatório
next_cursorstring · opcional
total_countinteger · opcional

Permissões collections:read · Funções: admin, analyst, billing_clerk, customer_service, finance, owner, viewer

curl -X GET "$BUSINESS_API/cases" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "data": [
    {
      "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"
    }
  ],
  "has_more": true,
  "next_cursor": "next cursor",
  "total_count": 125000
}

Abrir um caso de cobrança

Registos

POST /cases

Opens a collection case for an account's overdue debt in open status and returns it with 201. customer_id, account_id and a positive total_debt_cents are required; aging_bucket defaults to the 30-day bucket and currency to the tenant currency. Any notes are kept on the case, and the opening is recorded in the case's status history. Requires collections:write.

Corpo application/json

customer_idstring · obrigatório
account_idstring · obrigatório
total_debt_centsinteger (int64) · obrigatório
currencystring · obrigatório
aging_bucketstring · obrigatório

um de current, 30_days, 60_days, 90_days, 120_days_plus

notesstring · opcional

Devolve

201 Collection case opened

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

account_idstring · obrigatório
account_numberstring · opcional

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

account_holder_namestring · opcional

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

total_debt_centsinteger (int64) · obrigatório
currencystring · obrigatório
aging_bucketstring · obrigatório

um de current, 30_days, 60_days, 90_days, 120_days_plus

statusstring · obrigatório

um de open, notice_sent, payment_plan_active, enforcement_requested, resolved, written_off

notesstring · opcional

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

note_entriesarray of CollectionCaseNote · opcional

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

Mostrar atributos filhos
atstring (date-time) · obrigatório
actor_idstring · opcional
codestring · opcional

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 · opcional

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

textstring · obrigatório

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

dunning_levelinteger · obrigatório
dunning_statusstring · opcional

um de in_notice, cutoff_pending, disconnected, settled

connection_idstring · opcional
connection_holder_namestring · opcional

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

cutoff_order_idstring · opcional
reconnect_order_idstring · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Permissões collections:write · Funções: admin, finance, owner

curl -X POST "$BUSINESS_API/cases" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "customer_id": "cus_2UuXtOGTHWKlvkoF5so5Joi3Hck",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "total_debt_cents": 125000,
  "currency": "MZN",
  "aging_bucket": "current",
  "notes": "Leitura confirmada no local."
}'
Resposta 201
{
  "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"
}

Obter um caso de cobrança

Registos

GET /cases/{id}

Returns one collection case with its debt, currency, aging bucket, status, dunning status and level, linked cutoff order and notes. Returns 404 when the case is not in this tenant. Requires collections:read.

Parâmetros

idstring · caminho · obrigatório

Id of the collection case (prefix col).

Devolve

200 Collection case details

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

account_idstring · obrigatório
account_numberstring · opcional

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

account_holder_namestring · opcional

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

total_debt_centsinteger (int64) · obrigatório
currencystring · obrigatório
aging_bucketstring · obrigatório

um de current, 30_days, 60_days, 90_days, 120_days_plus

statusstring · obrigatório

um de open, notice_sent, payment_plan_active, enforcement_requested, resolved, written_off

notesstring · opcional

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

note_entriesarray of CollectionCaseNote · opcional

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

Mostrar atributos filhos
atstring (date-time) · obrigatório
actor_idstring · opcional
codestring · opcional

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 · opcional

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

textstring · obrigatório

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

dunning_levelinteger · obrigatório
dunning_statusstring · opcional

um de in_notice, cutoff_pending, disconnected, settled

connection_idstring · opcional
connection_holder_namestring · opcional

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

cutoff_order_idstring · opcional
reconnect_order_idstring · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Permissões collections:read · Funções: admin, analyst, billing_clerk, customer_service, finance, owner, viewer

curl -X GET "$BUSINESS_API/cases/{id}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 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"
}

Emitir um aviso de corte

Registos

POST /cases/{id}/notice

Records a disconnection notice for the case and returns it with 201, moving the case to notice_sent and its dunning status to in-notice. The cutoff date is today plus cutoff_days (default 14) and delivery defaults to text message; the dunning level rises to final warning when final_warning is true or the case already has two or more notices. A resolved or written-off case returns 409. Requires collections:write.

Parâmetros

idstring · caminho · obrigatório

Id of the collection case the notice is issued for (prefix col).

Corpo application/json

cutoff_daysinteger · opcional · predefinição 14
delivered_viastring · opcional

um de email, physical

final_warningboolean · opcional · predefinição false

Devolve

201 Disconnection notice issued

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
case_idstring · obrigatório
account_idstring · obrigatório
account_numberstring · opcional

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

account_holder_namestring · opcional

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

notice_datestring (date-time) · obrigatório
cutoff_datestring (date-time) · obrigatório
delivered_viastring · obrigatório

um de email, physical

statusstring · obrigatório

um de issued, delivered, resolved

created_atstring (date-time) · obrigatório

Permissões collections:write · Funções: admin, finance, owner

curl -X POST "$BUSINESS_API/cases/{id}/notice" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "cutoff_days": 14,
  "delivered_via": "email",
  "final_warning": false
}'
Resposta 201
{
  "id": "dis_23fwYdzS2hXmAzTIwZj8CFVqOtJ",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "case_id": "cas_2gmnNK0lRMC9tOMtZsWDhKGHpGe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "notice_date": "2026-11-19T09:30:00Z",
  "cutoff_date": "2026-11-19T09:30:00Z",
  "delivered_via": "email",
  "status": "issued",
  "created_at": "2026-11-19T09:30:00Z"
}

Listar avisos de um caso de cobrança

Registos

GET /cases/{id}/notices

Returns every disconnection notice issued for the case, in a data array without pagination, each with its notice and cutoff dates, delivery channel and status. Use the notice PDF endpoint to render one for printing or sending.

Parâmetros

idstring · caminho · obrigatório

Id of the collection case whose notices are listed (prefix col).

Devolve

200 Notices issued for the collection case

Mostrar atributos
dataarray of DisconnectionNotice · obrigatório
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
case_idstring · obrigatório
account_idstring · obrigatório
account_numberstring · opcional

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

account_holder_namestring · opcional

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

notice_datestring (date-time) · obrigatório
cutoff_datestring (date-time) · obrigatório
delivered_viastring · obrigatório

um de email, physical

statusstring · obrigatório

um de issued, delivered, resolved

created_atstring (date-time) · obrigatório

Permissões collections:read · Funções: admin, analyst, billing_clerk, customer_service, finance, owner, viewer

curl -X GET "$BUSINESS_API/cases/{id}/notices" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "data": [
    {
      "id": "dis_23fwYdzS2hXmAzTIwZj8CFVqOtJ",
      "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
      "case_id": "cas_2gmnNK0lRMC9tOMtZsWDhKGHpGe",
      "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
      "account_number": "ACC-2026-000142",
      "account_holder_name": "Ana Matsinhe",
      "notice_date": "2026-11-19T09:30:00Z",
      "cutoff_date": "2026-11-19T09:30:00Z",
      "delivered_via": "email",
      "status": "issued",
      "created_at": "2026-11-19T09:30:00Z"
    }
  ]
}

Resolver um caso de cobrança

Registos

POST /cases/{id}/resolve

Marks the case resolved, for example once the debt is paid or settled, and moves an active dunning status to settled. The optional reason is stored as a case note and in the case's status history. A written-off case cannot be resolved and returns 409, and resolving a case that is already resolved changes nothing. Requires collections:write.

Parâmetros

idstring · caminho · obrigatório

Id of the collection case to resolve (prefix col).

Corpo application/json

reasonstring · opcional

Devolve

200 Resolved collection case

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

account_idstring · obrigatório
account_numberstring · opcional

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

account_holder_namestring · opcional

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

total_debt_centsinteger (int64) · obrigatório
currencystring · obrigatório
aging_bucketstring · obrigatório

um de current, 30_days, 60_days, 90_days, 120_days_plus

statusstring · obrigatório

um de open, notice_sent, payment_plan_active, enforcement_requested, resolved, written_off

notesstring · opcional

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

note_entriesarray of CollectionCaseNote · opcional

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

Mostrar atributos filhos
atstring (date-time) · obrigatório
actor_idstring · opcional
codestring · opcional

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 · opcional

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

textstring · obrigatório

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

dunning_levelinteger · obrigatório
dunning_statusstring · opcional

um de in_notice, cutoff_pending, disconnected, settled

connection_idstring · opcional
connection_holder_namestring · opcional

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

cutoff_order_idstring · opcional
reconnect_order_idstring · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Permissões collections:write · Funções: admin, finance, owner

curl -X POST "$BUSINESS_API/cases/{id}/resolve" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Leitura confirmada no local."
}'
Resposta 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"
}

Pedir a execução de um caso de cobrança

Registos

POST /cases/{id}/enforce

Moves the case to enforcement_requested, the step before disconnection, and stores the optional reason as a case note. The change is recorded in the case's status history; a case that is already in this status is returned unchanged. A written-off case cannot move and returns 409. Requires collections:write.

Parâmetros

idstring · caminho · obrigatório

Id of the collection case (prefix col).

Corpo application/json

reasonstring · opcional

Devolve

200 Enforcement request recorded

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
customer_idstring · obrigatório
customer_namestring · opcional

Display name of the referenced customer. Omitted when unknown.

account_idstring · obrigatório
account_numberstring · opcional

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

account_holder_namestring · opcional

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

total_debt_centsinteger (int64) · obrigatório
currencystring · obrigatório
aging_bucketstring · obrigatório

um de current, 30_days, 60_days, 90_days, 120_days_plus

statusstring · obrigatório

um de open, notice_sent, payment_plan_active, enforcement_requested, resolved, written_off

notesstring · opcional

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

note_entriesarray of CollectionCaseNote · opcional

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

Mostrar atributos filhos
atstring (date-time) · obrigatório
actor_idstring · opcional
codestring · opcional

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 · opcional

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

textstring · obrigatório

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

dunning_levelinteger · obrigatório
dunning_statusstring · opcional

um de in_notice, cutoff_pending, disconnected, settled

connection_idstring · opcional
connection_holder_namestring · opcional

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

cutoff_order_idstring · opcional
reconnect_order_idstring · opcional
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Permissões collections:write · Funções: admin, finance, owner

curl -X POST "$BUSINESS_API/cases/{id}/enforce" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Leitura confirmada no local."
}'
Resposta 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"
}

Descarregar um aviso em PDF

Registos

GET /cases/{id}/notices/{noticeId}/pdf

Renders a disconnection notice as a PDF, served inline, with the issuer, the customer and account, the debt, the cutoff date, the delivery channel and the account's open invoices. The notice must belong to the given case and the case to the caller's tenant, otherwise 404. Language follows the request locale, and the layout parameter picks A4 or a narrow mobile page.

Parâmetros

idstring · caminho · obrigatório

Case id

noticeIdstring · caminho · obrigatório

Notice id

layoutstring · consulta · opcional · predefinição a4

Page format. mobile is one narrow column sized to its content, for reading on a phone. An unknown value renders A4.

um de a4, mobile

Devolve

200 PDF document

Erros 403 · 404

Permissões collections:read · Funções: admin, analyst, billing_clerk, customer_service, finance, owner, viewer

curl -X GET "$BUSINESS_API/cases/{id}/notices/{noticeId}/pdf" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

PDF document