> ## 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.2.0
info:
  title: CE POS APIs
  description: >-
    The consolidated Point of Sale surface. Every operation is served under the
    storefront base URL; the POS backend proxies some of them to the admin
    service.
  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: section-identity
    summary: Identity
    kind: nav
  - name: Devices
    description: >-
      Set up the till: pair a device with the store using its pairing code, list
      the store's `PosLocation`s and `PosDevice`s, and claim a device for the
      signed-in user or release it.
    summary: Devices
    kind: nav
    parent: section-identity
  - name: Authentication
    description: >-
      Sign a staff member in on a paired device with a one-time password over
      SMS, WhatsApp or email, then refresh the access token or log out.
    summary: Authentication
    kind: nav
    parent: section-identity
  - name: Users
    description: >-
      The staff member signed in on the till, as a `PosUser` with their
      location, device and roles.
    summary: Users
    kind: nav
    parent: section-identity
  - name: section-customers
    summary: Customers
    kind: nav
  - name: Customers
    description: >-
      Look up the shopper at the till: list customers (`CustomerListItem`) and
      read one's full `CustomerDetail`.
    summary: Customers
    kind: nav
    parent: section-customers
  - name: Addresses
    description: >-
      A customer's saved addresses, as `Address` objects: list, add, update and
      remove them.
    summary: Addresses
    kind: nav
    parent: section-customers
  - name: section-catalog
    summary: Catalog
    kind: nav
  - name: Products
    description: >-
      Browse and search the catalog at the till: list `Product`s and SKUs, read
      a product and its variants, and show similar, up-sell and cross-sell
      items.
    summary: Products
    kind: nav
    parent: section-catalog
  - name: Reviews
    description: Read product reviews at the till.
    summary: Reviews
    kind: nav
    parent: section-catalog
  - name: Categories
    description: >-
      The store's categories, as `ProductCategory` objects with their child
      categories.
    summary: Categories
    kind: nav
    parent: section-catalog
  - name: Inventory
    description: >-
      Stock at the store's locations: list it by item, read an item's
      `InventoryDetail`, and follow the `InventoryActivity` that moved it.
    summary: Inventory
    kind: nav
    parent: section-catalog
  - name: section-shopping
    summary: Shopping
    kind: nav
  - name: Carts
    description: >-
      The till's `Cart`: create it, add, update or remove items, link the
      customer, set the address, and apply loyalty points or credit balance.
      Each update returns the full, updated `Cart`.
    summary: Carts
    kind: nav
    parent: section-shopping
  - name: Coupons & promotions
    description: >-
      The coupons and promotions a cart can use: list what the store offers, see
      which apply to a cart and why the rest don't, and apply or remove a
      coupon.
    summary: Coupons & promotions
    kind: nav
    parent: section-shopping
  - name: Fulfillment
    description: >-
      List the delivery and collect-in-store options for a cart, and save the
      cart's choice.
    summary: Fulfillment
    kind: nav
    parent: section-shopping
  - name: section-orders
    summary: Orders
    kind: nav
  - name: Orders
    description: >-
      Place an order from the till's cart and follow it: list orders, read an
      `OrderDetail` and its activity, check stock before it ships, and get its
      invoice, receipt and shipments.
    summary: Orders
    kind: nav
    parent: section-orders
  - name: Order payments
    description: >-
      Collect payment for an order: add payments toward what is left to pay,
      across one or more methods, poll the payment status, and retry a failed or
      expired payment.
    summary: Order payments
    kind: nav
    parent: section-orders
  - name: Shipments
    description: >-
      The shipments that fulfill orders: list them, read a `ShipmentDetail` with
      its activity and invoice, approve, reject or update one, send a
      replacement, and refund a shortfall.
    summary: Shipments
    kind: nav
    parent: section-orders
  - name: section-payments
    summary: Payments
    kind: nav
  - name: Payments
    description: >-
      The payment methods the till accepts and the checks around paying with
      them: card BIN details, VPA verification, and authenticating a payment
      with a direct OTP.
    summary: Payments
    kind: nav
    parent: section-payments
  - name: section-store
    summary: Store
    kind: nav
  - name: Locations
    description: States and pincodes for address forms.
    summary: Locations
    kind: nav
    parent: section-store
