openapi: 3.1.0
info:
  title: Products API
  version: v1
  description: |-
    The Products API allows managing your shop's products within the Loop Platform.

    ### Resource identifier format

    Resource identifiers (the `id` field and related global-identifier fields) are returned as JSON
    integers by default. To receive them as strings instead, send the
    `X-Loop-Global-Identifier-Type: string` request header.
  contact:
    name: Loop Returns
    url: "https://loopreturns.com/"
servers:
  - url: https://api.loopreturns.com/api/2026-10
    description: 2026-10 (Stable)
  - url: https://api.loopreturns.com/api/2026-07
    description: 2026-07
  - url: https://api.loopreturns.com/api/unstable
    description: Unstable (Preview)
paths:
  /products:
    get:
      summary: List Products
      description: Retrieve a list of products. The list can be filtered, sorted, and paginated
        using the body parameters below.
      tags:
        - Products
      parameters:
        - name: external_id
          in: query
          description: "An `external_id` used to filter the products."
          example: 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          schema:
            type: string
            minLength: 1
            maxLength: 100
        - name: external_ids
          in: query
          description: "An array of `external_id` values used to filter the products. The results
            will include any products with an `external_id` that matches any of the external_ids
            provided."
          example:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
            - 4f0b29-b62c7-94406b-587a5-7bb56a290c
          schema:
            type: array
            items:
              type: string
              minLength: 1
              maxLength: 100
        - name: barcode
          in: query
          description: "The barcode used to filter the products."
          example: "712345000019"
          schema:
            type: string
        - name: tags
          in: query
          description: "An array of tags used to filter the products."
          example:
            - Shoes
            - Clearance
          schema:
            type: array
            items:
              type: string
              minLength: 1
              maxLength: 255
        - name: as_of_date
          in: query
          description: "The date used to filter the products. The results will only include
            products created before the `as_of_date`."
          example: 2024-01-01 00:00:00
          schema:
            type: string
            format: datetime
        - name: limit
          in: query
          description: "The maximum number of products returned."
          example: 20
          schema:
            type: integer
            format: int32
        - name: sort_order
          in: query
          description: "The sort order for the results."
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: cursor
          in: query
          description: "The cursor to return the next page of results."
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  products:
                    type: array
                    items:
                      $ref: "#/components/schemas/ProductResponse"
                  next_page_url:
                    type: [string, "null"]
                  previous_page_url:
                    type: [string, "null"]
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
      operationId: list-products
      security:
        - read: []
    post:
      summary: Create Product
      description: Create a new product.
      operationId: create-product
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: "#/components/schemas/ProductResponse"
        "401":
          $ref: "#/components/responses/Unauthorized"
      tags:
        - Products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateProductRequest"
      parameters: []
      security:
        - write: []
    put:
      summary: Upsert Product
      description: Upsert a product, identified using the product's `external_id`.
      operationId: upsertProduct
      tags:
        - Products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpsertProductRequest"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: "#/components/schemas/ProductResponse"
        "401":
          $ref: "#/components/responses/Unauthorized"
      security:
        - write: []
  /products/{id}:
    get:
      summary: Get Product
      description: Get the details about a single product.
      tags:
        - Products
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: "#/components/schemas/ProductResponse"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
      operationId: get-product
      security:
        - read: []
      parameters: []
    parameters:
      - schema:
          type: integer
        name: id
        in: path
        required: true
        description: The product's unique identifier.
    put:
      summary: Update Product
      description: Update a product.
      operationId: update-product
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: "#/components/schemas/ProductResponse"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateProductRequest"
      security:
        - write: []
      parameters: []
    patch:
      summary: Update Product
      description: Update a product. Accepts the same body as `PUT`.
      operationId: patch-product
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: "#/components/schemas/ProductResponse"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateProductRequest"
      security:
        - write: []
      parameters: []
    delete:
      summary: Delete Product
      description: Delete a product.
      operationId: delete-product
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductDeleteResponse"
                x-examples:
                  Example 1:
                    id: 562248696549343200
                    success: true
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Products
      security:
        - write: []
      parameters: []
  /products/external/{externalId}:
    get:
      summary: Get Product by External ID
      description: >-
        Get the details about a single product by its commerce `external_id`.
      tags:
        - Products
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: "#/components/schemas/ProductResponse"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
      operationId: getProductByExternalId
      security:
        - read: []
      parameters:
        - schema:
            type: string
            maxLength: 64
            examples:
              - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          name: externalId
          in: path
          required: true
          description: The identifier used by an external source to identify the product.
    delete:
      summary: Delete Product by External ID
      description: >-
        Delete a product by its commerce `external_id`.
      operationId: deleteProductByExternalId
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductDeleteByExternalIdResponse"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Products
      security:
        - write: []
      parameters:
        - schema:
            type: string
            maxLength: 64
            examples:
              - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          name: externalId
          in: path
          required: true
          description: The identifier used by an external source to identify the product.
  /products/external/{productExternalId}/product-variants:
    put:
      summary: Upsert Product Variant by Product External ID
      operationId: upsertProductVariantByProductExternalId
      description: >-
        Upsert a product variant under a parent product identified by its commerce
        `external_id`. The variant is identified using the variant's `external_id`
        in the request body.
      tags:
        - Product Variants
      security:
        - write: []
      parameters:
        - schema:
            type: string
            maxLength: 64
            examples:
              - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          name: productExternalId
          in: path
          required: true
          description: The identifier used by an external source to identify the parent product.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpsertProductVariantRequest"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product_variant:
                    $ref: "#/components/schemas/ProductVariantResponse"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
  /products/external/{productExternalId}/product-variants/{externalId}:
    get:
      summary: Get Product Variant by External ID
      operationId: getProductVariantByExternalId
      description: >-
        Get the details about a single product variant by the parent product's
        commerce `external_id` and the variant's commerce `external_id`.
      tags:
        - Product Variants
      security:
        - read: []
      parameters:
        - schema:
            type: string
            maxLength: 64
            examples:
              - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          name: productExternalId
          in: path
          required: true
          description: The identifier used by an external source to identify the parent product.
        - schema:
            type: string
            maxLength: 64
            examples:
              - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          name: externalId
          in: path
          required: true
          description: The identifier used by an external source to identify the product variant.
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product_variant:
                    $ref: "#/components/schemas/ProductVariantResponse"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
    delete:
      summary: Delete Product Variant by External ID
      operationId: deleteProductVariantByExternalId
      description: >-
        Delete a product variant by the parent product's commerce `external_id`
        and the variant's commerce `external_id`.
      tags:
        - Product Variants
      security:
        - write: []
      parameters:
        - schema:
            type: string
            maxLength: 64
            examples:
              - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          name: productExternalId
          in: path
          required: true
          description: The identifier used by an external source to identify the parent product.
        - schema:
            type: string
            maxLength: 64
            examples:
              - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          name: externalId
          in: path
          required: true
          description: The identifier used by an external source to identify the product variant.
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProductVariantDeleteByExternalIdResponse"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
  /products/{productId}/product-variants:
    post:
      summary: Create Product Variant
      operationId: createProductVariant
      description: "Create a new product variant."
      tags:
        - Product Variants
      security:
        - write: []
      parameters:
        - schema:
            type: integer
          name: productId
          in: path
          required: true
          description: "The unique Loop identifier of the parent product."
          example: 1234567890
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateProductVariantRequest"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product_variant:
                    $ref: "#/components/schemas/ProductVariantResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/responses/Unauthorized"
      x-stoplight:
        id: eztvdr0pc2rhg
    put:
      summary: Upsert Product Variant
      operationId: upsertProductVariant
      description: "Upsert a product variant, identified using the product's `external_id`."
      tags:
        - Product Variants
      security:
        - write: []
      parameters:
        - schema:
            type: integer
            examples:
              - 1234567890
          name: productId
          in: path
          required: true
          description: The unique Loop identifier of the parent product.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpsertProductVariantRequest"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product_variant:
                    $ref: "#/components/schemas/ProductVariantResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/responses/Unauthorized"
      x-stoplight:
        id: eztvdr0pc2rhg
    get:
      summary: List Product Variants
      operationId: getAllProductVariants
      description: Retrieve a list of product variants. The list can be filtered, sorted, and
        paginated using the body parameters below.
      tags:
        - Product Variants
      parameters:
        - schema:
            type: integer
            examples:
              - 1234567890
          name: productId
          in: path
          required: true
          description: "The unique Loop identifier of the parent product."
        - name: external_id
          in: query
          description: "An `external_id` used to filter the product variants."
          schema:
            type: string
            maxLength: 64
            examples:
              - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        - name: external_ids
          in: query
          description: "An array of `external_id` values used to filter the product variants. The
            results will include any product variants with an `external_id` that matches any of the
            external_ids provided."
          schema:
            type: array
            maxItems: 50
            items:
              type: string
              minLength: 1
              maxLength: 64
              examples:
                - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
                - 4f0b29-b62c7-94406b-587a5-7bb56a290c
        - name: ids
          in: query
          description: "An array of `id` values used to filter the product variants. The results
            will include any product variants with an `id` that matches any of the ids provided."
          schema:
            type: array
            maxItems: 50
            items:
              type: integer
              examples:
                - 5602357981530203654651
                - 6036235546579815303201
        - name: barcode
          in: query
          description: "The barcode used to filter the product variants."
          schema:
            type: string
            maxLength: 250
            examples:
              - "712345000019"
        - name: limit
          in: query
          description: "The maximum number of product variants returned."
          schema:
            type: integer
            format: int32
            maximum: 250
            examples:
              - 20
        - name: sort_order
          in: query
          description: "The sort order for the results."
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: cursor
          in: query
          description: "The cursor to return the next page of results."
          schema:
            type: string
      security:
        - read: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product_variants:
                    type: array
                    items:
                      $ref: "#/components/schemas/ProductVariantResponse"
                  next_page_url:
                    type: [string, "null"]
                  previous_page_url:
                    type: [string, "null"]
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/responses/Unauthorized"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/responses/NotFound"
      x-stoplight:
        id: ugg7zikc326ll
  /products/{productId}/product-variants/{id}:
    get:
      summary: Get Product Variant
      operationId: getProductVariantDetails
      description: Get the details about a single product variant.
      tags:
        - Product Variants
      security:
        - read: []
      parameters:
        - schema:
            type: integer
          name: productId
          in: path
          required: true
          description: The unique Loop identifier of the parent product.
          example: 1234567890
        - schema:
            type: integer
          name: id
          in: path
          required: true
          description: The product variant's unique identifier.
          example: 1123456789
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product_variant:
                    $ref: "#/components/schemas/ProductVariantResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/responses/Unauthorized"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/responses/NotFound"
      x-stoplight:
        id: cagprercbszhv
    put:
      summary: Replace Product Variant
      operationId: replaceProductVariant
      description: Replace a product variant. Accepts the same body as `PATCH`.
      tags:
        - Product Variants
      security:
        - write: []
      parameters:
        - schema:
            type: integer
          name: productId
          in: path
          required: true
          description: The unique Loop identifier of the parent product.
          example: 1234567890
        - schema:
            type: integer
          name: id
          in: path
          required: true
          description: The product variant's unique identifier.
          example: 1123456789
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateProductVariantRequest"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product_variant:
                    $ref: "#/components/schemas/ProductVariantResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/responses/Unauthorized"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/responses/NotFound"
    patch:
      summary: Update Product Variant
      operationId: updateProductVariants
      description: Update a product variant.
      tags:
        - Product Variants
      security:
        - write: []
      parameters:
        - schema:
            type: integer
          name: productId
          in: path
          required: true
          description: The unique Loop identifier of the parent product.
          example: 1234567890
        - schema:
            type: integer
          name: id
          in: path
          required: true
          description: The product variant's unique identifier.
          example: 1123456789
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateProductVariantRequest"
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product_variant:
                    $ref: "#/components/schemas/ProductVariantResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/responses/Unauthorized"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/responses/NotFound"
      x-stoplight:
        id: xmusuztx7ezs2
    delete:
      summary: Delete Product Variant
      operationId: deleteProductVariant
      description: Delete a product variant.
      tags:
        - Product Variants
      security:
        - write: []
      parameters:
        - schema:
            type: integer
          name: productId
          in: path
          required: true
          description: The unique Loop identifier of the parent product.
          example: 1234567890
        - schema:
            type: integer
          name: id
          in: path
          required: true
          description: The product variant's unique identifier.
          example: 1123456789
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteProductVariantResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/responses/Unauthorized"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/responses/NotFound"
      x-stoplight:
        id: sm61n5nshwuzs
