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

# Check inventory

> Verifies stock availability for an order's unscheduled or store_rejected shipment before it is scheduled.



## OpenAPI

````yaml https://openapi.commercengine.io/ce-pos.json get /pos/orders/{order_number}/check-inventory
openapi: 3.1.0
info:
  title: CE POS APIs
  description: >-
    The consolidated Point of Sale surface. Every operation is served under the
    storefront base URL; operations tagged POSAdmin are proxied to the admin
    service by the POS backend.
  version: '1.0'
servers:
  - url: https://staging.api.commercengine.io/api/v1/{store_id}/storefront
    description: Staging Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: staging
  - url: https://prod.api.commercengine.io/api/v1/{store_id}/storefront
    description: Prod Server
    variables:
      store_id:
        description: Store ID
        default: store_id
    x-speakeasy-server-id: prod
security:
  - Authorization: []
tags:
  - name: POS
    description: Operations backed by the storefront service
  - name: POSAdmin
    description: Operations proxied to the admin service
paths:
  /pos/orders/{order_number}/check-inventory:
    get:
      tags:
        - POSAdmin
      summary: Check inventory
      description: >-
        Verifies stock availability for an order's unscheduled or store_rejected
        shipment before it is scheduled.
      operationId: pos-check-order-inventory
      parameters:
        - name: fulfillment_type
          in: query
          description: >-
            Optional. The fulfillment type to evaluate inventory against. If not
            provided, the inventory will be checked for the `fulfillment_type`
            of the shipment.
          required: false
          schema:
            type: string
            enum:
              - delivery
              - collect-in-store
        - name: order_number
          in: path
          description: Order number
          required: true
          schema:
            type: string
        - name: shipment_number
          in: query
          description: >-
            Optional. The shipment number to check inventory for. If not
            provided, the inventory will be checked for the `unscheduled`
            shipment of the order.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                  content:
                    properties:
                      inventory:
                        $ref: '#/components/schemas/CheckInventoryResponse'
                    type: object
      security:
        - Authorization: []
components:
  schemas:
    CheckInventoryResponse:
      title: CheckInventoryResponse
      type: object
      properties:
        allowed_actions:
          type: array
          items:
            $ref: '#/components/schemas/InventoryAction'
        shipment_items:
          type: array
          items:
            $ref: '#/components/schemas/AdminShipmentItem'
        inventory_status:
          $ref: '#/components/schemas/InventoryStatus'
        inventory_detail:
          type: array
          items:
            type: object
            properties:
              product_id:
                type: string
              variant_id:
                type:
                  - string
                  - 'null'
              product_name:
                type: string
              variant_name:
                type:
                  - string
                  - 'null'
              sku:
                type:
                  - string
                  - 'null'
              track_inventory:
                type: boolean
              allow_backorder:
                type: boolean
              requested_quantity:
                type: integer
              stock_quantity:
                type: integer
              inventory_status:
                $ref: '#/components/schemas/InventoryStatus'
              warehouses:
                type: array
                items:
                  type: object
                  properties:
                    warehouse_id:
                      type: string
                    warehouse_name:
                      type: string
                    stock_quantity:
                      type: integer
                    inventory_status:
                      $ref: '#/components/schemas/InventoryStatus'
        recommended_warehouses:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              inventory_status:
                $ref: '#/components/schemas/InventoryStatus'
    InventoryAction:
      title: InventoryAction
      enum:
        - create-shipment
        - refund-shortfall
        - wait-for-inventory
        - cancel-shipment
        - cancel-and-refund-shipment
        - reject-order
    AdminShipmentItem:
      title: ShipmentItem
      description: Shipment item model
      type: object
      required:
        - product_id
        - variant_id
        - quantity
      properties:
        product_id:
          type: string
        product_name:
          type: string
          readOnly: true
        variant_id:
          description: '`null` for products without variants.'
          type:
            - string
            - 'null'
        variant_name:
          type:
            - string
            - 'null'
          readOnly: true
        product_image_url:
          type:
            - string
            - 'null'
          readOnly: true
        sku:
          type: string
          readOnly: true
        quantity:
          type: integer
        free_quantity:
          type: integer
        is_free_item:
          type: boolean
          readOnly: true
        selling_price:
          type: number
          format: double
        selling_price_excluding_tax:
          type: number
          format: double
          readOnly: true
    InventoryStatus:
      enum:
        - fulfilled
        - partially-fulfilled
        - not-fulfilled
  securitySchemes:
    Authorization:
      type: http
      description: Access token
      scheme: bearer

````