---
title: "Create a reservation"
method: POST
path: "/product-reservations"
tags: ["Product reservations"]
---

# Create a reservation

`POST /product-reservations`

Create a new product reservation in the CareCloud platform.

## Headers

- `Accept-Language` string

## Request body

- object
  - `product_reservation` ProductReservation, required — Product reservation resource. > ⚠️ Structure has to contain reservation codes or product reservation items.
    - `product_reservation_id` string — The unique ID of the product reservation.
    - `customer_id` string, required — The unique ID of the customer, owner of the product reservation. [GET /customers](https://carecloud.readme.io/reference/getcustomers)
    - `store_id` string, required — The unique ID of the store tied to the reservation. [GET /stores](https://carecloud.readme.io/reference/getstores)
    - `reservation_codes` string[] — Reservation codes of the reservation from CareCloud.
    - `external_reservation_codes` ExternalCode[] — List of the external reservation codes. Id codes can have different sources. Please get in touch with your account manager for the list of ID sources.
      - `external_code_type_id` string, required — The unique ID of the external code type (provided in [GET /product-reservation-external-list-types](https://carecloud.readme.io/reference/getproductreservationexternallisttypes)).
      - `value` string, required — Value of the external code.
    - `benefit_codes` string[] — List of the benefit (rewards, vouchers) codes used in a reservation. After the reservation is delivered, all benefits are applied on the customer account.
    - `product_reservation_source_id` string, required — The unique ID of the product reservation source. [GET /product-reservation-sources](https://carecloud.readme.io/reference/getproductreservationsources)
    - `pickup_date` string — Date of the reservation pickup in the tied store in ISO-8601 format (`YYYY-MM-DD`).
    - `customers_note` string — Customer’s note for the merchant.
    - `total_price` number, float — Total price of reservation. If currency_id is set, then total_price is mandatory.
    - `currency_id` string — The unique ID of the currency. If total_price is set, then currency_id is mandatory. [GET /currencies](https://carecloud.readme.io/reference/getcurrencies)
    - `product_reservation_items` ProductReservationItem[] — List of the Product Reservation Items.
      - `reservable_product_id` string, required — The unique ID of the reservable product in CareCloud. [GET /reservable-products](https://carecloud.readme.io/reference/getreservableproducts)
      - `amount` number, float, required — Number of the reserved products.
      - `unit_price` number, float — Unit price of the reserved product. If vat_rate is set, than unit_price is mandatory.
      - `vat_rate` number, float — The rate of the VAT of the reserved product. If unit_price is set, than vat_rate is mandatory.
    - `external_purchase_id` string — The unique external ID of the purchase.
    - `utm` UTM — UTM structure for data from email campaign.
      - `utm_source` string — Use utm_source to identify a search engine, newsletter name, or other sources. (Example: google).
      - `utm_medium` string — Use utm_medium to identify a medium such as an email or cost-per-click. (Example: cpc).
      - `utm_campaign` string — Used for keyword analysis. Use utm_campaign to identify a specific product promotion or strategic campaign. (Example: utm_campaign=spring_sale).
    - `actual_state` 0 | 1 | 2 | 4 | 5 | 6 | 7 | 8 — Current progress of the product reservation. *Possible values: 0 - Canceled / 1 - Entered / 2 - Accepted / 3 - Ready / 4 - Delivered / 5 - In progress / 6 - Not Picked up / 7 - Ordered / 8 - Being solved /*
    - `reservation_progress_history` ProductReservationProgress[] — History of the product reservation progress. Product reservation progress is sorted in descending order by time.
      - `reservation_progress_id` integer — ID of the product reservation progress.
      - `reservation_progress_text` string — String of the product reservation progress.
      - `reservation_progress_time` string — Timestamp of the product reservation progress change. Format: `YYYY-MM-DD HH:MM:SS`. All times are in the local timezone.
    - `comments` ProductReservationComment[] — Product reservation comments. Comments are sorted in descending order by time.
      - `comment_text` string — Text of the product reservation comment.
      - `comment_time` string — Timestamp of the product reservation comment. 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 product reservation. *Possible values are: 0 - deleted / 1 - active *

## Response `201`

Created

- object
  - `data` object
    - `product_reservation_id` string — The unique ID of the product reservation.

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