> 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 product costings

GET https://api.rechain.co/public/v1/product_costings

Fetch costing sheets for products visible to the public API key.

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

## Authentication

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

## Request

### Query parameters

- `filters` (list of ProductCostingsGetParametersFiltersSchemaItems, optional) — Filters. Use `productId` to fetch costings for a specific product.

## Response

### 200

Successful operation

- `list of ProductCostingResponse`

## Errors

### 401 Unauthorized Error

Unauthorized

- `any`

### 405 Method Not Allowed Error

Invalid input

- `any`

## Types

### ProductCostingsGetParametersFiltersSchemaItems

- `productId` (string, optional)

### ProductCostingResponse

- `id` (string, optional)
- `name` (string, optional)
- `productId` (string, optional)
- `variantId` (integer, optional, nullable)
- `currency` (string, optional)
- `currencyId` (string, optional)
- `currencySymbol` (string, optional)
- `supplierId` (string, optional, nullable)
- `manufacturerLocationId` (string, optional, nullable)
- `status` (string, optional)
- `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)

### 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
[
  {
    "id": "string",
    "name": "string",
    "productId": "string",
    "variantId": 1,
    "currency": "usd",
    "currencyId": "string",
    "currencySymbol": "$",
    "supplierId": "string",
    "manufacturerLocationId": "string",
    "status": "approved",
    "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
      }
    ]
  }
]
```

**SDK Code**

```python
import requests

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

querystring = {"filters":"[{\"productId\":\"fb13bf64-2897-45ff-a29d-c09fc384811d\"}]"}

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

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

print(response.json())
```

```javascript
const url = 'https://api.rechain.co/public/v1/product_costings?filters=%5B%7B%22productId%22%3A%22fb13bf64-2897-45ff-a29d-c09fc384811d%22%7D%5D';
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/product_costings?filters=%5B%7B%22productId%22%3A%22fb13bf64-2897-45ff-a29d-c09fc384811d%22%7D%5D"

	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/product_costings?filters=%5B%7B%22productId%22%3A%22fb13bf64-2897-45ff-a29d-c09fc384811d%22%7D%5D")

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/product_costings?filters=%5B%7B%22productId%22%3A%22fb13bf64-2897-45ff-a29d-c09fc384811d%22%7D%5D")
  .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/product_costings?filters=%5B%7B%22productId%22%3A%22fb13bf64-2897-45ff-a29d-c09fc384811d%22%7D%5D', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.rechain.co/public/v1/product_costings?filters=%5B%7B%22productId%22%3A%22fb13bf64-2897-45ff-a29d-c09fc384811d%22%7D%5D");
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/product_costings?filters=%5B%7B%22productId%22%3A%22fb13bf64-2897-45ff-a29d-c09fc384811d%22%7D%5D")! 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()
```