pos-list-skus
Method: GET
Path: /pos/catalog/skus
Tags: POS
Summary
List all SKUs
Description
Returns a list of SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.
Pos SDK Usage
SDK Method: pos.listSkus()
Example:
typescript
// Basic SKU listing
const { data, error } = await pos.listSkus();
if (error) {
console.error("Failed to list SKUs:", error.message);
} else {
console.log("SKUs found:", data.skus?.length || 0);
console.log("Pagination:", data.pagination);
data.skus?.forEach(sku => {
console.log(`SKU: ${sku.sku} - Price: ${sku.price}`);
});
}
// With pagination
const { data: skuData, error: skuError } = await pos.listSkus({
page: 1,
limit: 50
});
// Override customer group ID for this specific request
const { data: overrideData, error: overrideError } = await pos.listSkus(
{
page: 1,
limit: 50
},
{
"x-customer-group-id": "01H9XYZ12345USERID" // Override default SDK config
}
);TypeScript Definition
typescript
"pos-list-skus": {
parameters: {
query?: {
/** @description page number of pagination list */
page?: components["parameters"]["pageParam"];
/** @description no of rows per page */
limit?: components["parameters"]["pageLimitParam"];
/** @description JSON string format: {"field1":"asc", "field2":"desc"} */
sort_by?: components["parameters"]["sortingParam"];
/** @description filter sku by categories */
category_id?: string[];
/** @description Determines whether to include or exlude inventory details in response json */
inventory?: boolean;
/** @description array of sku */
sku?: string[];
};
header?: {
/** @description This param is used to determine product pricing, promotions, and subscription rates. If a valid customer group id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer group id, the system will fall back to the default customer group id. If no data is found for the default group either, the highest applicable price will be returned. */
"x-customer-group-id"?: components["parameters"]["CustomerGroupId"];
};
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Success response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
/** @example SKUs retrieved successfully. */
message: string;
success: boolean;
content: {
readonly skus: components["schemas"]["Item"][];
pagination: components["schemas"]["Pagination"];
};
};
};
};
401: components["responses"]["Unauthorized"];
404: components["responses"]["NotFound"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["parameters"]["pageParam"] | pageParam |
components["parameters"]["pageLimitParam"] | pageLimitParam |
components["parameters"]["sortingParam"] | sortingParam |
components["parameters"]["CustomerGroupId"] | CustomerGroupId |
components["schemas"]["Item"] | Item |
components["schemas"]["Pagination"] | Pagination |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["NotFound"] | NotFound |
Parameters
- page (query): page number of pagination list
- limit (query): no of rows per page
- sort_by (query): JSON string format: {"field1":"asc", "field2":"desc"}
- x-customer-group-id (header): This param is used to determine product pricing, promotions, and subscription rates. If a valid customer group id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer group id, the system will fall back to the default customer group id. If no data is found for the default group either, the highest applicable price will be returned.
- category_id (query): filter sku by categories
- inventory (query): Determines whether to include or exlude inventory details in response json
- sku (query): array of sku
Responses
200
Success response
401
Not authorized for given operation on the Resource
404
Requested resource not found
OpenAPI Definition
json
{
"tags": [
"POS"
],
"operationId": "pos-list-skus",
"summary": "List all SKUs",
"description": "Returns a list of SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.",
"parameters": [
{
"$ref": "#/components/parameters/pageParam"
},
{
"$ref": "#/components/parameters/pageLimitParam"
},
{
"$ref": "#/components/parameters/sortingParam"
},
{
"$ref": "#/components/parameters/CustomerGroupId"
},
{
"name": "category_id",
"in": "query",
"description": "filter sku by categories",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"explode": true,
"style": "form"
},
{
"name": "inventory",
"in": "query",
"description": "Determines whether to include or exlude inventory details in response json",
"schema": {
"type": "boolean"
}
},
{
"name": "sku",
"in": "query",
"description": "array of sku",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
],
"responses": {
"200": {
"description": "Success response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message",
"success",
"content"
],
"properties": {
"message": {
"type": "string",
"examples": [
"SKUs retrieved successfully."
]
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"skus": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Item"
},
"readOnly": true
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
},
"required": [
"skus",
"pagination"
],
"type": "object"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
},
"security": [
{
"Authorization": []
}
],
"x-speakeasy-group": "pos",
"x-speakeasy-ignore": true,
"x-speakeasy-name-override": "listSkus"
}Auto-generated from OpenAPI spec and TypeScript definitions