Finance
COGS / COGM statement API
Builds the cost-of-goods-sold statement (retail: beginning + net purchases − ending) or full cost-of-goods-manufactured + COGS schedule (manufacturing, with WIP and DM/DL/MOH). Answers 'What is my cost of goods sold?', 'What is cost of goods manufactured?'.
Price$0.04per request
MethodPOST
Route/v1/finance/cogs-statement
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
cogscost-of-goods-soldcogmmanufacturinginventoryaccountingstatementretail
API URL
Integration docshttps://x402.hexl.dev/v1/finance/cogs-statementExample request
{
"beginningInventory": 20000,
"purchases": 80000,
"freightIn": 2000,
"purchaseReturns": 3000,
"endingInventory": 15000
}Example response
{
"type": "retail",
"beginningInventory": 20000,
"purchases": 80000,
"freightIn": 2000,
"purchaseReturns": 3000,
"purchaseDiscounts": 0,
"netPurchases": 79000,
"goodsAvailableForSale": 99000,
"endingInventory": 15000,
"costOfGoodsSold": 84000,
"interpretation": "COGS = beginning inventory ($20000) + net purchases ($79000) − ending inventory ($15000) = $84000."
}Input schema
{
"type": "object",
"required": [
"beginningInventory",
"endingInventory"
],
"properties": {
"beginningInventory": {
"type": "number",
"examples": [
20000
]
},
"purchases": {
"type": "number",
"examples": [
80000
]
},
"freightIn": {
"type": "number",
"examples": [
2000
]
},
"purchaseReturns": {
"type": "number",
"examples": [
3000
]
},
"endingInventory": {
"type": "number",
"examples": [
15000
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}