Product Price

Get converted product prices in selected currency

E-commerce brands can use the product price endpoint to request product prices in the currency of their choosing. API details:

  • Exchange rates are updated 1/day to ensure product price stability through the day. Brands can also choose to configure static exchange rates of their choosing.
  • Product prices are rounded to 0 decimal places by default, but can be customized on a per currency basis.
  • Product prices use a default display format, but can be customized on a per currency basis.
post/product-price

Request

  • Base URL: https://api-stg.passportshipping.com/custom/v1
  • URL: https://api-stg.passportshipping.com/custom/v1/product-price
  • Auth: none declared

Request body

base_currencystring required

Currency code of currency to convert from (brand's store currency)

presentment_currencystring required

Currency code of currency to convert to

countrystring required

Country ISO2 code the presentment_currency belongs to

Example request

{
  "base_currency": "USD",
  "presentment_currency": "CAD",
  "country": "CA",
  "values": [
    {
      "reference": "Product_1_USD_CAD",
      "value": 1
    },
    {
      "reference": "Product_2_USD_CAD",
      "value": 2.35
    }
  ]
}

Response

Successful response with converted product prices

base_currencystring required

Currency to convert from (brand's store currency)

presentment_currencystring required

Currency to convert to

currency_symbolstring required

Currency symbol

currency_codestring required

Currency code

currency_textstring required

Currency name

countrystring required

Country ISO2 code that presentment_currency belongs to

Example response

{
  "base_currency": "USD",
  "presentment_currency": "CAD",
  "currency_symbol": "CAD",
  "currency_code": "CAD",
  "currency_text": "Canadian Dollar",
  "country": "CA",
  "converted_values": [
    {
      "reference": "Product_1_USD_CAD",
      "value": 1,
      "converted_value": "1.31234",
      "conversion_rate": "1.31234",
      "converted_value_with_fee": "1.44357",
      "conversion_fee": "0.1",
      "converted_value_with_fee_rounded": "1.44",
      "converted_value_formatted": "1.44 CAD"
    },
    {
      "reference": "Product_2_USD_CAD",
      "value": 2.35,
      "converted_value": "3.08400",
      "conversion_rate": "1.31234",
      "converted_value_with_fee": "3.39240",
      "conversion_fee": "0.1",
      "converted_value_with_fee_rounded": "3.39",
      "converted_value_formatted": "3.39 CAD"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.