get https://{shopdomain}.myshoplaza.com/openapi/2022-01/statistics/inventory/loss_quantity
Requires
read_inventory
access scope.More access scope
The List Inventory Loss Quantity API retrieves the inventory loss data within the specified time range, providing insights into stock discrepancies across sales platforms and SKUs.
This enables users to:
- Track inventory losses by SKU and location.
- Analyze stocktaking data to identify discrepancies.
- Generate reports for inventory management.
Request Parameters
Public Request Parameters
Query Parameters
Field | Type | Description | Example |
---|---|---|---|
date | string (required) | Querying data for the month, in UTC timezone (formatted as YYYY-MM). | 2024-06 |
sales_platform | string | Sales platform, can be "shoplazza" , "pos" , or "center" . | shoplazza |
skus | array of strings | Variant's SKU list to filter cost price data. | ["99898"] |
page | int32 (required) | Page number. | 1 |
limit | int32 (required) | Limit per page, maximum value is 1000 . | 50 |
Response Explanation
Public Response Parameters
Success Response
Field | Type | Description | Example |
---|---|---|---|
count | int | Total number of inventory cost price records. | 1 |
data | array | List of inventory cost price records. | |
data.location_id | string | Location ID where the inventory is stored. | 327329225536870531 |
data.product_id | string | Product ID associated with the inventory. | 0d876129-f410-4645-b54a-be9569 |
data.variant_id | string | Variant ID associated with the inventory. | 4ded938-8aa5-4d46-b4c6-0fd56fd |
data.sku | string | SKU of the variant. | 99898 |
data.cost_price | string | Cost price of the inventory item, numeric string. | "0.00" |
data.price | string | Selling price of the inventory item, numeric string. | "0.00" |
Error Response
Error responses in the API can be represented using two different fields: errors
and error
. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
Field | Type | Example | Description |
---|---|---|---|
error | String | "page not found" | Indicates an error encountered during the process |
Error Detail
Status Code | Message | Possible Reason | Example Response |
---|---|---|---|
400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized |