Skip to content

list-customer-order-invoices ​

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

Tags: Orders

Summary ​

List an order's issued invoices

Description ​

Lists only Commerce Engine-issued invoices for the current shopper's order, including shipment, counter and digital-goods documents. Read-only; an order without issued invoices returns an empty list.

Storefront SDK Usage ​

SDK Method: sdk.order.listOrderInvoices()

Example:

typescript
const { data, error } = await sdk.order.listOrderInvoices({
  order_number: "ORD-2024-001"
});

if (error) {
  console.error("Failed to list invoices:", error.message);
} else {
  data.invoices.forEach(invoice => {
    console.log(`${invoice.invoice_number}: ${invoice.grand_total}`);
  });
}

TypeScript Definition ​

typescript
"list-customer-order-invoices": {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description The shopper's order number. */
                order_number: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Document retrieved. */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        message: string;
                        success: boolean;
                        content: {
                            invoices: components["schemas"]["OrderInvoiceDetail"][];
                        };
                    };
                };
            };
            403: components["responses"]["Forbidden"];
            /** @description Document or order not found, or belongs to another shopper or store. */
            404: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
            500: components["responses"]["InternalServerError"];
            504: components["responses"]["GatewayTimeout"];
        };
    };

Component References ​

ReferenceResolves To
components["schemas"]["OrderInvoiceDetail"]OrderInvoiceDetail
components["responses"]["Forbidden"]Forbidden
components["responses"]["InternalServerError"]InternalServerError
components["responses"]["GatewayTimeout"]GatewayTimeout

Parameters ​

  • order_number (path): The shopper's order number.

Responses ​

200 ​

Document retrieved.

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 ​

Document or order not found, or belongs to another shopper or store.

500 ​

The request failed because of an unexpected error.

504 ​

The request timed out.

OpenAPI Definition ​

json
{
  "tags": [
    "Orders"
  ],
  "operationId": "list-customer-order-invoices",
  "summary": "List an order's issued invoices",
  "description": "Lists only Commerce Engine-issued invoices for the current shopper's order, including shipment, counter and digital-goods documents. Read-only; an order without issued invoices returns an empty list.",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/operations/list-customer-order-invoices",
    "description": "API reference for the list-customer-order-invoices operation"
  },
  "parameters": [
    {
      "name": "order_number",
      "in": "path",
      "description": "The shopper's order number.",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Document retrieved.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "message",
              "success",
              "content"
            ],
            "properties": {
              "message": {
                "type": "string"
              },
              "success": {
                "type": "boolean"
              },
              "content": {
                "properties": {
                  "invoices": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/OrderInvoiceDetail"
                    }
                  }
                },
                "required": [
                  "invoices"
                ],
                "type": "object"
              }
            }
          }
        }
      }
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "description": "Document or order not found, or belongs to another shopper or store."
    },
    "500": {
      "$ref": "#/components/responses/InternalServerError"
    },
    "504": {
      "$ref": "#/components/responses/GatewayTimeout"
    }
  },
  "security": [
    {
      "Authorization": []
    }
  ],
  "x-speakeasy-group": "orders",
  "x-speakeasy-ignore": false,
  "x-speakeasy-name-override": "listCustomerOrderInvoices"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: