Show Credit Actions
Returns a paginated list of credit actions for a specific credit account, filtered by client and action type
Returns a paginated list of credit actions for a specific credit account, filtered by client and action type.
GET
https://example.thoughtindustries.com/incoming/v2/clients/:id/creditAccount/:creditAccountId/creditActionsExample request
curl "https://example.thoughtindustries.com/incoming/v2/clients/:id/creditAccount/:creditAccountId/creditActions" \
-H 'Authorization: Bearer YOUR_API_KEY'Parameters
| Name | Type | Required | Location | Description |
|---|---|---|---|---|
id | string | Yes | path | The id identifier. |
creditAccountId | uuid | Yes | path | The creditAccountId identifier. |
clientId | uuid | Yes | query | The UUID of the client whose credit actions to retrieve. |
actionType | string | Yes | query | The type of credit action to filter results by (e.g., debit, credit). |
page | integer | No | query | The page number to retrieve for paginated results. |
Example response
{
"data": {
"APICreditActionsByClientIdAndAccountIdAndActionType": {
"clientId": "00000000-0000-0000-0000-000000000000",
"creditAccountId": "00000000-0000-0000-0000-000000000000",
"creditActions": [
{
"id": "00000000-0000-0000-0000-000000000000",
"client": "00000000-0000-0000-0000-000000000000",
"action": "string",
"amount": 0,
"target": "00000000-0000-0000-0000-000000000000",
"targetType": "string",
"targetBalanceIn": 0,
"targetBalanceOut": 0,
"initiator": "00000000-0000-0000-0000-000000000000",
"initiatorType": "string",
"creditAccountName": "string",
"source": "00000000-0000-0000-0000-000000000000",
"sourceType": "string",
"sourceBalanceIn": 0,
"sourceBalanceOut": 0,
"timestamp": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z"
}
],
"pageInfo": {
"perPage": 0,
"cursor": "string",
"total": 0,
"hasMore": true
}
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
clientId | uuid | The UUID of the client associated with the returned credit actions. |
creditAccountId | uuid | The UUID of the credit account associated with the returned credit actions. |
creditActions | CreditAction[] | The list of credit actions matching the specified filters. |
creditActions.id | uuid | The unique identifier of the credit action. |
creditActions.client | uuid | The UUID of the client associated with this credit action. |
creditActions.action | string | The type of action performed (e.g., debit, credit). |
creditActions.amount | number | The number of credits involved in this action. |
creditActions.target | uuid | The UUID of the entity receiving or affected by the credit action. |
creditActions.targetType | string | The type of entity identified by target (e.g., user, group). |
creditActions.targetBalanceIn | number | The credit balance of the target account before the action was applied. |
creditActions.targetBalanceOut | number | The credit balance of the target account after the action was applied. |
creditActions.initiator | uuid | The UUID of the entity that triggered the credit action. |
creditActions.initiatorType | string | The type of entity identified by initiator (e.g., user, system). |
creditActions.creditAccountName | string | The display name of the credit account associated with this action. |
creditActions.source | uuid | The UUID of the entity from which credits were drawn or transferred. |
creditActions.sourceType | string | The type of entity identified by source (e.g., account, group). |
creditActions.sourceBalanceIn | number | The credit balance of the source account before the action was applied. |
creditActions.sourceBalanceOut | number | The credit balance of the source account after the action was applied. |
creditActions.timestamp | ISO 8601 timestamp | The date and time when the credit action occurred, in ISO 8601 format. |
creditActions.updatedAt | ISO 8601 timestamp | The date and time when the credit action record was last updated, in ISO 8601 format. |
pageInfo | CursorPageInfo | Pagination metadata for the returned results. |
pageInfo.perPage | integer | The number of credit actions returned per page. |
pageInfo.cursor | string | The cursor value to use when requesting the next page of results. |
pageInfo.total | integer | The total number of credit actions matching the specified filters. |
pageInfo.hasMore | boolean | Indicates whether additional pages of results are available. |