> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get COGS Entry

> This endpoint gets a COGS (Cost of Goods Sold) entry.

### Response

<ResponseField name="id" type="integer">
  Unique identifier for the COGS entry (primary key)
</ResponseField>

### Response

<ResponseField name="id" type="integer">
  Unique identifier for the COGS entry (primary key)
</ResponseField>

<ResponseField name="period" type="string">
  The accounting period for the COGS entry
</ResponseField>

<ResponseField name="product" type="string">
  The product associated with the COGS entry
</ResponseField>

<ResponseField name="quantity_sold" type="integer">
  The quantity of the product sold
</ResponseField>

<ResponseField name="cogs" type="number">
  The Cost of Goods Sold amount
</ResponseField>

<ResponseField name="average_cost" type="number">
  The average cost per unit
</ResponseField>

<ResponseField name="ending_inventory_quantity" type="number">
  The quantity of inventory remaining at the end of the period
</ResponseField>

<ResponseField name="ending_inventory_value" type="number">
  The value of the ending inventory
</ResponseField>

<ResponseField name="currency" type="string">
  The currency used for the financial calculations
</ResponseField>

<ResponseField name="exchange_rate_id" type="integer">
  Identifier for the related exchange rate
</ResponseField>

<ResponseField name="sale_transaction_id" type="integer">
  Identifier for the related sale transaction
</ResponseField>

<ResponseField name="unit_selling_price" type="number">
  The selling price per unit
</ResponseField>

<ResponseField name="gross_sales" type="number">
  The total gross sales amount
</ResponseField>

<ResponseField name="gross_profit" type="number">
  The gross profit amount
</ResponseField>

<ResponseField name="gross_margin_percentage" type="number">
  The gross margin percentage
</ResponseField>

<ResponseField name="cogs_percentage" type="number">
  The COGS as a percentage of sales
</ResponseField>

<ResponseField name="cogs_method" type="string">
  The method used to calculate COGS
</ResponseField>

<ResponseField name="product_category" type="string">
  The category of the product
</ResponseField>

<ResponseField name="sales_channel" type="string">
  The channel through which the sale was made
</ResponseField>

<ResponseField name="customer_segment" type="string">
  The segment of the customer who made the purchase
</ResponseField>

<ResponseField name="sale_date" type="string">
  The date of the sale
</ResponseField>

<ResponseField name="is_return" type="boolean">
  Indicates whether this entry is for a return
</ResponseField>

<ResponseField name="return_reason" type="string">
  The reason for the return, if applicable
</ResponseField>

<ResponseField name="cost_center" type="string">
  The cost center associated with the COGS entry
</ResponseField>

<ResponseField name="supplier_id" type="integer">
  Identifier for the related supplier
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  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"
  }'
  ```
</RequestExample>

<RequestExample>
  ```graphQL theme={null}

  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
    }
  }

  ```
</RequestExample>
