fabric Inventory API

Manage stock counts, locations, and inventory networks across stores, warehouses, and dropship partners. Inventory feeds the cart, OMS, and storefront product detail pages with the available-to-promise figures that drive fulfillment decisions.

fabric Inventory API is one of 16 APIs that fabric publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 1 machine-runnable capability that can be deployed as REST, MCP, or Agent Skill surfaces via Naftiko.

Tagged areas include Inventory, Stock, Locations, and Networks. The published artifact set on APIs.io includes API documentation, an OpenAPI specification, and 1 Naftiko capability spec.

OpenAPI Specification

fabric-inventory-openapi.yml Raw ↑
components:
  headers:
    xFabricRequestIdResponseHeader:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
      schema:
        type: string
  parameters:
    xFabricChannelId:
      description: >-
        x-fabric-channel-id identifies the sales channel where the API request
        is being made; primarily for multichannel use cases. The channel ids are
        12 corresponding to US and 13 corresponding to Canada. The default
        channel id is 12. This field is required.
      example: '12'
      in: header
      name: x-fabric-channel-id
      required: true
      schema:
        type: string
    xFabricChannelIdOptional:
      description: >-
        x-fabric-channel-id identifies the sales channel through which the API
        request is being made; primarily for multichannel use cases. It is an
        optional field. The default US channel is 12 while the default Canada
        channel is 13.
      example: '12'
      in: header
      name: x-fabric-channel-id
      required: false
      schema:
        type: string
    xFabricChannelIds:
      description: >-
        x-fabric-channel-id identifies the sales channel where the API request
        is being made; primarily for multichannel use cases. The channel ids are
        12 corresponding to US and 13 corresponding to Canada. The default
        channel id is 12. This field is required. A comma separated list of
        sales channel IDs. This comma separated list of sales channel IDs are
        required when using multiple channels.
      example: 12, 13, 16
      in: header
      name: x-fabric-channel-ids
      required: false
      schema:
        type: string
    xFabricChannelIdsOptional:
      description: >-
        x-fabric-channel-id identifies the sales channel through which the API
        request is being made; primarily for multichannel use cases. It is an
        optional field. The default US channel is 12 while the default Canada
        channel is 13. This field is optional. **Note:** Use `xFabricChannelIds`
        for multiple channels, and `xFabricChannelId` for a single channel.
      example: 12, 13, 16
      in: header
      name: x-fabric-channel-ids
      required: false
      schema:
        type: string
    xFabricRequestId:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      in: header
      name: x-fabric-request-id
      required: false
      schema:
        type: string
    xFabricTenantId:
      description: >-
        A header used by fabric to identify the tenant making the request. You
        must include tenant id in the authentication header for an API request
        to access any of fabric’s endpoints. You can retrieve the tenant id ,
        which is also called account id, from
        [Copilot](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
      example: 5f328bf0b5f328bf0b5f328b
      in: header
      name: x-fabric-tenant-id
      required: true
      schema:
        type: string
  schemas:
    adjustCounterRequest:
      description: Sample request to adjust counter
      properties:
        counters:
          additionalProperties:
            description: >-
              Inventory counter (also known as inventory position) configured by
              the merchant
            example:
              onHand: 100
            type: object
          description: >-
            Inventory counter (also known as inventory position) configured by
            the merchant
          example:
            onHand: 100
          type: object
        inventoryId:
          description: >-
            The fabric system-generated inventory ID. This ID is generated
            during inventory creation.
          example: 723910d81723
          type: string
        isNoStock:
          description: An attribute used to indicate that a SKU is out of stock.
          example: false
          type: boolean
        itemId:
          description: >-
            Merchant-defined item ID whose inventory is updated. If omitted,
            fabric Inventory service generates the `itemId`. If you choose to
            use the `itemId` in your environment, you must include it in all
            inventory *Write* requests.
          example: 12345
          format: int32
          type: integer
        locationNumber:
          description: >-
            Represents the warehouse or store location where the inventory is
            stored. The locationNumber is crucial for inventory management. When
            creating or updating inventory, you need to include the
            locationNumber to specify which location the inventory belongs to.
          example: 12345
          format: int32
          type: integer
        sku:
          description: >-
            Product SKU (Stock Keeping Unit) identifier. It serves as the
            primary reference key for the inventory and provides uniqueness to
            the item.
          example: SKU1
          type: string
        status:
          description: Inventory status IN_STOCK, LOW_STOCK, etc.
          enum:
            - IN_STOCK
            - LOW_STOCK
            - OUT_OF_STOCK
            - BACKORDER_STOCK
            - PREORDER_STOCK
          example: ' IN_STOCK'
          type: string
        virtualCountersStatus:
          $ref: '#/components/schemas/virtualCounters'
      required:
        - counters
        - locationNumber
        - sku
      type: object
    aggregatedNetwork:
      description: >-
        Displays an aggregate representation of the SKU that includes all
        locations for which the sku is available in that network.
      properties:
        backorderLimit:
          description: The maximum restock inventory quantity.
          example: 50
          format: int32
          type: integer
        backorderShipmentAt:
          description: The timestamp for when a backorder is shipped.
          example: '2022-08-01T20:03:28.483Z'
          format: date-time
          type: string
        channelId:
          description: The sales channel ID; identifies business operations location.
          example: channel_xyz
          type: string
        counters:
          additionalProperties:
            description: >-
              Merchant-defined inventory counter (also known as inventory
              position)
            format: int32
            type: integer
          description: >-
            Your defined inventory positions. These can be included in
            availability calculations.
          example:
            allocated: 10
            onHand: 100
            shipped: 20
          type: object
        createdAt:
          description: Time of inventory creation
          example: '2022-08-01T18:03:28.483Z'
          format: date-time
          type: string
        customAttributes:
          additionalProperties:
            description: Placeholder for additional info
            example: '{"isBopis":true}'
            type: string
          description: Placeholder for additional info
          example:
            isBopis: true
          type: object
        hasInfiniteInventory:
          default: false
          description: >-
            The infinite inventory flag. Setting this to true means inventory
            can be used any number of times and does not have a consumption
            limit. Setting this to false means inventory can't be used
            infinitely, and has a consumption limit.
          example: false
          type: boolean
        inventoryId:
          description: >-
            The fabric system-generated inventory ID. This ID is generated
            during inventory creation.
          example: 723910d81723
          type: string
        isNoStock:
          description: An attribute used to indicate that a SKU is out of stock.
          example: false
          type: boolean
        itemId:
          description: >-
            Merchant-defined item ID whose inventory is created or updated. If
            omitted, fabric Inventory service generates the `itemId`. If you
            choose to use the `itemId` in your environment, you must include it
            in all inventory *Write* requests.
          example: 12345
          format: int32
          type: integer
        leadTime:
          description: >-
            The time between when an order is placed to replenish inventory and
            when the order is received at warehouse.
          example: 5 days
          type: string
        locationNumber:
          description: >-
            Represents the warehouse or store location where the inventory is
            stored. The locationNumber is crucial for inventory management. When
            creating or updating inventory, you need to include the
            locationNumber to specify which location the inventory belongs to.
          example: 12345
          format: int32
          type: integer
        lowStock:
          description: >-
            The lowStock parameter is used to alert low stock at a location when
            inventory is below a set number.
          example: 10
          format: int32
          type: integer
        networkCode:
          description: Code of the network to which the inventory belongs
          example: ShipToHome
          type: string
        networkCounters:
          additionalProperties:
            description: Indicates inventory positions at network
            format: int32
            type: integer
          description: Indicates inventory positions at network
          example:
            softReserve: 10
          type: object
        preorderLimit:
          description: The maximum preorder limit.
          example: 40
          format: int32
          type: integer
        preorderShipmentAt:
          description: Time when preorder is shipped
          example: '2022-08-01T20:03:28.483Z'
          format: date-time
          type: string
        region:
          description: Region where inventory is managed
          example: North America
          type: string
        safetyStock:
          description: Reserved inventory quantity at the location
          example: 10
          format: int32
          type: integer
        segment:
          description: Segment of the inventory
          example: Sample Segment
          type: string
        sku:
          description: >-
            Product SKU (Stock Keeping Unit) identifier. It serves as the
            primary reference key for the inventory and provides uniqueness to
            the item.
          example: SKU1
          type: string
        status:
          description: Inventory status IN_STOCK, LOW_STOCK, etc.
          enum:
            - IN_STOCK
            - LOW_STOCK
            - OUT_OF_STOCK
            - BACKORDER_STOCK
            - PREORDER_STOCK
          example: ' IN_STOCK'
          type: string
        type:
          description: >-
            Inventory type - a classifier attribute that provides flexibility to
            define inventory types
          example: primary
          type: string
        updatedAt:
          description: Time when inventory was last updated
          example: '2022-08-01T20:03:28.483Z'
          format: date-time
          type: string
        vendorId:
          description: ID of the vendor who will replenish the inventory for the retailer
          example: vendor1
          type: string
        virtualCounters:
          $ref: '#/components/schemas/virtualCounters'
        virtualCountersStatus:
          $ref: '#/components/schemas/virtualCounters'
      type: object
    aggregatedNetworksResponse:
      description: AggregatedNetworksResponse model
      properties:
        aggregatedNetworks:
          description: Aggregated networks
          items:
            $ref: '#/components/schemas/aggregatedNetwork'
          type: array
      type: object
    apiResponse:
      description: Response message
      properties:
        message:
          description: Response message
          example: OK
          type: string
      type: object
    capacity:
      description: >-
        Location Capacity Model used by fulfillment specialist to optimize
        fulfillments across the distribution network and monitor productivity by
        location
      properties:
        allocationPercentage:
          description: >-
            Current percentage of allocations at this location. Calculated by
            (currentAllocations / maxAllocations)*100
          example: 20
          format: int32
          type: integer
        currentAllocations:
          description: Current allocations at this location.
          example: 5
          format: int32
          readOnly: true
          type: integer
        infiniteAllocation:
          type: boolean
        isCapacityFull:
          description: If location has no allocation capacity limit.
          example: true
          type: boolean
        maxAllocations:
          description: >-
            Maximum allocations this location can take at any given time. When
            currentAllocations=maxAllocations, this location is AtCapacity and
            can't take any further allocations.
          example: 30
          format: int32
          type: integer
      type: object
    counter:
      description: Counter response sample
      properties:
        code:
          description: Counter code
          example: onHand
          type: string
        id:
          description: fabric system-generated counter ID
          example: 38271022e832a1
          type: string
        name:
          description: Counter name
          example: onHand
          type: string
      required:
        - code
      type: object
    counterSearchResponse:
      description: Counter search response
      properties:
        data:
          items:
            $ref: '#/components/schemas/counter'
          type: array
        pagination:
          $ref: '#/components/schemas/pagination'
      type: object
    createCounterRequest:
      description: Sample to create counter
      properties:
        code:
          description: Counter code
          example: onHand
          type: string
        name:
          description: Counter name
          example: onHand
          type: string
      required:
        - code
      type: object
    createInventory:
      description: Create inventory request sample. Either `sku` or `itemId` is mandatory.
      properties:
        backorderLimit:
          description: Maximum restock inventory quantity
          example: 50
          format: int32
          type: integer
        backorderShipmentAt:
          description: Time when backorder is shipped
          example: 2022-08-01T20:03:28.483Z
          format: date-time
          type: string
        counters:
          additionalProperties:
            description: >-
              Inventory counter (also known as inventory position) configured by
              the merchant
            example:
              allocated: 10
              onHand: 100
              shipped: 20
            type: object
          description: >-
            Inventory counter (also known as inventory position) configured by
            the merchant
          example:
            allocated: 10
            onHand: 100
            shipped: 20
          type: object
        customAttributes:
          additionalProperties:
            description: Custom attributes to store additional information
            example: '{"isBopis":true}'
            type: string
          description: Custom attributes to store additional information
          example:
            isBopis: true
          type: object
        hasInfiniteInventory:
          default: false
          description: >-
            Infinite inventory flag.**true:** Inventory can be used any number
            of times and does not have any consumption limit.**false:**
            Inventory can't be used infinitely, and has a consumption limit.
          example: false
          type: boolean
        itemId:
          description: >-
            Merchant-defined item ID whose inventory is created or updated. If
            omitted, fabric Inventory service generates the `itemId`. If you
            choose to use the `itemId` in your environment, you must include it
            in all inventory *Write* requests.
          example: 12345
          format: int32
          type: integer
        leadTime:
          description: >-
            Time between when an order is placed to replenish inventory and when
            the order is received at warehouse
          example: 5 days
          type: string
        locationNumber:
          description: >-
            Represents the warehouse or store location where the inventory is
            stored. It is recommended to link `locationNumber` to the
            corresponding value in the fabric Locations service.
          example: 12345
          format: int32
          type: integer
        lowStock:
          description: >-
            Inventory quantity below which consumer service wants to be alerted
            as low stock at the location
          example: 10
          format: int32
          type: integer
        networkCode:
          description: Code of the network to which the inventory belongs
          example: ShipToHome
          type: string
        preorderLimit:
          description: Maximum first-shipping inventory quantity
          example: 40
          format: int32
          type: integer
        preorderShipmentAt:
          description: Time when preorder is shipped
          example: 2022-08-01T20:03:28.483Z
          format: date-time
          type: string
        region:
          description: Region where inventory is managed
          example: North America
          type: string
        safetyStock:
          description: Reserved inventory quantity at the location
          example: 10
          format: int32
          type: integer
        sku:
          description: >-
            Product SKU (Stock Keeping Unit) identifier. It serves as the
            primary reference key for the inventory and provides uniqueness to
            the item.
          example: SKU1
          type: string
        status:
          description: Inventory status IN_STOCK, LOW_STOCK, etc.
          enum:
            - IN_STOCK
            - LOW_STOCK
            - OUT_OF_STOCK
            - BACKORDER_STOCK
            - PREORDER_STOCK
          example: ' IN_STOCK'
          type: string
        type:
          description: >-
            Inventory type - a classifier attribute that provides flexibility to
            define inventory types
          example: primary
          type: string
        vendorId:
          description: ID of the vendor who will replenish the inventory for the retailer
          example: vendor1
          type: string
        virtualCountersStatus:
          $ref: '#/components/schemas/virtualCounters'
      required:
        - counters
        - locationNumber
        - sku
      type: object
    createNetwork:
      description: Sample request to create network
      properties:
        code:
          description: Unique network code
          example: DC
          type: string
        description:
          description: Network description
          example: network-mar6th
          type: string
        lowStock:
          description: >-
            Inventory quantity below which consumer service wants to be alerted
            as low stock at the network
          example: 10
          format: int32
          type: integer
        name:
          description: Network name
          example: Distribution Center
          type: string
        networkId:
          description: >-
            A fabric system-generated unique ID that is auto generated once the
            network is created successfully.
          example: 5349b4ddd2781d08c09890f4
          type: string
        rule:
          description: >-
            Rule by which a network will be created with the group of
            inventories
          example:
            locationData.attributes.safetyStock: 10
            locationData.isActive: true
            locationData.type: Store
            productData.attributes.brand: ABC
            productData.attributes.isSoldOnline: true
          type: object
        safetyStock:
          description: >-
            Safety stock count. The reserve quantity of an item kept to fulfill
            an emergency requirement, in case of damage to the product that is
            set for sale.
          example: 10
          format: int32
          type: integer
      required:
        - code
        - name
        - rule
      type: object
    errorResponse:
      description: Error response
      properties:
        errors:
          description: Errors
          items:
            $ref: '#/components/schemas/errorResponse'
          type: array
        message:
          description: Error message
          example: Bad request
          type: string
        type:
          description: Error type
          example: CLIENT_ERROR
          type: string
      type: object
    findInventoriesResponse:
      description: Find inventory response
      properties:
        data:
          items:
            $ref: '#/components/schemas/inventory'
          type: array
        pagination:
          $ref: '#/components/schemas/pagination'
      type: object
    findInventoryByGeographyRequest:
      description: Find inventory by geography request
      properties:
        locationTypes:
          description: List of location types
          items:
            description: Location type
            example: DC
            type: string
          type: array
        origin:
          $ref: '#/components/schemas/geoOrigin'
        skus:
          description: >-
            List of SKUs for which the inventories are to be searched within the
            specified region
          items:
            description: SKU
            example: sku1
            type: string
          type: array
      required:
        - origin
      type: object
    geoLocationResource:
      description: Geo location response sample
      properties:
        capacity:
          $ref: '#/components/schemas/capacity'
        distance:
          description: >-
            Distance of the location from the provided coordinates; distance is
            defined using the unit specified in `distanceUnit`.
          example: 12.34
          format: double
          type: number
        locationNumber:
          description: Location number of the inventory
          example: 12345
          format: int32
          type: integer
        locationType:
          description: Type of the location
          example: DC
          type: string
      type: object
    geoOrigin:
      description: >-
        Geo search origin. Must include (`postalCode`) OR (`city` and `region`
        and `countryCode`) OR (`latitude` and `longitude`)
      properties:
        city:
          description: City for which location will be searched
          example: San Francisco
          type: string
        countryCode:
          description: ISO 3166-1 alpha-2 based country code
          example: US
          type: string
        distanceUnit:
          default: MILE
          description: Distance unit
          enum:
            - MILE
            - KILOMETER
            - METER
          example: MILE
          type: string
        latitude:
          description: Latitude of the location in degree
          example: 21.2629852
          format: double
          type: number
        longitude:
          description: Longitude of the location in degree
          example: -108.7256871
          format: double
          type: number
        maxDistance:
          default: 100
          description: >-
            Maximum distance (in radius) from the specified postal code within
            which the location will be searched
          example: 100
          format: double
          type: number
        minDistance:
          default: 0
          description: >-
            Minimum distance (in radius) from the specified postal code within
            which the location will be searched
          example: 10
          format: double
          type: number
        postalCode:
          description: Postal code from where nearby locations are to be searched
          example: '94008'
          type: string
        region:
          description: Region for which location will be searched
          example: New York
          type: string
      type: object
    hardReservationSearchRequest:
      description: Hard reservation search request model
      example:
        filters:
          - condition: EQ
            field: hardReserve.allocationRequestId
            value: '123'
          - condition: IN
            field: hardReserve.inventoryAllocations.channelId
            values:
              - WHBM
              - CHO
        sort: '-hardReserve.createdAt'
      properties:
        filters:
          items:
            oneOf:
              - $ref: '#/components/schemas/valueSearchFilter'
              - $ref: '#/components/schemas/valuesSearchFilter'
          maxItems: 50
          minItems: 0
          type: array
        sort:
          default: '-hardReserve.createdAt'
          description: Resource property on which data needs to be sorted on.
          example: +hardReserve.createdAt
          pattern: >-
            (^[+-]hardReserve\.[a-zA-Z.\-_]*)(,([+-]hardReserve\.[a-zA-Z.\-_]*)){0,}
          type: string
      required:
        - filters
      type: object
    hardReserveFilter:
      description: Search filter
      discriminator:
        mapping:
          EQ: '#/components/schemas/valueSearchFilter'
          GT: '#/components/schemas/valueSearchFilter'
          GTE: '#/components/schemas/valueSearchFilter'
          IN: '#/components/schemas/valuesSearchFilter'
          LT: '#/components/schemas/valueSearchFilter'
          LTE: '#/components/schemas/valueSearchFilter'
          NEQ: '#/components/schemas/valueSearchFilter'
          NIN: '#/components/schemas/valuesSearchFilter'
        propertyName: condition
      properties:
        condition:
          default: EQ
          description: SearchCondition to apply filter
          enum:
            - EQ
            - NEQ
            - IN
            - NIN
            - LT
            - GT
            - LTE
            - GTE
          example: EQ
          type: string
        field:
          description: Field name
          example: hardReserve.sku
          pattern: ^hardReserve\.[a-zA-Z.\-_]*
          type: string
        group:
          default: Default
          description: Group name
          example: GroupA
          type: string
      required:
        - condition
        - field
      type: object
    importCount:
      description: Import count object
      properties:
        error:
          description: Total rows with errors in the file
          example: 2000
          format: int32
          type: integer
        processed:
          description: >-
            Total rows processed in the file. `processed` = `uploaded` - `error`
            **Note:** Rows that are not formatted according to system
            requirements will not be imported.
          example: 8000
          format: int32
          type: integer
        uploaded:
          description: Total rows in the file
          example: 10000
          format: int32
          type: integer
      type: object
    ItemResource:
      properties:
        backorderQuantity:
          description: Back order quantity that needs to be reserved
          example: 5
          format: int32
          type: integer
        channelId:
          description: >-
            ChannelId for the item which needs to be reserved. Required
            parameter
          example: '3'
          type: string
        errorMessage:
          type: string
        itemId:
          description: itemId of product. Optional parameter
          example: '451008962041'
          type: string
        lineItemId:
          description: 'lineItemId of product. Required parameter '
          example: '2'
          type: string
        locationNumber:
          description: >-
            LocationNumber for which this item needs to be reserved. Optional
            parameter
          example: 999
          format: int32
          type: integer
        networkCode:
          description: Network for which this item needs to be reserved. Optional parameter
          example: ShipToHome
          type: string
        preorderQuantity:
          description: Pre order quantity that needs to be reserved
          example: 5
          format: int32
          type: integer
        quantity:
          description: quantity that needs to be reserved. Required parameter
          example: 5
          format: int32
          type: integer
        reservedNetworkCodes:
          items:
            type: string
          type: array
        sku:
          description: sku of product. Required parameter
          example: OMSTESTSKU1
          type: string
        status:
          type: string
        type:
          description: Order type, default value is STANDARD. Optional parameter
          example: '[''STANDARD'',''PREORDER'',''BACKORDER'']'
          type: string
      required:
        - channelId
        - lineItemId
        - quantity
        - sku
      type: object
    inventoriesRequest:
      description: Find inventory request
      properties:
        itemIds:
          description: List of item IDs for which the inventories are to be searched
          items:
            description: Item ID
            example: 127122871
            format: int64
            type: integer
          type: array
        locationNumbers:
          description: Location numbers
          items:
            description: Location number
            example: 12
            format: int32
            type: integer
          type: array
        locationTypes:
          description: Location types
          items:
            description: Location type
            example: DC
            type: string
          type: array
        networkCodes:
          description: >-
            Codes associated with networks in which inventory of the SKUs are
            maintained
          items:
            description: Network code
            example: '4'
            type: string
          type: array
        region:
          description: Region
          example: North America
          type: string
        segments:
          description: Segments
          items:
            description: Segment
            example: B2B_Special
            type: string
          type: array
        skus:
          description: >-
            List of SKUs for which the inventories are to be searched within the
            specified region
          items:
            description: SKU
            example: SKU1
            type: string
          type: array
      type: object
    inventory:
      description: Inventory response sample
      properties:
        backorderLimit:
          description: Maximum restock inventory quantity
          example: 50
          format: int32
          type: integer
        backorderShipmentAt:
          description: Time when backorder is shipped
          example: 2022-08-01T20:03:28.483Z
          format: date-time
          type: string
        channelId:
          description: Sales channel ID; identifies business operations location.
          example: channel_xyz
          type: string
        counters:
          additionalProperties:
            description: >-
              Merchant-defined inventory counter (also known as inventory
              position)
            format: int32
            type: integer
          description: >-
            Merchant-defined inventory counter (also known as inventory
            position)
          example:
            allocated: 10
            onHand: 100
            shipped: 20
          type: object
        createdAt:
          description: Time of inventory creation
          example: 2022-08-01T18:03:28.483Z
          format: date-time
          type: string
        customAttributes:
          additionalProperties:
            description: Placeholder for additional info
            example: '{"isBopis":true}'
            t

# --- truncated at 32 KB (148 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/fabric-com/refs/heads/main/openapi/fabric-inventory-openapi.yml