> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://dev.rechain.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://dev.rechain.co/_mcp/server.

# Fetch costings for a product

GET https://api.rechain.co/public/v1/products/{product_id}/product_costings

Fetch costing sheets for a specific product.

Reference: https://dev.rechain.co/api-reference/product-costing/fetch-costings-for-a-product

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `product_id` (string, required) — ID of the product.

## Response

### 200

Costing sheets for the product

- `list of ProductCostingResponse`

## Errors

### 401 Unauthorized Error

Unauthorized

- `any`

### 404 Not Found Error

Product not found or inaccessible to the public API key

- `any`

## Types

### ProductCostingResponse

- `acceptedCostingState` (enum, required, nullable) — Returns `accepted` or `preAccepted` for the selected costing in its season, or at product level for a costing without a season. Unselected costings return `null`.
  - Allowed values: `accepted`, `preAccepted`
- `id` (string, optional)
- `name` (string, optional)
- `productId` (string, optional)
- `seasonId` (string, optional, nullable) — Season of the costing, or null for a costing without a season.
- `variantId` (integer, optional, nullable)
- `currency` (string, optional)
- `currencyId` (string, optional)
- `currencySymbol` (string, optional)
- `supplierId` (string, optional, nullable)
- `manufacturerLocationId` (string, optional, nullable)
- `makeCost` (float, optional)
- `freightCost` (float, optional)
- `dutyCost` (float, optional)
- `miscCost` (float, optional)
- `dutyRate` (float, optional)
- `countryOfOrigin` (string, optional)
- `targetFob` (float, optional)
- `wholesalePrice` (float, optional)
- `retailRecommendedPrice` (float, optional)
- `directSalePrice` (float, optional)
- `costingType` (string, optional)
- `finishedProduct` (float, optional)
- `salesChannels` (list of string, optional)
- `costingV2` (map from string to any, optional)
- `product` (ProductCostingResponseProduct, optional)
- `costingSections` (list of map from string to any, optional)
- `costingColumns` (list of ProductCostingResponseCostingColumnsItems, optional)
- `status` (string, optional, deprecated) — Deprecated workflow status of the costing. Use `acceptedCostingState` to check whether a costing is selected.

### ProductCostingResponseProduct

- `id` (string, optional)
- `name` (string, optional)

### ProductCostingResponseCostingColumnsItems

- `id` (string, optional)
- `variantId` (integer, optional, nullable)
- `productSizeId` (string, optional, nullable)
- `makeCost` (float, optional)
- `freightCost` (float, optional)
- `dutyCost` (float, optional)
- `miscCost` (float, optional)
- `wholesalePrice` (float, optional)
- `retailRecommendedPrice` (float, optional)
- `directSalePrice` (float, optional)
- `targetFob` (float, optional)
- `fobPrice` (float, optional)
- `landedPrice` (float, optional)

## Examples

**Response**

```json
[
  {
    "acceptedCostingState": "accepted",
    "id": "string",
    "name": "string",
    "productId": "string",
    "seasonId": "string",
    "variantId": 1,
    "currency": "usd",
    "currencyId": "string",
    "currencySymbol": "$",
    "supplierId": "string",
    "manufacturerLocationId": "string",
    "makeCost": 1.1,
    "freightCost": 1.1,
    "dutyCost": 1.1,
    "miscCost": 1.1,
    "dutyRate": 1.1,
    "countryOfOrigin": "string",
    "targetFob": 1.1,
    "wholesalePrice": 1.1,
    "retailRecommendedPrice": 1.1,
    "directSalePrice": 1.1,
    "costingType": "string",
    "finishedProduct": 1.1,
    "salesChannels": [
      "string"
    ],
    "costingV2": {},
    "product": {
      "id": "string",
      "name": "string"
    },
    "costingSections": [
      {}
    ],
    "costingColumns": [
      {
        "id": "string",
        "variantId": 1,
        "productSizeId": "string",
        "makeCost": 1.1,
        "freightCost": 1.1,
        "dutyCost": 1.1,
        "miscCost": 1.1,
        "wholesalePrice": 1.1,
        "retailRecommendedPrice": 1.1,
        "directSalePrice": 1.1,
        "targetFob": 1.1,
        "fobPrice": 1.1,
        "landedPrice": 1.1
      }
    ],
    "status": "approved"
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.rechain.co/public/v1/products/product_id/product_costings"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.rechain.co/public/v1/products/product_id/product_costings';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.rechain.co/public/v1/products/product_id/product_costings"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.rechain.co/public/v1/products/product_id/product_costings")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.rechain.co/public/v1/products/product_id/product_costings")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.rechain.co/public/v1/products/product_id/product_costings', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.rechain.co/public/v1/products/product_id/product_costings");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.rechain.co/public/v1/products/product_id/product_costings")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```