Markets
Example models
public class MarketModel
{
public string MarketId { get; set; }
public bool IsEnabled { get; set; }
public string MarketName { get; set; }
public string MarketDescription { get; set; }
public string DefaultLanguage { get; set; }
public string DefaultCurrency { get; set; }
public IEnumerable<string> Languages { get; set; } = Enumerable.Empty<string>();
public IEnumerable<string> Currencies { get; set; } = Enumerable.Empty<string>();
public IEnumerable<string> Countries { get; set; } = Enumerable.Empty<string>();
public bool PricesIncludeTax { get; set; }
}
Get all markets
GET | episerverapi/commerce/markets | Get all markets |
Response
[
{
"MarketId" : "DEFAULT",
"IsEnabled" : true,
"MarketName" : "Default Market",
"MarketDescription" : "Default Market",
"DefaultLanguage" : "en",
"DefaultCurrency" : "USD",
"Languages" : [
"en"
],
"Currencies" : [
"USD"
],
"Countries" : [
"USA"
],
"PricesIncludeTax" : false
},
{
"MarketId" : "EU",
"IsEnabled" : false,
"MarketName" : "European Union",
"MarketDescription" : "",
"DefaultLanguage" : "en",
"DefaultCurrency" : "EUR",
"Languages" : [
"en"
],
"Currencies" : [
"EUR"
],
"Countries" : [],
"PricesIncludeTax" : false
},
{
"MarketId" : "InteTest",
"IsEnabled" : true,
"MarketName" : "Test Market",
"MarketDescription" : "",
"DefaultLanguage" : "en",
"DefaultCurrency" : "USD",
"Languages" : [
"en"
],
"Currencies" : [
"USD"
],
"Countries" : [],
"PricesIncludeTax" : false
},
{
"MarketId" : "US",
"IsEnabled" : false,
"MarketName" : "United States",
"MarketDescription" : "",
"DefaultLanguage" : "en",
"DefaultCurrency" : "USD",
"Languages" : [
"en"
],
"Currencies" : [
"USD"
],
"Countries" : [],
"PricesIncludeTax" : false
}
]
Get a specific market
GET | episerverapi/commerce/markets/{marketId} | Get a specific market |
Response
{
"MarketId" : "US",
"IsEnabled" : false,
"MarketName" : "United States",
"MarketDescription" : "",
"DefaultLanguage" : "en",
"DefaultCurrency" : "USD",
"Languages" : [
"en"
],
"Currencies" : [
"USD"
],
"Countries" : [],
"PricesIncludeTax" : false
}
Create market
POST | episerverapi/commerce/markets | Create market |
Body
{
"MarketId" : "US",
"IsEnabled" : false,
"MarketName" : "United States",
"MarketDescription" : "",
"DefaultLanguage" : "en",
"DefaultCurrency" : "USD",
"Languages" : [
"en"
],
"Currencies" : [
"USD"
],
"Countries" : [],
"PricesIncludeTax" : false
}
Response
{
"MarketId" : "US",
"IsEnabled" : false,
"MarketName" : "United States",
"MarketDescription" : "",
"DefaultLanguage" : "en",
"DefaultCurrency" : "USD",
"Languages" : [
"en"
],
"Currencies" : [
"USD"
],
"Countries" : [],
"PricesIncludeTax" : false
}
Update market
PUT | episerverapi/commerce/markets/{marketId} | Update market |
Body
{
"MarketId" : "US",
"IsEnabled" : false,
"MarketName" : "United States",
"MarketDescription" : "",
"DefaultLanguage" : "en",
"DefaultCurrency" : "USD",
"Languages" : [
"en"
],
"Currencies" : [
"USD"
],
"Countries" : [],
"PricesIncludeTax" : false
}
Response
200 No Content
Delete market
DELETE | episerverapi/commerce/markets/{marketId} | Delete market |
Response
{
"MarketId" : "US",
"IsEnabled" : false,
"MarketName" : "United States",
"MarketDescription" : "",
"DefaultLanguage" : "en",
"DefaultCurrency" : "USD",
"Languages" : [
"en"
],
"Currencies" : [
"USD"
],
"Countries" : [],
"PricesIncludeTax" : false
}
Updated over 1 year ago