Skip to main content
GET
/
api
/
v1
/
credit_systems
/
v2
/
credit-allocations
/
{id}
Get a single credit allocation
curl --request GET \
  --url https://{defaultHost}/api/v1/credit_systems/v2/credit-allocations/{id} \
  --header 'x-api-key: <api-key>'
{
  "statusCode": 200,
  "message": "Credit transactions fetched successfully",
  "meta": {},
  "data": {
    "id": "a3f2b8e0-4d11-4f9a-8c2d-7e1b3a9f0c12",
    "amount": 100,
    "consumed": 35,
    "allocation_type": "subscription",
    "invoice_id": "0d9e5a0e-7de4-48c6-b01a-b1759394578b",
    "order_id": null,
    "order_number": null,
    "valid_until": "2026-04-12T16:55:21.847Z",
    "created_at": "2026-03-12T16:55:22.014Z",
    "transactions": [
      {
        "id": "2e8c1a4f-9b73-4f1a-bd64-58a9d7c83ef0",
        "amount": 10,
        "quantity": 2,
        "event_name": "image_generated",
        "usage_event_id": "ue_01HXYZ123ABC",
        "created_at": "2026-03-15T09:22:03.114Z"
      },
      {
        "id": "9af2e7b1-8c3d-4d52-9b1a-23c7e4f60d21",
        "amount": 25,
        "quantity": 5,
        "event_name": "image_generated",
        "usage_event_id": "ue_01HXYZ456DEF",
        "created_at": "2026-03-18T14:08:47.802Z"
      }
    ]
  },
  "errors": {}
}

Authorizations

x-api-key
string
header
required

Path Parameters

id
string<uuid>
required

The unique credit allocation identifier

Response

Credit allocation fetched successfully

statusCode
integer
Example:

200

message
string
Example:

"Credit transactions fetched successfully"

meta
object
data
object
errors
object