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

Create Credit Account

Creates a credit account for the specified client

Creates a credit account for the specified client.

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

Example request

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

Parameters

NameTypeRequiredLocationDescription
idstringYespathThe id identifier.
batchDaysUntilExpireintegerNobodyNumber of days until a credit batch expires after being issued.
clientIduuidNobodyUnique identifier of the client to associate with this credit account.
startingBalancenumberYesbodyInitial credit balance assigned to the account at creation.
minimumBatchAmountintegerNobodyMinimum number of credits that must be included in a single credit batch.
notifyEmailsstring[]YesbodyList of email addresses to notify when account activity occurs (e.g. low balance).
typeCreditAccountTypeNobodyClassification of the credit account (e.g. client).
namestringYesbodyDisplay name for the credit account.
creditBatchNamestringNobodyLabel applied to credit batches issued under this account.
licenseIdsstring[]YesbodyList of license IDs to associate with this credit account.

Example response

{
  "data": {
    "APICreateCreditAccount": {
      "id": "00000000-0000-0000-0000-000000000000",
      "clientId": "00000000-0000-0000-0000-000000000000",
      "sublicenses": [
        {
          "id": "00000000-0000-0000-0000-000000000000",
          "deleted": true
        }
      ],
      "currentBalance": 0,
      "status": "active",
      "notifyEmails": [
        "string"
      ],
      "batchDaysUntilExpire": 0,
      "minimumBatchAmount": 0,
      "createdAt": "2024-01-01T00:00:00.000Z",
      "updatedAt": "2024-01-01T00:00:00.000Z",
      "type": "client",
      "name": "string"
    }
  }
}

Response fields

FieldTypeDescription
iduuidUnique identifier of the newly created credit account.
clientIduuidUnique identifier of the client that owns this credit account.
sublicensesSublicense[]List of sublicenses associated with this credit account.
sublicenses.iduuidUnique identifier of the sublicense.
sublicenses.deletedbooleanIndicates whether the sublicense has been deleted.
currentBalancenumberCurrent number of credits available in the account.
statusCreditAccountStatusCurrent status of the credit account (e.g. active).
notifyEmailsstring[]Email addresses configured to receive account activity notifications.
batchDaysUntilExpireintegerNumber of days after issuance before a credit batch expires.
minimumBatchAmountintegerMinimum number of credits required per credit batch.
createdAtISO 8601 timestampDate and time the credit account was created, in ISO 8601 format.
updatedAtISO 8601 timestampDate and time the credit account was last updated, in ISO 8601 format.
typeCreditAccountTypeClassification of the credit account (e.g. client).
namestringDisplay name of the credit account.