Skip to content

pos-get-order-detail ​

Method: GET
Path: /pos/orders/{order_number}

Tags: Orders

Summary ​

Retrieve order details

Description ​

Retrieves an order's details. For an order not on the customer's credit line that the customer's loyalty points, credit balance or a discount pay in full, payments holds no gateway or manual payment. It lists the bank transfer of the credit balance used, if any, and, for a storefront order, the loyalty points redeemed. Staff can retrieve orders across all store locations.

Pos SDK Usage ​

SDK Method: pos.getOrderDetail()

Example:

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

if (error) {
  console.error("Failed to get order:", error.message);
} else {
  const order = data.order;
  console.log(`Order: ${order?.order_number}`);
  console.log(`Status: ${order?.status}`);
  console.log(`Payment Status: ${order?.payment_status}`);
  console.log(`Total: ${order?.grand_total}`);
  console.log(`Items:`, order?.order_items);
  console.log(`Billing Address:`, order?.billing_address);
  console.log(`Payments:`, order?.payments);
}

TypeScript Definition ​

typescript
"pos-get-order-detail": {
        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: {
                            order: components["schemas"]["OrderDetail"];
                        };
                    };
                };
            };
            400: components["responses"]["BadRequest"];
            401: components["responses"]["AdminUnauthorized"];
            403: components["responses"]["Forbidden"];
            404: components["responses"]["AdminNotFound"];
            /** @description Unsupported method. Use GET, PUT. */
            405: components["responses"]["MethodNotAllowed"];
            500: components["responses"]["AdminInternalServerError"];
            504: components["responses"]["GatewayTimeout"];
        };
    };

Component References ​

ReferenceResolves To
components["schemas"]["OrderDetail"]OrderDetail
components["responses"]["BadRequest"]BadRequest
components["responses"]["AdminUnauthorized"]AdminUnauthorized
components["responses"]["Forbidden"]Forbidden
components["responses"]["AdminNotFound"]AdminNotFound
components["responses"]["MethodNotAllowed"]MethodNotAllowed
components["responses"]["AdminInternalServerError"]AdminInternalServerError
components["responses"]["GatewayTimeout"]GatewayTimeout

Parameters ​

  • order_number (path): order number

Responses ​

200 ​

OK

400 ​

Bad request

401 ​

403 ​

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.

404 ​

405 ​

500 ​

504 ​

The request timed out.

OpenAPI Definition ​

json
{
  "operationId": "pos-get-order-detail",
  "summary": "Retrieve order details",
  "description": "Retrieves an order's details. For an order not on the customer's credit line that the customer's loyalty points, credit balance or a discount pay in full, `payments` holds no gateway or manual payment. It lists the bank transfer of the credit balance used, if any, and, for a storefront order, the loyalty points redeemed. Staff can retrieve orders across all store locations.",
  "parameters": [
    {
      "name": "order_number",
      "in": "path",
      "description": "order number",
      "required": true,
      "schema": {
        "type": "string",
        "maxLength": 128,
        "minLength": 1,
        "pattern": "^[A-Za-z0-9_-]{1,128}$"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "success": {
                "type": "boolean"
              },
              "content": {
                "properties": {
                  "order": {
                    "$ref": "#/components/schemas/OrderDetail"
                  }
                },
                "required": [
                  "order"
                ],
                "type": "object"
              }
            },
            "required": [
              "message",
              "success",
              "content"
            ]
          }
        }
      }
    },
    "400": {
      "$ref": "#/components/responses/BadRequest"
    },
    "401": {
      "$ref": "#/components/responses/AdminUnauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/AdminNotFound"
    },
    "405": {
      "description": "Unsupported method. Use GET, PUT.",
      "$ref": "#/components/responses/MethodNotAllowed"
    },
    "500": {
      "$ref": "#/components/responses/AdminInternalServerError"
    },
    "504": {
      "$ref": "#/components/responses/GatewayTimeout"
    }
  },
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/admin-pos/operations/pos-get-order-detail"
  },
  "security": [
    {
      "Authorization": []
    }
  ],
  "tags": [
    "Orders"
  ],
  "x-speakeasy-group": "pos"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: