Skip to content

pos-check-order-inventory

Method: GET
Path: /pos/shipping/shipments/{order_number}/check-inventory

Tags: POSAdmin

Summary

Check Inventory

Description

Check Inventory

Pos SDK Usage

SDK Method: pos.checkInventory()

Example:

typescript
const { data, error } = await pos.checkInventory({
  order_number: "ORD-2024-001234"
});

if (error) {
  console.error("Failed to check inventory:", error.message);
} else {
  const inventory = data.content;
  console.log(`Inventory Status: ${inventory?.inventory_status}`);
  console.log(`Shipment Items:`, inventory?.shipment_items);
  console.log(`Recommended Warehouses:`, inventory?.recommended_warehouses);
  console.log(`Inventory Detail:`, inventory?.inventory_detail);
  console.log(`Allowed Actions:`, inventory?.allowed_action);
}

TypeScript Definition

typescript
"pos-check-order-inventory": {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description Order number */
                order_number: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description OK */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        message?: string;
                        success?: boolean;
                        content?: {
                            /** @enum {unknown} */
                            inventory_status?: "fulfilled" | "partially-fulfilled" | "not-fulfilled";
                            shipment_items?: components["schemas"]["ShipmentItem"][];
                            recommended_warehouses?: {
                                id?: string;
                                name?: string;
                                /** @enum {unknown} */
                                inventory_status?: "fulfilled" | "partially-fulfilled" | "not-fulfilled";
                            }[];
                            inventory_detail?: {
                                sku?: string;
                                total_quantity?: number;
                                warehouses?: {
                                    warehouse_id?: string;
                                    warehouse_name?: string;
                                    quantity?: number;
                                }[];
                            }[];
                            allowed_action?: string[];
                        };
                    };
                };
            };
        };
    };

Component References

ReferenceResolves To
components["schemas"]["ShipmentItem"]ShipmentItem

Parameters

  • order_number (path): Order number

Responses

200

OK

OpenAPI Definition

json
{
  "operationId": "pos-check-order-inventory",
  "summary": "Check Inventory",
  "description": "Check Inventory",
  "parameters": [
    {
      "name": "order_number",
      "in": "path",
      "description": "Order number",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "success": {
                "type": "boolean"
              },
              "content": {
                "properties": {
                  "inventory_status": {
                    "enum": [
                      "fulfilled",
                      "partially-fulfilled",
                      "not-fulfilled"
                    ]
                  },
                  "shipment_items": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ShipmentItem"
                    }
                  },
                  "recommended_warehouses": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "inventory_status": {
                          "enum": [
                            "fulfilled",
                            "partially-fulfilled",
                            "not-fulfilled"
                          ]
                        }
                      }
                    }
                  },
                  "inventory_detail": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "sku": {
                          "type": "string"
                        },
                        "total_quantity": {
                          "type": "integer"
                        },
                        "warehouses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "warehouse_id": {
                                "type": "string"
                              },
                              "warehouse_name": {
                                "type": "string"
                              },
                              "quantity": {
                                "type": "integer"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "allowed_action": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "type": "object"
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    "POSAdmin"
  ],
  "x-speakeasy-group": "pos",
  "x-speakeasy-ignore": true
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: