> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clearline.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Products Catalog Import to CMC

# Products catalog Import

In order to synchronize the Product Catalog, it is necessary to call 2 endpoints in sequence:

1. Call productCategories endpoint (the response will contain errors or warnings that occurred during the import process)
2. Call products endpoint (the response will contain errors or warnings that occurred during the import process)

## Product Categories

**POST** [https://apitest.clearline.me/pos/\{posSystemId}/company/\{posCompanyId}/import/productCategories](https://apitest.clearline.me/pos/\{posSystemId}/company/\{posCompanyId}/import/productCategories)

### Input request

```text theme={null}
{
  "items": [
    {
      "name": "string",
      "posProductParentCategoryId": "string",
      "posProductCategoryId": "string",
      "posCatalogId": "string",
      "imageUrl": "string"
    }
  ]
}
```

### Input parameters

| Field name                 | Description                           |
| -------------------------- | ------------------------------------- |
| name                       | Category name                         |
| posProductParentCategoryId | Parent Category Id in POS (if exists) |
| posProductCategoryId       | Category ID in POS                    |
| posCatalogId               | Product Catalog Id (if exists)        |
| imageUrl                   | Product image url                     |

### Response

```text theme={null}
{
  "data": {
    "status": "string",
    "createdCount": 0,
    "updatedCount": 0,
    "errors": [
      {
        "entityId": "string",
        "rowNumber": 0,
        "errorMessage": "string",
        "errorDetails": "string"
      }
    ],
    "warnings": [
      {
        "entityId": "string",
        "rowNumber": 0,
        "message": "string",
        "details": "string"
      }
    ]
  }
}
```

## Products

**POST** [https://apitest.clearline.me/pos/\{posSystemId}/company/\{posCompanyId}/import/products](https://apitest.clearline.me/pos/\{posSystemId}/company/\{posCompanyId}/import/products)

### Input request

```text theme={null}
 {
  "items": [
    {
      "product": {
        "productId": "string",
        "productName": "string",
        "manufacturer": "string",
        "price": 0
      },
      "externalCategoryIds": [
        "string"
      ]
    }
  ]
```

}

### Input parameters

| Field name          | Description                                                                    |
| ------------------- | ------------------------------------------------------------------------------ |
| productId           | POS Product Id                                                                 |
| ProductName         | Product Name in POS                                                            |
| manufacturer        | Product Manufacturer (if exists)                                               |
| price               | Product price                                                                  |
| externalCategoryIds | Category ID in POS (which were created in the productCategories endpoint call) |

### Response

```text theme={null}
  {
  "data": {
    "status": "string",
    "createdCount": 0,
    "updatedCount": 0,
    "errors": [
      {
        "entityId": "string",
        "rowNumber": 0,
        "errorMessage": "string",
        "errorDetails": "string"
      }
    ],
    "warnings": [
      {
        "entityId": "string",
        "rowNumber": 0,
        "message": "string",
        "details": "string"
      }
    ]
  }
}
```
