GET
/
v1
/
billing
/
{organizationId}
/
credits
/
history
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.billingGetCreditHistory({
  organizationId: process.env.OCTOSPARK_ORGANIZATION_ID ?? "organizationId",
  query: {},
})
{
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amountDecimillicents": 123,
      "reason": "<string>",
      "referenceId": "<string>",
      "balanceAfter": 123,
      "createdAt": "<string>"
    }
  ],
  "total": 123,
  "nextCursor": "<string>",
  "prevCursor": "<string>"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

organizationId
string
required

Query Parameters

cursor
string
limit
string
sortBy
string
sortOrder
enum<string>
Available options:
asc,
desc

Response

Success

data
object[]
required
total
number
required
nextCursor
string | null
required
prevCursor
string | null
required