Skip to content

Promises to pay

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

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).

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

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).

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"
  }
}

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