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

# Create a product

> Creates a product in a store, with its SKUs, barcode (UPC/EAN), logistics data (weight and
dimensions) and fiscal data. Send a single product (`skus` + `upc`) or a product with
variants (`has_variants: true` + `variants[]`), which creates one product per variant.
- **Barcode and SKU rules.** Both the barcode (`upc`) and every SKU must be unique within the store, and a barcode may not reuse a value already registered as a SKU of another product (or the other way round). The request is rejected with 422 when any of them is already taken. SKUs are trimmed of surrounding whitespace.
- **Weight.** `weight` is stored in kilograms. Send `weight_unit: "g"` (or `"gr"`) to send grams; the value is converted to kg and the stored unit becomes `kg`. Any other unit is stored as sent, without conversion.
- **Dimensions.** `length`, `width` and `height` must be between 0.01 and 999999.99; `dimension_unit` defaults to `cm`.
- **Dropshipping.** `is_dropshipping: true` marks a product that Cubbo does not stock. It cannot be combined with `has_variants`.
- **Non-scannable (marketing) products.** `is_scannable: false` requires a `product_image` and cannot be combined with `has_variants`.
- **Expiration.** When `has_expiration` is true you must also send `freshness` (minimum shelf-life in days required at receiving), or the product fails validation.
- **Kits (bundles).** This endpoint does not create kits: the created product always has `is_kit: false`. Kits are configured from the Cubbo app; their components are returned by `GET /inventory` as `kit_childs`.
- **Fiscal data (Brazil).** `tax_code` is the product's NCM code (Brazilian fiscal classification) or the id of an NCM configuration already registered in the store; an NCM that is not configured for the store is rejected. `origin`, `extipi` and `fci_key` feed the NF-e (Brazilian electronic invoice).
- **Variants.** Each variant becomes an independent product named `"<name> <variant name>"`, with its own `skus` and `bar_code`. The response is then an array of products in the full product format instead of a single product.
- **Concurrency.** Two simultaneous requests for the same SKUs in the same store are de-duplicated: the second receives `202 Accepted` while the first is still processing.
- **Integration accounts.** For API users linked to certain marketplace integrations the endpoint behaves as an upsert by barcode: an existing barcode gets the new SKU added (or its name and weight updated when the SKU already exists), `has_expiration` is forced to true with a default `freshness` of 180 days, `master_box_quantity` registers the units per master box for the SKU, and a SKU that already belongs to another product can be migrated to the new product when `migrate_sku` is true or the store has automatic SKU migration enabled. Variants are not supported for these accounts, and `weight_unit` is required.




## OpenAPI

````yaml /openapi.yaml post /products
openapi: 3.1.0
info:
  title: Cubbo Clients API
  version: '1.0'
  summary: >-
    Orders, inventory, replenishments, returns, shipping and webhooks for Cubbo
    fulfillment.
  description: >
    The Cubbo Clients API connects your store, ERP or marketplace with Cubbo's
    fulfillment network.

    All endpoints except `POST /auth/token` require a bearer token; see the
    Authentication guide.

    Request and response bodies are JSON. Errors are JSON objects with an
    `error` key.
  contact:
    name: Cubbo integrations
    email: integraciones@cubbo.com
servers:
  - url: https://api.cubbo.com/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Exchange client credentials for a bearer token.
  - name: Orders
    description: Create, update, hold, cancel and read sales orders.
  - name: Shipping labels
    description: Read the shipping labels generated for an order.
  - name: Inventory
    description: Products and stock per store.
  - name: Lots
    description: Lot-level inventory for products with expiration or batch tracking.
  - name: Reports
    description: Bulk reports for reconciliation.
  - name: Replenishments
    description: Inbound shipments to the warehouse.
  - name: Returns
    description: Returns and exchanges.
  - name: Stores
    description: Store provisioning and settings.
  - name: Shipping methods
    description: Available shipping methods, coverage and quotes.
  - name: Click and collect
    description: Pickup points and in-store pickup orders.
paths:
  /products:
    post:
      tags:
        - Inventory
      summary: Create a product
      description: >
        Creates a product in a store, with its SKUs, barcode (UPC/EAN),
        logistics data (weight and

        dimensions) and fiscal data. Send a single product (`skus` + `upc`) or a
        product with

        variants (`has_variants: true` + `variants[]`), which creates one
        product per variant.

        - **Barcode and SKU rules.** Both the barcode (`upc`) and every SKU must
        be unique within the store, and a barcode may not reuse a value already
        registered as a SKU of another product (or the other way round). The
        request is rejected with 422 when any of them is already taken. SKUs are
        trimmed of surrounding whitespace.

        - **Weight.** `weight` is stored in kilograms. Send `weight_unit: "g"`
        (or `"gr"`) to send grams; the value is converted to kg and the stored
        unit becomes `kg`. Any other unit is stored as sent, without conversion.

        - **Dimensions.** `length`, `width` and `height` must be between 0.01
        and 999999.99; `dimension_unit` defaults to `cm`.

        - **Dropshipping.** `is_dropshipping: true` marks a product that Cubbo
        does not stock. It cannot be combined with `has_variants`.

        - **Non-scannable (marketing) products.** `is_scannable: false` requires
        a `product_image` and cannot be combined with `has_variants`.

        - **Expiration.** When `has_expiration` is true you must also send
        `freshness` (minimum shelf-life in days required at receiving), or the
        product fails validation.

        - **Kits (bundles).** This endpoint does not create kits: the created
        product always has `is_kit: false`. Kits are configured from the Cubbo
        app; their components are returned by `GET /inventory` as `kit_childs`.

        - **Fiscal data (Brazil).** `tax_code` is the product's NCM code
        (Brazilian fiscal classification) or the id of an NCM configuration
        already registered in the store; an NCM that is not configured for the
        store is rejected. `origin`, `extipi` and `fci_key` feed the NF-e
        (Brazilian electronic invoice).

        - **Variants.** Each variant becomes an independent product named
        `"<name> <variant name>"`, with its own `skus` and `bar_code`. The
        response is then an array of products in the full product format instead
        of a single product.

        - **Concurrency.** Two simultaneous requests for the same SKUs in the
        same store are de-duplicated: the second receives `202 Accepted` while
        the first is still processing.

        - **Integration accounts.** For API users linked to certain marketplace
        integrations the endpoint behaves as an upsert by barcode: an existing
        barcode gets the new SKU added (or its name and weight updated when the
        SKU already exists), `has_expiration` is forced to true with a default
        `freshness` of 180 days, `master_box_quantity` registers the units per
        master box for the SKU, and a SKU that already belongs to another
        product can be migrated to the new product when `migrate_sku` is true or
        the store has automatic SKU migration enabled. Variants are not
        supported for these accounts, and `weight_unit` is required.
      operationId: createProduct
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductCreateRequest'
            examples:
              singleProduct:
                summary: Single product with logistics and fiscal data
                value:
                  store_id: 1234
                  name: Widget Pro Black
                  description: <p>A professional-grade widget.</p>
                  skus:
                    - SKU-RED-M
                  upc: '7501234567890'
                  price: 99.99
                  weight: 500
                  weight_unit: g
                  length: 10
                  width: 8
                  height: 5
                  dimension_unit: cm
                  is_fragile: false
                  has_expiration: true
                  freshness: 180
                  tax_code: 3401.11.90
                  origin: NATIONAL
              dropshipping:
                summary: Dropshipping product
                value:
                  store_id: 1234
                  name: Printed Poster
                  skus:
                    - SKU-POSTER-01
                  upc: '7501234567891'
                  is_dropshipping: true
                  weight: 0.2
                  weight_unit: kg
              withVariants:
                summary: Product with size variants
                value:
                  store_id: 1234
                  name: Widget Tee
                  description: Cotton tee
                  has_variants: true
                  weight: 0.3
                  weight_unit: kg
                  options:
                    - name: Size
                      tags:
                        - S
                        - M
                  variants:
                    - name: S
                      skus:
                        - SKU-TEE-S
                      bar_code: '7501234567892'
                      options_name:
                        - name: Size
                          value: S
                    - name: M
                      skus:
                        - SKU-TEE-M
                      bar_code: '7501234567893'
                      options_name:
                        - name: Size
                          value: M
              nonScannableWithImage:
                summary: Non-scannable product with an inline image
                value:
                  store_id: 1234
                  name: Thank-you card
                  skus:
                    - SKU-CARD-01
                  upc: CARD-01
                  is_scannable: false
                  product_image:
                    filename: card.png
                    base64_data: >-
                      iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
                    content_type: image/png
      responses:
        '201':
          description: >-
            Product created. A single product returns one object; a
            `has_variants` request returns an array with one full product per
            variant.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ProductCreated'
                  - type: array
                    items:
                      $ref: '#/components/schemas/ProductDetailed'
              examples:
                singleProduct:
                  value:
                    id: 12345
                    name: Widget Pro Black
                    billing_name: null
                    description: <p>A professional-grade widget.</p>
                    has_imei: false
                    is_fragile: false
                    is_kit: false
                    bar_code: '7501234567890'
                    is_dropshipping: false
                    has_expiration: true
                    freshness: 180
                    is_scannable: true
                    price: '99.99'
                    weight: 0.5
                    product_codes:
                      - id: 9001
                        sku: SKU-RED-M
                withVariants:
                  value:
                    - id: 12346
                      name: Widget Tee S
                      billing_name: null
                      description: Cotton tee
                      has_imei: false
                      requires_unit_code: false
                      allow_unit_code_substitution: false
                      personalized_units: false
                      is_fragile: false
                      is_kit: false
                      bar_code: '7501234567892'
                      is_dropshipping: false
                      has_expiration: false
                      freshness: null
                      stock: null
                      full_name: Widget Tee S
                      is_scannable: true
                      product_image_path: null
                      price: '0.0'
                      weight: 0.3
                      weight_unit: kg
                      origin: NATIONAL
                      buffer_stock: null
                      is_packageless: false
                      length: null
                      width: null
                      height: null
                      dimension_unit: cm
                      is_discarded: false
                      product_codes:
                        - id: 9002
                          product_id: 12346
                          sku: SKU-TEE-S
                          created_at: '2026-10-12T15:04:05.000Z'
                          updated_at: '2026-10-12T15:04:05.000Z'
                      kit_childs: []
                      store:
                        id: 1234
                        name: Example Store
                      ncm_configuration: null
        '202':
          description: >-
            Another request for the same SKUs in this store is still being
            processed. Retry later and check the catalog before re-sending.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptedProcessing'
              example:
                message: Accepted, but PRODUCT whit skus SKU-RED-M still processing.
                transaction_id: 7f3c2a1e-0000-4000-8000-000000000000
                transaction_key: api_create_products-SKU-RED-M-1234
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: Validation or business error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missingParam:
                  value:
                    error: Parameter name is required
                missingSkus:
                  value:
                    error: Parameter skus is required
                missingUpc:
                  value:
                    error: Parameter upc is required
                invalidBoolean:
                  value:
                    error: '''maybe'' is not a valid boolean'
                dimensionOutOfRange:
                  value:
                    error: Parameter length cannot be less than 0.01
                dimensionUnit:
                  value:
                    error: >-
                      Parameter dimension_unit must be within ["cm", "mm", "in",
                      "m"]
                skuOrUpcExists:
                  value:
                    error: >-
                      A product with provided sku or upc already exists for this
                      store (SKU-RED-M,7501234567890)
                upcTaken:
                  value:
                    error: >-
                      Validation failed: Bar code upc 7501234567890 is already
                      taken for this store.
                freshnessRequired:
                  value:
                    error: >-
                      Validation failed: Freshness Freshness must be setted for
                      expirable products.
                ncmNotConfigured:
                  value:
                    error: NCM 34011190 not configured for this store
                nonScannableNeedsImage:
                  value:
                    error: Non-scannable products must have an image.
                nonScannableWithVariants:
                  value:
                    error: Non-scannable products cannot have variants.
                dropshippingWithVariants:
                  value:
                    error: Variant products cannot be created as dropshipping.
                variantsEmpty:
                  value:
                    error: Parameter variants cannot be blank
                variantSkuExists:
                  value:
                    error: Products [12345] with same Sku SKU-TEE-S
                variantBarCodeExists:
                  value:
                    error: Products [12345] with same bar code 7501234567892
                variantSkuEmpty:
                  value:
                    error: Sku is empty
                imageTooLarge:
                  value:
                    error: >-
                      product_image.base64_data exceeds maximum allowed size
                      (10485760 bytes).
                variantsNotSupportedForIntegration:
                  value:
                    error: >-
                      Variant products are not supported for the natura
                      integration.
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    ProductCreateRequest:
      type: object
      description: >-
        Body of `POST /products`. `skus` and `upc` are required for a single
        product; `variants` is required when `has_variants` is true.
      properties:
        store_id:
          type: integer
          description: Store to create the product in.
          example: 1234
        name:
          type: string
          description: Product name.
          example: Widget Pro Black
        description:
          type: string
          description: Product description; HTML is allowed.
          example: <p>A professional-grade widget.</p>
        skus:
          type: array
          description: >-
            SKUs of the product (single-product requests). Required unless
            `has_variants` is true. Each must be unique within the store.
          items:
            type: string
          example:
            - SKU-RED-M
        upc:
          type: string
          description: >-
            Barcode (UPC/EAN). Required unless `has_variants` is true. Must be
            unique within the store and must not match another product's SKU.
          example: '7501234567890'
        has_variants:
          type: boolean
          description: >-
            Create one product per entry in `variants` instead of a single
            product.
          default: false
          example: false
        options:
          type: array
          description: Option axes of a variant product. Only with `has_variants`.
          items:
            $ref: '#/components/schemas/ProductOptionInput'
        variants:
          type: array
          description: >-
            Variants to create. Required and non-empty when `has_variants` is
            true.
          items:
            $ref: '#/components/schemas/ProductVariantInput'
        is_fragile:
          type: boolean
          description: Requires fragile handling.
          default: false
          example: false
        is_dropshipping:
          type: boolean
          description: >-
            Product fulfilled by dropshipping (Cubbo holds no stock). Not
            allowed with `has_variants`.
          default: false
          example: false
        has_expiration:
          type: boolean
          description: Stock is tracked by lot with expiration dates. Requires `freshness`.
          default: false
          example: true
        freshness:
          type:
            - integer
            - 'null'
          description: >-
            Minimum shelf life in days a lot must have when received. Required
            when `has_expiration` is true.
          example: 180
        tax_code:
          type:
            - string
            - 'null'
          description: >-
            Brazil only. NCM code of the product (for example `3401.11.90`) or
            the id of an NCM configuration of the store. Must already be
            configured for the store.
          example: 3401.11.90
        is_packageless:
          type: boolean
          description: Ships without additional packaging.
          default: false
          example: false
        has_imei:
          type: boolean
          description: Each unit is identified by an IMEI.
          default: false
          example: false
        requires_unit_code:
          type: boolean
          description: >-
            Each unit is identified by a unique code (serial) that is scanned at
            receiving and picking.
          default: false
          example: false
        product_image_url:
          type: string
          description: >-
            Public URL of the product image to download and attach (PNG or
            JPEG).
          example: https://cdn.example.com/images/widget.png
        product_image:
          $ref: '#/components/schemas/ProductImageInput'
        is_scannable:
          type: boolean
          description: >-
            Units can be scanned at picking. Set to false for marketing inserts;
            then `product_image` is required and `has_variants` is not allowed.
          default: true
          example: true
        price:
          type: number
          description: >-
            Unit price. Up to 8 significant digits. A non-numeric value is
            stored as 0.
          default: 0
          example: 99.99
        billing_name:
          type:
            - string
            - 'null'
          description: Name printed on invoices, when different from `name`.
          example: Widget Pro - Black Edition
        origin:
          type: string
          description: Brazil only. Fiscal origin of the goods for the NF-e.
          enum:
            - NATIONAL
            - FOREIGN_IMPORTED
            - FOREIGN_ACQUIRED_INTERNALLY
            - NATIONAL_40_70_IMPORTED
            - NATIONAL_MANUFACTURED
            - NATIONAL_0_40_IMPORTED
            - FOREIGN_DIRECT_IMPORT
            - FOREIGN_ACQUIRED_INTERNALLY_WITHOUT_NATIONAL_SIMILAR
            - NATIONAL_70_IMPORTED
          default: NATIONAL
          example: NATIONAL
        extipi:
          type:
            - string
            - 'null'
          description: Brazil only. IPI exception code (EX TIPI), 2 or 3 digits.
          example: '001'
        fci_key:
          type:
            - string
            - 'null'
          description: Brazil only. FCI (import content form) key for the NF-e.
          example: 00000000-0000-0000-0000-000000000000
        weight:
          type: number
          description: Unit weight, in `weight_unit`. Stored in kilograms.
          example: 500
        weight_unit:
          type: string
          description: >-
            Unit of `weight`. `g` or `gr` is converted to kilograms; any other
            value (for example `kg`) is stored as sent. Required for certain
            marketplace integration accounts.
          example: g
        length:
          type: number
          description: Package length in `dimension_unit`, between 0.01 and 999999.99.
          minimum: 0.01
          maximum: 999999.99
          example: 10
        width:
          type: number
          description: Package width in `dimension_unit`, between 0.01 and 999999.99.
          minimum: 0.01
          maximum: 999999.99
          example: 8
        height:
          type: number
          description: Package height in `dimension_unit`, between 0.01 and 999999.99.
          minimum: 0.01
          maximum: 999999.99
          example: 5
        dimension_unit:
          type: string
          description: Unit of the dimensions.
          enum:
            - cm
            - mm
            - in
            - m
          default: cm
          example: cm
        master_box_quantity:
          type:
            - integer
            - 'null'
          description: >-
            Certain marketplace integration accounts only. Units per master box
            for the SKU; registers or updates the master box configuration.
          minimum: 1
          example: 12
        migrate_sku:
          type: boolean
          description: >-
            Certain marketplace integration accounts only. When the SKU already
            belongs to another product of the store, move the SKU (with its
            lots, stock, open order lines and open replenishments) to the new
            product instead of failing.
          default: false
          example: false
      required:
        - store_id
        - name
    ProductCreated:
      type: object
      description: >-
        The product returned by `POST /products` for a single (non-variant)
        request.
      properties:
        id:
          type: integer
          description: Cubbo product id. Use it for `PATCH /products/{id}`.
          example: 12345
        name:
          type: string
          description: Product name.
          example: Widget Pro Black
        billing_name:
          type:
            - string
            - 'null'
          description: Name printed on invoices.
          example: null
        description:
          type:
            - string
            - 'null'
          description: Product description.
          example: <p>A professional-grade widget.</p>
        has_imei:
          type: boolean
          description: Each unit is identified by an IMEI.
          example: false
        is_fragile:
          type: boolean
          description: Requires fragile handling.
          example: false
        is_kit:
          type: boolean
          description: Always false for products created through the API.
          example: false
        bar_code:
          type:
            - string
            - 'null'
          description: Barcode (UPC/EAN).
          example: '7501234567890'
        is_dropshipping:
          type: boolean
          description: Fulfilled by dropshipping.
          example: false
        has_expiration:
          type:
            - boolean
            - 'null'
          description: Stock is tracked by lot with expiration dates.
          example: true
        freshness:
          type:
            - integer
            - 'null'
          description: Minimum shelf life in days at receiving.
          example: 180
        is_scannable:
          type: boolean
          description: Units can be scanned at picking.
          example: true
        price:
          type:
            - string
            - 'null'
          description: Unit price, as a decimal string.
          example: '99.99'
        weight:
          type:
            - number
            - 'null'
          description: Unit weight in kilograms (after conversion).
          example: 0.5
        product_codes:
          type: array
          description: SKUs registered for the product.
          items:
            $ref: '#/components/schemas/ProductCode'
      required:
        - id
        - name
        - is_kit
        - product_codes
    ProductDetailed:
      type: object
      description: >-
        Full product representation, as used by the Cubbo app. Returned by
        `PATCH /products/{id}` and, as an array, by `POST /products` with
        variants.
      properties:
        id:
          type: integer
          description: Cubbo product id.
          example: 12345
        name:
          type: string
          description: Product name.
          example: Widget Pro Black
        billing_name:
          type:
            - string
            - 'null'
          description: Name printed on invoices.
          example: null
        description:
          type:
            - string
            - 'null'
          description: Product description (may contain HTML).
          example: <p>A professional-grade widget.</p>
        has_imei:
          type: boolean
          description: Each unit is identified by an IMEI.
          example: false
        requires_unit_code:
          type: boolean
          description: Each unit is identified by a unique code (serial).
          example: false
        allow_unit_code_substitution:
          type: boolean
          description: >-
            A reserved unit may be swapped for another unit of the same product
            at picking.
          example: false
        personalized_units:
          type:
            - boolean
            - 'null'
          description: Units are personalized per order.
          example: false
        is_fragile:
          type: boolean
          description: Requires fragile handling.
          example: false
        is_kit:
          type: boolean
          description: The product is a kit (bundle).
          example: false
        bar_code:
          type:
            - string
            - 'null'
          description: Barcode (UPC/EAN).
          example: '7501234567890'
        is_dropshipping:
          type: boolean
          description: Fulfilled by dropshipping.
          example: false
        has_expiration:
          type:
            - boolean
            - 'null'
          description: Stock is tracked by lot with expiration dates.
          example: true
        freshness:
          type:
            - integer
            - 'null'
          description: Minimum shelf life in days at receiving.
          example: 180
        stock:
          oneOf:
            - $ref: '#/components/schemas/ProductStock'
            - type: 'null'
          description: >-
            Aggregate stock (without the `LOST` and by-source keys). Null for a
            product that has never had stock.
        full_name:
          type: string
          description: Product name including the parent name for variants.
          example: Widget Pro Black
        is_scannable:
          type: boolean
          description: Units can be scanned at picking.
          example: true
        product_image_path:
          type:
            - string
            - 'null'
          description: URL of the product image, when one is attached.
          example: null
        price:
          type:
            - string
            - 'null'
          description: Unit price, as a decimal string.
          example: '99.99'
        weight:
          type:
            - number
            - 'null'
          description: Unit weight in `weight_unit`.
          example: 0.5
        weight_unit:
          type:
            - string
            - 'null'
          description: Unit of `weight`.
          example: kg
        origin:
          type:
            - string
            - 'null'
          description: Brazil only. Fiscal origin of the goods.
          example: NATIONAL
        buffer_stock:
          type:
            - integer
            - 'null'
          description: Safety stock excluded from availability.
          example: null
        is_packageless:
          type: boolean
          description: Ships without additional packaging.
          example: false
        length:
          type:
            - string
            - 'null'
          description: Package length, as a decimal string.
          example: '10.0'
        width:
          type:
            - string
            - 'null'
          description: Package width, as a decimal string.
          example: '8.0'
        height:
          type:
            - string
            - 'null'
          description: Package height, as a decimal string.
          example: '5.0'
        dimension_unit:
          type: string
          description: Unit of the dimensions.
          enum:
            - cm
            - mm
            - in
            - m
          example: cm
        extipi:
          type: string
          description: Brazil only. IPI exception code. Present only when set.
          example: '001'
        fci_key:
          type: string
          description: Brazil only. FCI key. Present only when set.
          example: 00000000-0000-0000-0000-000000000000
        is_discarded:
          type: boolean
          description: The product has been removed from the catalog.
          example: false
        product_codes:
          type: array
          description: SKUs registered for the product, with timestamps.
          items:
            type: object
            properties:
              id:
                type: integer
                description: SKU record id.
                example: 9001
              product_id:
                type: integer
                description: Product id.
                example: 12345
              sku:
                type: string
                description: The SKU.
                example: SKU-RED-M
              created_at:
                type: string
                format: date-time
                description: When the SKU was registered.
                example: '2026-10-12T15:04:05.000Z'
              updated_at:
                type: string
                format: date-time
                description: Last change of the SKU.
                example: '2026-10-12T15:04:05.000Z'
        kit_childs:
          type: array
          description: Components of the kit. Empty unless `is_kit` is true.
          items:
            type: object
            properties:
              id:
                type: integer
                description: Kit component line id.
                example: 501
              quantity:
                type: integer
                description: Units of the component in one kit.
                example: 2
              price_per_item:
                type:
                  - string
                  - 'null'
                description: Price per component unit
                as a decimal string.: null
                example: '49.50'
              child_product:
                type:
                  - object
                  - 'null'
                description: >-
                  The component product (id, name, codes, stock and flags). Null
                  when it was removed from the catalog.
                additionalProperties: true
        store:
          type: object
          description: >-
            Store that owns the product. Carries the store's id and name plus
            its configuration fields.
          properties:
            id:
              type: integer
              description: Store id.
              example: 1234
            name:
              type: string
              description: Store name.
              example: Example Store
          additionalProperties: true
        ncm_configuration:
          type:
            - object
            - 'null'
          description: >-
            Brazil only. The NCM fiscal configuration linked to the product
            (`id`, `ncm`, `description` and the tax rates and CFOP codes used on
            the NF-e). Null when none is linked.
          additionalProperties: true
      required:
        - id
        - name
        - is_kit
        - product_codes
    AcceptedProcessing:
      type: object
      description: >-
        Returned with HTTP 202 when a concurrent request for the same resource
        is still being processed.
      properties:
        message:
          type: string
          description: Explains which request is still processing.
          example: Accepted, but PRODUCT whit skus SKU-RED-M still processing.
        transaction_id:
          type: string
          description: Id of the request already in progress.
          example: 7f3c2a1e-0000-4000-8000-000000000000
        transaction_key:
          type: string
          description: Concurrency key the two requests collided on.
          example: api_create_products-SKU-RED-M-1234
      required:
        - message
        - transaction_id
        - transaction_key
    Error:
      type: object
      description: Error body returned by every failed request.
      required:
        - error
      properties:
        error:
          type: string
          description: >-
            Human-readable description of the failure. For `401` responses it is
            always `Unauthorized`.
          example: Parameter store_id is required
        message:
          type: string
          description: >-
            Present on `401` responses only; the reason the request was
            rejected.
          example: invalid token
        code:
          type:
            - string
            - 'null'
          description: >-
            Stable machine-readable code, present on some order, return and
            replenishment errors.
          example: ORDER_ALREADY_EXISTS
        context:
          type:
            - object
            - 'null'
          description: >-
            Extra data about the failure when available, for example the id of
            the conflicting order.
          additionalProperties: true
          example:
            order_id: 987654
    ProductOptionInput:
      type: object
      description: >-
        An option axis of a variant product (for example Size) and its possible
        values.
      properties:
        name:
          type: string
          description: Option name.
          example: Size
        tags:
          type: array
          description: Possible values.
          items:
            type: string
          example:
            - S
            - M
            - L
      required:
        - name
        - tags
    ProductVariantInput:
      type: object
      description: >-
        One variant of a `has_variants` product. Each variant becomes its own
        product.
      properties:
        name:
          type: string
          description: >-
            Variant name. The created product is named `"<product name> <variant
            name>"`.
          example: S
        skus:
          type: array
          description: SKUs of the variant. At least one, unique within the store.
          items:
            type: string
          example:
            - SKU-TEE-S
        bar_code:
          type:
            - string
            - 'null'
          description: Barcode (UPC/EAN) of the variant, unique within the store.
          example: '7501234567892'
        options_name:
          type: array
          description: Option values that define this variant.
          items:
            type: object
            properties:
              name:
                type: string
                description: Option name.
                example: Size
              value:
                type: string
                description: Option value.
                example: S
            required:
              - name
              - value
      required:
        - name
        - skus
    ProductImageInput:
      type: object
      description: >-
        An image sent inline as base64. PNG or JPEG, at most 5 MB decoded; the
        base64 payload may not exceed 10485760 bytes.
      properties:
        filename:
          type: string
          description: File name with extension.
          example: widget.png
        base64_data:
          type: string
          description: >-
            Base64-encoded image bytes. A `data:image/png;base64,` prefix is
            accepted and stripped.
          example: >-
            iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
        content_type:
          type: string
          description: MIME type of the image.
          enum:
            - image/png
            - image/jpeg
          example: image/png
      required:
        - filename
        - base64_data
        - content_type
    ProductCode:
      type: object
      description: A SKU registered for a product.
      properties:
        id:
          type: integer
          description: SKU record id.
          example: 9001
        sku:
          type: string
          description: The SKU.
          example: SKU-RED-M
      required:
        - id
        - sku
    ProductStock:
      type: object
      description: >-
        Aggregate stock counts of a product. All counts are units. Keys with a
        dash are returned exactly as written.
      properties:
        IN_WAREHOUSE:
          type: integer
          description: Units physically in the warehouse, in any status.
          example: 250
        AVAILABLE:
          type: integer
          description: >-
            Units you can sell now (active units minus buffer stock, plus
            sell-ahead units).
          example: 188
        AVAILABLE_NOT_EXTERNALLY_CONFIRMED:
          type: integer
          description: >-
            Available units from replenishments not yet confirmed by your system
            (relevant when your store only sells confirmed stock).
          example: 0
        AVAILABLE_EXTERNALLY_CONFIRMED:
          type: integer
          description: >-
            Available units from confirmed replenishments, plus sell-ahead
            units.
          example: 188
        UNAVAILABLE:
          type: integer
          description: >-
            Units present but not sellable (on hold, expired, damaged, in
            reception).
          example: 22
        RECEPTION-INCOMING-SELL-AHEAD:
          type: integer
          description: Sell-ahead units that arrived and are being received.
          example: 0
        INCOMING-SELL-AHEAD:
          type: integer
          description: Sell-ahead units still inbound.
          example: 0
        RESERVED-RECEPTION-INCOMING-SELL-AHEAD:
          type: integer
          description: Sell-ahead units in reception already reserved by orders.
          example: 0
        RESERVED-INCOMING-SELL-AHEAD:
          type: integer
          description: Inbound sell-ahead units already reserved by orders.
          example: 0
        DAMAGED:
          type: integer
          description: Units marked as damaged.
          example: 2
        RECEPTION:
          type: integer
          description: Units in the reception process, not yet put away.
          example: 0
        OUT_OF_STOCK:
          type: integer
          description: >-
            Units requested by orders that could not be reserved for lack of
            stock.
          example: 0
        RESERVED:
          type: integer
          description: Units reserved, by orders and by inbound returns.
          example: 40
        RESERVED_BY_ORDERS:
          type: integer
          description: Units reserved by open orders.
          example: 40
        RESERVED_BY_RETURNS:
          type: integer
          description: Units reserved by inbound returns.
          example: 0
        ACTIVE:
          type: integer
          description: Active (sellable, unreserved) units on the shelf.
          example: 188
        RESERVED-WITHOUT-SELL-AHEAD:
          type: integer
          description: Units reserved by orders, excluding sell-ahead reservations.
          example: 40
        EXPIRED:
          type: integer
          description: Units in expired lots.
          example: 20
        HOLDED:
          type: integer
          description: Units in lots on hold.
          example: 20
        BUFFER_STOCK:
          type: integer
          description: Safety stock configured for the product, excluded from `AVAILABLE`.
          example: 0
        LOST:
          type: integer
          description: Units marked as lost.
          example: 1
        DAMAGED_BY_SOURCE:
          type: object
          description: >-
            `DAMAGED` split by where the damage was found. Keys are
            `REPLENISHMENT`, `RETURN`, `STORAGE` or `UNKNOWN`; only sources with
            units appear.
          additionalProperties:
            type: integer
          example:
            STORAGE: 2
        LOST_BY_SOURCE:
          type: object
          description: >-
            `LOST` split by where the loss happened. Keys are `REPLENISHMENT`,
            `RETURN`, `STORAGE`, `DELIVERY` or `UNKNOWN`; only sources with
            units appear.
          additionalProperties:
            type: integer
          example:
            RETURN: 1
  responses:
    Unauthorized:
      description: >-
        Missing or invalid token, wrong credentials, or no access to the
        requested store.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            invalidToken:
              value:
                error: Unauthorized
                message: invalid token
            noHeader:
              value:
                error: Unauthorized
                message: no authorization header found
            storeNotAllowed:
              value:
                error: Unauthorized
                message: not allowed to show? this Store
    InternalServerError:
      description: >-
        Unexpected error. Retry with backoff; if it persists, send the timestamp
        to Cubbo support.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'unexpected error, timestamp: 1760000000'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Token returned by `POST /auth/token`, sent as `Authorization: Bearer
        <token>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.