---
title: "Create a batch of cards"
method: POST
path: "/cards/batch"
tags: ["Cards"]
---

# Create a batch of cards

`POST /cards/batch`

Create multiple customer cards in a single request. Use this endpoint to import a large number of cards efficiently.
⚠️ Adjust batch sizes based on processing times. We recommend using a maximum of 1000 records and adjusting the batch size based on processing time.
⚠️ Endpoint is available only in the Enterprise interface.

## Headers

- `Accept-Language` string

## Request body

- object
  - `cards` Card[], required — List of the CareCloud cards.
    - `card_id` string — The unique ID of the card.
    - `customer_id` string — The unique ID of the card holder. [GET /customers](https://carecloud.readme.io/reference/getcustomers)
    - `card_type_id` string, required — The unique ID of the card type. [GET /card-types](https://carecloud.readme.io/reference/getcardtypes)
    - `card_number` string, required — Card number.
    - `secondary_card_number` string — Alternative card number for this card.
    - `valid_from` string — Timestamp from which the card 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 card 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.
    - `store_id` string — The unique ID of the store where the card was assigned to a customer. [GET /stores](https://carecloud.readme.io/reference/getstores)
    - `last_change` string — Date and time of the last change. *(YYYY-MM-DD HH:MM:SS)*
    - `state` 0 | 1, required — State of the card. *Possible values are: 0 - blocked / 1 - active*
  - `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/revisions/329c06dbf8d9/schema)
