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

Create Credit Batch

Creates a new credit batch for the specified client, setting an initial balance and optionally associating the batch with a credit account and expiration date

Creates a new credit batch for the specified client, setting an initial balance and optionally associating the batch with a credit account and expiration date.

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

Example request

curl -X POST "https://example.thoughtindustries.com/incoming/v2/clients/:id/creditBatches" \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "clientId": "00000000-0000-0000-0000-000000000000",
  "startingBalance": 0,
  "creditAccountId": "00000000-0000-0000-0000-000000000000",
  "name": "string"
}'

Parameters

NameTypeRequiredLocationDescription
idstringYespathThe id identifier.
clientIduuidNobodyUUID of the client to associate with this credit batch.
startingBalancenumberYesbodyInitial number of credits to assign to the batch.
creditAccountIduuidNobodyUUID of the credit account to link to this batch.
namestringNobodyDisplay name for the credit batch.
expiresOnISO 8601 timestampNobodyDate and time at which the credit batch expires, in ISO 8601 format.

Example response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "string",
  "startingBalance": 0,
  "currentBalance": 0,
  "expiresOn": "2024-01-01T00:00:00.000Z"
}

Response fields

FieldTypeDescription
iduuidIdentifier of the created credit batch.
namestringName of the credit batch.
startingBalancenumberCredits originally issued in the batch.
currentBalancenumberCredits remaining in the batch.
expiresOnISO 8601 timestampDate when the batch expires.