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

# Create Policy

> Creates a Replenishment Policy in the warehouse specified by its `id` path
parameter.

A Policy created without `is_active` is inactive: it is not evaluated and no
Replenishment rebuild is requested. Creating an active Policy invalidates the
warehouse's published Replenishment results and requests a rebuild, so the
report catches up asynchronously.



## OpenAPI

````yaml POST /v1/inventory/warehouses/{id}/replenishment-policies
openapi: 3.0.3
info:
  title: ShipStream
  version: '1.0'
  license:
    name: Commercial (Copyright 2025 - All Rights Reserved)
    url: https://shipstream.io
  contact:
    name: ShipStream Support
    email: help@shipstream.io
  termsOfService: https://shipstream.io/legal/api-terms/
servers:
  - url: https://{base_url_domain}/api/global
    description: Direct API Url
    variables:
      base_url_domain:
        default: example.shipstream.app
        description: >-
          The fully qualified domain name for your ShipStream WMS instance. This
          is either a custom domain, or a subdomain of shipstream.app,

          and will be the same as the domain name for the page which you use to
          login to ShipStream WMS.
security:
  - ShipStream_bearerAuth: []
tags:
  - name: Warehouses
    x-displayName: Warehouses
  - name: Products
    x-displayName: Products
  - name: ProductProfiles
    x-displayName: ProductProfiles
  - name: HandlingClasses
    x-displayName: HandlingClasses
  - name: Locations
    x-displayName: Locations
  - name: LocationTags
    x-displayName: LocationTags
  - name: SlotTypes
    x-displayName: SlotTypes
  - name: Levels
    x-displayName: Levels
  - name: HoldReasons
    x-displayName: HoldReasons
  - name: Holds
    x-displayName: Holds
  - name: Replenishment
    x-displayName: Replenishment
  - name: LocationProfiles
    x-displayName: LocationProfiles
  - name: SlottingRules
    x-displayName: SlottingRules
  - name: Deliveries
    description: Every thing about a Delivery Receiving
    x-displayName: Deliveries
  - name: Shipments
    x-displayName: Shipments
  - name: Orders
    x-displayName: Orders
  - name: Retailers
    x-displayName: Retailers
  - name: Users
    x-displayName: Users
  - name: User Roles
    x-displayName: User Roles
  - name: Merchants
    x-displayName: Merchants
  - name: Healthcheck
    x-displayName: Healthcheck
