list-pos-locations
Method: GET
Path: /pos/locations
Tags: Devices
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"][];
};
};
};
};
/** @description The API key is missing or invalid. */
403: components["responses"]["Forbidden"];
500: components["responses"]["InternalServerError"];
504: components["responses"]["GatewayTimeout"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["PosLocation"] | PosLocation |
components["responses"]["Forbidden"] | Forbidden |
components["responses"]["InternalServerError"] | InternalServerError |
components["responses"]["GatewayTimeout"] | GatewayTimeout |
Responses
200
OK
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.
500
The request failed because of an unexpected error.
504
The request timed out.
OpenAPI Definition
json
{
"operationId": "list-pos-locations",
"summary": "List all locations",
"description": "List all locations.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"locations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PosLocation"
}
}
},
"required": [
"locations"
],
"type": "object"
}
},
"required": [
"message",
"success",
"content"
]
}
}
}
},
"403": {
"description": "The API key is missing or invalid.",
"$ref": "#/components/responses/Forbidden"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
},
"504": {
"$ref": "#/components/responses/GatewayTimeout"
}
},
"externalDocs": {
"url": "https://llm-docs.commercengine.io/admin-pos/operations/list-pos-locations"
},
"security": [
{
"X-Api-Key": []
}
],
"tags": [
"Devices"
],
"x-speakeasy-group": "pos",
"x-speakeasy-name-override": "listLocations"
}Auto-generated from OpenAPI spec and TypeScript definitions