Skip to main content

Get transaction history

GET /api/credits/transactions

Retrieve paginated list of credit transactions

Authentication​

  • Option 1: x-api-key: YOUR_API_KEY (header). API key for authentication. Create one in your dashboard.
  • Option 2: Authorization: Bearer YOUR_ACCESS_TOKEN. Dashboard JWT in Authorization: Bearer <token>, only on operations that explicitly list this scheme. Prefer x-api-key for REST integrations. OAuth for hosted MCP is a separate connection at https://mcp.zvid.io/mcp.

Create API keys at app.zvid.io/api-keys. Keep credentials on your server.

Parameters​

ParameterLocationTypeRequiredDescription and constraints
pagequeryintegerNoPage number Default: 1. Minimum: 1.
limitqueryintegerNoNumber of items per page Default: 20. Minimum: 1. Maximum: 100.

Request​

The shell examples read credentials from ZVID_API_KEY (or ZVID_ACCESS_TOKEN for Bearer authentication). Set that variable in your environment. Replace sample project, template, job, and asset identifiers with values from your own account.

This operation does not take a request body.

Request example​

curl --request GET 'https://api.zvid.io/api/credits/transactions' \
--header "x-api-key: $ZVID_API_KEY"

Responses​

HTTP 200​

Transaction history retrieved successfully

Content type: application/json.

Unknown properties are rejected. Required properties: transactions, pagination.

FieldTypeRequiredDescription and constraints
response.transactionsarray of TransactionYes
response.paginationobjectYesUnknown properties are rejected. Required properties: page, limit, total, totalPages, hasNext, hasPrev.

Nested field: response.transactions

Array item: response.transactions[]

Schema: Transaction.

Nested field: response.pagination

Unknown properties are rejected. Required properties: page, limit, total, totalPages, hasNext, hasPrev.

FieldTypeRequiredDescription and constraints
response.pagination.pageintegerYes
response.pagination.limitintegerYes
response.pagination.totalintegerYes
response.pagination.totalPagesintegerYes
response.pagination.hasNextbooleanYesWhether there are more pages after the current one
response.pagination.hasPrevbooleanYesWhether there are pages before the current one

HTTP 400​

Invalid query parameters

Content type: application/json.

Required properties: error.

FieldTypeRequiredDescription and constraints
response.errorstringYes
response.messagestringNo
response.detailsarray of objectNo
response.planLimitsobjectNoPresent on render validation errors; contains the authenticated user's current render limits.

Nested field: response.details

Array item: response.details[]

Unknown properties are rejected. Required properties: field, message.

FieldTypeRequiredDescription and constraints
response.details[].fieldstringYes
response.details[].messagestringYes

HTTP 401​

Unauthorized

Content type: application/json.

Unknown properties are rejected. Required properties: error.

FieldTypeRequiredDescription and constraints
response.errorstringYesError type
response.messagestringNoHuman-readable error message

HTTP 500​

Internal server error

Content type: application/json.

Required properties: error.

FieldTypeRequiredDescription and constraints
response.errorstringYesError type
response.messagestringNoHuman-readable error message

Schema definitions​

The following definitions describe the fields referenced above. Expand a definition to inspect its complete contract.

TransactionList

Unknown properties are rejected. Required properties: transactions, pagination.

FieldTypeRequiredDescription and constraints
TransactionList.transactionsarray of TransactionYes
TransactionList.paginationobjectYesUnknown properties are rejected. Required properties: page, limit, total, totalPages, hasNext, hasPrev.

Nested field: TransactionList.transactions

Array item: TransactionList.transactions[]

Schema: Transaction.

Nested field: TransactionList.pagination

Unknown properties are rejected. Required properties: page, limit, total, totalPages, hasNext, hasPrev.

FieldTypeRequiredDescription and constraints
TransactionList.pagination.pageintegerYes
TransactionList.pagination.limitintegerYes
TransactionList.pagination.totalintegerYes
TransactionList.pagination.totalPagesintegerYes
TransactionList.pagination.hasNextbooleanYesWhether there are more pages after the current one
TransactionList.pagination.hasPrevbooleanYesWhether there are pages before the current one
Transaction

Unknown properties are rejected. Required properties: id, userId, amount, transactionType, createdAt.

FieldTypeRequiredDescription and constraints
Transaction.idintegerYes
Transaction.userIdintegerYes
Transaction.amountintegerYesTransaction amount (positive for additions, negative for deductions)
Transaction.transactionType"earned" / "spent" / "admin_adjustment" / "credit_pack" / "revoke" / "plan_change_adjustment"YesType of transaction
Transaction.creditSource"addon" / "subscription"NoCredit pool affected by this transaction
Transaction.subscriptionCreditPeriodIdinteger / nullNoSubscription credit period touched by this transaction, if applicable
Transaction.jobIdstring / nullNoRelated job ID (if applicable) Format: uuid.
Transaction.descriptionstringNo
Transaction.metadataobject OR string OR nullNoExactly one of the listed alternatives must match.
Transaction.createdAtstringYesFormat: date-time.

Nested field: Transaction.metadata

Exactly one of the listed alternatives must match.

oneOf alternative 1

Type: object.

oneOf alternative 2

Type: string.

oneOf alternative 3

Type: null.

ValidationError

Required properties: error.

FieldTypeRequiredDescription and constraints
ValidationError.errorstringYes
ValidationError.messagestringNo
ValidationError.detailsarray of objectNo
ValidationError.planLimitsobjectNoPresent on render validation errors; contains the authenticated user's current render limits.

Nested field: ValidationError.details

Array item: ValidationError.details[]

Unknown properties are rejected. Required properties: field, message.

FieldTypeRequiredDescription and constraints
ValidationError.details[].fieldstringYes
ValidationError.details[].messagestringYes
AuthenticationError

Unknown properties are rejected. Required properties: error.

FieldTypeRequiredDescription and constraints
AuthenticationError.errorstringYesError type
AuthenticationError.messagestringNoHuman-readable error message
Error

Required properties: error.

FieldTypeRequiredDescription and constraints
Error.errorstringYesError type
Error.messagestringNoHuman-readable error message