paths:
  /v1/inventory/warehouses/{id}/replenishment-policies:
    post:
      tags:
        - Replenishment
      summary: Create Policy
      description: >-
        Creates a Replenishment Policy in the warehouse specified by its `id`
        path

        parameter.


        A Policy created without `is_active` is inactive: it is not evaluated
        and no

        Replenishment rebuild is requested. Creating an active Policy
        invalidates the

        warehouse's published Replenishment results and requests a rebuild, so
        the

        report catches up asynchronously.
      operationId: createReplenishmentPolicy
      parameters:
        - name: id
          in: path
          schema:
            type: integer
            format: int32
          required: true
          description: The `id` of the referenced `Warehouse`.
        - $ref: '#/components/parameters/Inventory_API_v1_replenishment-policy-fields'
        - $ref: >-
            #/components/parameters/Inventory_API_v1_fields-slotting-rule-merchants
        - $ref: >-
            #/components/parameters/Inventory_API_v1_fields-slotting-rule-product-profiles
        - $ref: >-
            #/components/parameters/Inventory_API_v1_fields-slotting-rule-handling-classes
        - $ref: >-
            #/components/parameters/Inventory_API_v1_fields-replenishment-policy-location_profile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Inventory_API_v1_ReplenishmentPolicyCreate'
      responses:
        '201':
          description: The Replenishment Policy was created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  resource:
                    $ref: '#/components/schemas/Inventory_API_v1_ReplenishmentPolicy'
                  included:
                    $ref: >-
                      #/components/schemas/Inventory_API_v1_replenishment-policies
                  meta:
                    $ref: '#/components/schemas/Inventory_API_v1_meta'
              example:
                resource:
                  type: ReplenishmentPolicy
                  id: 7
                  name: Fast Movers - Forward Pick
                  is_active: false
                  sort_order: 0
                  merchant_ids:
                    - 2
                    - 7
                  product_profile_ids:
                    - 12
                    - 15
                  product_profile_match_mode: any
                  handling_class_ids:
                    - 4
                  merchants:
                    - type: Merchant
                      id: 2
                    - type: Merchant
                      id: 7
                  product_profiles:
                    - type: ProductProfile
                      id: 12
                    - type: ProductProfile
                      id: 15
                  handling_classes:
                    - type: HandlingClass
                      id: 4
                  location_profile:
                    type: LocationProfile
                    id: 3
                  demand_period_days: 30
                  trigger_doi_days: 7
                  target_doi_days: 21
                  qualification_reason: inactive
                  created_at: '2026-08-12T11:30:00Z'
                  updated_at: '2026-08-12T11:30:00Z'
                included:
                  Merchant:
                    - type: Merchant
                      id: 2
                      code: retail_direct
                      name: Retail Direct
                      status: active
                    - type: Merchant
                      id: 7
                      code: marketplace
                      name: Marketplace
                      status: active
                  ProductProfile:
                    - type: ProductProfile
                      id: 12
                      name: Regulated Aerosols
                      code: regulated_aerosols
                    - type: ProductProfile
                      id: 15
                      name: Fast Movers
                      code: fast_movers
                  HandlingClass:
                    - type: HandlingClass
                      id: 4
                      name: Hazmat
                      code: hazmat
                  LocationProfile:
                    - type: LocationProfile
                      id: 3
                      name: Pick Face
                      status: ready
                      member_count: 1275
                meta:
                  processing_time: 0.0114
        '400':
          $ref: '#/components/responses/Inventory_API_v1_400-bad-request'
        '404':
          $ref: '#/components/responses/Inventory_API_v1_404-not-found'
        '422':
          $ref: '#/components/responses/Inventory_API_v1_422-unprocessable'
        '500':
          $ref: '#/components/responses/Inventory_API_v1_500-internal-server-error'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://example.shipstream.app/api/global/v1/inventory/warehouses/1/replenishment-policies?fields=merchants,product_profiles,handling_classes&fields:merchants=code,name,status&fields:product_profiles=name,code&fields:handling_classes=name,code&fields:location_profile=name,status,member_count' \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{"name":"Fast Movers - Forward Pick","is_active":false,"sort_order":10,"merchant_ids":[2,7],"product_profile_ids":[12,15],"product_profile_match_mode":"any","handling_class_ids":[4],"location_profile_id":3,"demand_period_days":30,"trigger_doi_days":7,"target_doi_days":21}'
        - lang: python
          label: Python
          source: >-
            import json

            import requests


            url =
            "https://example.shipstream.app/api/global/v1/inventory/warehouses/1/replenishment-policies?fields=merchants,product_profiles,handling_classes&fields:merchants=code,name,status&fields:product_profiles=name,code&fields:handling_classes=name,code&fields:location_profile=name,status,member_count"

            headers = {"Authorization": "Bearer <token>"}

            payload = json.loads('{"name":"Fast Movers - Forward
            Pick","is_active":false,"sort_order":10,"merchant_ids":[2,7],"product_profile_ids":[12,15],"product_profile_match_mode":"any","handling_class_ids":[4],"location_profile_id":3,"demand_period_days":30,"trigger_doi_days":7,"target_doi_days":21}')


            response = requests.request('POST', url, headers=headers,
            json=payload)

            print(response.text)
        - lang: javascript
          label: JavaScript
          source: >-
            const options = {
              method: 'POST',
              headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
              body: JSON.stringify({"name":"Fast Movers - Forward Pick","is_active":false,"sort_order":10,"merchant_ids":[2,7],"product_profile_ids":[12,15],"product_profile_match_mode":"any","handling_class_ids":[4],"location_profile_id":3,"demand_period_days":30,"trigger_doi_days":7,"target_doi_days":21}),
            };


            fetch('https://example.shipstream.app/api/global/v1/inventory/warehouses/1/replenishment-policies?fields=merchants,product_profiles,handling_classes&fields:merchants=code,name,status&fields:product_profiles=name,code&fields:handling_classes=name,code&fields:location_profile=name,status,member_count',
            options)
              .then(response => response.json())
              .then(response => console.log(response));
        - lang: php
          label: PHP
          source: |-
            <?php

            $curl = curl_init();
            curl_setopt_array($curl, [
                CURLOPT_URL => 'https://example.shipstream.app/api/global/v1/inventory/warehouses/1/replenishment-policies?fields=merchants,product_profiles,handling_classes&fields:merchants=code,name,status&fields:product_profiles=name,code&fields:handling_classes=name,code&fields:location_profile=name,status,member_count',
                CURLOPT_RETURNTRANSFER => TRUE,
                CURLOPT_CUSTOMREQUEST => 'POST',
                CURLOPT_POSTFIELDS => '{"name":"Fast Movers - Forward Pick","is_active":false,"sort_order":10,"merchant_ids":[2,7],"product_profile_ids":[12,15],"product_profile_match_mode":"any","handling_class_ids":[4],"location_profile_id":3,"demand_period_days":30,"trigger_doi_days":7,"target_doi_days":21}',
                CURLOPT_HTTPHEADER => ['Authorization: Bearer <token>', 'Content-Type: application/json'],
            ]);

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

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

            func main() {
                request, _ := http.NewRequest("POST", "https://example.shipstream.app/api/global/v1/inventory/warehouses/1/replenishment-policies?fields=merchants,product_profiles,handling_classes&fields:merchants=code,name,status&fields:product_profiles=name,code&fields:handling_classes=name,code&fields:location_profile=name,status,member_count", strings.NewReader(`{"name":"Fast Movers - Forward Pick","is_active":false,"sort_order":10,"merchant_ids":[2,7],"product_profile_ids":[12,15],"product_profile_match_mode":"any","handling_class_ids":[4],"location_profile_id":3,"demand_period_days":30,"trigger_doi_days":7,"target_doi_days":21}`))
                request.Header.Add("Authorization", "Bearer <token>")
                request.Header.Add("Content-Type", "application/json")
                response, _ := http.DefaultClient.Do(request)
                defer response.Body.Close()
                body, _ := io.ReadAll(response.Body)
                fmt.Println(string(body))
            }
        - lang: java
          label: Java
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://example.shipstream.app/api/global/v1/inventory/warehouses/1/replenishment-policies?fields=merchants,product_profiles,handling_classes&fields:merchants=code,name,status&fields:product_profiles=name,code&fields:handling_classes=name,code&fields:location_profile=name,status,member_count")
              .header("Authorization", "Bearer <token>")
              .header("Content-Type", "application/json")
              .body("{\"name\":\"Fast Movers - Forward Pick\",\"is_active\":false,\"sort_order\":10,\"merchant_ids\":[2,7],\"product_profile_ids\":[12,15],\"product_profile_match_mode\":\"any\",\"handling_class_ids\":[4],\"location_profile_id\":3,\"demand_period_days\":30,\"trigger_doi_days\":7,\"target_doi_days\":21}")
              .asString();
        - lang: ruby
          label: Ruby
          source: >-
            require 'uri'

            require 'net/http'


            url =
            URI('https://example.shipstream.app/api/global/v1/inventory/warehouses/1/replenishment-policies?fields=merchants,product_profiles,handling_classes&fields:merchants=code,name,status&fields:product_profiles=name,code&fields:handling_classes=name,code&fields:location_profile=name,status,member_count')

            request = Net::HTTP::Post.new(url)

            request['Authorization'] = 'Bearer <token>'

            request['Content-Type'] = 'application/json'

            request.body = '{"name":"Fast Movers - Forward
            Pick","is_active":false,"sort_order":10,"merchant_ids":[2,7],"product_profile_ids":[12,15],"product_profile_match_mode":"any","handling_class_ids":[4],"location_profile_id":3,"demand_period_days":30,"trigger_doi_days":7,"target_doi_days":21}'


            response = Net::HTTP.start(url.hostname, url.port, use_ssl: true) do
            |http|
              http.request(request)
            end

            puts response.read_body
components:
  parameters:
    Inventory_API_v1_replenishment-policy-fields:
      name: fields
      in: query
      required: false
      description: >-
        Specify additional fields of the `ReplenishmentPolicy` object to be
        included in the response.

        See the [selecting fields](/global-api/selecting-fields) page for more
        information.
      explode: false
      schema:
        $ref: '#/components/schemas/Inventory_API_v1_replenishment-policy-fields-enum'
    Inventory_API_v1_fields-slotting-rule-merchants:
      name: fields:merchants
      in: query
      required: false
      description: >-
        Specify direct fields of selected `Merchant` objects to include under
        `included.Merchant`. Add `merchants` to the root `fields` parameter to
        return the relationship. `type` and `id` are always returned.
      explode: false
      schema:
        $ref: >-
          #/components/schemas/Inventory_API_v1_merchant-relationship-fields-enum
    Inventory_API_v1_fields-slotting-rule-product-profiles:
      name: fields:product_profiles
      in: query
      required: false
      description: >-
        Specify fields of selected `ProductProfile` objects to include under
        `included.ProductProfile`. Add `product_profiles` to the root `fields`
        parameter to return the relationship. `type` and `id` are always
        returned.
      explode: false
      schema:
        $ref: >-
          #/components/schemas/Inventory_API_v1_product-profile-relationship-fields-enum
    Inventory_API_v1_fields-slotting-rule-handling-classes:
      name: fields:handling_classes
      in: query
      required: false
      description: >-
        Specify direct fields of selected `HandlingClass` objects to include
        under `included.HandlingClass`. Add `handling_classes` to the root
        `fields` parameter to return the relationship. `type` and `id` are
        always returned.
      explode: false
      schema:
        $ref: >-
          #/components/schemas/Inventory_API_v1_handling-class-relationship-fields-enum
    Inventory_API_v1_fields-replenishment-policy-location_profile:
      name: fields:location_profile
      in: query
      required: false
      description: >-
        Specify direct fields of the `LocationProfile` selected by each Policy.

        Location Tags and Slot Types remain available from the Profile's own
        endpoint.
      explode: false
      schema:
        $ref: >-
          #/components/schemas/Inventory_API_v1_location-profile-policy-relationship-fields-enum
  schemas:
    Inventory_API_v1_ReplenishmentPolicyCreate:
      title: ReplenishmentPolicyCreate
      type: object
      description: >-
        The configuration of a new Replenishment Policy. The warehouse comes
        from the

        path, and every derived or index-owned property of `ReplenishmentPolicy`
        is

        rejected if present.
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          example: Fast Movers - Forward Pick
          description: The user-visible Policy name; must be unique within the warehouse.
        is_active:
          type: boolean
          default: false
          description: >-
            Whether the Policy participates in Product evaluation. Omitted, a
            Policy is

            created inactive and no Replenishment rebuild is requested.
        sort_order:
          type: integer
          minimum: 0
          maximum: 65535
          default: 0
          example: 10
          description: >-
            Policy precedence; lower values are evaluated first, with `id` as
            the tie-break.
        merchant_ids:
          type: array
          nullable: true
          maxItems: 100
          items:
            type: integer
            minimum: 1
          example:
            - 2
            - 7
          description: >-
            Merchant IDs the Policy selects. `null` or an empty list means every
            Merchant.
        product_profile_ids:
          type: array
          maxItems: 100
          items:
            type: integer
            minimum: 1
          example:
            - 12
            - 15
          description: >-
            Product Profile IDs the Policy selects. An empty list means Product
            Profiles do not restrict the subject.
        product_profile_match_mode:
          type: string
          enum:
            - any
            - all
            - none
          default: any
          description: >-
            How the selected Product Profiles are matched against a Product. The
            `none`

            mode requires at least one Product Profile.
        handling_class_ids:
          type: array
          maxItems: 100
          items:
            type: integer
            minimum: 1
          example:
            - 4
          description: >-
            Handling Class IDs the Policy selects. Each must be assigned to this

            warehouse. An empty list means Handling Classes do not restrict the
            subject.
        location_profile_id:
          type: integer
          format: int32
          minimum: 1
          example: 3
          description: >-
            The `id` of the Location Profile supplying the target group. It must
            belong

            to this warehouse and already have a published revision.
        demand_period_days:
          type: integer
          minimum: 1
          maximum: 65535
          example: 30
          description: >-
            The Product Velocity window used to derive daily demand. Must equal
            one of

            the configured Product Velocity periods.
        trigger_doi_days:
          type: number
          minimum: 0
          maximum: 999999.9999
          example: 7
          description: >-
            The coverage threshold below which an assigned Product is flagged
            for Replenishment.
        target_doi_days:
          type: number
          minimum: 0
          maximum: 999999.9999
          example: 21
          description: >-
            The target coverage used to calculate the required replenishment
            quantity.

            Must not be lower than `trigger_doi_days`; equal values are
            accepted.
      required:
        - name
        - location_profile_id
        - demand_period_days
        - trigger_doi_days
        - target_doi_days
      additionalProperties: false
    Inventory_API_v1_ReplenishmentPolicy:
      title: ReplenishmentPolicy
      type: object
      description: >-
        A Replenishment Policy configuration for one warehouse. The Policy
        selects

        Products by Merchant, Product Profile, and Handling Class, then applies
        Trigger

        and Target days-of-inventory thresholds to one Location Profile.
      properties:
        type:
          type: string
          enum:
            - ReplenishmentPolicy
          readOnly: true
          description: >-
            This is a read-only property that describes the type of object in
            the response body.
        id:
          type: integer
          example: 7
          readOnly: true
          description: >-
            The internal `id` property used to identify the Replenishment
            Policy.
        name:
          type: string
          minLength: 1
          maxLength: 255
          example: Fast Movers - Forward Pick
          description: The user-visible Policy name, unique within the warehouse.
        is_active:
          type: boolean
          description: Whether this Policy participates in Product evaluation.
        sort_order:
          type: integer
          minimum: 0
          maximum: 65535
          example: 10
          description: >-
            Policy precedence; lower values are evaluated first, with `id` as
            the

            tie-break. The first qualified Policy wins for a given Product.
        merchant_ids:
          type: array
          nullable: true
          items:
            type: integer
            minimum: 1
          example:
            - 2
            - 7
          description: Merchant IDs selected by the Policy; `null` means every Merchant.
        merchants:
          type: array
          nullable: true
          readOnly: true
          description: >-
            Direct references to the selected Merchants. Request this optional
            relationship when an editor needs names. `null` means the Policy
            applies to every Merchant.\
              `Optional Field`
          items:
            $ref: '#/components/schemas/Inventory_API_v1_MerchantRef'
        product_profile_ids:
          type: array
          items:
            type: integer
            minimum: 1
          example:
            - 12
            - 15
          description: >-
            Product Profile IDs selected by the Policy; an empty list means
            Product Profiles do not restrict the subject.
        product_profiles:
          type: array
          readOnly: true
          description: |-
            Direct references to selected Product Profiles for editor display.\
              `Optional Field`
          items:
            $ref: '#/components/schemas/Inventory_API_v1_ProductProfileRef'
        product_profile_match_mode:
          type: string
          enum:
            - any
            - all
            - none
          description: How the selected Product Profiles are matched against a Product.
        handling_class_ids:
          type: array
          items:
            type: integer
            minimum: 1
          example:
            - 4
          description: >-
            Handling Class IDs selected by the Policy; an empty list means
            Handling Classes do not restrict the subject.
        handling_classes:
          type: array
          readOnly: true
          description: |-
            Direct references to selected Handling Classes for editor display.\
              `Optional Field`
          items:
            $ref: '#/components/schemas/Inventory_API_v1_HandlingClassRef'
        subject_readable:
          type: string
          example: >-
            Merchants: Acme Supply; Product Profiles (Any of): Fast Movers;
            Handling Classes: Hazmat
          readOnly: true
          description: >-
            A rendered summary of the Merchant, Product Profile, and Handling
            Class selectors, resolved to names rather than identifiers.\
              `Optional Field`
        location_profile:
          description: >-
            The Location Profile whose resolved membership supplies the target
            group.
          allOf:
            - $ref: '#/components/schemas/Inventory_API_v1_LocationProfileRef'
        demand_period_days:
          type: integer
          minimum: 1
          maximum: 65535
          example: 30
          description: The Product Velocity window used to derive daily demand.
        trigger_doi_days:
          type: number
          minimum: 0
          maximum: 999999.9999
          example: 7
          description: >-
            The coverage threshold below which an assigned Product is flagged
            for Replenishment.
        target_doi_days:
          type: number
          minimum: 0
          maximum: 999999.9999
          example: 14
          description: >-
            The target coverage used to calculate the required replenishment
            quantity.
        qualification_reason:
          type: string
          nullable: true
          enum:
            - inactive
            - profile_building
            - profile_failed
            - profile_not_ready
            - profile_empty
            - demand_period_unconfigured
            - null
          example: profile_empty
          description: >-
            Why this Policy currently falls through during evaluation, or `null`
            when it is qualified.
        flagged_sku_count:
          type: integer
          nullable: true
          example: 42
          readOnly: true
          description: >-
            How many Products this Policy flagged for Replenishment in the
            published generation. `null` means the warehouse has not published a
            Replenishment generation yet, so no count has been calculated.\
              `Optional Field`
        skipped_sku_count:
          type: integer
          nullable: true
          example: 3
          readOnly: true
          description: >-
            How many Products the published generation skipped for this Policy.
            `null` means the warehouse has not published a Replenishment
            generation yet.\
              `Optional Field`
        slotting_forbidden_count:
          type: integer
          nullable: true
          example: 1
          readOnly: true
          description: >-
            How many Products the published generation could not replenish
            because Slotting forbids the target group. `null` means the
            warehouse has not published a Replenishment generation yet.\
              `Optional Field`
        results_refresh_pending:
          type: boolean
          readOnly: true
          description: >-
            Whether the published counts are already superseded by a requested
            generation that has not finished building.\
              `Optional Field`
        created_at:
          type: string
          format: date-time
          nullable: true
          description: The time the Policy was created.
        updated_at:
          type: string
          format: date-time
          nullable: true
          description: The time the Policy was last updated.
      required:
        - type
        - id
      additionalProperties: false
      example:
        type: ReplenishmentPolicy
        id: 7
        name: Fast Movers - Forward Pick
        is_active: true
        sort_order: 10
        merchant_ids:
          - 2
          - 7
        product_profile_ids:
          - 12
          - 15
        product_profile_match_mode: any
        handling_class_ids:
          - 4
        location_profile:
          type: LocationProfile
          id: 3
        demand_period_days: 30
        trigger_doi_days: 7
        target_doi_days: 21
        qualification_reason: null
        created_at: '2026-08-01T09:30:00Z'
        updated_at: '2026-08-12T10:15:00Z'
    Inventory_API_v1_replenishment-policies:
      type: object
      description: >-
        Lists of referenced objects included by specifying optional fields.

        See the [selecting fields](/global-api/selecting-fields) page for more
        information.
      example: {}
      properties:
        LocationProfile:
          type: array
          items:
            $ref: '#/components/schemas/Inventory_API_v1_LocationProfile'
        Merchant:
          type: array
          items:
            $ref: '#/components/schemas/Inventory_API_v1_Merchant'
        ProductProfile:
          type: array
          items:
            $ref: '#/components/schemas/Inventory_API_v1_ProductProfile'
        HandlingClass:
          type: array
          items:
            $ref: '#/components/schemas/Inventory_API_v1_HandlingClass'
      additionalProperties: false
    Inventory_API_v1_meta:
      type: object
      properties:
        processing_time:
          type: number
          description: Total time in which request is processed and response is sent back.
          example: 0.2525252525
        cursor_start:
          type: integer
          description: >-
            A cursor for use in pagination which defines the starting `id` of
            the next page of results.

            See [paging parameters](/global-api/paging-parameters) for more
            information on paging.
          nullable: true
        cursor_end:
          type: integer
          description: >-
            A cursor for use in pagination which defines the last `id` of the
            next page of results, non-inclusive.

            See [paging parameters](/global-api/paging-parameters) for more
            information on paging.
          nullable: true
        count:
          type: integer
          description: >-
            The total number of items matching the query before applying paging
            parameters.

            This field is only present if the query parameter `count=1` is
            present in the request.
      description: Additional metadata pertaining to the response.
    Inventory_API_v1_replenishment-policy-fields-enum:
      title: ReplenishmentPolicy
      description: >-
        Specify additional fields of the `ReplenishmentPolicy` object to be
        included in the response.
      type: array
      items:
        type: string
        enum:
          - basic
          - all
          - name
          - is_active
          - sort_order
          - merchant_ids
          - merchants
          - product_profile_ids
          - product_profiles
          - product_profile_match_mode
          - handling_class_ids
          - handling_classes
          - subject_readable
          - location_profile
          - demand_period_days
          - trigger_doi_days
          - target_doi_days
          - qualification_reason
          - flagged_sku_count
          - skipped_sku_count
          - slotting_forbidden_count
          - results_refresh_pending
          - created_at
          - updated_at
    Inventory_API_v1_merchant-relationship-fields-enum:
      title: SlottingRuleMerchantSelection
      description: Specify direct fields of an included `Merchant` object.
      type: array
      items:
        type: string
        enum:
          - code
          - name
          - status
          - created_at
          - updated_at
    Inventory_API_v1_product-profile-relationship-fields-enum:
      title: ProductProfile
      description: Specify fields of an included `ProductProfile` object.
      type: array
      items:
        type: string
        enum:
          - basic
          - all
          - name
          - code
          - conditions
          - conditions_readable
          - matched_count
          - classification
          - created_at
          - updated_at
    Inventory_API_v1_handling-class-relationship-fields-enum:
      title: SlottingRuleHandlingClassSelection
      description: Specify direct fields of an included `HandlingClass` object.
      type: array
      items:
        type: string
        enum:
          - name
          - code
          - sort_order
          - conditions
          - conditions_readable
          - matched_count
          - classification
          - created_at
          - updated_at
    Inventory_API_v1_location-profile-policy-relationship-fields-enum:
      title: ReplenishmentPolicyLocationProfileSelection
      description: Specify direct fields of the included `LocationProfile` object.
      type: array
      items:
        type: string
        enum:
          - name
          - description
          - status
          - member_count
          - match
          - match_readable
          - active_revision
          - pending_revision
          - used_by
          - created_at
          - updated_at
    Inventory_API_v1_MerchantRef:
      title: MerchantRef
      type: object
      description: Reference a `Merchant` by `id`.
      properties:
        type:
          type: string
          enum:
            - Merchant
        id:
          type: integer
          format: int32
          example: 4
          description: >-
            The internal `id` property used as a path parameter in a resource
            lookup.
      required:
        - type
        - id
      additionalProperties: false
    Inventory_API_v1_ProductProfileRef:
      title: ProductProfileRef
      type: object
      description: A reference to a `ProductProfile` by `id`.
      properties:
        type:
          type: string
          enum:
            - ProductProfile
        id:
          type: integer
          format: int32
          minimum: 1
          description: Product Profile ID.
      required:
        - type
        - id
      additionalProperties: false
    Inventory_API_v1_HandlingClassRef:
      title: HandlingClassRef
      type: object
      description: A reference to a Handling Class by ID.
      properties:
        type:
          type: string
          enum:
            - HandlingClass
        id:
          type: integer
          format: int32
          minimum: 1
          description: Handling Class ID.
      required:
        - type
        - id
      additionalProperties: false
    Inventory_API_v1_LocationProfileRef:
      title: LocationProfileRef
      type: object
      description: A reference to a Location Profile by ID.
      properties:
        type:
          type: string
          enum:
            - LocationProfile
        id:
          type: integer
          format: int32
          minimum: 1
          description: Location Profile ID.
      required:
        - type
        - id
      nullable: true
      additionalProperties: false
    Inventory_API_v1_LocationProfile:
      title: LocationProfile
      type: object
      description: >-
        A `LocationProfile` is a warehouse-scoped, named set of locations
        defined by match clauses

        rather than by enumeration. Slotting Rules and Replenishment Policies
        target a profile

        instead of listing locations, so the same policy keeps working as the
        warehouse grows.


        Membership is materialized asynchronously. Saving a definition creates
        an immutable revision

        and starts a build; the previously published revision keeps serving
        consumers until the

        replacement is ready. A profile without a ready active revision has no
        resolved member set

        and is never represented as an empty one — `member_count` is `null`
        rather than `0`.
      properties:
        type:
          type: string
          enum:
            - LocationProfile
          readOnly: true
          description: >-
            This is a read-only property that describes the type of object in
            the response body.
        id:
          type: integer
          format: int32
          example: 42
          readOnly: true
          description: >-
            The internal `id` property used as a path parameter in a resource
            lookup.
        name:
          type: string
          minLength: 1
          maxLength: 255
          example: Rack Pick Face
          description: The user-visible profile name, unique within the warehouse.
        description:
          type: string
          nullable: true
          example: >-
            Pickable shelf locations on rack aisles, excluding ground-level
            overflow.
          description: >-
            An optional explanation of the locations represented by this
            profile.
        status:
          type: string
          enum:
            - ready
            - building
            - failed
            - none
          description: >-
            The availability of the revision currently published for this
            profile:
              - `ready` — a published revision is serving consumers, and stays serving while any
                replacement builds. Check `pending_revision` to see a rebuild in flight.
              - `building` — no revision has been published yet and the first one is materializing.
              - `failed` — no revision has been published and the latest attempt failed.
              - `none` — no published or actionable pending revision is available.

            A Slotting Rule may reference only a `ready` profile. A
            Replenishment Policy may

            reference a profile before it is ready, but remains disqualified
            until a revision

            publishes. For a new profile, poll until `status` is `ready`. For an
            update or rebuild,

            inspect `pending_revision`: successful publication is complete when
            it becomes `null`,

            while a failed replacement remains present with a `failed` status.
        member_count:
          type: integer
          format: int32
          nullable: true
          example: 486
          description: >-
            The resolved member location count of the published revision. A
            ready profile with zero

            members is a genuine empty set; `null` means the profile has no
            published revision and

            therefore no resolved member set at all.
        match:
          type: array
          nullable: true
          description: >-
            The ordered clauses defining membership, all of which must match.
            This is the latest

            *intended* definition: the pending revision's clauses while a
            rebuild is in flight,

            otherwise the published revision's.


            An empty array is the saved all-locations definition, which matches
            every non-temporary

            location in the warehouse. `null` means no definition has ever been
            saved, which only a

            legacy profile head can be.
          items:
            $ref: '#/components/schemas/Inventory_API_v1_LocationProfileMatchClause'
          example:
            - field: location_label
              operator: starts_with
              values:
                - RK
            - field: slot_type
              operator: is_one_of
              values:
                - type: SlotType
                  id: 4
            - field: location_tag
              operator: is_not_one_of
              values:
                - type: LocationTag
                  id: 1
            - field: script
              operator: returns_true
              cel: is_pickable
        match_readable:
          type: string
          nullable: true
          example: >-
            startsWith(label.toLower(), 'rk') && (present(slot_type_id) &&
            (slot_type_id in [4])) && !(1 in tag_ids) && (is_pickable)
          description: >-
            The same definition compiled to a single CEL expression, for display
            and for comparing

            two profiles at a glance. This is the read-only counterpart of a
            `ProductProfile`'s

            `conditions_readable`.


            `true` is the all-locations definition. `null` whenever `match` is
            `null`.
        location_tags:
          type: array
          readOnly: true
          description: >-
            Unique Location Tags referenced by the ordered match definition, in
            first-appearance order. Request this field when an editor needs to
            resolve the shallow Tag references.
          items:
            $ref: '#/components/schemas/Inventory_API_v1_LocationTagRef'
        slot_types:
          type: array
          readOnly: true
          description: >-
            Unique Slot Types referenced by the ordered match definition, in
            first-appearance order. Request this field when an editor needs to
            resolve the shallow Slot Type references.
          items:
            $ref: '#/components/schemas/Inventory_API_v1_SlotTypeRef'
        active_revision:
          type: object
          nullable: true
          description: >-
            The published revision currently serving consumers, or `null` when
            none has published yet.
          allOf:
            - $ref: >-
                #/components/schemas/Inventory_API_v1_LocationProfileActiveRevision
        pending_revision:
          type: object
          nullable: true
          description: >-
            The replacement revision being materialized, or whose latest attempt
            failed. `null` once

            a revision publishes and no rebuild is in flight.
          allOf:
            - $ref: >-
                #/components/schemas/Inventory_API_v1_LocationProfilePendingRevision
        used_by:
          $ref: '#/components/schemas/Inventory_API_v1_LocationProfileUsedBy'
        created_at:
          type: string
          format: date-time
          nullable: true
          example: '2026-07-14T09:12:05Z'
          description: The UTC date and time the profile was created.
        updated_at:
          type: string
          format: date-time
          nullable: true
          example: '2026-08-02T06:41:18Z'
          description: >-
            The UTC date and time the profile metadata or revision pointers last
            changed.
      required:
        - type
        - id
      additionalProperties: false
      example:
        type: LocationProfile
        id: 26
        name: Cold Storage Pick Faces
        description: Pickable shelf locations approved for refrigerated inventory.
        status: ready
        member_count: 486
        match:
          - field: slot_type
            operator: is_one_of
            values:
              - type: SlotType
                id: 5
          - field: location_tag
            operator: is_one_of
            values:
              - type: LocationTag
                id: 12
        match_readable: (present(slot_type_id) && (slot_type_id in [5])) && (12 in tag_ids)
        active_revision:
          id: 1184
          status: ready
          member_count: 486
          ready_at: '2026-08-12T06:41:22Z'
        used_by:
          slotting_rules: 3
          replenishment_policies: 1
        created_at: '2026-07-14T09:12:05Z'
        updated_at: '2026-08-12T06:41:18Z'
    Inventory_API_v1_Merchant:
      title: Merchant
      type: object
      description: >-
        A `Merchant` represents an entity that owns a distinct pool of inventory
        and line of business.
      properties:
        type:
          type: string
          enum:
            - Merchant
          readOnly: true
        id:
          type: integer
          format: int32
          description: >-
            The internal `id` property used as a path parameter in a resource
            lookup.
          readOnly: true
          example: 4
        code:
          type: string
          description: >-
            Merchant code may only contain letters (a-z), numbers (0-9) or
            underscore(_), the first character must be a letter.
          minLength: 1
          maxLength: 32
          example: acme_inc
        name:
          type: string
          description: Any string which uniquely identifies a Merchant.
          minLength: 1
          maxLength: 64
          example: ACME Inc.
        status:
          type: string
          enum:
            - active
            - inactive
            - suspended
            - archived
          default: active
          description: >-
            Lifecycle status of the Merchant:

            - `active`: Merchant is operational and available for use

            - `suspended`: Temporarily on hold, can be easily reactivated

            - `inactive`: Long-term offline status, reactivation is possible but
            may require additional steps

            - `archived`: Soft delete status, manual recovery required
          example: active
          nullable: true
          readOnly: true
        created_at:
          $ref: '#/components/schemas/Inventory_API_v1_created_at-optional'
        updated_at:
          $ref: '#/components/schemas/Inventory_API_v1_updated_at'
        brands:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Inventory_API_v1_BrandRef'
          description: >-
            A merchant must have one or more brands which may share the same
            pool of inventory. Brands can be used for

            customizing presentation and behaviors and often correspond to
            distinct lines of business or market presences.\
              `Optional Field`
          readOnly: true
        default_brand:
          allOf:
            - $ref: '#/components/schemas/Inventory_API_v1_BrandRef'
          description: >-
            This is the primary brand used when defining only the merchant for
            operations such as creating a new product.\
              `Optional Field`
        custom_fields:
          type: object
          allOf:
            - $ref: '#/components/schemas/Inventory_API_v1_sales_custom_fields'
          nullable: true
          description: >-
            Custom fields associated with the merchant in script format. Each
            field contains

            a code and value, with additional properties depending on the field
            type.\
              `Optional Field`
    Inventory_API_v1_ProductProfile:
      title: ProductProfile
      type: object
      description: >-
        A reusable Product classification whose conditions may match many
        Products. Classification is

        asynchronous: after a create or condition update, poll the resource
        until

        `classification.status` is `up_to_date`. This status confirms that the
        Profile's current

        conditions were classified. Product changes flow through a separate
        asynchronous changelog and

        may not appear immediately in materialized membership.
      properties:
        type:
          type: string
          enum:
            - ProductProfile
          readOnly: true
        id:
          type: integer
          format: int32
          minimum: 1
          readOnly: true
          description: Product Profile ID.
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: Human-readable Product Profile name.
          example: Lightweight Parcel
        code:
          type: string
          maxLength: 64
          pattern: ^[A-Za-z0-9_]+$
          example: lightweight_parcel
          description: >-
            Stable unique code. It may be supplied on create and cannot be
            changed later.
        conditions:
          allOf:
            - $ref: '#/components/schemas/Inventory_API_v1_ConditionTree'
          description: >-
            Canonical Product matching conditions. Request with
            `fields=conditions` when editing.\
              `Optional Field`\
        conditions_readable:
          type: string
          readOnly: true
          description: >-
            Compiled CEL expression corresponding to the canonical conditions.
            Request with

            `fields=conditions_readable` for diagnostics or previews.\
              `Optional Field`\
        matched_count:
          type: integer
          minimum: 0
          readOnly: true
          description: >-
            Number of Products in the most recently completed materialized
            membership.
        classification:
          type: object
          readOnly: true
          properties:
            status:
              type: string
              description: Current state of the asynchronous Product classification.
              enum:
                - up_to_date
                - processing
                - queued
                - failed
                - out_of_date
                - not_indexed
            indexed_at:
              type: string
              format: date-time
              nullable: true
              description: >-
                Completion time of the most recent successful classification, if
                any.
          required:
            - status
            - indexed_at
          additionalProperties: false
        created_at:
          type: string
          format: date-time
          nullable: true
          readOnly: true
          description: Time when the Product Profile was created.
        updated_at:
          type: string
          format: date-time
          nullable: true
          readOnly: true
          description: Time when the Product Profile was last updated.
      required:
        - type
        - id
      additionalProperties: false
      example:
        type: ProductProfile
        id: 26
        name: Lightweight Parcel
        code: lightweight_parcel
        conditions:
          or:
            - and:
                - <=:
                    - var: weight
                    - value: 15
                      unit: lb
                      base_value: 15
        conditions_readable: ((present(weight) && weight <= 15.0))
        matched_count: 482
        classification:
          status: up_to_date
          indexed_at: '2026-08-04T09:15:00Z'
        created_at: '2026-07-15T14:30:00Z'
        updated_at: '2026-08-04T09:15:00Z'
    Inventory_API_v1_HandlingClass:
      title: HandlingClass
      type: object
      description: >-
        A Warehouse-scoped Product classification used by Slotting and
        Replenishment. Classification

        is asynchronous: after conditions or Warehouse assignments change, poll
        the resource until

        `classification.status` is `up_to_date`. Product changes flow through a
        separate asynchronous

        changelog and may not appear immediately in materialized classification.
      properties:
        type:
          type: string
          enum:
            - HandlingClass
          readOnly: true
        id:
          type: integer
          format: int32
          minimum: 1
          readOnly: true
          description: Handling Class ID.
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: Human-readable Handling Class name.
          example: Heavy Bulky
        code:
          type: string
          maxLength: 64
          pattern: ^[A-Za-z0-9_]+$
          description: Stable unique code.
          example: heavy_bulky
        sort_order:
          type: integer
          minimum: 0
          maximum: 1000000
          description: Evaluation precedence; lower values are evaluated first.
          example: 20
        warehouses:
          type: array
          description: >-
            Warehouses where the Handling Class is evaluated. Deleting a
            Warehouse detaches it immediately, so a class scoped only to a
            deleted Warehouse reads `warehouses: []` and stops classifying until
            it is assigned again; updates must always supply at least one
            Warehouse.
          items:
            $ref: '#/components/schemas/Inventory_API_v1_WarehouseRef'
        conditions:
          allOf:
            - $ref: '#/components/schemas/Inventory_API_v1_ConditionTree'
          description: >-
            Canonical Product matching conditions. Request with
            `fields=conditions` when editing.\
              `Optional Field`\
        referenced_product_profiles:
          type: array
          readOnly: true
          description: >-
            Product Profiles referenced by the canonical conditions — the
            Profiles this rule depends on, not any Product's memberships.
          items:
            $ref: '#/components/schemas/Inventory_API_v1_ProductProfileRef'
        conditions_readable:
          type: string
          readOnly: true
          description: >-
            Compiled CEL expression corresponding to the canonical conditions.
            Request with

            `fields=conditions_readable` for diagnostics or previews.\
              `Optional Field`\
        matched_count:
          type: integer
          minimum: 0
          readOnly: true
          description: Products in the most recently completed materialized classification.
        classification:
          type: object
          readOnly: true
          properties:
            status:
              type: string
              description: Current state of asynchronous classification.
              enum:
                - up_to_date
                - processing
                - queued
                - failed
                - out_of_date
                - not_indexed
            indexed_at:
              type: string
              format: date-time
              nullable: true
              description: >-
                Completion time of the most recent successful classification, if
                any.
          required:
            - status
            - indexed_at
          additionalProperties: false
        created_at:
          type: string
          format: date-time
          nullable: true
          readOnly: true
          description: Time when the Handling Class was created.
        updated_at:
          type: string
          format: date-time
          nullable: true
          readOnly: true
          description: Time when the Handling Class was last updated.
      required:
        - type
        - id
      additionalProperties: false
      example:
        type: HandlingClass
        id: 14
        name: Heavy Bulky
        code: heavy_bulky
        sort_order: 20
        warehouses:
          - type: Warehouse
            id: 1
        referenced_product_profiles:
          - type: ProductProfile
            id: 31
        matched_count: 318
        classification:
          status: up_to_date
          indexed_at: '2026-08-04T09:15:00Z'
        created_at: '2026-07-15T14:30:00Z'
        updated_at: '2026-08-04T09:15:00Z'
    Inventory_API_v1_LocationProfileMatchClause:
      title: LocationProfileMatchClause
      type: object
      description: >-
        One clause of a Location Profile definition. Clauses are ANDed and
        evaluated in the order

        they appear, so a location joins the profile only when every clause
        matches it.


        A clause carries its operands in exactly one channel: `values` for the
        typed operators and

        `cel` for `script`. Only the channel in use is present — the other is
        omitted rather than

        returned as `null`.
      properties:
        field:
          type: string
          enum:
            - zone
            - rack
            - rack_type
            - location_label
            - slot_type
            - location_tag
            - script
          example: location_label
          description: |-
            The location property the clause tests:
              - `zone`, `rack`, `rack_type`, `slot_type`, `location_tag` — entity references.
              - `location_label` — the location's label text.
              - `script` — a CEL expression evaluated against the location, for cases the typed
                fields cannot express.
        operator:
          type: string
          enum:
            - is_one_of
            - is_not_one_of
            - starts_with
            - not_starts_with
            - contains
            - not_contains
            - ends_with
            - not_ends_with
            - matches
            - not_matches
            - returns_true
          example: starts_with
          description: >-
            The comparison applied to the field. Which operators are available
            depends on the field:
              - entity fields (`zone`, `rack`, `rack_type`, `slot_type`, `location_tag`) take
                `is_one_of` and `is_not_one_of`.
              - `location_label` takes `starts_with`, `contains`, `ends_with`, `matches` and their
                `not_` counterparts. `matches` takes a regular expression.
              - `script` takes `returns_true`.
        values:
          type: array
          description: >-
            The operands. Absent on a `script` clause, which carries `cel`
            instead. Entity fields whose target is exposed as

            its own Global API resource carry `{type, id}` references; `zone`
            carries bare integer

            ids because zones have no resource of their own. `location_label`
            carries a single

            string needle.
          items:
            oneOf:
              - $ref: '#/components/schemas/Inventory_API_v1_RackRef'
              - $ref: '#/components/schemas/Inventory_API_v1_RackTypeRef'
              - $ref: '#/components/schemas/Inventory_API_v1_SlotTypeRef'
              - $ref: '#/components/schemas/Inventory_API_v1_LocationTagRef'
              - type: integer
                description: A warehouse zone `id`.
              - type: string
                description: >-
                  A `location_label` needle, or a regular expression for the
                  `matches` operators.
        cel:
          type: string
          example: is_pickable
          description: >-
            The CEL expression evaluated for a `script` clause. Absent on every
            other clause, which

            carries `values` instead. The expression returns a boolean.
      required:
        - field
        - operator
      additionalProperties: false
    Inventory_API_v1_LocationTagRef:
      title: LocationTagRef
      type: object
      description: A reference to a `LocationTag` object.
      properties:
        type:
          type: string
          enum:
            - LocationTag
          description: This property describes the type of object in the response body.
        id:
          type: integer
          description: >-
            The internal `id` property used as a path parameter in a resource
            lookup.
          example: 4
      required:
        - type
        - id
      additionalProperties: false
    Inventory_API_v1_SlotTypeRef:
      title: SlotTypeRef
      type: object
      description: A reference to a `SlotType` object.
      properties:
        type:
          type: string
          enum:
            - SlotType
          description: This property describes the type of object in the response body.
        id:
          type: integer
          example: 54
          description: >-
            The internal `id` property used as a path parameter in a resource
            lookup.
      required:
        - type
        - id
      nullable: true
      additionalProperties: false
    Inventory_API_v1_LocationProfileActiveRevision:
      title: LocationProfileActiveRevision
      type: object
      description: >-
        The published Location Profile revision whose materialized membership is
        serving consumers.

        A published revision is always `ready`; it keeps serving until a
        replacement finishes

        building and atomically takes over.
      properties:
        id:
          type: integer
          format: int32
          example: 1184
          description: The internal `id` of the published revision.
        status:
          type: string
          enum:
            - ready
          description: Always `ready` — an unpublished revision is never the active one.
        member_count:
          type: integer
          format: int32
          example: 486
          description: >-
            The number of locations this revision resolved to. Zero is a genuine
            empty set.
        ready_at:
          type: string
          format: date-time
          nullable: true
          example: '2026-08-02T06:41:22Z'
          description: >-
            The UTC date and time this revision finished materializing and was
            published.
      required:
        - id
        - status
        - member_count
        - ready_at
      additionalProperties: false
    Inventory_API_v1_LocationProfilePendingRevision:
      title: LocationProfilePendingRevision
      type: object
      description: >-
        The Location Profile revision being materialized, or whose latest
        attempt failed. It is not

        serving anyone yet: while it builds, the profile keeps answering with
        its published revision

        if it has one. A `failed` pending revision is retried by a rebuild.
      properties:
        id:
          type: integer
          format: int32
          example: 1185
          description: The internal `id` of the pending revision.
        status:
          type: string
          enum:
            - building
            - failed
          description: >-
            `building` while membership is being materialized, `failed` when the
            latest attempt

            stopped with an error. See `last_error` for the diagnostic.
        started_at:
          type: string
          format: date-time
          nullable: true
          example: '2026-08-02T06:41:19Z'
          description: The UTC date and time the latest materialization attempt started.
        failed_at:
          type: string
          format: date-time
          nullable: true
          example: '2026-08-02T06:41:21Z'
          description: >-
            The UTC date and time the revision was marked failed, or `null` when
            it has not failed.
        last_error:
          type: string
          nullable: true
          example: >-
            A location rule in this Profile could not be evaluated. Review the
            Profile rules.
          description: >-
            The diagnostic from the latest failed attempt, or `null` when it has
            not failed.
      required:
        - id
        - status
        - started_at
        - failed_at
        - last_error
      additionalProperties: false
    Inventory_API_v1_LocationProfileUsedBy:
      title: LocationProfileUsedBy
      type: object
      description: >-
        Live counts of the authoring objects referencing this Location Profile.
        A profile with any

        reference cannot be deleted. These fields do not include published
        Replenishment result rows,

        which may temporarily continue to reference the profile until the
        Warehouse index is rebuilt.
      properties:
        slotting_rules:
          type: integer
          format: int32
          example: 3
          description: The number of Slotting Rules currently referencing this profile.
        replenishment_policies:
          type: integer
          format: int32
          example: 1
          description: >-
            The number of Replenishment Policies currently referencing this
            profile.
      required:
        - slotting_rules
        - replenishment_policies
      additionalProperties: false
    Inventory_API_v1_created_at-optional:
      type: string
      format: date-time
      description: >-
        The date and time the object was created in RFC 3339 section 5.6
        notation.\
          `Optional Field`
      example: '2017-07-21T17:32:28Z'
      nullable: true
      readOnly: true
    Inventory_API_v1_updated_at:
      type: string
      format: date-time
      description: >-
        The date and time the object was last updated in RFC 3339 section 5.6
        notation.\
          `Optional Field`
      example: '2017-07-21T17:39:43Z'
      nullable: true
      readOnly: true
    Inventory_API_v1_BrandRef:
      title: BrandRef
      type: object
      description: Reference a `Brand` by `id`.
      properties:
        type:
          type: string
          enum:
            - Brand
        id:
          type: integer
          format: int32
          description: The numeric `id` of a particular resource being updated.
          example: 4
      required:
        - type
        - id
      additionalProperties: false
    Inventory_API_v1_sales_custom_fields:
      type: object
      description: >-
        Custom field values for the order, keyed by field code.


        The format of each value depends on the field's input type:

        - **select**: `{"id": <integer>, "label": "<string>"}`

        - **multiselect**: `[{"id": <integer>, "label": "<string>"}, ...]`

        - **currency**: Uses the Monetary type `{"amount": <number>, "currency":
        "<string>"}`

        - **boolean**: `{"value": <boolean>}`

        - **text/multiline-text/email/url/date**: `{"value": "<string>"}`

        - **number**: `{"value": <number>}`

        - **admin-user/client-user**: `{"value": <integer>}` (user ID)
      additionalProperties:
        $ref: '#/components/schemas/Inventory_API_v1_custom_field_value'
      example:
        is_gift:
          value: true
        order_details:
          value: test details
        department:
          id: 3
          label: Shipping
        priority_levels:
          - id: 1
            label: Urgent
          - id: 2
            label: High
        cost_of_goods:
          amount: 156.99
          currency: USD
        assigned_user:
          value: 42
    Inventory_API_v1_ConditionTree:
      oneOf:
        - type: object
          description: Canonical condition tree returned by the API.
          properties:
            or:
              type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/Inventory_API_v1_ConditionGroup'
          required:
            - or
          additionalProperties: false
        - $ref: '#/components/schemas/Inventory_API_v1_ConditionGroup'
      description: >-
        A one-level OR-of-AND condition tree. The server accepts the `{"and":
        [...]}` shorthand

        for a single group and always returns the canonical `{"or": [{"and":
        [...]}]}` form.


        OpenAPI validates the structural envelope. ShipStream remains
        authoritative for available

        Product fields, field/operator compatibility, option values, measurement
        units, raw CEL

        validity, normalization, the limit of 64 condition rows across all
        groups, and the

        65,535-byte compiled-expression limit. Editor clients can

        load the applicable Product field catalogue from

        `GET /api/global/v1/inventory/product-profiles/condition-fields` or

        `GET /api/global/v1/inventory/handling-classes/condition-fields`.
      example:
        or:
          - and:
              - <=:
                  - var: weight
                  - value: 15
                    unit: lb
    Inventory_API_v1_WarehouseRef:
      title: WarehouseRef
      type: object
      description: A reference to a `Warehouse` by `id`.
      properties:
        type:
          type: string
          enum:
            - Warehouse
          description: This property describes the type of object in the response body.
        id:
          type: integer
          format: int32
          description: >-
            The internal `id` property used as a path parameter in a resource
            lookup.
      required:
        - type
        - id
      nullable: true
      additionalProperties: false
    Inventory_API_v1_RackRef:
      title: RackRef
      type: object
      description: >-
        A `Rack` is a grouping of locations in a warehouse implying a very close
        proximity.
      properties:
        type:
          type: string
          enum:
            - Rack
          description: This property describes the type of object in the response body.
        id:
          type: integer
          description: >-
            The internal `id` property used as a path parameter in a resource
            lookup.
      required:
        - type
        - id
      nullable: true
      additionalProperties: false
    Inventory_API_v1_RackTypeRef:
      title: RackTypeRef
      type: object
      description: >-
        A `RackType` classifies racks by their physical characteristics (e.g.
        "Wide Aisle", "Narrow Aisle").
      properties:
        type:
          type: string
          enum:
            - RackType
          description: This property describes the type of object in the response body.
        id:
          type: integer
          description: >-
            The internal `id` property used as a path parameter in a resource
            lookup.
      required:
        - type
        - id
      nullable: true
      additionalProperties: false
    Inventory_API_v1_custom_field_value:
      description: Union type for all possible custom field value formats.
      anyOf:
        - $ref: '#/components/schemas/Inventory_API_v1_custom_field_scalar_value'
        - $ref: '#/components/schemas/Inventory_API_v1_Monetary'
        - $ref: '#/components/schemas/Inventory_API_v1_custom_field_select_option'
        - $ref: '#/components/schemas/Inventory_API_v1_custom_field_multiselect_value'
    Inventory_API_v1_ConditionGroup:
      type: object
      properties:
        and:
          type: array
          minItems: 1
          maxItems: 64
          items:
            $ref: '#/components/schemas/Inventory_API_v1_ConditionRow'
      required:
        - and
      additionalProperties: false
    Inventory_API_v1_custom_field_scalar_value:
      type: object
      description: |-
        A wrapper for scalar custom field values.
        The value type depends on the field's input type:
        - **boolean**: boolean value
        - **text/multiline-text/email/url/date**: string value
        - **number**: number value
        - **admin-user/client-user**: integer value (user ID)
      required:
        - value
      properties:
        value:
          description: The field value. Type varies based on field configuration.
          oneOf:
            - type: boolean
            - type: string
            - type: number
            - type: integer
      additionalProperties: false
    Inventory_API_v1_Monetary:
      title: Monetary
      type: object
      nullable: true
      properties:
        amount:
          type: number
          description: This is the monetary value..
          format: float
          example: 99
        currency:
          type: string
          description: An ISO 3166-1 alpha-3 currency code.
          example: USD
    Inventory_API_v1_custom_field_select_option:
      type: object
      description: A selected option for select type fields.
      required:
        - id
        - label
      properties:
        id:
          type: integer
          description: The option ID.
        label:
          type: string
          description: The display label for the selected option.
      additionalProperties: false
    Inventory_API_v1_custom_field_multiselect_value:
      type: array
      description: Array of selected options for multiselect type fields.
      items:
        $ref: '#/components/schemas/Inventory_API_v1_custom_field_select_option'
    Inventory_API_v1_ConditionRow:
      type: object
      description: |-
        One predicate or raw CEL expression. Predicate operands are ordered as
        `[{"var": "field_code"}, value]`; expression operands are ordered as
        `[{"cel": "boolean expression"}, true]`.
      minProperties: 1
      maxProperties: 1
      properties:
        <:
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        <=:
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        '==':
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        '!=':
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        '>':
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        '>=':
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        contains:
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        not_contains:
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        matches:
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        not_matches:
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        in:
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        not_in:
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        contains_any:
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        contains_none:
          $ref: '#/components/schemas/Inventory_API_v1_PredicateOperands'
        expr:
          $ref: '#/components/schemas/Inventory_API_v1_ExpressionOperands'
      additionalProperties: false
    Inventory_API_v1_PredicateOperands:
      type: array
      minItems: 2
      maxItems: 2
      items:
        oneOf:
          - $ref: '#/components/schemas/Inventory_API_v1_Variable'
          - $ref: '#/components/schemas/Inventory_API_v1_ConditionValue'
    Inventory_API_v1_ExpressionOperands:
      type: array
      description: >-
        The first item is a CEL expression object and the second item must be
        `true`.
      minItems: 2
      maxItems: 2
      items:
        oneOf:
          - type: object
            properties:
              cel:
                type: string
                minLength: 1
                description: >-
                  Boolean CEL expression evaluated against Product facts.
                  Selector fields that

                  exist only for the consuming resource (such as the Handling
                  Class Product

                  Profile selector, `product_profiles`) are rejected here
                  because the server

                  tracks their references; they may only be used through their
                  structured

                  operators.
                example: present(weight) && weight <= 15.0
            required:
              - cel
            additionalProperties: false
          - type: boolean
            enum:
              - true
    Inventory_API_v1_Variable:
      type: object
      properties:
        var:
          type: string
          minLength: 1
          description: Product condition field code.
          example: weight
      required:
        - var
      additionalProperties: false
    Inventory_API_v1_ConditionValue:
      oneOf:
        - type: string
          minLength: 1
          maxLength: 4096
        - type: number
        - type: boolean
        - type: array
          minItems: 1
          items:
            oneOf:
              - type: integer
              - type: string
        - $ref: '#/components/schemas/Inventory_API_v1_MeasurementValue'
    Inventory_API_v1_MeasurementValue:
      type: object
      description: >-
        Measurement input. Clients provide `value` and `unit`; canonical
        responses also contain the

        normalized `base_value` used by the evaluator.
      properties:
        value:
          type: number
          description: Measurement expressed in the submitted unit.
          example: 15
        unit:
          type: string
          minLength: 1
          description: Supported unit code for the condition field.
          example: lb
        base_value:
          type: number
          readOnly: true
          description: Server-normalized measurement in the field's base unit.
          example: 15
      required:
        - value
        - unit
      additionalProperties: false
  responses:
    Inventory_API_v1_400-bad-request:
      description: >-
        The request was invalid. The client must change the request. See the
        response body for more details.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: The error type code.
                      enum:
                        - parser
                        - parameters
                        - openapi
                    message:
                      type: string
                      description: An English sentence describing the error type.
                    details:
                      type: array
                      description: >-
                        An array of objects describing which keys are
                        responsible for the error and detailed messages
                        describing why they are not valid.
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                            description: The path to the key which relates to the error.
                          message:
                            type: string
                            description: >-
                              An English sentence describing the details of the
                              error.
                        additionalProperties: false
                  additionalProperties: false
                minItems: 1
            additionalProperties: false
          example:
            errors:
              - type: parameters
                message: The supplied parameters are invalid.
    Inventory_API_v1_404-not-found:
      description: >-
        The requested resource was not found. It may have been deleted, it may
        have never existed, or you may not have permission to view it.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: The error type code.
                      enum:
                        - not_found
                    message:
                      type: string
                      description: An English sentence describing the error type.
                    details:
                      type: array
                      description: >-
                        An array of objects describing which keys are
                        responsible for the error and detailed messages
                        describing why they are not valid.
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                            description: The path to the key which relates to the error.
                          message:
                            type: string
                            description: >-
                              An English sentence describing the details of the
                              error.
                        additionalProperties: false
                  additionalProperties: false
                minItems: 1
            additionalProperties: false
          example:
            errors:
              - type: not_found
                message: The server could not find the requested resource.
    Inventory_API_v1_422-unprocessable:
      description: >-
        There was an error processing the request. See the response body for
        more details.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      description: The error type code.
                      enum:
                        - application
                        - unable_to_process
                    message:
                      type: string
                      description: An English sentence describing the error type.
                    details:
                      type: array
                      description: >-
                        An array of objects describing which keys are
                        responsible for the error and detailed messages
                        describing why they are not valid.
                      items:
                        type: object
                        properties:
                          key:
                            type: string
                            description: The path to the key which relates to the error.
                          message:
                            type: string
                            description: >-
                              An English sentence describing the details of the
                              error.
                        additionalProperties: false
                  additionalProperties: false
                minItems: 1
            additionalProperties: false
          example:
            errors:
              - type: unable_to_process
                message: There was an error processing the request.
    Inventory_API_v1_500-internal-server-error:
      description: >-
        Internal Server Error - Something wrong happened at server side. Contact
        server administrator for more details.
  securitySchemes:
    ShipStream_bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Generate a JWT access token through a Custom Global Integration and
        provide it with each request in the `Authorization` header prefixed with
        "Bearer" and then a single space.

````