curl --request POST \
--url 'https://api.stateset.com/api/v1/reports/transaction-cogs' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"from": "string",
"lines": [
{
"cost": "string",
"product_id": null,
"quantity": "string",
"revenue": "string",
"sku": "string",
"transaction_date": "string"
}
],
"to": "string"
}'
{
"from": "string",
"gross_margin": "string",
"gross_margin_pct": "string",
"rows": [
{
"cogs": "string",
"gross_margin": "string",
"quantity": "string",
"revenue": "string",
"sku": "string"
}
],
"to": "string",
"total_cogs": "string",
"total_revenue": "string"
}
Transaction cogs
Transaction cogs
POST
/
api
/
v1
/
reports
/
transaction-cogs
curl --request POST \
--url 'https://api.stateset.com/api/v1/reports/transaction-cogs' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"from": "string",
"lines": [
{
"cost": "string",
"product_id": null,
"quantity": "string",
"revenue": "string",
"sku": "string",
"transaction_date": "string"
}
],
"to": "string"
}'
{
"from": "string",
"gross_margin": "string",
"gross_margin_pct": "string",
"rows": [
{
"cogs": "string",
"gross_margin": "string",
"quantity": "string",
"revenue": "string",
"sku": "string"
}
],
"to": "string",
"total_cogs": "string",
"total_revenue": "string"
}
Request body
TransactionCogsRequest
string
required
CogsLineRequest[]
required
string
required
Responses
TransactionCogsResponse
ErrorBody
curl --request POST \
--url 'https://api.stateset.com/api/v1/reports/transaction-cogs' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"from": "string",
"lines": [
{
"cost": "string",
"product_id": null,
"quantity": "string",
"revenue": "string",
"sku": "string",
"transaction_date": "string"
}
],
"to": "string"
}'
{
"from": "string",
"gross_margin": "string",
"gross_margin_pct": "string",
"rows": [
{
"cogs": "string",
"gross_margin": "string",
"quantity": "string",
"revenue": "string",
"sku": "string"
}
],
"to": "string",
"total_cogs": "string",
"total_revenue": "string"
}
โI