Skip to main content
https://.thoughtindustries.com

Show Credit Batches

Returns a paginated list of credit batches for a specified client and credit account

Returns a paginated list of credit batches for a specified client and credit account.

GEThttps://example.thoughtindustries.com/incoming/v2/clients/:id/creditBatches

Example request

curl "https://example.thoughtindustries.com/incoming/v2/clients/:id/creditBatches" \
  -H 'Authorization: Bearer YOUR_API_KEY'

Parameters

NameTypeRequiredLocationDescription
idstringYespathThe id identifier.
clientIduuidYesqueryUnique identifier of the client whose credit batches to retrieve.
creditAccountIduuidNoqueryFilters results to credit batches belonging to the specified credit account.
cursorstringNoqueryOpaque cursor for the next page of results. Omit to fetch the first page.

Example response

{
  "clientId": "00000000-0000-0000-0000-000000000000",
  "creditAccountId": "00000000-0000-0000-0000-000000000000",
  "creditBatches": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "string",
      "creditAccountId": "00000000-0000-0000-0000-000000000000",
      "startingBalance": 0,
      "currentBalance": 0,
      "createdAt": "2024-01-01T00:00:00.000Z",
      "expiresOn": "2024-01-01T00:00:00.000Z"
    }
  ],
  "pageInfo": {
    "perPage": 0,
    "cursor": "string",
    "total": 0,
    "hasMore": true
  }
}

Response fields

FieldTypeDescription
clientIduuidIdentifier of the client.
creditAccountIduuidIdentifier of the credit account, when filtered.
creditBatchesobject[]Array of credit batch records for the current page.
creditBatches.iduuidIdentifier of the credit batch.
creditBatches.namestringName of the credit batch.
creditBatches.creditAccountIduuidIdentifier of the credit account the batch belongs to.
creditBatches.startingBalancenumberCredits originally issued in the batch.
creditBatches.currentBalancenumberCredits remaining in the batch.
creditBatches.createdAtISO 8601 timestampTimestamp when the batch was created.
creditBatches.expiresOnISO 8601 timestampDate when the batch expires.
pageInfoobjectCursor-based pagination metadata for the result set.
pageInfo.perPageintegerNumber of records returned per page.
pageInfo.cursorstringOpaque cursor to pass on the next request. Present when hasMore is true.
pageInfo.totalintegerTotal number of records matching the query.
pageInfo.hasMorebooleanWhether additional pages of results are available.