---
title: "Create a batch of vouchers."
method: POST
path: "/vouchers/batch"
tags: ["Vouchers"]
---

# Create a batch of vouchers.

`POST /vouchers/batch`

Batch process helps to add multiple vouchers in one request.
⚠️ Adjust batch sizes based on processing times. We recommended use maximum amount of 1000 records and adjust the batch size based on processing time.
⚠️ Endpoint is available only in Enterprise interface.

## Headers

- `Accept-Language` string

## Request body

- object
  - `vouchers` VoucherBatch[], required — List of the CareCloud vouchers.
    - `reward_id` string, required — The unique ID of the reward. [GET /rewards](https://carecloud.readme.io/reference/getrewards)
    - `customer_id` string, required — The unique ID of the customer. [GET /customers](https://carecloud.readme.io/reference/getcustomers)
    - `store_id` string — The unique ID of the store where voucher was applied. [GET /stores](https://carecloud.readme.io/reference/getstores)
    - `code` string — Code of the voucher.
    - `value` number, float — Value of the voucher when applied by the purchase.
    - `applied_date` string — Timestamp of the voucher application. Accepts the format `YYYY-MM-DD HH:MM:SS` or ISO-8601 format (`YYYY-MM-DDTHH:MM:SS`). All times must be in the local timezone.
    - `valid_from` string — Timestamp from which the voucher is valid. Accepts the format `YYYY-MM-DD HH:MM:SS` or ISO-8601 format (`YYYY-MM-DDTHH:MM:SS`). All times must be in the local timezone.
    - `valid_to` string — Timestamp until which the voucher is valid. Accepts the format `YYYY-MM-DD HH:MM:SS` or ISO-8601 format (`YYYY-MM-DDTHH:MM:SS`). All times must be in the local timezone.
    - `note` string — Voucher's note.
  - `error_processing` 1 | 2 — The parameter describes the batch method behavior in case of error occurs. *Possible values are: 1 - It returns the first error found and rollback all previous changes (this is also the default behavior if the parameter is not set) / 2 - It creates all valid records and creates an error report from failed attempts.*

## Response `204`

No Content

## Other responses

- `400` — Bad input parameter. The response body's `error.error_data.invalid_params[]` array lists the parameters that caused the failure, each carrying a `reason` code. See the `BadRequestErrorBody` schema for the generic reason taxonomy. Operations with domain-specific business rules document additional reasons at the operation level.
- `401` — The client has invalid credentials or auth token.
- `403` — The client does not exist or the client tried to access an unauthorized property or resource.
- `404` — The resource was not found.
- `405` — The resource does not support the specified HTTP method.
- `429` — Too many requests - more than the resource limit.
- `500` — Server is not working as expected.
- `503` — Temporary state when the service is temporarily unavailable, overloaded or there is a maintenance window.

---

[API](https://skmtc.net/crmcarecloud/apis/rest-api-reference.md) · [All operations](https://skmtc.net/crmcarecloud/apis/rest-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/crmcarecloud/rest-api-reference/versions/329c06dbf8d9/schema)
