GET
/
credits
curl --request GET \
  --url https://api.togai.com/credits \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "creds.1znQx9jiIXw.r44fc",
      "customerId": "7VcRw9xZDIqsC5E",
      "accountId": "ACC001",
      "purpose": "Prepaid Credit",
      "effectiveFrom": "2020-07-04",
      "effectiveUntil": "2021-07-04",
      "status": "ACTIVE",
      "creditAmount": 1000,
      "creditUnit": "USD",
      "holdAmount": 500,
      "consumedAmount": 400,
      "priority": 1,
      "createdAt": "2020-07-04T12:00:00.000Z"
    }
  ],
  "nextToken": "eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ=="
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

nextToken
string

Pagination token used as a marker to get records from next page.

status
string

Filter option to filter by status.

account_id
string

Filter option to filter based on account id.

id
string

Filter option to filter based on credit id.

pageSize
integer

Maximum page size expected by client to return the record list.

NOTE: Max page size cannot be more than 50. Also 50 is the default page size if no value is provided.

Response

200 - application/json
data
object[]
required
nextToken
string