curl --request POST \
--url 'https://api.stateset.com/api/v1/reports/transaction-cogs' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"from": "string",
"lines": [
{
"cost": "49.00",
"product_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quantity": "string",
"revenue": "49.00",
"sku": "SKU-TENT-2P-GRN",
"transaction_date": "2026-08-31T14:22:05Z"
}
],
"to": "string"
}'
{
"from": "string",
"gross_margin": "string",
"gross_margin_pct": "string",
"rows": [
{
"cogs": "string",
"gross_margin": "string",
"quantity": "string",
"revenue": "49.00",
"sku": "SKU-TENT-2P-GRN"
}
],
"to": "string",
"total_cogs": "string",
"total_revenue": "49.00"
}
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 $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"from": "string",
"lines": [
{
"cost": "49.00",
"product_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quantity": "string",
"revenue": "49.00",
"sku": "SKU-TENT-2P-GRN",
"transaction_date": "2026-08-31T14:22:05Z"
}
],
"to": "string"
}'
{
"from": "string",
"gross_margin": "string",
"gross_margin_pct": "string",
"rows": [
{
"cogs": "string",
"gross_margin": "string",
"quantity": "string",
"revenue": "49.00",
"sku": "SKU-TENT-2P-GRN"
}
],
"to": "string",
"total_cogs": "string",
"total_revenue": "49.00"
}
Request body
TransactionCogsRequest
string
required
CogsLineRequest[]
required
string
required
Response
TransactionCogsResponse
string
required
string
required
string
required
CogsRowResponse[]
required
string
required
string
required
string
required
Status codes
| Code | Meaning |
|---|---|
200 | — |
400 | — |
curl --request POST \
--url 'https://api.stateset.com/api/v1/reports/transaction-cogs' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"from": "string",
"lines": [
{
"cost": "49.00",
"product_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quantity": "string",
"revenue": "49.00",
"sku": "SKU-TENT-2P-GRN",
"transaction_date": "2026-08-31T14:22:05Z"
}
],
"to": "string"
}'
{
"from": "string",
"gross_margin": "string",
"gross_margin_pct": "string",
"rows": [
{
"cogs": "string",
"gross_margin": "string",
"quantity": "string",
"revenue": "49.00",
"sku": "SKU-TENT-2P-GRN"
}
],
"to": "string",
"total_cogs": "string",
"total_revenue": "49.00"
}
Last modified on August 31, 2026