422
Validation error
https://api.quotastack.io/errors/validation-error
One or more fields in your request were missing or wrong. QuotaStack changed nothing.
Why it happened
- You left out the
Idempotency-Keyheader on a POST or a PATCH. QuotaStack wants it on every write. - A required field was missing from the body.
- A field held a value QuotaStack does not take, such as an unknown
source. - You sent two fields that cannot go together, such as
expires_atandduration_seconds.
How to fix it
- Read the
validation_errorsarray in the reply. Each entry names one field. - Fix that field, then send the request again.
- Add the header if the field is
Idempotency-Key. Any string you can make again will do.
Example response 422
{
"type": "https://api.quotastack.io/errors/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "One or more fields failed validation.",
"validation_errors": [
{
"field": "duration_seconds",
"message": "duration_seconds and expires_at are mutually exclusive",
"code": "invalid"
}
]
} Which calls return this
POST /v1/customersPATCH /v1/customers/{id}PATCH /v1/customer-by-external-id/{external_id}POST /v1/customers/{customer_id}/credits/grantPOST /v1/customers/{customer_id}/credits/adjustGET /v1/customers/{customer_id}/overagePOST /v1/customer-by-external-id/{external_id}/credits/grantPOST /v1/customer-by-external-id/{external_id}/credits/adjustGET /v1/customer-by-external-id/{external_id}/overagePOST /v1/entitlements/consumePOST /v1/usagePOST /v1/imports/customersPOST /v1/subscriptionsPOST /v1/subscriptions/{id}/upgradePOST /v1/subscriptions/{id}/downgradePOST /v1/plansPOST /v1/plans/{id}/variants/{vid}/entitlementsPATCH /v1/plans/{id}/variants/{vid}/entitlements/{billable_metric_key}POST /v1/metering-rulesPOST /v1/billable-metricsPATCH /v1/billable-metrics/{key}POST /v1/webhooks/events/{id}/redeliverPOST /v1/webhooks/test
See also
● raw markdown · validation-error.md ↗ — this is exactly what an agent fetches
Loading…