Get customer-unit spend (by external customer id)
Returns the credits of one credits currency spent by this customer unit and every unit beneath it during a window, whether or not the unit has a cap. The window runs from start (inclusive) to end (exclusive), at most 366 days; omit both for the current calendar month (UTC). For a capped unit over its cap's current period, spent equals the cap's used. Spend from a signal that names no unit counts toward no unit. 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. Addresses the customer by your external customer id.
Request
- Base URL: https://api.agentpaid.io/api/v2
- URL: https://api.agentpaid.io/api/v2/customers/external/{externalId}/customer-units/{externalCustomerUnitId}/spend
- Auth: HTTP bearer
Path parameters
Customer ID from your system, stored on Paid as the customer's externalId.
Your own id for the unit (its externalId), unique within this customer.
Query parameters
The credits currency to read. Omit it only when the organization has exactly one credits currency, which is then used; otherwise it is required.
ISO 8601 timestamp, the window's inclusive start. Give start and end together, with start before end, or omit both for the current calendar month (UTC).
ISO 8601 timestamp, the window's exclusive end. Give start and end together, with start before end, or omit both for the current calendar month (UTC).
Response
200
Changes
No recorded changes to this operation across all 1 revision of this API.