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

# Create Product

> Inserts new product data into the system.



## OpenAPI

````yaml post /products
openapi: 3.1.0
info:
  title: Catalogix API
  description: >

    <br> API documentation for Catalogix services. <br>

    **Base URL:** `https://api.catalogix.ai` <br>

    Use this base URL to access all API endpoints.


    # Introduction

    Our suite of headless APIs enable end to end management of your fashion
    store. If you have any questions, please do not hesitate to contact us at
    support@catalogix.ai


    # Getting Started


    In Catalogix Headless Platform, your company or organization is treated as a
    Workspace. Within the workspace, a store is defined as a channel for selling
    your products. Stores can be an eCommerce website in a specific country, a
    mobile app, a printed catalog, a chatbot, a 3rd party marketplace, or even
    physical retail locations. 


    Once you share your store's product feed or product images with Catalogix
    via our Feed API or using a CSV/XML file, we process your catalog and enable
    our APIs and services for your store.


    # Authentication


    <!-- ReDoc-Inject: <security-definitions> -->


    Catalogix's REST APIs use Bearer token authentication to authenticate and
    authorize calls. Follow the steps listed here to get started.


    <h3> Step 1: Registering your store and getting your API token </h3>


    Catalogix will register your store and provide you an API token. Please
    reach out to support@catalogix.ai to get started.

        
    <br/>


    <h3> Step 2: Calling an API </h3>

    You can call any API included in your subscription using the generated API
    token.


    Pass the token in the Authorization header as follows:


    Authorization: Bearer {token}


    <h4>You can use the same token for all APIs.</h4>


    # Errors

    Catalogix Platform uses HTTP status codes to indicate success or failure of
    an API call. In general, status codes in the 2xx range means success, 4xx
    range means there was an error in the provided information, and those in the
    5xx range indicate server side errors. Commonly used HTTP status codes are
    listed below.


    |Status Code | Description  |

    |--|--|

    | `200` | **Success**: The request was successfully completed. |

    | `201` | **Created**: The request was a success and one or more resources
    have been created. |

    | `400` | **Bad request**: The request cannot be performed. Usually because
    of malformed parameter or missing parameter. |

    | `401` | **Unauthorized (Invalid AuthToken)**: Request was rejected because
    of invalid API Key |

    | `404` | **Resource Not Found**: The URL youʼve sent is wrong. Itʼs
    possible that the resource youʼve requested has been moved to another URL. |

    | `405` |**Method Not Found**: The HTTP method that the API is calling with
    is not supported for this API. |

    | `413` |**Payload too large**: The API accepts upto 100 data items at a
    time. |

    | `422` |**validation Error**: It failed validation. Please refer to the
    data format given in the description of each API |

    | `429` | **Too many requests**: Too many requests within a certain time
    frame. To know more about api call limits, click here. |

    | `500` | **Server error**: Catalogix Platform server encountered an error
    which prevents it from fulfilling the request. Although this rarely happens,
    we recommend you to contact us at support@catalogix.ai if you receive this
    error. |


    For details about the structure and application-specific error-codes of a
    specific Catalogix service, consult the documentation dedicated to that
    service.


    # Product Information


    <h3>What is a Product? </h3>

    <p>A product is a uniquely identified item in a store catalog which can be
    sold to customers. A product typically contains information such as an
    identifier (eg: SKU, Style Code, GTIN), a title, a description, images,
    brand name, price, sale price, and other such attributes.  </p>


    <h3>Where can it be implemented? </h3>

    <p>The APIs shown in the section below help you to create new products in
    the Catalogix platform, modify existing product information, and fetch
    product information which can be used in many ways such as populating the
    content of a Product Details Page.  </p>
  contact:
    name: Catalogix Support
    email: support@catalogix.ai
  license:
    name: Catalogix License
  version: 1.0.0
servers:
  - url: https://api.catalogix.ai/v1
    description: Catalogix APIs
security:
  - bearerAuth: []
