Skip to navigation

End customer-unit cap

Ends the cap on this customer unit for one credits currency by setting effectiveUntil to now on every open version — the one in force, older overlapping versions still open, and versions scheduled to start later — so nothing can resurface or activate afterwards; nothing is deleted and history is kept. Select the currency with creditsCurrencyId; it may be omitted only when the organization has exactly one credits currency. 404 when the customer or the unit does not exist, or there is no open version for that currency. Use the value returned as customer.id, for example cus_abc123; if you have your own customer ID, use the /api/v2/customers/external/{externalId}/… twin.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Path parameters

idstringRequiredformat: "^cus_.+"
Paid customer display id
externalCustomerUnitIdstringRequired>=1 character

Your own id for the unit (its externalId), unique within this customer.

Query parameters

creditsCurrencyIdstringOptionalformat: "uuid"

The credits currency whose cap to end. Omit it only when the organization has exactly one credits currency, which is then used; otherwise it is required.

Response

200
externalCustomerUnitIdstring>=1 character

Your own id for the unit (its externalId), the identifier the unit and cap routes take.

customerIdstringformat: "^cus_.+"
The Paid display id of the customer the unit belongs to.
creditsCurrencyIdstringformat: "uuid"

The credits currency this cap limits. The cap’s amount is in this currency’s credits.

policyobject

The cap version that was in force at the time of the call, now ended (effectiveUntil set). null when no version was in force — only scheduled versions were ended.

endedVersionsinteger>=1

How many versions were closed by this call: the one in force, older overlapping versions still open, and scheduled versions. At least 1.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error