⚠️ The COGS API is meant to be used only when you're not pushing orders via the orders API, e.g. orders are coming in via Shopware but the COGS are provided by an ERP system => Use COGS API. Both COGS and orders can be provided via the orders API (see productCogs).
First Example: For Order "2312231241" and lineItemId "5234123423" we have COGS of 17.33 , for Order "2312231242" and lineItemId "5234123423" we have COGS of 9.99 (currency is defined by the Order currency)
{
"items" : [
{
orderId: "2312231241",
lineItemid: "5234123423",
productCogs: 17.33,
},
{
orderId: "2312231242",
lineItemId: "5234123423",
productCogs: 9.99,
}
]
}
Second Example: For Order "2312231241" and sku "34123-243234-2342342" we have COGS of 17.33, for Order "2312231242" and sku "34123-243234-2342344" we have COGS of 9.99 (currency is defined by the Order currency)
{
"items" : [
{
orderId: "2312231241",
sku: "34123-243234-2342342",
productCogs: 17.33,
},
{
orderId: "2312231242",
sku: "34123-243234-2342344",
productCogs: 9.99,
}
]
}