Appearance
Promises to pay
Generated from
DialerDigital/corecommit0fc18008b3c8— specopenapi/dialer-v1.yamlv0.134.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)
http
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).
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
| 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 |
json
{
"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).
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"
}
}