Item Cost of Goods
get_item_cogsGet the current cost of goods sold and full cost history for one item, identified by sku, product_id (internal product id), or variant_id (the commerce platform's variant id, e.g. the Shopify variant id - not an internal uuid). Optional on_date returns the cost effective on that date.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | The item's SKU. Provide at least one of sku, product_id, or variant_id. | |
| on_date | No | Return the cost effective on this date, in YYYY-MM-DD format, resolved in the tenant's timezone (default: today). | |
| product_id | No | The internal MerchantFlow product id (Product.id), not the commerce platform's own product id. Provide at least one of sku, product_id, or variant_id. | |
| variant_id | No | The commerce platform's own variant id (e.g. the Shopify variant id), not the internal ProductVariant.id. Provide at least one of sku, product_id, or variant_id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| _meta | No | ||
| as_of | No | ||
| current | No | The cost effective on the requested date, or null when the item has none. | |
| history | No | Every cost record for the item, newest first. | |
| _message | No | ||
| _truncated | No | ||
| _tenant_context | No |