Update Credit Batch
Updates an existing credit batch by ID, allowing you to modify its name, expiration date, or current balance
Updates an existing credit batch by ID, allowing you to modify its name, expiration date, or current balance.
PUT
https://example.thoughtindustries.com/incoming/v2/clients/creditBatches/:idExample request
curl -X PUT "https://example.thoughtindustries.com/incoming/v2/clients/creditBatches/:id" \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"expiresOn": "string",
"currentBalance": 0
}'Parameters
| Name | Type | Required | Location | Description |
|---|---|---|---|---|
id | uuid | Yes | path | The id identifier. |
name | string | No | body | Display name for the credit batch. |
expiresOn | ISO 8601 timestamp | No | body | Date and time when the credit batch expires, in ISO 8601 format. |
currentBalance | integer | No | body | Number of credits currently available in the batch. |
Example response
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"expiresOn": "2024-01-01T00:00:00.000Z",
"currentBalance": 0
}Response fields
| Field | Type | Description |
|---|---|---|
id | uuid | Identifier of the credit batch. |
name | string | Name of the credit batch. |
expiresOn | ISO 8601 timestamp | Date when the batch expires. |
currentBalance | number | Credits remaining in the batch. |