Markets
When selling to different countries and regions, you often manage translations and which currency should be displayed to users from those places. In Cevoid infrastructure, this is often referred to as Markets. We support all markets in Cevoid so that you can display the correct currency and language in all Cevoid widgets based on the user’s location.
The market model
The market data model contains essential information about an online store. This includes its short name, website address, language, country, and currency. It also includes settings that can be changed, like whether to show prices and how to display currency symbols.
Properties
- Name
shortId
- Type
- string
- Description
Unique identifier for the market.
- Name
title
- Type
- string
- Description
The title for the market.
- Name
domain
- Type
- string
- Description
The domain where this market is active.
- Name
default
- Type
- string
- Description
Determines if this market is used as fallback or not.
- Name
language
- Type
- string
- Description
The language for the market.
- Name
country
- Type
- string
- Description
The country for the market.
- Name
settings
- Type
- MarketSettings
- Description
Object containing currency display settings.
- Name
createdAt
- Type
- timestamp
- Description
Timestamp of when the market was created.
- Name
updatedAt
- Type
- timestamp
- Description
Timestamp of when the market was last updated.
MarketSettings
- Name
hidePrices
- Type
- boolean
- Description
Determines if prices should be hidden.
- Name
roundPrices
- Type
- boolean
- Description
Determines if prices should be rounded to nearest integer.
- Name
displayDecimals
- Type
- boolean
- Description
Determines if decimals should be displayed.
- Name
currencyPosition
- Type
- string
- Description
Determines if the currency symbol should be displayed before or after the price. The value can be
before
orafter
.
- Name
currencyDisplay
- Type
- string
- Description
Determines if the currency symbol should be displayed as a symbol or as the currency code.
- Name
decimalDelimiter
- Type
- string
- Description
Determines the character used to separate the integer and decimal parts of a price. The value can be
.
or,
.
- Name
thousandSeparator
- Type
- string
- Description
Determines the character used to separate groups of thousands in a price. The value can be
.
or,
.
- Name
unavailableProductBehaviour
- Type
- string
- Description
Determines how unavailable products should be displayed. The value can be
hide
,show_as_normal
orshow_as_unavailable
List all markets
This endpoint allows you to retrieve a paginated list of all your markets.
Optional attributes
- Name
skip
- Type
- integer
- Description
Define the number of markets to skip.
- Name
limit
- Type
- integer
- Description
Limit the number of markets returned.
Request
curl -G https://api.cevoid.com/v1/markets \
-H "x-api-key: {key}" \
-d skip=5 \
-d limit=10 \
Response
{
"count": 30,
"next": "https://api.cevoid.com/v1/markets?skip=15&limit=10",
"nodes": [
{
"shortId": "m-1234",
"title": "Market 1",
"domain": "https://store.com/en",
"default": true,
"language": "en",
"country": "USA",
"currency": "USD",
"settings": {
"hidePrices": false,
"roundPrices": false,
"displayDecimals": true,
"currencyPosition": "after",
"currencyDisplay": "€",
"decimalDelimiter": ".",
"thousandSeparator": ".",
"unavailableProductBehaviour": "hide"
},
"updatedAt": "2022-12-09T09:01:17.000Z",
"createdAt": "2022-12-09T09:01:17.000Z"
}
{
"shortId": "m-2344",
// ...
}
]
}
Retrieve a market
This endpoint allows you to retrieve a market by providing their short id. Refer to the list at the top of this page to see which properties are included with market objects.
Request
curl https://api.cevoid.com/v1/markets/m-1234 \
-H "x-api-key: {key}"
Response
{
"shortId": "m-1234",
"title": "Market 1",
"domain": "https://store.com/en",
"default": true,
"language": "en",
"country": "USA",
"currency": "USD",
"settings": {
"hidePrices": false,
"roundPrices": false,
"displayDecimals": true,
"currencyPosition": "after",
"currencyDisplay": "€",
"decimalDelimiter": ".",
"thousandSeparator": ".",
"unavailableProductBehaviour": "hide"
},
"updatedAt": "2022-12-09T09:01:17.000Z",
"createdAt": "2022-12-09T09:01:17.000Z"
}