Plan and usage

Change the monthly spending cap

PUT
/v1/usage/overage-cap

Only for a live business (409 for a sandbox one). Sets how much, before IVA, the month's live documents above the included ones may cost: a document issues only while the usage amount with it stays within the cap. 0 stops at the included documents, a positive value allows them up to that amount and null removes the cap, which is the usual case. It does not touch documents already issued, which are billed as issued, and you can change it again whenever you like.

Authorization

AuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_sandbox_… issues in sandbox, fb_test_… in test, the tax authority's testing service, and fb_live_… in live.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

overage_cap*|

New monthly cap on the usage amount before IVA. Use 0 to stop at the included documents, or null to remove the cap.

Match^\d{1,8}(?:\.\d{1,2})?$

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X PUT "https://example.com/v1/usage/overage-cap" \  -H "Content-Type: application/json" \  -d '{    "overage_cap": "string"  }'
{  "object": "usage",  "entity_id": "8161163a-f227-466f-bc01-090a01e80165",  "country": "ec",  "currency": "string",  "plan": {    "id": "string",    "name": "string"  },  "issuing": {    "allowed": true,    "lock": {      "code": "plan_required",      "message": "string",      "canceled": true    }  },  "period": {    "start": "2019-08-24",    "end": "2019-08-24",    "timezone": "string"  },  "documents": 0,  "included_documents": 0,  "band": {    "up_to": 0,    "unit_price": "string"  },  "next_band": {    "threshold": 0,    "unit_price": "string"  },  "usage_amount": "string",  "usage_amount_with_iva": "string",  "estimated_total": "string",  "estimated_total_with_iva": "string",  "overage_cap": "string",  "overage_cap_with_iva": "string"}