curl --location --request GET 'https://api.stateset.com/v1/cogs_entries' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token <token>' \ --data-raw '{ "limit": 10, "offset": 0, "order_direction": "asc" }'
{ "id": 123, "period": "<string>", "product": "<string>", "quantity_sold": 123, "cogs": 123, "average_cost": 123, "ending_inventory_quantity": 123, "ending_inventory_value": 123, "currency": "<string>", "exchange_rate_id": 123, "sale_transaction_id": 123, "unit_selling_price": 123, "gross_sales": 123, "gross_profit": 123, "gross_margin_percentage": 123, "cogs_percentage": 123, "cogs_method": "<string>", "product_category": "<string>", "sales_channel": "<string>", "customer_segment": "<string>", "sale_date": "<string>", "is_return": true, "return_reason": "<string>", "cost_center": "<string>", "supplier_id": 123 }
This endpoint gets a COGS (Cost of Goods Sold) entry.
query ($limit: Int!, $offset: Int!, $order_direction: order_by) { cogs_entries(limit: $limit, offset: $offset, order_by: {id: $order_direction}) { id period product quantity_sold cogs average_cost ending_inventory_quantity ending_inventory_value currency exchange_rate_id sale_transaction_id unit_selling_price gross_sales gross_profit gross_margin_percentage cogs_percentage cogs_method product_category sales_channel customer_segment sale_date is_return return_reason cost_center supplier_id } }