customers

Get customer-unit cap

Returns the cap in force on this customer unit for one credits currency, with usage in the current period when available. Select the currency with creditsCurrencyId; it may be omitted only when the organization has exactly one credits currency, which is then used and echoed back. 404 when the customer or the unit does not exist, or the unit has no cap in force for that currency. The usage figures are advisory: other spend may land between this read and the next burn. 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.

get/customers/{id}/customer-units/{externalCustomerUnitId}/cap

Request

  • Base URL: https://api.agentpaid.io/api/v2
  • URL: https://api.agentpaid.io/api/v2/customers/{id}/customer-units/{externalCustomerUnitId}/cap
  • Auth: HTTP bearer

Path parameters

idstring required

Paid customer display id

externalCustomerUnitIdstring required

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

Query parameters

creditsCurrencyIdstring uuid

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

Response

200

externalCustomerUnitIdstring required

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

customerIdstring required

The Paid display id of the customer the unit belongs to.

creditsCurrencyIdstring uuid required

The credits currency this response is about: the requested creditsCurrencyId, or the organization's only credits currency when it was omitted.

Changes

No recorded changes to this operation across all 1 revision of this API.