Promises to pay
Generated from
DialerDigital/corecommit6e9f026f0a72— specopenapi/dialer-v1.yamlv0.36.0. Do not edit by hand; see How this reference is built. Download the OpenAPI spec.
Promise-to-pay pipeline.
Endpoints
| Method | Path | Summary |
|---|---|---|
GET | /v1/promises | List promises (PTP pipeline) |
PATCH | /v1/promises/{id} | Resolve a promise |
List promises (PTP pipeline)
GET /v1/promisesParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
debt_id | query | string (uuid) | no | |
status | query | pending · kept · broken · cancelled | no | |
limit | query | integer | no | Page size (default 100, max 1000). |
Responses
200
Promises, newest first.
| Field | Type | Required | Description |
|---|---|---|---|
promises | array of Promise | yes | |
promises[].id | string (uuid) | no | |
promises[].tenant_id | string (uuid) | no | |
promises[].debt_id | string (uuid) | no | |
promises[].call_attempt_id | string (uuid) | null | no | |
promises[].agent_id | string (uuid) | null | no | |
promises[].amount_cents | integer | no | |
promises[].currency | MXN · USD | no | |
promises[].promised_date | string (date) | no | |
promises[].status | pending · kept · broken · cancelled | no | |
promises[].note | string | null | no | |
promises[].created_at | string (date-time) | no | |
promises[].updated_at | string (date-time) | no |
400 — BadRequest
Malformed request (shape/type errors, invalid filters, bad timestamps).
{
"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).
{
"error": {
"code": "unauthorized",
"message": "invalid or revoked API key"
}
}Resolve a promise
PATCH /v1/promises/{id}Status machine is pending → kept|broken|cancelled (terminal): re-transitions → 409 conflict; other strings → 400. Rows are never deleted.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | yes | Resource UUID. Malformed or cross-tenant ids read as 404. |
Request body (JSON, required)
| Field | Type | Required | Description |
|---|---|---|---|
status | kept · broken · cancelled | yes |
{
"status": "kept"
}Responses
200
The resolved promise.
| Field | Type | Required | Description |
|---|---|---|---|
promise | object (Promise) | yes | |
promise.id | string (uuid) | no | |
promise.tenant_id | string (uuid) | no | |
promise.debt_id | string (uuid) | no | |
promise.call_attempt_id | string (uuid) | null | no | |
promise.agent_id | string (uuid) | null | no | |
promise.amount_cents | integer | no | |
promise.currency | MXN · USD | no | |
promise.promised_date | string (date) | no | |
promise.status | pending · kept · broken · cancelled | no | |
promise.note | string | null | no | |
promise.created_at | string (date-time) | no | |
promise.updated_at | string (date-time) | no |
400 — BadRequest
Malformed request (shape/type errors, invalid filters, bad timestamps).
{
"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).
{
"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).
{
"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.
{
"error": {
"code": "conflict",
"message": "invalid state transition"
}
}