get https://{shopdomain}.myshoplaza.com/openapi/2022-01/statistics/inventory/cost_price
Requires
read_inventory
access scope.More access scope
The List Inventory Cost Price API retrieves the inventory cost price data for specified SKUs within a particular month, providing detailed cost and price information for inventory management.
This enables users to:
- Analyze the cost price of inventory items over a specific period.
- Compare cost prices across different sales platforms.
- Generate reports for inventory cost evaluation.
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 |