LogoLogo
System status
Commerce API references
Commerce API references
  • Commerce API references
  • Warnings and error codes
    • Errors
    • Error codes
      • HTTP response status codes
      • Error format for Shopper APIs
      • Error codes for Shopper APIs
        • 400 Bad Request
        • 401 Unauthorized
        • 403 Forbidden
        • 404 Not Found
        • 405 Method Not Allowed
        • 409 Conflict
        • 412 Precondition Failed
        • 413 Payload Too Large
        • 500 Internal Server Error
      • Error format for Admin APIs
        • Async error objects
        • Sync error objects
        • Deployment objects
        • Warning objects
      • Error codes for Admin APIs
        • Error patterns
        • Supported image types
        • Asynchronous response error codes
        • Deployment error codes
        • Synchronous response error codes
  • Commerce API reference guide
    • API structure
      • API keys
      • Supported OAuth and Commerce API formats
      • Mini cart widget
      • Custom attributes
      • Fields used as keys
      • Fields and expand query parameters
      • Caching responses
      • CORS support
      • JSONP support
      • Transport
      • Service profiles
      • Supported protocols and formats
      • Elements
      • Rate limiting
      • Locale and currency
      • Exchange rate
      • Product identifier
      • Product external reference identifier (ERID)
      • Customer external reference identifier ERID
      • Cancel request process
      • Failover and redundancy
      • Troubleshooting API calls
    • Shopper APIs reference
      • Carts
        • Offers
          • Offer types
          • POP offers
          • Applied offers
          • Eligible offers
      • Orders
      • Returns
      • Links
    • Admin APIs reference
      • Subscriptions
      • Sites
      • Products
      • Live changes
      • Authorized shipping and billing countries
      • Merchandising
      • Disclosures
    • Glossary
Powered by GitBook
On this page
  1. Commerce API reference guide
  2. API structure

Locale and currency

Understand how to use locale and currency.

PreviousRate limitingNextExchange rate

Last updated 4 months ago

A locale designator combines the two-letter language code with the country code (for example, en-US). When you set up your store in , you specified a default locale. Your store automatically shows the language and currency of the default locale.

The currency is a designator that uses a to identify the currency.

When creating a shopper through Commerce API, the default locale and currency can be specified in the request body; if the locale and currency are not provided, it will use the default locale and currency for this shopper.

When creating a shopper through Commerce API, the default locale and currency can be specified in the request body; if the locale and currency are not provided, it will use the default locale and currency for this shopper.

{
  "shopper": {
    "username": "jswanson@digitalriver.com",
    "firstName": "Automation",
    "lastName": "Tester",
    "emailAddress": "jswanson@digitalriver.com",
    "password": "qwerasdf",
    "locale": "en_CH",
    "currency": "CHF",
    "sendmail": true,
    "sendEMail": true
  }
}

After the shopper adds a product to create a shopping cart, the locale and currency of the shopping cart will be the default for the current shopper's cart.

The shopper can update their default locale and currency for their current shopping cart by using the /shoppers/me endpoint.

ISO 639-1
ISO 3166-1 alpha-2
Global Commerce
three-letter currency code