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

> Create or update asset links with rank assignment. Supports batch input.



## OpenAPI

````yaml post /assets
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:
  /assets:
    post:
      tags:
        - Asset APIs
      summary: Create Assets
      description: Create or update asset links with rank assignment. Supports batch input.
      operationId: create_update_asset
      parameters:
        - name: store_uuid
          in: query
          required: true
          schema:
            type: string
          example: 699ec31355208b213e56059a
          description: Store identifier
        - name: channel
          in: query
          required: false
          schema:
            type: string
            default: SMP
          description: Channel for all assets in the request
        - name: X-Request-Id
          in: header
          required: false
          schema:
            type: string
          description: Optional trace ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/AssetUpsertItem'
            example:
              - parent_code: SKU001
                asset_type: image
                assets:
                  Image URL 1: https://cdn.example.com/img1.jpg
                  Image URL 2: https://cdn.example.com/img2.jpg
      responses:
        '200':
          description: Assets created or updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetUpsertResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '401':
          description: Unauthorized – Bearer token missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '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/assets?store_uuid=67762d4ce590324df813bd8c&channel=SMP'
            \

            --header 'Authorization: Bearer YOUR_TOKEN' \

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

            --data-raw '[\n  {\n    "parent_code": "SKU001",\n    "asset_type":
            "image",\n    "assets": {\n      "Image URL 1":
            "https://cdn.example.com/img1.jpg"\n    }\n  }\n]'
        - lang: Python
          label: Python
          source: >
            import requests

            import json


            url =
            "https://api.catalogix.ai/v1/assets?store_uuid=67762d4ce590324df813bd8c&channel=SMP"


            payload = json.dumps([
              {
                "parent_code": "SKU001",
                "asset_type": "image",
                "assets": {
                  "Image URL 1": "https://cdn.example.com/img1.jpg"
                }
              }
            ])

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


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

            print(response.text)
components:
  schemas:
    AssetUpsertItem:
      type: object
      required:
        - parent_code
        - assets
        - asset_type
      properties:
        parent_code:
          type: string
          example: SKU001
          description: Parent/product code
        asset_type:
          type: string
          example: image
          description: Defaults to image
        product_uuid:
          type: string
          description: Optional; resolved via search API if not provided
        assets:
          type: object
          additionalProperties:
            type: string
          example:
            Image URL 1: https://cdn.example.com/img1.jpg
          description: Map of image attribute name to URL
    AssetUpsertResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/StandardStatus'
        data:
          type: object
          properties:
            created:
              type: integer
              example: 1
            updated:
              type: integer
              example: 0
            failed:
              type: integer
              example: 0
            error_info:
              type: array
              items:
                type: object
    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
    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
    StandardStatus:
      type: object
      properties:
        code:
          type: integer
          example: 0
          description: 0 = success, -1 = error
        message:
          type: string
          example: SUCCESS
        request_id:
          type: string
          example: 8c8b2b7e-23d7-4c2a-91b0-2a7c4dfbb312
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Pass the API token as a Bearer token in the Authorization header.

````