Skip to content

Promises to pay ​

Generated from DialerDigital/core commit 0fc18008b3c8 — spec openapi/dialer-v1.yaml v0.134.0. Do not edit by hand; see How this reference is built. Download the OpenAPI spec.

Español

Promise-to-pay pipeline.

Endpoints ​

MethodPathSummary
GET/v1/promisesList promises (PTP pipeline)
PATCH/v1/promises/{id}Resolve a promise

List promises (PTP pipeline) ​

http
GET /v1/promises

Parameters

NameInTypeRequiredDescription
debt_idquerystring (uuid)no
statusquerypending · kept · broken · cancelledno
limitqueryintegernoPage size (default 100, max 1000).

Responses

200 ​

Promises, newest first.

FieldTypeRequiredDescription
promisesarray of Promiseyes
promises[].idstring (uuid)no
promises[].tenant_idstring (uuid)no
promises[].debt_idstring (uuid)no
promises[].call_attempt_idstring (uuid) | nullno
promises[].agent_idstring (uuid) | nullno
promises[].amount_centsintegerno
promises[].currencyMXN · USDno
promises[].promised_datestring (date)no
promises[].statuspending · kept · broken · cancelledno
promises[].notestring | nullno
promises[].created_atstring (date-time)no
promises[].updated_atstring (date-time)no

400 — BadRequest ​

Malformed request (shape/type errors, invalid filters, bad timestamps).

json
{
  "error": {
    "code": "bad_request",
    "message": "from must be RFC-3339"
  }
}

401 — Unauthorized ​

Missing, unknown or revoked API key (or, on /v1/admin/*, a bad/unset admin token; on webhooks, a bad/missing signature). A dashboard session (ddu_) that a newer login of the same person ended answers the code session_superseded instead (tenant flag single_session_enforced), so the screen can say why it was signed out; a logout, an expired or an unknown token stay unauthorized.

json
{
  "error": {
    "code": "unauthorized",
    "message": "invalid or revoked API key"
  }
}

429 — ApiKeyRateLimited ​

This API key is over its request quota, or the tenant's keys together are over the tenant ceiling (core#2503) (code rate_limited). The request was not processed. Wait Retry-After seconds and retry; a refusal is not counted against the budget, so that wait is always enough. Bounded per API key and, above the keys, per tenant (api_tenant_requests_per_minute): a sibling key is unaffected until the tenant's keys together reach that ceiling. The quota applies to every operation reachable with a dd_ key, so the operations that name a more specific 429 (call control, dispositions, SMS, …) can ALSO answer this one with its X-RateLimit-* headers.

json
{
  "error": {
    "code": "rate_limited",
    "message": "API key request quota exceeded; retry after the interval in Retry-After"
  }
}

Resolve a promise ​

http
PATCH /v1/promises/{id}

Status machine is pending → kept|broken|cancelled (terminal): re-transitions → 409 conflict; other strings → 400. Rows are never deleted.

Parameters

NameInTypeRequiredDescription
idpathstring (uuid)yesResource UUID. Malformed or cross-tenant ids read as 404.

Request body (JSON, required)

FieldTypeRequiredDescription
statuskept · broken · cancelledyes
json
{
  "status": "kept"
}

Responses

200 ​

The resolved promise.

FieldTypeRequiredDescription
promiseobject (Promise)yes
promise.idstring (uuid)no
promise.tenant_idstring (uuid)no
promise.debt_idstring (uuid)no
promise.call_attempt_idstring (uuid) | nullno
promise.agent_idstring (uuid) | nullno
promise.amount_centsintegerno
promise.currencyMXN · USDno
promise.promised_datestring (date)no
promise.statuspending · kept · broken · cancelledno
promise.notestring | nullno
promise.created_atstring (date-time)no
promise.updated_atstring (date-time)no

400 — BadRequest ​

Malformed request (shape/type errors, invalid filters, bad timestamps).

json
{
  "error": {
    "code": "bad_request",
    "message": "from must be RFC-3339"
  }
}

401 — Unauthorized ​

Missing, unknown or revoked API key (or, on /v1/admin/*, a bad/unset admin token; on webhooks, a bad/missing signature). A dashboard session (ddu_) that a newer login of the same person ended answers the code session_superseded instead (tenant flag single_session_enforced), so the screen can say why it was signed out; a logout, an expired or an unknown token stay unauthorized.

json
{
  "error": {
    "code": "unauthorized",
    "message": "invalid or revoked API key"
  }
}

404 — NotFound ​

Unknown id, malformed (non-UUID) id OR another tenant's id — RLS returns zero rows, so all three are indistinguishable by design (no existence leak, never a 403 for foreign ids).

json
{
  "error": {
    "code": "not_found",
    "message": "resource not found for this tenant"
  }
}

409 — Conflict ​

Invalid state transition, uniqueness conflict, or a seat that is busy/reserved.

json
{
  "error": {
    "code": "conflict",
    "message": "invalid state transition"
  }
}

429 — ApiKeyRateLimited ​

This API key is over its request quota, or the tenant's keys together are over the tenant ceiling (core#2503) (code rate_limited). The request was not processed. Wait Retry-After seconds and retry; a refusal is not counted against the budget, so that wait is always enough. Bounded per API key and, above the keys, per tenant (api_tenant_requests_per_minute): a sibling key is unaffected until the tenant's keys together reach that ceiling. The quota applies to every operation reachable with a dd_ key, so the operations that name a more specific 429 (call control, dispositions, SMS, …) can ALSO answer this one with its X-RateLimit-* headers.

json
{
  "error": {
    "code": "rate_limited",
    "message": "API key request quota exceeded; retry after the interval in Retry-After"
  }
}

Nothing in these docs is legal advice — always confirm compliance posture with your own counsel.