Currency

The Currency API endpoints allow fetching supported currencies from a store.

Gets all the Currencies in a Store

GET/umbraco/commerce/storefront/api/v1/currencies
Query parameters
Header parameters
Response

Success

Body
idstring (uuid)
codestring
namenullable string
culturenullable string
formatTemplatenullable string
allowedCountriesnullable array of AllowedCountryDto (object)
Request
const response = await fetch('/umbraco/commerce/storefront/api/v1/currencies', {
    method: 'GET',
    headers: {
      "Api-Key": "text",
      "Store": "text"
    },
});
const data = await response.json();
Response
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "code": "text",
    "name": "text",
    "culture": "text",
    "formatTemplate": "text",
    "allowedCountries": [
      {
        "country": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "code": "text"
        }
      }
    ]
  }
]

Gets a Currency by ID or Alias

GET/umbraco/commerce/storefront/api/v1/currency/{idOrAlias}
Path parameters
idOrAlias*string

The ID or the alias of the given resource

Query parameters
Header parameters
Response

Success

Body
idstring (uuid)
codestring
namenullable string
culturenullable string
formatTemplatenullable string
allowedCountriesnullable array of AllowedCountryDto (object)
Request
const response = await fetch('/umbraco/commerce/storefront/api/v1/currency/{idOrAlias}', {
    method: 'GET',
    headers: {
      "Api-Key": "text",
      "Store": "text"
    },
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "code": "text",
  "name": "text",
  "culture": "text",
  "formatTemplate": "text",
  "allowedCountries": [
    {
      "country": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "code": "text"
      }
    }
  ]
}

Last updated