paths:
  /products:
    post:
      tags:
        - Product APIs
      summary: Create Product
      description: Inserts new product data into the system.
      operationId: insert_data_products_post
      parameters:
        - name: store_uuid
          in: query
          required: true
          schema:
            type: string
            title: Store Uuid
          example: 67762d4ce590324df813bd8c
        - name: X-Request-Id
          in: header
          required: false
          schema:
            type: string
          description: Optional trace ID. If not provided, one is generated automatically
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/SkuDataModel'
              title: Data
      responses:
        '200':
          description: Insert successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsertDataResponse'
        '400':
          description: Invalid data format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '401':
          description: Unauthorized – Bearer token missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: Mapping profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '413':
          description: Payload too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
        '502':
          description: Downstream service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
      x-codeSamples:
        - lang: cURL
          label: cUrl
          source: >-
            curl --location --request POST
            'https://api.catalogix.ai/v1/products?store_uuid=67762d4ce590324df813bd8c'
            \

            --header 'Authorization: Bearer YOUR_TOKEN' \

            --header 'Content-Type: application/json' \

            --data-raw '[
              {
                "product_code": "CI001",
                "parent_code": "SC001",
                "Product Name": "Blue shirts",
                "Department": "Men",
                "Category": "Dupatta",
                "Selling Price": "1000",
                "Currency": "INR",
                "Image URL 1": "https://assets-test.catalogix.ai/dee9c181338099b931cde78787df567a",
                "Image URL 2": "https://assets-test.catalogix.ai/b9e0a674584b15df799a2d2a7bcb6f57",
                "Image URL 3": "https://assets-test.catalogix.ai/3d8f430ce3bc623e8037aac988a889c6",
                "Image URL 4": "https://assets-test.catalogix.ai/e263183310aa0093381bf48a6d8540aa",
                "Image URL 5": "https://assets-test.catalogix.ai/38d253f0fb7aad878ae270e2c612467a",
                "Image URL 6": "https://assets-test.catalogix.ai/5733be608a3f9303af5d7dd14621d2d1"
              }
            ]'
        - lang: Python
          label: Python
          source: >
            import requests

            import json


            url =
            "https://api.catalogix.ai/v1/products?store_uuid=67762d4ce590324df813bd8c"


            payload = json.dumps([
              {
                "product_code": "CI001",
                "parent_code": "SC001",
                "Product Name": "Blue shirts",
                "Department": "Men",
                "Category": "Dupatta",
                "Selling Price": "1000",
                "Currency": "INR",
                "Image URL 1": "https://assets-test.catalogix.ai/dee9c181338099b931cde78787df567a",
                "Image URL 2": "https://assets-test.catalogix.ai/b9e0a674584b15df799a2d2a7bcb6f57",
                "Image URL 3": "https://assets-test.catalogix.ai/3d8f430ce3bc623e8037aac988a889c6",
                "Image URL 4": "https://assets-test.catalogix.ai/e263183310aa0093381bf48a6d8540aa",
                "Image URL 5": "https://assets-test.catalogix.ai/38d253f0fb7aad878ae270e2c612467a",
                "Image URL 6": "https://assets-test.catalogix.ai/5733be608a3f9303af5d7dd14621d2d1"
              }
            ])

            headers = {
              'Authorization': 'Bearer YOUR_TOKEN',
              'Content-Type': 'application/json'
            }


            response = requests.request("POST", url, headers=headers,
            data=payload)


            print(response.text)
        - lang: JavaScript
          label: JavaScript
          source: >-
            var myHeaders = new Headers();

            myHeaders.append("Authorization", "Bearer YOUR_TOKEN");

            myHeaders.append("Content-Type", "application/json");


            var raw = JSON.stringify([
              {
                "product_code": "CI001",
                "parent_code": "SC001",
                "Product Name": "Blue shirts",
                "Department": "Men",
                "Category": "Dupatta",
                "Selling Price": "1000",
                "Currency": "INR",
                "Image URL 1": "https://assets-test.catalogix.ai/dee9c181338099b931cde78787df567a",
                "Image URL 2": "https://assets-test.catalogix.ai/b9e0a674584b15df799a2d2a7bcb6f57",
                "Image URL 3": "https://assets-test.catalogix.ai/3d8f430ce3bc623e8037aac988a889c6",
                "Image URL 4": "https://assets-test.catalogix.ai/e263183310aa0093381bf48a6d8540aa",
                "Image URL 5": "https://assets-test.catalogix.ai/38d253f0fb7aad878ae270e2c612467a",
                "Image URL 6": "https://assets-test.catalogix.ai/5733be608a3f9303af5d7dd14621d2d1"
              }
            ]);


            var requestOptions = {
              method: 'POST',
              headers: myHeaders,
              body: raw,
              redirect: 'follow'
            };


            fetch("https://api.catalogix.ai/v1/products?store_uuid=67762d4ce590324df813bd8c",
            requestOptions)
              .then(response => response.text())
              .then(result => console.log(result))
              .catch(error => console.log('error', error));
        - lang: PHP
          label: PHP
          source: |
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, array(
              CURLOPT_URL => 'https://api.catalogix.ai/v1/products?store_uuid=67762d4ce590324df813bd8c',
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => '',
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 0,
              CURLOPT_FOLLOWLOCATION => true,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => 'POST',
              CURLOPT_POSTFIELDS =>'[
              {
                "product_code": "CI001",
                "parent_code": "SC001",
                "Product Name": "Blue shirts",
                "Department": "Men",
                "Category": "Dupatta",
                "Selling Price": "1000",
                "Currency": "INR",
                "Image URL 1": "https://assets-test.catalogix.ai/dee9c181338099b931cde78787df567a",
                "Image URL 2": "https://assets-test.catalogix.ai/b9e0a674584b15df799a2d2a7bcb6f57",
                "Image URL 3": "https://assets-test.catalogix.ai/3d8f430ce3bc623e8037aac988a889c6",
                "Image URL 4": "https://assets-test.catalogix.ai/e263183310aa0093381bf48a6d8540aa",
                "Image URL 5": "https://assets-test.catalogix.ai/38d253f0fb7aad878ae270e2c612467a",
                "Image URL 6": "https://assets-test.catalogix.ai/5733be608a3f9303af5d7dd14621d2d1"
              }
            ]',
              CURLOPT_HTTPHEADER => array(
                'Authorization: Bearer YOUR_TOKEN',
                'Content-Type: application/json'
              ),
            ));

            $response = curl_exec($curl);

            curl_close($curl);
            echo $response;
        - lang: Go
          label: Go
          source: |-
            package main

            import (
              "fmt"
              "strings"
              "net/http"
              "io/ioutil"
            )

            func main() {

              url := "https://api.catalogix.ai/v1/products?store_uuid=67762d4ce590324df813bd8c"
              method := "POST"

              payload := strings.NewReader(`[
              {
                "product_code": "CI001",
                "parent_code": "SC001",
                "Product Name": "Blue shirts",
                "Department": "Men",
                "Category": "Dupatta",
                "Selling Price": "1000",
                "Currency": "INR",
                "Image URL 1": "https://assets-test.catalogix.ai/dee9c181338099b931cde78787df567a",
                "Image URL 2": "https://assets-test.catalogix.ai/b9e0a674584b15df799a2d2a7bcb6f57",
                "Image URL 3": "https://assets-test.catalogix.ai/3d8f430ce3bc623e8037aac988a889c6",
                "Image URL 4": "https://assets-test.catalogix.ai/e263183310aa0093381bf48a6d8540aa",
                "Image URL 5": "https://assets-test.catalogix.ai/38d253f0fb7aad878ae270e2c612467a",
                "Image URL 6": "https://assets-test.catalogix.ai/5733be608a3f9303af5d7dd14621d2d1"
              }
            ]`)

              client := &http.Client {
              }
              req, err := http.NewRequest(method, url, payload)

              if err != nil {
                fmt.Println(err)
                return
              }
              req.Header.Add("Authorization", "Bearer YOUR_TOKEN")
              req.Header.Add("Content-Type", "application/json")

              res, err := client.Do(req)
              if err != nil {
                fmt.Println(err)
                return
              }
              defer res.Body.Close()

              body, err := ioutil.ReadAll(res.Body)
              if err != nil {
                fmt.Println(err)
                return
              }
              fmt.Println(string(body))
            }
        - lang: Java
          label: Java
          source: >
            Unirest.setTimeouts(0, 0);

            HttpResponse<String> response =
            Unirest.post("https://api.catalogix.ai/v1/products?store_uuid=67762d4ce590324df813bd8c")
              .header("Authorization", "Bearer YOUR_TOKEN")
              .header("Content-Type", "application/json")
              .body("[\n  {\n    \"product_code\": \"CI001\",\n    \"parent_code\": \"SC001\",\n    \"Product Name\": \"Blue shirts\",\n    \"Department\": \"Men\",\n    \"Category\": \"Dupatta\",\n    \"Selling Price\": \"1000\",\n    \"Currency\": \"INR\",\n    \"Image URL 1\": \"https://assets-test.catalogix.ai/dee9c181338099b931cde78787df567a\",\n    \"Image URL 2\": \"https://assets-test.catalogix.ai/b9e0a674584b15df799a2d2a7bcb6f57\",\n    \"Image URL 3\": \"https://assets-test.catalogix.ai/3d8f430ce3bc623e8037aac988a889c6\",\n    \"Image URL 4\": \"https://assets-test.catalogix.ai/e263183310aa0093381bf48a6d8540aa\",\n    \"Image URL 5\": \"https://assets-test.catalogix.ai/38d253f0fb7aad878ae270e2c612467a\",\n    \"Image URL 6\": \"https://assets-test.catalogix.ai/5733be608a3f9303af5d7dd14621d2d1\"\n  }\n]")
              .asString();
