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

# Update Product

> Updates existing product data.



## OpenAPI

````yaml put /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:
    put:
      tags:
        - Product APIs
      summary: Update Product
      description: Updates existing product data.
      operationId: update_data_products_put
      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/UpdateSkuDataModel'
              title: Data
      responses:
        '200':
          description: Update successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateDataResponse'
        '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 PUT
            'https://api.catalogix.ai/v1/products?store_uuid=67762d4ce590324df813bd8c'
            \

            --header 'Authorization: Bearer YOUR_TOKEN' \

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

            --data-raw '[
              {
                "product_code": "CI001",
                "Category": "Shirts",
                "Department": "Men",
                "Status": "inactive"
              }
            ]'
        - 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",
                "Category": "Shirts",
                "Department": "Men",
                "Status": "inactive"
              }
            ])

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


            response = requests.request("PUT", 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",
                "Category": "Shirts",
                "Department": "Men",
                "Status": "inactive"
              }
            ]);


            var requestOptions = {
              method: 'PUT',
              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 => 'PUT',
              CURLOPT_POSTFIELDS =>'[
              {
                "product_code": "CI001",
                "Category": "Shirts",
                "Department": "Men",
                "Status": "inactive"
              }
            ]',
              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 := "PUT"

              payload := strings.NewReader(`[
              {
                "product_code": "CI001",
                "Category": "Shirts",
                "Department": "Men",
                "Status": "inactive"
              }
            ]`)

              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.put("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    \"Category\": \"Shirts\",\n    \"Department\": \"Men\",\n    \"Status\": \"inactive\"\n  }\n]")
              .asString();
components:
  schemas:
    UpdateSkuDataModel:
      properties:
        status:
          type: string
          enum:
            - active
            - new
            - problem
            - inactive
            - draft
            - under review
          title: Status
          example: inactive
        product_code:
          type: string
          title: product_code
          description: Unique identifier for the product (SKU code)
          example: CI001
      type: object
      required:
        - product_code
      title: UpdateSkuDataModel
    UpdateDataResponse:
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/StatusModel'
          description: Status of the operation
        data:
          allOf:
            - $ref: '#/components/schemas/UpdateDataModel'
          description: Data containing updated and unavailable SKUs
      type: object
      required:
        - status
        - data
      title: UpdateDataResponse
    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
    UpdateDataModel:
      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 update. Keyed by product_code with error
            details as value.
          example:
            SKU003:
              Color: invalid value
          additionalProperties:
            type: object
        updated_skus:
          items:
            type: string
          type: array
          title: Updated products
          description: List of Products that were successfully updated
          default:
            - CI001
        unavailable_skus:
          items:
            type: string
          type: array
          title: Unavailable products
          description: List of Products that were unavailable for update
          default:
            - CI00000000
      type: object
      required:
        - store_uuid
      title: UpdateDataModel
    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.

````