Referência / Quadra Command API
Limits
4 operações em Quadra Command API 0.2.0.
/v1/accounts/{account_id}/limitsCreate a Per-Account Limit Policy
Create an ACCOUNT-scope velocity/limit policy (WARN or REJECT) enforced on the account's monetary writes. GL and faucet accounts are exempt.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| account_id | string | pathobrigatório |
| Idempotency-Key | string | headerobrigatório |
Corpo da requisição
CreateAccountLimitPolicyRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 201 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/accounts/{account_id}/pix-limitsSet Self-Service Pix Limits
Adjust the account's Pix limits within the pack ceilings (LaaS-07 D7/D8). Decreases apply immediately; increases (and the 20:00→22:00 night start) take effect only after the mandated 24–48 h delay, reported per knob as ``pending {value, activates_at}``. Above a ceiling → 422 LIMIT_CEILING_EXCEEDED (operator path).
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| account_id | string | pathobrigatório |
| Idempotency-Key | string | headerobrigatório |
Corpo da requisição
PutPixLimitsRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/limit-policiesCreate a Shared-Scope Limit Policy
Create a GLOBAL / ACCOUNT_TYPE / RAIL / PRODUCT limit policy.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| Idempotency-Key | string | headerobrigatório |
Corpo da requisição
CreateLimitPolicyRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 201 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/limit-policies/{policy_id}Disable a Limit Policy
Soft-disable (``enabled=false``). Policy rows are never deleted — an auditor may need them. Idempotent: re-disabling returns 200.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| policy_id | string | pathobrigatório |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
Esquemas
Os modelos que as operações acima aceitam e devolvem. Campos opcionais estão marcados como tal; um campo tipado como outro modelo está documentado sob o nome dele.
ActiveBetweenModel
| Campo | Tipo | Detalhe |
|---|---|---|
| end | string | obrigatórioSão Paulo local 'HH:MM' (exclusive); start > end wraps midnight |
| start | string | obrigatórioSão Paulo local 'HH:MM' (inclusive) |
CreateAccountLimitPolicyRequest
POST /v1/accounts/{account_id}/limits — ACCOUNT-scope policy.
| Campo | Tipo | Detalhe |
|---|---|---|
| action | "WARN" | "REJECT" | obrigatório |
| active_between | ActiveBetweenModel, opcional | Time-of-day applicability (e.g. a nighttime policy); requires window=DAY |
| applies_max_kyc_level | integer, opcional | Applies only when the funnel supplies kyc_level <= this; funnels that don't populate kyc_level skip the policy (fail-open) |
| dimension | "AMOUNT" | "COUNT" | "SINGLE_AMOUNT" | obrigatórioWhat the threshold bounds: summed centavos (AMOUNT), event count (COUNT), or a per-transaction cap — threshold compare only, no counter (SINGLE_AMOUNT) |
| direction | "DEBIT" | "CREDIT" | obrigatório |
| enforce_per | "SCOPE" | "ACCOUNT", opcional | ACCOUNT: this broad-scope policy gates per-account counters (default SCOPE = one shared counter per scope) |
| policy_key | string, opcional | Pack identity (e.g. 'pix.night.amount'): the most-specific scope carrying a key shadows broader ones, and interval counters key on it so overrides inherit mid-window utilization. Unique per scope. |
| rail | string, opcional | Restrict to one rail (QUADRA/ACH/MOCK/PIX); absent = all rails |
| threshold | integer | obrigatórioCentavos for AMOUNT, count for COUNT |
| window | "MINUTE" | "HOUR" | "DAY" | "MONTH" | obrigatórioTumbling calendar window, América/São Paulo boundaries |
CreateLimitPolicyRequest
POST /v1/limit-policies — GLOBAL / ACCOUNT_TYPE / RAIL / PRODUCT scope.
| Campo | Tipo | Detalhe |
|---|---|---|
| action | "WARN" | "REJECT" | obrigatório |
| active_between | ActiveBetweenModel, opcional | Time-of-day applicability (e.g. a nighttime policy); requires window=DAY |
| applies_max_kyc_level | integer, opcional | Applies only when the funnel supplies kyc_level <= this; funnels that don't populate kyc_level skip the policy (fail-open) |
| dimension | "AMOUNT" | "COUNT" | "SINGLE_AMOUNT" | obrigatórioWhat the threshold bounds: summed centavos (AMOUNT), event count (COUNT), or a per-transaction cap — threshold compare only, no counter (SINGLE_AMOUNT) |
| direction | "DEBIT" | "CREDIT" | obrigatório |
| enforce_per | "SCOPE" | "ACCOUNT", opcional | ACCOUNT: this broad-scope policy gates per-account counters (default SCOPE = one shared counter per scope) |
| policy_key | string, opcional | Pack identity (e.g. 'pix.night.amount'): the most-specific scope carrying a key shadows broader ones, and interval counters key on it so overrides inherit mid-window utilization. Unique per scope. |
| rail | string, opcional | Restrict to one rail (QUADRA/ACH/MOCK/PIX); absent = all rails |
| scope_id | string, opcional | Type name / rail family / product id; omitted for GLOBAL |
| scope_type | "GLOBAL" | "ACCOUNT_TYPE" | "RAIL" | "PRODUCT" | obrigatório |
| threshold | integer | obrigatórioCentavos for AMOUNT, count for COUNT |
| window | "MINUTE" | "HOUR" | "DAY" | "MONTH" | obrigatórioTumbling calendar window, América/São Paulo boundaries |
HTTPValidationError
| Campo | Tipo | Detalhe |
|---|---|---|
| detail | array de ValidationError |
PutPixLimitsRequest
| Campo | Tipo | Detalhe |
|---|---|---|
| actor | string, opcional | Caller identity (caller-injected until laas-23 authz lands) |
| daily_limit_minor | integer, opcional | Daytime cumulative Pix limit, integer centavos |
| nighttime_limit_minor | integer, opcional | Nighttime cumulative Pix limit, integer centavos |
| nighttime_start | "20:00" | "22:00", opcional | Nighttime window start (Res. BCB 142/2021: 20:00 default, 22:00 opt-in) |
ValidationError
| Campo | Tipo | Detalhe |
|---|---|---|
| ctx | object | |
| input | não declarado | |
| loc | array de string ou integer | obrigatório |
| msg | string | obrigatório |
| type | string | obrigatório |