pos-list-skus
Method: GET
Path: /pos/catalog/skus
Tags: Products
Summary
List all SKUs
Description
Returns a paginated list of SKUs. Sorts within the returned page. By default, simple products appear first, newest first; variant SKUs follow in no defined order.
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.pricing?.selling_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, starting at 1. Non-integer values and values below 1 return 400. */
page?: components["parameters"]["pageParam"];
/** @description Results per page. Values outside 1–100 are clamped to that range. Non-integer input returns 400. */
limit?: components["parameters"]["pageLimitParam"];
/** @description Alias for `category_id`. */
"category-id"?: string[];
/** @description Alias for `category_slug`. */
"category-slug"?: string[];
/** @description filter sku by categories */
category_id?: string[];
/** @description filter products by categories slugs */
category_slug?: string[];
/** @description Determines whether to include or exclude inventory details in response json */
inventory?: boolean;
/** @description Filter by product IDs. Products without variants are listed when no variant IDs are supplied. */
product_id?: string[];
/** @description Filter by product type. Only items with a SKU are listed. */
product_type?: ("physical" | "digital" | "bundle")[];
/** @description array of sku */
sku?: string[];
/** @description Sort within the returned page by item fields using a JSON object of field names and directions. Use `asc` for string fields such as `sku`, `product_name` and `variant_name`; numeric fields such as `reviews_count` and `reviews_rating_sum` support `asc` and `desc`. */
sort_by?: string;
/** @description Filter by variant IDs. Variants are listed when no product IDs are supplied. */
variant_id?: 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: {
skus: $Read<components["schemas"]["SkuListItem"][]>;
pagination: components["schemas"]["Pagination"];
};
};
};
};
/** @description The request parameters or customer group are invalid. */
400: components["responses"]["BadRequest"];
401: components["responses"]["Unauthorized"];
403: components["responses"]["Forbidden"];
500: components["responses"]["InternalServerError"];
504: components["responses"]["GatewayTimeout"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["parameters"]["pageParam"] | pageParam |
components["parameters"]["pageLimitParam"] | pageLimitParam |
components["parameters"]["CustomerGroupId"] | CustomerGroupId |
components["schemas"]["SkuListItem"] | SkuListItem |
components["schemas"]["Pagination"] | Pagination |
components["responses"]["BadRequest"] | BadRequest |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["Forbidden"] | Forbidden |
components["responses"]["InternalServerError"] | InternalServerError |
components["responses"]["GatewayTimeout"] | GatewayTimeout |
Parameters
- page (query): Page number, starting at 1. Non-integer values and values below 1 return 400.
- limit (query): Results per page. Values outside 1–100 are clamped to that range. Non-integer input returns 400.
- 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): Alias for
category_id. - category-slug (query): Alias for
category_slug. - category_id (query): filter sku by categories
- category_slug (query): filter products by categories slugs
- inventory (query): Determines whether to include or exclude inventory details in response json
- product_id (query): Filter by product IDs. Products without variants are listed when no variant IDs are supplied.
- product_type (query): Filter by product type. Only items with a SKU are listed.
- sku (query): array of sku
- sort_by (query): Sort within the returned page by item fields using a JSON object of field names and directions. Use
ascfor string fields such assku,product_nameandvariant_name; numeric fields such asreviews_countandreviews_rating_sumsupportascanddesc. - variant_id (query): Filter by variant IDs. Variants are listed when no product IDs are supplied.
Responses
200
Success response
400
Bad request
401
Authentication failed. Codes include token-required, token-expired and token_not_valid for an invalid or expired token.
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": "pos-list-skus",
"summary": "List all SKUs",
"description": "Returns a paginated list of SKUs. Sorts within the returned page. By default, simple products appear first, newest first; variant SKUs follow in no defined order.",
"parameters": [
{
"$ref": "#/components/parameters/pageParam"
},
{
"$ref": "#/components/parameters/pageLimitParam"
},
{
"$ref": "#/components/parameters/CustomerGroupId"
},
{
"name": "category-id",
"in": "query",
"description": "Alias for `category_id`.",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"explode": true,
"style": "form"
},
{
"name": "category-slug",
"in": "query",
"description": "Alias for `category_slug`.",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"name": "category_id",
"in": "query",
"description": "filter sku by categories",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"explode": true,
"style": "form"
},
{
"name": "category_slug",
"in": "query",
"description": "filter products by categories slugs",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"name": "inventory",
"in": "query",
"description": "Determines whether to include or exclude inventory details in response json",
"schema": {
"type": "boolean"
}
},
{
"name": "product_id",
"in": "query",
"description": "Filter by product IDs. Products without variants are listed when no variant IDs are supplied.",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"explode": false,
"style": "form"
},
{
"name": "product_type",
"in": "query",
"description": "Filter by product type. Only items with a SKU are listed.",
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
"physical",
"digital",
"bundle"
]
}
},
"explode": false,
"style": "form"
},
{
"name": "sku",
"in": "query",
"description": "array of sku",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"explode": false,
"style": "form"
},
{
"name": "sort_by",
"in": "query",
"description": "Sort within the returned page by item fields using a JSON object of field names and directions. Use `asc` for string fields such as `sku`, `product_name` and `variant_name`; numeric fields such as `reviews_count` and `reviews_rating_sum` support `asc` and `desc`.",
"required": false,
"schema": {
"type": "string",
"examples": [
"{\"sku\":\"asc\"}"
]
}
},
{
"name": "variant_id",
"in": "query",
"description": "Filter by variant IDs. Variants are listed when no product IDs are supplied.",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"explode": false,
"style": "form"
}
],
"responses": {
"200": {
"description": "Success response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"examples": [
"SKUs retrieved successfully."
]
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"skus": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SkuListItem"
},
"readOnly": true
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
},
"required": [
"skus",
"pagination"
],
"type": "object"
}
},
"required": [
"message",
"success",
"content"
]
}
}
},
"links": {
"AddItemToCart": {
"operationId": "pos-update-cart",
"requestBody": {
"product_id": "$response.body#/content/skus/0/product_id",
"variant_id": "$response.body#/content/skus/0/variant_id"
},
"description": "Add a SKU to a cart."
}
}
},
"400": {
"description": "The request parameters or customer group are invalid.",
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
},
"504": {
"$ref": "#/components/responses/GatewayTimeout"
}
},
"externalDocs": {
"url": "https://llm-docs.commercengine.io/admin-pos/operations/pos-list-skus"
},
"security": [
{
"Authorization": []
}
],
"tags": [
"Products"
],
"x-speakeasy-group": "pos",
"x-speakeasy-name-override": "listSkus"
}Auto-generated from OpenAPI spec and TypeScript definitions