pos-list-inventory-activity
Method: GET
Path: /pos/catalog/inventories/activities
Tags: Inventory
Summary
List all inventories activities
Description
Lists all inventory related activities of stock movements. This provides a comprehensive audit trail of inventory operations such as receiving, reservations, adjustments, transfers, and sales.
Pos SDK Usage
SDK Method: pos.listInventoryActivities()
Example:
typescript
// Basic inventory activities listing
const { data, error } = await pos.listInventoryActivities();
if (error) {
console.error("Failed to list inventory activities:", error.message);
} else {
console.log("Activities found:", data?.activities?.length || 0);
data?.activities?.forEach(activity => {
console.log(`Activity: ${activity.activity_type} - Product: ${activity.product_name} - Quantity: ${activity.quantity}`);
});
}
// With pagination and filters
const { data: filteredData, error: filteredError } = await pos.listInventoryActivities({
page: 1,
limit: 50,
sort_by: JSON.stringify({ created_at: "desc" }),
filters: JSON.stringify({
condition: "AND",
filters: [{ type: "data", field: "activity_type", operator: "equals", value: "add" }]
})
});TypeScript Definition
typescript
"pos-list-inventory-activity": {
parameters: {
query?: {
/** @description Page number, starting at 1. Non-integer values and values below 1 return 400. */
page?: components["parameters"]["pageNumber"];
/** @description Results per page. Values outside 1–100 are clamped to that range. Non-integer input returns 400. */
limit?: components["parameters"]["pageLimit"];
/** @description JSON string format: {"field1":"asc", "field2":"desc"} */
sort_by?: components["parameters"]["sortByOptions"];
/** @description JSON object */
filters?: components["parameters"]["columnBasedFilters"];
/** @description Search product and variant IDs, SKUs and names. */
search?: string;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
content: {
activities: components["schemas"]["InventoryActivity"][];
pagination: components["schemas"]["AdminPagination"];
};
};
};
};
400: components["responses"]["AdminBadRequest"];
401: components["responses"]["AdminUnauthorized"];
403: components["responses"]["Forbidden"];
404: components["responses"]["NotFound"];
500: components["responses"]["AdminInternalServerError"];
504: components["responses"]["GatewayTimeout"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["parameters"]["pageNumber"] | pageNumber |
components["parameters"]["pageLimit"] | pageLimit |
components["parameters"]["sortByOptions"] | sortByOptions |
components["parameters"]["columnBasedFilters"] | columnBasedFilters |
components["schemas"]["InventoryActivity"] | InventoryActivity |
components["schemas"]["AdminPagination"] | AdminPagination |
components["responses"]["AdminBadRequest"] | AdminBadRequest |
components["responses"]["AdminUnauthorized"] | AdminUnauthorized |
components["responses"]["Forbidden"] | Forbidden |
components["responses"]["NotFound"] | NotFound |
components["responses"]["AdminInternalServerError"] | AdminInternalServerError |
components["responses"]["GatewayTimeout"] | GatewayTimeout |
Parameters
- search (query): Search product and variant IDs, SKUs and names.
Responses
200
OK
400
401
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
Requested resource not found
500
504
The request timed out.
OpenAPI Definition
json
{
"operationId": "pos-list-inventory-activity",
"summary": "List all inventories activities",
"description": "Lists all inventory related activities of stock movements. This provides a comprehensive audit trail of inventory operations such as receiving, reservations, adjustments, transfers, and sales.",
"parameters": [
{
"$ref": "#/components/parameters/pageNumber"
},
{
"$ref": "#/components/parameters/pageLimit"
},
{
"$ref": "#/components/parameters/sortByOptions"
},
{
"$ref": "#/components/parameters/columnBasedFilters"
},
{
"name": "search",
"in": "query",
"description": "Search product and variant IDs, SKUs and names.",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"activities": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InventoryActivity"
}
},
"pagination": {
"$ref": "#/components/schemas/AdminPagination"
}
},
"required": [
"activities",
"pagination"
],
"type": "object"
}
},
"required": [
"message",
"success",
"content"
]
}
}
}
},
"400": {
"$ref": "#/components/responses/AdminBadRequest"
},
"401": {
"$ref": "#/components/responses/AdminUnauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/AdminInternalServerError"
},
"504": {
"$ref": "#/components/responses/GatewayTimeout"
}
},
"externalDocs": {
"url": "https://llm-docs.commercengine.io/admin-pos/operations/pos-list-inventory-activity"
},
"security": [
{
"Authorization": []
}
],
"tags": [
"Inventory"
],
"x-speakeasy-group": "pos"
}Auto-generated from OpenAPI spec and TypeScript definitions