components:
  schemas:
    SkuDataModel:
      properties:
        parent_code:
          type: string
          title: parent_code
          description: product parent code
          example: CI001
        Image URL 1:
          type: string
          title: Image Url 1
          description: Image URL 1
          example: https://assets-test.catalogix.ai/dee9c181338099b931cde78787df567a
        status:
          type: string
          enum:
            - active
            - new
            - problem
            - inactive
            - draft
            - under review
          title: Status
          example: inactive
          default: new
        product_code:
          type: string
          title: product_code
          description: Unique identifier for the product (SKU code)
          example: CI001-BLU
        assets:
          type: object
          title: Assets
          description: Product media assets
          properties:
            images:
              type: array
              items:
                type: string
              description: List of image URLs
              example:
                - >-
                  https://assets-test.catalogix.ai/dee9c181338099b931cde78787df567a
            videos:
              type: array
              items:
                type: string
              description: List of video URLs
              example:
                - >-
                  https://assets-test.catalogix.ai/cac950f7a787813a1d99fbb20e159ee2
      type: object
      required:
        - product_code
        - parent_code
      title: SkuDataModel
    InsertDataResponse:
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/StatusModel'
          description: Status of the operation
        data:
          allOf:
            - $ref: '#/components/schemas/InsertData'
          description: Information related to insertion of each products
      type: object
      required:
        - status
        - data
      title: InsertDataResponse
    ErrorResponseModel:
      properties:
        status:
          type: string
          title: Status
          description: The status of the request, typically 'error'
          default: error
        detail:
          type: string
          title: Detail
          description: A description of the error
      type: object
      required:
        - detail
      title: ErrorResponseModel
    UnauthorizedError:
      type: object
      properties:
        status:
          type: object
          properties:
            code:
              type: integer
              example: -1
            message:
              type: string
              example: Unauthorized – invalid or missing Bearer token
      title: UnauthorizedError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InternalServerError:
      type: object
      properties:
        status:
          type: object
          properties:
            code:
              type: integer
              example: -1
            message:
              type: string
              example: Internal server error. Please contact support@catalogix.ai
      title: InternalServerError
    StatusModel:
      properties:
        code:
          type: integer
          title: Code
          description: >-
            Status code of the operation. 1 means success. -1 means failure. 0
            means process moved to background
          example: 0
        message:
          type: string
          title: Message
          description: Message describing the status
          example: success
        request_id:
          type: string
          title: Request Id
          description: >-
            Unique trace ID for the request. Echoed from X-Request-Id header or
            auto-generated.
          example: 8c8b2b7e-23d7-4c2a-91b0-2a7c4dfbb312
      type: object
      required:
        - code
        - message
      title: StatusModel
    InsertData:
      properties:
        store_uuid:
          type: string
          title: Store Uuid
          description: Unique identifier for the store
          example: 67762d4ce590324df813bd8c
        failed_products:
          type: object
          title: Failed Products
          description: >-
            Products that failed to insert. Keyed by product_code with error
            details as value.
          example:
            SKU003:
              Color: invalid value
          additionalProperties:
            type: object
        successful_product_codes:
          items:
            type: string
          type: array
          title: Successful Product Codes
          example:
            - CI001
        existing_product_codes:
          items:
            type: string
          type: array
          title: Existing Product Codes
          default:
            - CI001
      type: object
      required:
        - store_uuid
      title: InsertData
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
          default:
            - body
            - ''
        msg:
          type: string
          title: Message
          default: Field Required
        type:
          type: string
          title: Error Type
          default: missing
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Pass the API token as a Bearer token in the Authorization header.

````