comecerodocs

Get a product price in a currency

GET
/fx/product

Gets a product's price in one currency. When you set a price in that currency, you get it. Otherwise your default price is converted at today's rate with your markup and rounding. Pass a cart_id or invoice_id to use the rate saved on that cart or invoice.

Any token may call this, including a limited token. No permission is needed.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Query Parameters

product_id*string

The product to price.

currency*string

The ISO 4217 code of the currency to price it in.

quantity?number

The quantity, so a volume price applies. The default is 1.

Default1
cart_id?string

Use the exchange rate saved on this cart.

invoice_id?string

Use the exchange rate saved on this invoice.

formatted?boolean

When true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.

Defaultfalse
show?string

Comma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

hide?string

Comma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

Response Body

The product's price in the currency.

application/json
  1. response

A product's price in one currency.

price?number

The price of one unit, in currency, at the quantity asked for (so a volume price applies). It is the price you set in that currency, or your default price converted at today's rate.

currency?string

The ISO 4217 code of the currency.

formatted?

Only present when you send formatted=true.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/fx/product?product_id=widget&currency=EUR'
Example Response
{  "price": 45.95,  "currency": "EUR"}