---
title: "Create a batch of the third party recommendations"
method: POST
path: "/third-party-recommendations/batch"
tags: ["Product recommendation engine"]
---

# Create a batch of the third party recommendations

`POST /third-party-recommendations/batch`

Batch process helps to add multiple third party recommendations in one request. A third party may submit products recommended to a selected customer based on their previous shopping behavior or products recommended based on links to the current content of their shopping cart.

## Headers

- `Accept-Language` string

## Request body

- object
  - `third_party_recommendations` ThirdPartyRecommendation[], required — List of the Recommendations from third party system.
    - `third_party_recommendation_id` string — The unique ID of the third party recommendation.
    - `customer_id` string — The unique ID of the CareCloud customer. Required only if `products` parameter is not set. [GET /customers](https://carecloud.readme.io/reference/getcustomers)
    - `products` ProductIdentification[], required — Products from the shopping cart to which the recommended product is linked. Structure is required only if the parameter `customer_id` is not set.
      - `product_id` string — The unique CareCloud ID of the product. [GET /products](https://carecloud.readme.io/reference/getproducts)
      - `plu_ids` PluId[] — An array of all available pluIds from the particular product lists (default is Product ID from Global product list (consist cleaned data - unique ID of every product across all POS systems)).
        - `list_code` string, required — Code of the particular product list (basic is code of Global product list (consist cleaned data - unique ID of every product across all POS systems)). For example, “GLOBAL”, “SKU”, “PLU”, etc.
        - `code` string, required — Code of product from the product list (basic is Product ID from Global product list (consist cleaned data - unique ID of every product across all POS systems)).
    - `recommended_product` ProductIdentification, required — All possible identifications of the product.
      - `product_id` string — The unique CareCloud ID of the product. [GET /products](https://carecloud.readme.io/reference/getproducts)
      - `plu_ids` PluId[] — An array of all available pluIds from the particular product lists (default is Product ID from Global product list (consist cleaned data - unique ID of every product across all POS systems)).
        - `list_code` string, required — Code of the particular product list (basic is code of Global product list (consist cleaned data - unique ID of every product across all POS systems)). For example, “GLOBAL”, “SKU”, “PLU”, etc.
        - `code` string, required — Code of product from the product list (basic is Product ID from Global product list (consist cleaned data - unique ID of every product across all POS systems)).
    - `recommendation_system_id` string, required — The unique ID of the third party recommendation system from resource recommendation systems.
    - `recommendation_system_dataset_id` string, required — The unique ID of the third party recommendation system dataset.
    - `score` number, float, required — Score of the recommendation. Depends of score we will pick products to recommendation. Higher score means better results.
    - `state` 0 | 1 | 2 — State of the recommendation. *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)*
  - `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)
