Prepaid credit lots (each acquired cupo: expiry, consumed, remaining)
GET
/v1/billing/prepaid-lots
const url = 'https://api.emite.cr/v1/billing/prepaid-lots';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.emite.cr/v1/billing/prepaid-lots \ --header 'Authorization: Bearer <token>'Per-lot breakdown ordered by soonest expiry. Not scope-gated — any tenant member may view their cupos. Includes expired/depleted lots for history.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Media typeapplication/json
Array<object>
object
id
required
Identifier of the lot — one lot per prepaid purchase.
string
quantity
required
Documents originally purchased in this lot.
number
remaining
required
Documents still available in this lot.
number
consumed
required
Documents already consumed from this lot (quantity − remaining).
number
purchasedAt
required
ISO date the lot was purchased.
string
expiresAt
required
ISO date the lot expires (purchase + 1 year).
string
expired
required
True once past expiresAt (no longer counts toward balance).
boolean
depleted
required
True once remaining reaches 0.
boolean
granted
required
True when the lot was given at no charge: no payment funded it.
boolean
Examplegenerated
[ { "id": "example", "quantity": 1, "remaining": 1, "consumed": 1, "purchasedAt": "example", "expiresAt": "example", "expired": true, "depleted": true, "granted": true }]