paths:
  /pos/orders/{order_number}/check-inventory:
    get:
      tags:
        - Orders
      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
            maxLength: 128
            minLength: 1
            pattern: ^[A-Za-z0-9_-]{1,128}$
        - 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
                required:
                  - message
                  - success
                  - content
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
                  content:
                    properties:
                      inventory:
                        $ref: '#/components/schemas/CheckInventoryResponse'
                    required:
                      - inventory
                    type: object
        '400':
          $ref: '#/components/responses/AdminBadRequest'
        '401':
          $ref: '#/components/responses/AdminUnauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/AdminNotFound'
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '500':
          $ref: '#/components/responses/AdminInternalServerError'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      security:
        - Authorization: []
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/operations/pos-check-order-inventory
components:
  schemas:
    CheckInventoryResponse:
      title: CheckInventoryResponse
      type: object
      externalDocs:
        url: >-
          https://llm-docs.commercengine.io/admin-pos/schemas/CheckInventoryResponse
      required:
        - packing_detail_available
        - order
        - inventory_status
        - shipment_items
        - recommended_warehouses
        - inventory_detail
        - allowed_actions
      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
                  - 'null'
              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
                        - 'null'
                    stock_quantity:
                      type: integer
                    inventory_status:
                      $ref: '#/components/schemas/InventoryStatus'
                    quantity:
                      description: >-
                        Stock at the warehouse, also returned as
                        `stock_quantity`.
                      type: integer
                    is_default:
                      type: boolean
                      const: false
                    can_collect:
                      type:
                        - boolean
                        - 'null'
                    can_ship_parcel:
                      type:
                        - boolean
                        - 'null'
                    can_receive_stock:
                      type:
                        - boolean
                        - 'null'
                    accepts_returns:
                      type:
                        - boolean
                        - 'null'
                    is_checkout_point:
                      type:
                        - boolean
                        - 'null'
                    opening_hours:
                      description: Opening hours by day, when available.
                      type:
                        - object
                        - 'null'
                      additionalProperties: true
              total_quantity:
                description: Total stock quantity, also returned as `stock_quantity`.
                type: integer
              allowed_quantity:
                description: Quantity that can be fulfilled when stock is not tracked.
                type: integer
              packaging:
                $ref: '#/components/schemas/ProductPackaging'
        recommended_warehouses:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              inventory_status:
                $ref: '#/components/schemas/InventoryStatus'
        packing_detail_available:
          type: boolean
        order:
          type: object
          properties:
            order_number:
              type:
                - string
                - 'null'
            order_date:
              type:
                - string
                - 'null'
              format: date-time
            order_status:
              $ref: '#/components/schemas/AdminOrderStatus'
            payment_status:
              $ref: '#/components/schemas/PaymentStatus'
            customer_name:
              type: string
            customer_id:
              type: string
            sub_total:
              type: number
            shipping_amount:
              type: number
            total_tax:
              type: number
            coupon_discount_amount:
              type: number
            grand_total:
              type: number
            coupon_code:
              type:
                - string
                - 'null'
            coupon_discount_percent:
              type:
                - number
                - 'null'
          required:
            - order_number
            - order_date
            - order_status
            - payment_status
            - customer_name
            - customer_id
            - sub_total
            - shipping_amount
            - total_tax
            - coupon_discount_amount
            - grand_total
            - coupon_code
            - coupon_discount_percent
    InventoryAction:
      title: InventoryAction
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/InventoryAction
      enum:
        - create-shipment
        - download-invoice
        - download-shipping-label
        - inventory-check
        - return-replace
        - update-manual
        - update-shipment
        - cancel-shipment
        - cancel-and-refund-shipment
        - replace-shipment
        - approve-shipment
        - reject-shipment
        - refund-shortfall
        - wait-for-inventory
        - reject-order
    AdminShipmentItem:
      title: ShipmentItem
      description: Shipment item model
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/AdminShipmentItem
      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
        is_free_item:
          type: boolean
        free_quantity:
          type: integer
        selling_price:
          type: number
          format: double
        seller_detail:
          description: >-
            Seller detail information. This field is relevant for marketplace
            type stores only. Will return null for b2b and b2c type stores.
          oneOf:
            - $ref: '#/components/schemas/SellerBasicDetail'
            - type: 'null'
    InventoryStatus:
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/InventoryStatus
      enum:
        - fulfilled
        - partially-fulfilled
        - not-fulfilled
    ProductPackaging:
      title: ProductPackaging
      type:
        - object
        - 'null'
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/ProductPackaging
      required:
        - pack_width
        - pack_height
        - pack_length
        - pack_dry_weight
        - units_per_pack
        - vertical_rotation
      properties:
        product_id:
          type: string
          readOnly: true
        product_variant_id:
          description: '`null` when packaging applies to a product without variants.'
          type:
            - string
            - 'null'
          readOnly: true
        product_name:
          type: string
          readOnly: true
        variant_name:
          description: '`null` when packaging applies to a product without variants.'
          type:
            - string
            - 'null'
          readOnly: true
        pack_width:
          type: number
          format: float
        pack_height:
          type: number
          format: float
        pack_length:
          type: number
          format: float
        pack_dry_weight:
          type: number
          format: float
        units_per_pack:
          type: integer
          format: int32
        vertical_rotation:
          description: >-
            Indicates whether items can be rotated during packing or if they
            must be kept in a strictly vertical orientation.
          type: boolean
        shipper_width:
          type:
            - number
            - 'null'
          format: float
        shipper_height:
          type:
            - number
            - 'null'
          format: float
        shipper_length:
          type:
            - number
            - 'null'
          format: float
        shipper_dry_weight:
          type:
            - number
            - 'null'
          format: float
        units_per_shipper:
          type:
            - integer
            - 'null'
          format: int32
      x-tags:
        - Catalog
    AdminOrderStatus:
      title: OrderStatus
      type: string
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/AdminOrderStatus
      enum:
        - draft
        - awaiting_approval
        - confirmed
        - schedule_requested
        - partially_scheduled
        - awaiting_shipment
        - shipped
        - partially_shipped
        - undelivered
        - partially_undelivered
        - return_to_origin
        - partially_return_to_origin
        - complete
        - partially_delivered
        - cancelled
        - pending
        - payment_failed
        - sent_to_store
        - ready_to_collect
        - processing
        - lost
    PaymentStatus:
      title: PaymentStatus
      type: string
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/PaymentStatus
      enum:
        - pending
        - success
        - failed
        - partially_paid
        - refund_initiated
        - refunded
        - unsettled
        - settled
        - partially_settled
        - manual_review
        - debit_scheduled
        - collection_due
    SellerBasicDetail:
      title: SellerBasicDetail
      type: object
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/SellerBasicDetail
      properties:
        id:
          type: string
        trade_name:
          type: string
        legal_name:
          type: string
        business_type:
          $ref: '#/components/schemas/SellerBusinessType'
        tax_identification_number:
          type: string
    SellerBusinessType:
      title: SellerBusinessType
      type: string
      externalDocs:
        url: https://llm-docs.commercengine.io/admin-pos/schemas/SellerBusinessType
      enum:
        - sole_proprietorship
        - private_limited
        - public_listed
        - public_limited
        - state_owned
        - charity
        - individual
  responses:
    AdminBadRequest:
      description: The request is invalid or cannot be completed in the current state.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
            properties:
              message:
                type: string
              success:
                type: boolean
              code:
                type: string
              errors:
                description: Validation details as a field map, a bulk list or a string.
                anyOf:
                  - type: object
                    additionalProperties: true
                  - type: array
                  - type: string
              content:
                type: object
                additionalProperties: true
              details:
                type: string
    AdminUnauthorized:
      description: >-
        The token is missing, invalid or expired, or does not grant access to
        this store and operation.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
            properties:
              message:
                type: string
              success:
                type: boolean
              code:
                type: string
              details:
                type: string
    Forbidden:
      description: >-
        Access denied. `token-required` requires an authenticated session;
        `permission-denied` means the caller cannot access this resource. On
        POS, `session-expired` requires signing in again.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
              - success
            properties:
              code:
                type: string
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              details:
                type: string
    AdminNotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
            properties:
              message:
                type: string
              success:
                type: boolean
              code:
                type: string
              details:
                type: string
    RequestTimeout:
      description: The request timed out.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
              - success
            properties:
              code:
                type: string
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              details:
                type: string
    AdminInternalServerError:
      description: >-
        The request could not be completed. Quote error_id, when present, when
        contacting support.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - success
            properties:
              message:
                type: string
              success:
                type: boolean
              code:
                type: string
              details:
                type: string
              error_id:
                type: string
    GatewayTimeout:
      description: The request timed out.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - message
              - success
            properties:
              code:
                type: string
              message:
                type: string
                x-speakeasy-error-message: true
              success:
                type: boolean
              details:
                type: string
  securitySchemes:
    Authorization:
      type: http
      description: Access token
      scheme: bearer

````

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