components:
  schemas:
    Collection:
      title: Collection
      type: object
      properties:
        id:
          type: integer
          format: int64
          examples:
            - 891009
          minimum: 1
          readOnly: true
        external_id:
          type: [string, "null"]
          examples:
            - 62291d16-9b61-4fbb-b868-21c2d32dc155
        name:
          type: string
    Inventory:
      type: object
      properties:
        id:
          type: integer
          format: int64
          minimum: 1
          examples:
            - 127302
          readOnly: true
        available_count:
          type: integer
          format: int32
          examples:
            - 10
        location:
          anyOf:
            - $ref: "#/components/schemas/Location"
            - type: "null"
    Location:
      type: object
      properties:
        id:
          type: integer
          format: int64
          minimum: 1
          examples:
            - 182973
          readOnly: true
        external_id:
          type: [string, "null"]
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        name:
          oneOf:
            - type: string
    MoneySet:
      type: object
      examples:
        - amount: 50000
          currency_code: USD
        - amount: 25000
        - amount: 1500
          currency_code: EUR
      properties:
        amount:
          type: integer
          format: int32
          examples:
            - 25000
        currency_code:
          type: string
          default: USD
          examples:
            - EUR
      required:
        - amount
        - currency_code
    ProductOption:
      title: ProductOption
      type: object
      properties:
        position:
          type: integer
          format: int32
          examples:
            - 1
        values:
          type: array
          items:
            type: string
            examples:
              - "red"
              - "green"
              - "blue"
        name:
          type: string
          examples:
            - "Colors"
      required:
        - position
        - values
        - name
    ProductLocaleDataOption:
      title: ProductLocaleDataOption
      type: object
      properties:
        position:
          type: integer
          format: int32
          description: "Must match a `position` present in this request's `options` array."
          examples:
            - 1
        name:
          type: string
          maxLength: 255
          description: "The translated name for this option."
          examples:
            - "Couleur"
        values:
          type: object
          additionalProperties:
            type: string
          description: "A translated value for every value in the matched base option's `values`
            array — no missing values, no extra ones."
          examples:
            - red: "rouge"
              green: "vert"
              blue: "bleu"
      required:
        - position
        - name
        - values
    ProductLocaleData:
      title: ProductLocaleData
      type: object
      properties:
        locale:
          type: string
          maxLength: 5
          description: "The locale this translation applies to. Loop's canonical v1 shape — the
            form to send — is a plain `language` or `language-REGION` tag: a lowercase 2-letter
            language code, optionally followed by a hyphen and an uppercase 2-letter ISO 3166-1
            region code (e.g. `en`, `fr-CA`). For input leniency, `_` is also accepted as the
            separator and input case is not enforced (e.g. `en_us`, `FR-ca`); these are
            canonicalized to the form above before being stored and compared for uniqueness.
            Script subtags (e.g. `zh-Hans`), numeric region codes, and 3+ letter language codes are
            rejected with a 422. This is a known v1 limitation."
          examples:
            - fr-CA
        name:
          type: string
          maxLength: 255
          description: "The translated name of the product."
          examples:
            - Chaussures Habillées Marron Classiques
        description:
          type: [string, "null"]
          maxLength: 65000
          description: "The translated description of the product. Optional, matching the
            top-level `description` field on the product itself."
        options:
          type: [array, "null"]
          description: "Translated overrides for the product's options. Requires this request's own
            `options` array to also be present — if this array is non-empty and the request's
            `options` is omitted, the request is rejected. Each entry's `position` must match a
            position present in this request's `options` array, and each entry must be fully
            populated — a partial override is rejected."
          items:
            $ref: "#/components/schemas/ProductLocaleDataOption"
      required:
        - locale
        - name
    ProductLocaleDataOptionResponse:
      title: ProductLocaleDataOptionResponse
      type: object
      properties:
        position:
          type: integer
          format: int32
          description: "The position of the base option this translation applies to."
          examples:
            - 1
        name:
          type: string
          description: "The translated name of the option."
          examples:
            - "Couleur"
        values:
          type: object
          additionalProperties:
            type: string
          description: "The translated value for each of the base option's values."
          examples:
            - Stone: "Pierre"
      required:
        - position
        - name
        - values
    ProductLocaleDataResponse:
      title: ProductLocaleDataResponse
      type: object
      properties:
        locale:
          type: string
          maxLength: 5
          description: "The locale this translation applies to."
          examples:
            - fr-CA
        name:
          type: string
          description: "The translated name of the product."
          examples:
            - Arizona Birko-Flor Nubuck
        description:
          type: [string, "null"]
          description: "The translated description of the product."
        options:
          type: [array, "null"]
          description: "Translated overrides for the product's options — one entry per base option
            that has a translation for this locale."
          items:
            $ref: "#/components/schemas/ProductLocaleDataOptionResponse"
      required:
        - locale
        - name
    Product:
      type: object
      properties:
        id:
          type: integer
          format: int64
          minimum: 1
          examples:
            - 810772
          readOnly: true
        name:
          type: string
        external_id:
          type: [string, "null"]
          examples:
            - "564400c7-7a6b-4f29-b6a5-7bb580b2992c"
        sku:
          type: [string, "null"]
          examples:
            - SHOES-US44-M-Brwn
        description:
          maxLength: 65000
          type: [string, "null"]
        type:
          type: [string, "null"]
        vendor:
          type: [string, "null"]
        price:
          $ref: "#/components/schemas/MoneySet"
          description: The price of the product in minor units, such as cents, with its corresponding currency.
        created_at:
          type: [string, "null"]
          format: date-time
          examples:
            - "2023-04-25T13:25:00-05:00"
        updated_at:
          type: [string, "null"]
          examples:
            - "2023-04-25T13:45:00-05:00"
          format: date-time
        options:
          type: [array, "null"]
          items:
            $ref: "#/components/schemas/ProductOption"
        images:
          type: [array, "null"]
          items:
            type: string
            format: uri
            examples:
              - "https://example.com/example.jpg"
        tags:
          type: [array, "null"]
          items:
            type: string
            examples:
              - "shoes"
        collections:
          type: [array, "null"]
          items:
            $ref: "#/components/schemas/Collection"
    ProductDetails:
      type: object
      properties:
        id:
          type: integer
          format: int64
          minimum: 1
          examples:
            - 810772
          readOnly: true
        external_id:
          type: [string, "null"]
          examples:
            - "564400c7-7a6b-4f29-b6a5-7bb580b2992c"
        sku:
          type: [string, "null"]
          examples:
            - SHOES-US44-M-Brwn
        name:
          type: string
    CreateProductRequest:
      title: CreateProductRequest
      type: object
      properties:
        name:
          type: string
          maxLength: 255
          description: "The name of the product."
        source:
          type: [string, "null"]
          maxLength: 255
          examples:
            - Shopify
          description: "The ecommerce platform from which the product is available."
        external_id:
          type: [string, "null"]
          maxLength: 100
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          description: "The provided `external_id` must be unique. If a non-unique `external_id` is
            provided, the API will respond with an error."
        sales_channel:
          type: string
          maxLength: 255
          description: "If a channel with this name is not already associated with the shop, it will
            be used to create a new channel."
        sku:
          type: [string, "null"]
          examples:
            - SHOES-US44-M-Brwn
          maxLength: 255
          description: "The SKU of the product."
        weight_grams:
          type: [integer, "null"]
          description: "The weight of the product in grams."
        barcode:
          type: [string, "null"]
          maxLength: 255
          description: "The barcode of the product."
        description:
          maxLength: 65000
          type: [string, "null"]
          description: "The description of the product."
        type:
          type: [string, "null"]
          maxLength: 255
          examples:
            - shoes
          description: 'The "type" of the product. This is a single value used to classify and group similar products.'
        vendor:
          type: [string, "null"]
          maxLength: 255
          examples:
            - Internal
          description: "The manufacturer or seller of the product."
        price:
          $ref: "#/components/schemas/MoneySet"
          description: The price of the product in minor units, such as cents, with its corresponding currency.
        created_at:
          type: [string, "null"]
          format: date-time
          examples:
            - 2023-04-25T13:25:00-05:00
          description: "The date and time at which the product was created."
        updated_at:
          type: [string, "null"]
          examples:
            - "2023-04-25T13:45:00-05:00"
          format: date-time
          description: "The date and time at which the product was updated. The value must be equal
            or greater than `created_at`."
        options:
          type: [array, "null"]
          items:
            $ref: "#/components/schemas/ProductOption"
          description: "An array of optional features or characteristics of the product that can be
            selected by the customer."
        images:
          type: [array, "null"]
          items:
            type: string
            format: uri
            examples:
              - "https://example.com/example.jpg"
            minLength: 1
          description: "An array of URLs which reference images of the product."
        tags:
          type: [array, "null"]
          items:
            type: string
            minLength: 1
            maxLength: 255
            examples:
              - shoes
          description: "An array of tags used to classify and group products."
        is_gift_card:
          type: [boolean, "null"]
          description: "Whether the product is a gift card."
          examples:
            - false
        locale_data:
          type: [array, "null"]
          description: "Translated content for this product, one entry per locale. Locales must be
            unique within the array — uniqueness is checked against each locale's canonicalized
            tag (`fr-CA`, `fr_ca`, and `FR-CA` all collide)."
          items:
            $ref: "#/components/schemas/ProductLocaleData"
      required:
        - name
        - sales_channel
    UpsertProductRequest:
      title: UpsertProductRequest
      type: object
      properties:
        name:
          type: string
          maxLength: 255
          description: "The name of the product."
          examples:
            - Classic Brown Dress Shoes
        external_id:
          type: string
          maxLength: 100
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          description: "The identifier used by an external source to identify the product."
        sales_channel:
          type: string
          maxLength: 255
          description: "If a channel with this name is not already associated with the shop, it will
            be used to create a new channel."
        sku:
          type: [string, "null"]
          examples:
            - SHOES-US44-M-Brwn
          maxLength: 255
          description: "The SKU of the product."
        weight_grams:
          type: [integer, "null"]
          description: "The weight of the product in grams."
          examples:
            - 440
        barcode:
          type: [string, "null"]
          maxLength: 255
          description: "The barcode of the product."
          examples:
            - 712345000019
        description:
          maxLength: 65000
          type: [string, "null"]
          description: "The description of the product."
        type:
          type: [string, "null"]
          maxLength: 255
          examples:
            - shoes
          description: 'The "type" of the product. This is a single value used to classify and group similar products.'
        vendor:
          type: [string, "null"]
          maxLength: 255
          examples:
            - Internal
          description: "The manufacturer or seller of the product."
        price:
          anyOf:
            - $ref: "#/components/schemas/MoneySet"
            - type: "null"
          description: The price of the product in minor units, such as cents, with its corresponding currency.
          examples:
            - 10000
        created_at:
          type: [string, "null"]
          format: date-time
          examples:
            - "2023-04-25T13:25:00-05:00"
          description: "The date and time at which the product was created."
        updated_at:
          type: [string, "null"]
          examples:
            - "2023-04-25T13:45:00-05:00"
          format: date-time
          description: "The date and time at which the product was updated. The value must be equal
            to or greater than `created_at`."
        options:
          type: [array, "null"]
          items:
            $ref: "#/components/schemas/ProductOption"
          description: "An array of optional features or characteristics of the product that can be
            selected by the customer."
        images:
          type: [array, "null"]
          items:
            type: string
            format: uri
            examples:
              - "https://example.com/example.jpg"
            minLength: 1
          description: "An array of URLs which reference images of the product."
        tags:
          type: [array, "null"]
          items:
            type: string
            minLength: 1
            maxLength: 255
            examples:
              - shoes
          description: "An array of tags added to the product."
        source:
          type: [string, "null"]
          maxLength: 255
          examples:
            - Shopify
          description: "The ecommerce platform from which the product is available."
        is_gift_card:
          type: [boolean, "null"]
          description: "Whether the product is a gift card."
          examples:
            - false
        locale_data:
          type: [array, "null"]
          description: "Translated content for this product, one entry per locale. Locales must be
            unique within the array — uniqueness is checked against each locale's canonicalized
            tag (`fr-CA`, `fr_ca`, and `FR-CA` all collide)."
          items:
            $ref: "#/components/schemas/ProductLocaleData"
      required:
        - external_id
        - name
        - sales_channel
    UpdateProductRequest:
      title: UpdateProductRequest
      type: object
      properties:
        name:
          type: string
          maxLength: 255
        source:
          type: [string, "null"]
          maxLength: 255
        external_id:
          type: [string, "null"]
          maxLength: 100
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          description: "The provided `external_id` must be unique. If a non-unique `external_id` is
            provided, the API will respond with an error."
        sales_channel:
          type: string
          maxLength: 255
          description: "If a channel with this name is not already associated with the shop, it will
            be used to create a new channel."
        sku:
          type: [string, "null"]
          examples:
            - SHOES-US44-M-Brwn
          maxLength: 255
        weight_grams:
          type: [integer, "null"]
          description: "The weight of the product in grams."
          examples:
            - 440
        barcode:
          type: [string, "null"]
          maxLength: 255
          examples:
            - 712345000019
          description: "The barcode of the product."
        description:
          maxLength: 65000
          type: [string, "null"]
        type:
          type: [string, "null"]
          maxLength: 255
        vendor:
          type: [string, "null"]
          maxLength: 255
        price:
          anyOf:
            - $ref: "#/components/schemas/MoneySet"
            - type: "null"
          description: The price of the product in minor units, such as cents, with its corresponding currency.
        created_at:
          type: [string, "null"]
          format: date-time
          examples:
            - "2023-04-25T13:25:00-05:00"
        updated_at:
          type: [string, "null"]
          examples:
            - "2023-04-25T13:45:00-05:00"
          format: date-time
          description: The value must be equal to or greater than `created_at`.
        options:
          type: [array, "null"]
          description: The provided array will overwrite the existing set of options.
          items:
            $ref: "#/components/schemas/ProductOption"
        images:
          type: [array, "null"]
          description: The provided array will overwrite the existing set of images.
          items:
            type: string
            format: uri
            examples:
              - "https://example.com/example.jpg"
            minLength: 1
        tags:
          type: [array, "null"]
          description: The provided array will overwrite the existing set of tags.
          items:
            type: string
            minLength: 1
            maxLength: 255
            examples:
              - shoes
        is_gift_card:
          type: [boolean, "null"]
          description: "Whether the product is a gift card."
          examples:
            - false
        locale_data:
          type: [array, "null"]
          description: "Translated content for this product, one entry per locale. Locales must be
            unique within the array — uniqueness is checked against each locale's canonicalized
            tag (`fr-CA`, `fr_ca`, and `FR-CA` all collide). Unlike `options`/`images`/`tags`,
            update-time behavior (overwrite vs. merge with any existing translations) is not yet
            defined — this field is currently validation-only, ahead of the persistence work that
            will define it."
          items:
            $ref: "#/components/schemas/ProductLocaleData"
      required:
        - name
        - sales_channel
    ProductResponse:
      title: ProductResponse
      type: object
      properties:
        id:
          type: integer
          format: int64
          minimum: 1
          examples:
            - 810772
          readOnly: true
          description: "The unique integer identifier for the product, created by Loop."
        external_id:
          type: [string, "null"]
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
          description: "The identifier used by an external source to identify the product."
        sales_channel:
          type: string
          description: "The name of the channel."
        sku:
          type: [string, "null"]
          examples:
            - SHOES-US44-M-Brwn
          description: "The SKU of the product."
        name:
          type: string
          description: "The name of the product."
          examples:
            - Classic Brown Dress Shoes
        weight_grams:
          type: [integer, "null"]
          format: int32
          examples:
            - 440
          description: "The weight of the product in grams."
        barcode:
          type: [string, "null"]
          examples:
            - 712345000019
          description: "The barcode of the product."
        description:
          maxLength: 65000
          type: [string, "null"]
          description: "The description of the product."
        type:
          type: [string, "null"]
          examples:
            - shoes
          description: 'The "type" of the product. This is a single value used to classify and group similar products.'
        vendor:
          type: [string, "null"]
          examples:
            - Internal
          description: "The manufacturer or seller of the product."
        price:
          anyOf:
            - $ref: "#/components/schemas/MoneySet"
            - type: "null"
          description: The price of the product in minor units, such as cents, with its corresponding currency.
        created_at:
          type: [string, "null"]
          format: date-time
          examples:
            - "2023-04-25T13:25:00-05:00"
          description: "The date and time at which the product was created."
        updated_at:
          type: [string, "null"]
          examples:
            - "2023-04-25T13:45:00-05:00"
          format: date-time
          description: "The date and time at which the product was updated. The value must be equal
            to or greater than `created_at`."
        collections:
          type: [array, "null"]
          items:
            $ref: "#/components/schemas/Collection"
          description: "A grouping of products which can be used to organize a merchant's shop."
        options:
          type: [array, "null"]
          items:
            $ref: "#/components/schemas/ProductOption"
          description: "An array of optional features or characteristics of the product that can be
            selected by the customer."
        images:
          type: [array, "null"]
          items:
            type: string
            format: uri
            examples:
              - "https://example.com/example.jpg"
          description: "An array of links to images of the product."
        tags:
          type: [array, "null"]
          items:
            type: string
            examples:
              - shoes
          description: "An array of tags used to classify and group products."
        source:
          type: [string, "null"]
          examples:
            - Shopify
          description: "The ecommerce platform from which the product is available."
        default_variant_id:
          type: [integer, "null"]
          format: int64
          examples:
            - 810773
          description: The global identifier (created by Loop) of the product's default variant.
            Present only when the product has no explicit variants; null otherwise.
        locale_data:
          type: array
          description: "Every stored per-locale translation of the product, in the same shape the
            create and upsert `locale_data` request field accepts (see `ProductLocaleData`). Empty
            when the product has no translations. When resubmitting these entries on a write, follow
            the request-side `locale_data` rules — in particular each locale's `options` overrides
            must still match the request's own `options` and translate every value, so refresh them
            whenever you change a product's option values."
          items:
            $ref: "#/components/schemas/ProductLocaleDataResponse"
    ProductDeleteResponse:
      title: ProductDeleteResponse
      type: object
      properties:
        id:
          type: integer
          format: int64
          examples:
            - 77892011
          minimum: 1
        success:
          type: boolean
          readOnly: true
    ProductDeleteByExternalIdResponse:
      title: ProductDeleteByExternalIdResponse
      type: object
      required:
        - id
        - external_id
        - success
      properties:
        id:
          type: integer
          format: int64
          examples:
            - 77892011
          minimum: 1
        external_id:
          type: string
          description: The identifier used by an external source to identify the product.
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        success:
          type: boolean
          readOnly: true
    CreateProductVariantRequest:
      type: object
      properties:
        external_id:
          type: [string, "null"]
          maxLength: 100
          description: "The provided `external_id` must be unique within the shop. If a non-unique
            `external_id` is provided, the API will respond with an error."
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        sku:
          type: [string, "null"]
          maxLength: 255
          description: "The SKU of the product variant."
          examples:
            - SHOES-US44-M-Brwn
        name:
          type: string
          maxLength: 255
          description: "The name of the product variant."
          examples:
            - Classic Brown Dress Shoes - Size 12
        weight_grams:
          type: [integer, "null"]
          description: "The weight of the product variant in grams."
          examples:
            - 440
        barcode:
          type: [string, "null"]
          maxLength: 255
          description: "The barcode of the product variant."
          examples:
            - 712345000019
        price:
          anyOf:
            - $ref: "#/components/schemas/MoneySet"
            - type: "null"
          description: "The price of the product variant in minor units, such as cents, with its
            corresponding currency."
        images:
          type: [array, "null"]
          items:
            type: string
            format: uri
            examples:
              - "https://example.com/example.jpg"
            minLength: 1
        options:
          type: [array, "null"]
          description: "An array of optional features or characteristics of the product variant that
            can be selected by the customer."
          items:
            $ref: "#/components/schemas/ProductVariantOption"
        logistics_information:
          description: "The logistics information for the product variant such as code
            classification, shipping, and cost."
          anyOf:
            - $ref: "#/components/schemas/ProductVariantLogisticsInformation"
            - type: "null"
        dimensions:
          description: "The dimensions of the product variant, interpreted as inches.
            Optional and nullable. When provided, `depth`, `width`, and `height` are all
            required."
          anyOf:
            - $ref: "#/components/schemas/ProductVariantDimensions"
            - type: "null"
        locale_data:
          type: [array, "null"]
          description: "Translated content for this product variant, one entry per locale. Locales
            must be unique within the array — uniqueness is checked against each locale's
            canonicalized tag (`fr-CA`, `fr_ca`, and `FR-CA` all collide)."
          items:
            $ref: "#/components/schemas/ProductVariantLocaleData"
      required:
        - name
      x-stoplight:
        id: 4pa0jndzw1qig
    UpsertProductVariantRequest:
      type: object
      properties:
        external_id:
          type: string
          maxLength: 100
          description: "The identifier used by an external source to identify the product variant.
            Must be unique within the shop. If a non-unique `external_id` is provided, the API will
            respond with an error."
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        sku:
          type: [string, "null"]
          maxLength: 255
          description: :The SKU of the product variant."
          examples:
            - SHOES-US44-M-Brwn
        name:
          type: string
          description: "The name of the product variant."
          examples:
            - Classic Brown Dress Shoes - Size 12
        weight_grams:
          type: [integer, "null"]
          description: "The weight of the product variant in grams."
          examples:
            - 440
        barcode:
          type: [string, "null"]
          maxLength: 255
          description: "The barcode of the product variant."
          examples:
            - 712345000019
        price:
          anyOf:
            - $ref: "#/components/schemas/MoneySet"
            - type: "null"
          description: "The price of the product variant in minor units, such as cents, with its
            corresponding currency."
        images:
          type: [array, "null"]
          description: "An array of URLs which reference images of the product variant."
          items:
            type: string
            format: uri
            examples:
              - "https://example.com/example.jpg"
            minLength: 1
        options:
          description: "An array of optional features or characteristics of the product variant that
            can be selected by the customer."
          type: [array, "null"]
          items:
            $ref: "#/components/schemas/ProductVariantOption"
        logistics_information:
          description: "The logistics information for the product variant such as code
            classification, shipping, and cost."
          anyOf:
            - $ref: "#/components/schemas/ProductVariantLogisticsInformation"
            - type: "null"
        dimensions:
          description: "The dimensions of the product variant, interpreted as inches.
            Optional and nullable. When provided, `depth`, `width`, and `height` are all
            required. Omit `dimensions` to leave any stored dimensions untouched, or send
            `null` to delete the stored dimensions."
          anyOf:
            - $ref: "#/components/schemas/ProductVariantDimensions"
            - type: "null"
        locale_data:
          type: [array, "null"]
          description: "Translated content for this product variant, one entry per locale. Locales
            must be unique within the array — uniqueness is checked against each locale's
            canonicalized tag (`fr-CA`, `fr_ca`, and `FR-CA` all collide)."
          items:
            $ref: "#/components/schemas/ProductVariantLocaleData"
      x-stoplight:
        id: 4pa0jndzw1qig
      required:
        - name
        - external_id
    UpdateProductVariantRequest:
      type: object
      properties:
        external_id:
          type: [string, "null"]
          maxLength: 100
          description: "The identifier used by an external source to identify the product variant.
            Must be unique within the shop. If a non-unique `external_id` is provided, the API will
            respond with an error."
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        sku:
          type: [string, "null"]
          maxLength: 255
          description: The SKU of the product variant.
          examples:
            - SHOES-US44-M-Brwn
        name:
          type: string
          description: The name of the product variant.
          examples:
            - Classic Brown Dress Shoes - Size 12
        weight_grams:
          type: [integer, "null"]
          description: The weight of the product variant in grams.
          examples:
            - 440
        barcode:
          type: [string, "null"]
          maxLength: 255
          description: The barcode of the product variant.
          examples:
            - 712345000019
        price:
          anyOf:
            - $ref: "#/components/schemas/MoneySet"
            - type: "null"
          description: The price of the product variant in minor units, such as cents, with its corresponding currency.
        images:
          type: [array, "null"]
          description: An array of URLs which reference images of the product.
          items:
            type: string
            format: uri
            examples:
              - "https://example.com/example.jpg"
            minLength: 1
        options:
          type: [array, "null"]
          description: An array of optional features or characteristics of the product variant that
            can be selected by the customer.
          items:
            $ref: "#/components/schemas/ProductVariantOption"
        logistics_information:
          description: "The logistics information for the product variant such as code
            classification, shipping, and cost."
          anyOf:
            - $ref: "#/components/schemas/ProductVariantLogisticsInformation"
            - type: "null"
        dimensions:
          description: "The dimensions of the product variant, interpreted as inches.
            Optional and nullable. When provided, `depth`, `width`, and `height` are all
            required. Omit `dimensions` to leave any stored dimensions untouched, or send
            `null` to delete the stored dimensions."
          anyOf:
            - $ref: "#/components/schemas/ProductVariantDimensions"
            - type: "null"
        locale_data:
          type: [array, "null"]
          description: "Translated content for this product variant, one entry per locale. Locales
            must be unique within the array — uniqueness is checked against each locale's
            canonicalized tag (`fr-CA`, `fr_ca`, and `FR-CA` all collide). Update-time behavior
            (overwrite vs. merge with any existing translations) is not yet defined — this field is
            currently validation-only, ahead of the persistence work that will define it."
          items:
            $ref: "#/components/schemas/ProductVariantLocaleData"
      required:
        - name
      x-stoplight:
        id: xsa7ujtb39y0o
    ProductVariantOption:
      title: ProductVariantOption
      type: object
      properties:
        position:
          type: integer
          format: int32
          examples:
            - 1
        value:
          type: string
          examples:
            - "Red"
      required:
        - position
        - value
    ProductVariantLocaleData:
      title: ProductVariantLocaleData
      type: object
      properties:
        locale:
          type: string
          maxLength: 5
          description: "The locale this translation applies to. Loop's canonical v1 shape — the
            form to send — is a plain `language` or `language-REGION` tag: a lowercase 2-letter
            language code, optionally followed by a hyphen and an uppercase 2-letter ISO 3166-1
            region code (e.g. `en`, `fr-CA`). For input leniency, `_` is also accepted as the
            separator and input case is not enforced (e.g. `en_us`, `FR-ca`); these are
            canonicalized to the form above before being stored and compared for uniqueness.
            Script subtags (e.g. `zh-Hans`), numeric region codes, and 3+ letter language codes are
            rejected with a 422. This is a known v1 limitation."
          examples:
            - fr-CA
        name:
          type: string
          maxLength: 255
          description: "The translated name of the product variant."
          examples:
            - Chaussures Habillées Marron Classiques - Taille 12
      required:
        - locale
        - name
    ProductVariantLogisticsInformation:
      title: ProductVariantLogisticsInformation
      type: object
      properties:
        origin_country_code:
          type: [string, "null"]
          examples:
            - "US"
          minLength: 2
          maxLength: 2
          description: "The ISO 3166-1 alpha-2 country code of the country where the product variant is manufactured."
        origin_region_code:
          type: [string, "null"]
          examples:
            - "CA"
          minLength: 2
          maxLength: 2
          description: The ISO 3166-2 alpha-2 region code of the region where the product variant is manufactured.
        default_hs_code:
          type: [string, "null"]
          examples:
            - "1234567890"
          minLength: 6
          maxLength: 13
          description: "The default Harmonized System (HS) code of the product variant. This code is
            used for any country that does not have a corresponding entry in the
            `destination_country_hs_codes` array."
        requires_shipping:
          type: [boolean, "null"]
          description: The value that determines whether the product variant requires shipping.
        cost:
          anyOf:
            - $ref: "#/components/schemas/MoneySet"
            - type: "null"
          description: The cost of the product variant in minor units, such as cents, with its
            corresponding currency.
        destination_country_hs_codes:
          type: [array, "null"]
          items:
            $ref: "#/components/schemas/DestinationCountryHsCode"
          description: The list of destination country-specific HS codes for the product variant
            (each country code may occur only once in the list).
    DestinationCountryHsCode:
      title: DestinationCountryHsCode
      type: object
      properties:
        destination_country_code:
          type: string
          examples:
            - "US"
          minLength: 2
          maxLength: 2
          description: The ISO 3166-1 alpha-2 country code of the destination country.
        hs_code:
          type: string
          examples:
            - "1234567890"
          minLength: 6
          maxLength: 13
          description: The Harmonized System (HS) code of the product variant for the destination country.
    ProductVariantDimensions:
      title: ProductVariantDimensions
      type: object
      description: "The dimensions of the product variant. Values are unitless on the
        wire and interpreted as inches. Dimensions are all-or-nothing: when a `dimensions`
        object is provided, `depth`, `width`, and `height` are all required."
      properties:
        depth:
          type: number
          format: float
          exclusiveMinimum: 0
          maximum: 9999.9999
          multipleOf: 0.0001
          examples:
            - 8.5
          description: "The depth of the product variant, in inches. Must be greater than 0,
            at most 9999.9999, and have no more than 4 decimal places."
        width:
          type: number
          format: float
          exclusiveMinimum: 0
          maximum: 9999.9999
          multipleOf: 0.0001
          examples:
            - 6
          description: "The width of the product variant, in inches. Must be greater than 0,
            at most 9999.9999, and have no more than 4 decimal places."
        height:
          type: number
          format: float
          exclusiveMinimum: 0
          maximum: 9999.9999
          multipleOf: 0.0001
          examples:
            - 2.25
          description: "The height of the product variant, in inches. Must be greater than 0,
            at most 9999.9999, and have no more than 4 decimal places."
      required:
        - depth
        - width
        - height
    ProductVariantResponse:
      title: ProductVariantResponse
      type: object
      properties:
        id:
          type: integer
          format: int64
          minimum: 1
          description: "The unique integer identifier for the product variant, created by Loop."
          examples:
            - 810772
          readOnly: true
        external_id:
          type: [string, "null"]
          description: "The identifier used by an external source to identify the product variant."
          examples:
            - "564400c7-7a6b-4f29-b6a5-7bb580b2992c"
        sku:
          type: [string, "null"]
          description: "The SKU of the product variant."
          examples:
            - "SHOES-US44-M-Brwn"
        name:
          type: string
          description: "The name of the product variant."
          examples:
            - Classic Brown Dress Shoes - Size 12
        weight_grams:
          type: [integer, "null"]
          format: int32
          description: "The weight of the product variant in grams."
          examples:
            - 500
        barcode:
          type: [string, "null"]
          description: "The barcode of the product variant."
          examples:
            - 1234asdf324
        product:
          description: "The details associated with the parent product."
          anyOf:
            - $ref: "#/components/schemas/ProductDetails"
            - type: "null"
        price:
          anyOf:
            - $ref: "#/components/schemas/MoneySet"
            - type: "null"
          description: The price of the product variant in minor units, such as cents, with its corresponding currency.
        images:
          type: [array, "null"]
          description: "An array of links to images of the product variant."
          items:
            type: string
            format: uri
            examples:
              - "https://example.com/example.jpg"
        inventories:
          description: "The record of available count and location by product variant."
          type: [array, "null"]
          items:
            $ref: "#/components/schemas/Inventory"
        options:
          type: [array, "null"]
          description: "An array of optional features or characteristics of the product variant that
            can be selected by the customer."
          items:
            $ref: "#/components/schemas/ProductVariantOption"
        logistics_information:
          description: "The logistics information for the product variant such as code
            classification, shipping, and cost."
          anyOf:
            - $ref: "#/components/schemas/ProductVariantLogisticsInformation"
            - type: "null"
        dimensions:
          description: "The dimensions of the product variant, interpreted as inches,
            or `null` when none are stored."
          anyOf:
            - $ref: "#/components/schemas/ProductVariantDimensions"
            - type: "null"
    DeleteProductVariantResponse:
      title: ProductVariantDeleteResponse
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: The unique integer identifier for the product variant, created by Loop.
          examples:
            - 98273402
          minimum: 1
        success:
          type: boolean
          readOnly: true
    ProductVariantDeleteByExternalIdResponse:
      title: ProductVariantDeleteByExternalIdResponse
      type: object
      required:
        - id
        - external_id
        - success
      properties:
        id:
          type: integer
          format: int64
          description: The unique integer identifier for the product variant, created by Loop.
          examples:
            - 98273402
          minimum: 1
        external_id:
          type: string
          description: The identifier used by an external source to identify the product variant.
          examples:
            - 564400c7-7a6b-4f29-b6a5-7bb580b2992c
        success:
          type: boolean
          readOnly: true
  securitySchemes:
    read:
      type: apiKey
      in: header
      name: X-Authorization
      description: 'API Scope: "Product (read)"'
      x-scope: Product (Read)
    write:
      name: X-Authorization
      type: apiKey
      in: header
      description: 'API Scope: "Product (write)"'
  responses:
    Unauthorized:
      description: Example response if request submitted without a valid API Key in X-Authorization.
      content:
        application/json:
          schema:
            type: object
            required:
              - errors
            properties:
              errors:
                type: string
                examples:
                  - "Unauthorized."
      headers:
        X-Loop-Request-ID:
          schema:
            type: string
            examples:
              - 5a748e7c-5fcc-4fb0-a777-6a4d28e60d4c
            format: uuid
          description: UUID to aid in debugging API issues
    NotFound:
      description: The requested entity could not be found.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
            properties:
              message:
                type: string
                examples:
                  - "Resource not found."
      headers:
        X-Loop-Request-ID:
          schema:
            type: string
          description: UUID to aid in debugging API issues
  parameters: {}
tags:
  - name: Products
  - name: Product Variants
