Skip to content

list-pos-locations

Method: GET
Path: /pos/locations

Tags: POS

Summary

List all locations

Description

List all locations.

Pos SDK Usage

SDK Method: pos.listLocations()

Example:

typescript
const { data, error } = await pos.listLocations();
if (error) {
  console.error("Failed to list locations:", error.message);
} else {
  console.log("Locations:", data.locations);
}

TypeScript Definition

typescript
"list-pos-locations": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description OK */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        message: string;
                        success: boolean;
                        content: {
                            locations?: components["schemas"]["PosLocation"][];
                        };
                    };
                };
            };
            401: components["responses"]["Unauthorized"];
        };
    };

Component References

ReferenceResolves To
components["schemas"]["PosLocation"]PosLocation
components["responses"]["Unauthorized"]Unauthorized

Responses

200

OK

401

Not authorized for given operation on the Resource

OpenAPI Definition

json
{
  "tags": [
    "POS"
  ],
  "operationId": "list-pos-locations",
  "summary": "List all locations",
  "description": "List all locations.",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/operations/list-pos-locations",
    "description": "API reference for the list-pos-locations operation"
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "message",
              "success",
              "content"
            ],
            "properties": {
              "message": {
                "type": "string"
              },
              "success": {
                "type": "boolean"
              },
              "content": {
                "properties": {
                  "locations": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PosLocation"
                    }
                  }
                },
                "type": "object"
              }
            }
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    }
  },
  "security": [
    {
      "X-Api-Key": []
    }
  ],
  "x-speakeasy-group": "pos",
  "x-speakeasy-ignore": true,
  "x-speakeasy-name-override": "listLocations"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: