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

# Create Product

> Creates a new product in your COR instance with external ID mapping

Creates a new product in your COR instance through the integrations service. The product must be associated with an existing client and brand that were previously created through the integrations API.

## Request Body Requirements

<ParamField body="metadata" type="object" required>
  <Expandable title="properties">
    <ParamField body="source" type="string" required>
      Integration source identifier. Must be one of: `JIRA`, `SALESFORCE`, `ADVERTMIND`, `QUICKBOOKS`, `ZAPIER`, `OKTA`, `MICROSOFT_DYNAMICS`, `GITHUB`, `MICROSOFT_TEAMS`, `VBS`, `SAP`, `GLOBANT`
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="id" type="string" required>
  External product ID from your source system
</ParamField>

<ParamField body="name" type="string" required>
  Product name
</ParamField>

<ParamField body="client_id" type="string" required>
  External client ID. The client must have been previously created through the integrations API.
</ParamField>

<ParamField body="brand_id" type="string" required>
  External brand ID. The brand must have been previously created through the integrations API.
</ParamField>

<ParamField body="description" type="string">
  Product description
</ParamField>

## Known Errors

* `ValidationError` — Missing required fields
* `ClientNotFoundError` — The specified client does not exist in the integration mappings
* `BrandNotFoundError` — The specified brand does not exist in the integration mappings
* `DuplicateExternalIdError` — A product with this external ID already exists for this source

<RequestExample>
  ```bash cURL theme={null}
  curl --location 'https://integrations.projectcor.com/v2/integrations/products' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "metadata": {
      "source": "MICROSOFT_DYNAMICS"
    },
    "id": "EXT-PROD-12345",
    "name": "Premium Product",
    "client_id": "EXT-CLIENT-67890",
    "brand_id": "EXT-BRAND-11111",
    "description": "Premium product description"
  }'
  ```

  ```python Python theme={null}
  import requests

  url = "https://integrations.projectcor.com/v2/integrations/products"

  payload = {
      "metadata": {
          "source": "MICROSOFT_DYNAMICS"
      },
      "id": "EXT-PROD-12345",
      "name": "Premium Product",
      "client_id": "EXT-CLIENT-67890",
      "brand_id": "EXT-BRAND-11111",
      "description": "Premium product description"
  }

  headers = {
      "Authorization": "Bearer YOUR_ACCESS_TOKEN",
      "Content-Type": "application/json"
  }

  response = requests.post(url, json=payload, headers=headers)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://integrations.projectcor.com/v2/integrations/products',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        metadata: {
          source: 'MICROSOFT_DYNAMICS'
        },
        id: 'EXT-PROD-12345',
        name: 'Premium Product',
        client_id: 'EXT-CLIENT-67890',
        brand_id: 'EXT-BRAND-11111',
        description: 'Premium product description'
      })
    }
  );

  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": 52188,
    "name": "Premium Product",
    "client_id": 58294,
    "brand_id": 52187,
    "company_id": 2336,
    "user_id": 48429,
    "created_at": "2025-12-09T15:22:28Z",
    "updated_at": "2025-12-09T15:22:28Z"
  }
  ```

  ```json 404 theme={null}
  {
    "error": "ClientNotFoundError",
    "message": "Client with external ID 'EXT-CLIENT-67890' not found",
    "code": "ZC004"
  }
  ```

  ```json 404 theme={null}
  {
    "error": "BrandNotFoundError",
    "message": "Brand with external ID 'EXT-BRAND-11111' not found",
    "code": "ZC004"
  }
  ```
</ResponseExample>
