HTTP 400 Invalid billing date range. A billing usage or ledger from/to does not parse or is reversed, or a usage span is longer than the 90-day maximum.
When it happens
A negative monthly spend cap also returns it.
4 operations declare it: GET /api/v1/workspaces/{workspaceId}/billing, GET /api/v1/workspaces/{workspaceId}/billing/ledger, PATCH /api/v1/workspaces/{workspaceId}/billing/spend-controls, and GET /api/v1/workspaces/{workspaceId}/billing/usage.
Response body
{
"type": "https://pubnio.com/docs/problems/invalid-billing-date-range/",
"status": 400,
"title": "Invalid billing date range",
"detail": "Billing query date range must have from <= to and span at most 90 days.",
"code": "invalid_billing_date_range",
"nextAction": "Provide valid YYYY-MM-DD bounds spanning at most 90 days.",
"requestId": "0f8e4c2a-6b1d-4e3f-8a9b-7c6d5e4f3a21"
}| Field | Type | Always present |
|---|---|---|
nextAction |
string | Yes |
Recovery for agents
- Do what
nextActionsays.
Retryable
No: the SDKs mark HTTP 400 not retryable.
Limits
- Match on
typeorcode, not ondetail.