---
title: "Update a voucher"
method: PUT
path: "/vouchers/{voucher_id}"
tags: ["Vouchers"]
---

# Update a voucher

`PUT /vouchers/{voucher_id}`

This method updates a specific voucher.

## Path parameters

- `voucher_id` string, required

## Headers

- `Accept-Language` string

## Request body

- object
  - `voucher` Voucher, required — Customer's voucher.
    - `voucher_id` string — The unique ID of the voucher.
    - `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 the 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.
    - `reward_group` string — The unique ID of the reward group.
    - `note` string — Voucher's note.
    - `reward` Reward — Reward structure.
      - `reward_id` string — The unique ID of the reward.
      - `code` string, required — Code of the reward.
      - `name` string, required — Name of the reward.
      - `note` string — Additional text.
      - `subtitle` string — Text of subtitle.
      - `points_cost` number, float — Number of points that will be spent by the voucher redemption.
      - `valid_time_from` string — Time from which the reward is valid in ISO-8601 format (`HH:MM:SS`). All times are in the local timezone.
      - `valid_time_to` string — Time until which the reward is valid in ISO-8601 format (`HH:MM:SS`). All times are in the local timezone.
      - `reward_group` 0 | 1 | 2 | 4, required — The unique ID of the reward group. *Possible values: 0 - party time voucher / 1 - catalog voucher / 2 - campaign voucher/ 4 - simple reward / 5 - gift reward (Multi Purpose Reward)*
      - `reward_type_id` string — The unique ID of the reward type. The reward type describes the reward behavior. For example, a Percentage discount, Buy one + get one discounted product, and others. [GET /reward-types](https://carecloud.readme.io/reference/getrewardtypes)
      - `store_list` Store[], required — List of the stores where the reward can be redeemed.
        - `store_id` string, required — The unique ID of the store in CareCloud.
        - `store_code` string, required — External code of the store.
        - `name` string, required — Name of the store.
        - `store_address` Address — The Address Structure in the API defines the standardized format for representing addresses throughout the system. This resource ensures consistency and accuracy in capturing address details, facilitating seamless integration and data exchange.
          - `address1` string — Street name of the address.
          - `address2` string — Street number (Land registry number).
          - `address3` string — House number.
          - `address4` string — Next address data.
          - `address5` string — Next address data.
          - `address6` string — Next address data.
          - `address7` string — Next address data.
          - `zip` string — ZIP code.
          - `city` string — City.
          - `country_code` string — ISO code of the country. *Possible values de / gb / us / it / cz / etc*
        - `contact_email` string — Contact email of the store.
        - `manager_name` string — Name of the store manager.
        - `phone_number` string — Phone number of the store with international prefix (420000000000).
        - `partner_id` string, required — The unique ID of the partner. [GET /partners](https://carecloud.readme.io/reference/getpartners)
        - `system_id` string, required — The external unique ID of the store in external system.
        - `gps_coordinates` GPSCoordinates — GPS coordinates of the store.
          - `gps_longitude` number, float, required — GPS longitude.
          - `gps_latitude` number, float, required — GPS latitude.
        - `url_address` string — URL address of the store.
        - `opening` OpeningDay[] — List of opening days.
          - `day_id` string, required — The unique ID of the day of the week.
          - `time_intervals` TimeInterval[], required — List of time Intervals.
            - `from` string, required — Time from. *(HH:MM:SS)*
            - `to` string, required — Time to. *(HH:MM:SS)*
        - `image_urls` string[] — A list of image URL addresses.
        - `visibility_for_customer` 0 | 1 — State of the visibility for the customer. *Possible values are: 0 - invisible / 1 - visible*
        - `short_description` string — Short description of the store.
        - `description` string — Long description of the store.
        - `registration_id` string — Legal registration number of the store.
        - `last_change` string — Date and time of the last change. *(YYYY-MM-DD HH:MM:SS)*
        - `state` 0 | 1 | 2 — State of the store *Possible values are: 0 - deleted / 1 - active / 2 - non active*
      - `additional_properties` PropertyRecord[] — Additional properties.
        - `property_record_id` string — The unique ID of the property record.
        - `property_id` string, required — The unique ID of the property.
        - `property_name` string — Name of the property.
        - `property_value` union — Value of the property record. The format depends on the data type of the property. - **string** – a plain text value: ```json { "property_id": "p1_note", "property_value": "VIP customer" } ``` - **date** – a date string in `YYYY-MM-DD` format: ```json { "property_id": "p1_birth_date", "property_value": "1985-06-15" } ``` - **integer** – a whole number: ```json { "property_id": "p1_visit_count", "property_value": 42 } ``` - **float** – a decimal number: ```json { "property_id": "p1_average_spend", "property_value": 149.90 } ``` - **enum** – a single-item array containing a PropertyItem object: ```json { "property_id": "p1_favourite_color", "property_value": [ { "id": "86e05affc7a7abefcd513ab400", "name": "Blue", "resource_record_id": null, "state": 1 } ] } ``` - **multiselect** – a multi-item array of PropertyItem objects: ```json { "property_id": "p1_favourite_color", "property_value": [ { "id": "86e05affc7a7abefcd513ab400", "name": "Blue", "resource_record_id": null, "state": 1 }, { "id": "81eaeea13b8984a169c490a325", "name": "Green", "resource_record_id": null, "state": 1 } ] } ``` - **custom data type** – the format depends on the specific data type configuration. For example, a serialized JSON object: ```json { "property_id": "p1_address", "property_value": "{\"street\":\"Main St\",\"city\":\"Prague\"}" } ```
          - string
          - number
          - integer
          - boolean
          - unknown[]
            - unknown
          - object
        - `last_change` string — Date and time of the last change. *(YYYY-MM-DD HH:MM:SS)*
      - `priority` 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 — Priority of the reward. *1 is the highest priority*
      - `image_urls` string[] — List of reward image URL addresses.
      - `reward_external_url` string — External URL addresses.
      - `has_product_condition` boolean — Parameter says, if there is product condition on reward.
      - `has_group_condition` boolean — Parameter says, if there is group condition on reward.
      - `has_brand_condition` boolean — Parameter says, if there is brand condition on reward.
      - `has_product_bonus` boolean — Parameter says, if there is product bonus on reward.
      - `has_group_bonus` boolean — Parameter says, if there is group bonus on reward.
      - `has_brand_bonus` boolean — Parameter says, if there is brand bonus on reward.
      - `reward_product_relation_conditions` RewardProductRelationCondition[] — Conditions between reward and product.
        - `related_to` 'product' | 'product_group' | 'product_brand' — Parameter defines where is the reward condition related to. *Possible values: product - relation between reward and product / product_group - relation between reward and product group / product_brand - relation between reward and product brand *
        - `count` integer — Count of the type(product, group or brand) in the shopping cart to fulfill the condition.
        - `min_price` number, float — Minimum price of the type (product, group, brand) in the shopping cart to fulfill the condition.
        - `max_price` number, float — Maximum price of the type (product, group, brand) in the shopping cart to fulfill the condition.
      - `reward_product_relation_bonuses` RewardProductRelationBonus[] — Bonuses between reward and product.
        - `related_to` 'product' | 'product_group' | 'product_brand' — Parameter defines where is the reward condition related to. *Possible values: product - relation between reward and product / product_group - relation between reward and product group / product_brand - relation between reward and product brand *
        - `count` integer — Count of the type(product, group or brand) in the shopping cart to fulfill the bonus.
        - `min_price` number, float — Minimum price of the type (product, group, brand) in the shopping cart to fulfill the bonus.
        - `max_price` number, float — Maximum price of the type (product, group, brand) in the shopping cart to fulfill the bonus.
      - `is_automated` boolean — Parameter says, if reward is automated or not. If the reward is automated, it means it is applied by the rules of the reward. Otherwise, it has to be applied manually.
      - `tags` Tag[] — List of the tags assigned to the reward.
        - `tag_id` string — The unique ID of the tag.
        - `name` string — Name of the tag in language from the HTTP header.
        - `text_id` string — Text ID of the tag.
        - `state` 0 | 1 | 2 — State of the tag. *Possible values are: 0 - deleted / 1 - active / 2 - non active*
        - `last_change` string — Date and time of the last change. *(YYYY-MM-DD HH:MM:SS)*
      - `last_change` string — Date and time of the last change. *(YYYY-MM-DD HH:MM:SS)*
      - `state` 0 | 1 | 2 — State of the reward *Possible values are: 0 - deleted / 1 - active / 2 - non active*
    - `created_at` string — Timestamp of the voucher creation. Format: `YYYY-MM-DD HH:MM:SS`. All times are in the local timezone.
    - `last_change` string — Timestamp of the last change. Format: `YYYY-MM-DD HH:MM:SS`. All times are in the local timezone.
    - `state` 0 | 1 | 2 — State of the voucher. *Possible values are: 0 - deleted / 1 - active / 2 - non active*

## 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)
