Skip to main content

Market types

Note

Not all merchant stores are eligible for the new markets experience. As an app developer, you must check if the shop is onboarded on the new markets experience before you can use the new marketCreate and marketUpdate mutations.


A region market is composed of one or more regions.

Only one market with the same set of regions can be active at a time.

The following example shows how to create a region market for the United States, Canada, and Mexico.

POST https://{shop}.myshopify.com/api/{api_version}/graphql.json

Create a market for North America

mutation CreateNorthAmericaMarket {
marketCreate(input: {
name: "North America",
status: "ACTIVE",
conditions: {
regionsCondition: {
regions: [
{
countryCode: "US"
},
{
countryCode: "CA"
},
{
countryCode: "MX"
}
]
}
}
}) {
market {
id
name
conditions {
conditionTypes
regionsCondition {
applicationLevel
regions(first: 10) { nodes { id name } }
}
}
}
userErrors { field code message }
}
}

JSON response

{
"marketCreate": {
"market": {
"id": "gid://shopify/Market/1",
"name": "North America",
"type": "REGION",
"status": "ACTIVE",
"handle": "north-america",
"conditions": {
"conditionTypes": [
"REGION"
],
"regionsCondition": {
"regions": {
"edges": [
{
"node": {
"id": "gid://shopify/MarketRegionCountry/35486695446",
"name": "United States",
}
}
{
"node": {
"id": "gid://shopify/MarketRegionCountry/3260461842454",
"name": "Canada",
}
}
{
"node": {
"id": "gid://shopify/MarketRegionCountry/35491512342",
"name": "Mexico",
}
}
]
},
"applicationLevel": "SPECIFIED",
"__typename": "RegionsCondition"
}
}
}
"userErrors": [],
"__typename": "MarketCreatePayload"
}
}

Anchor to Location and Company location marketsLocation and Company location markets

A company location market is a market that targets B2B buyers. A location market targets a specific POS location.

The company location (B2B) and location (retail) markets can target specific locations, or all locations in a region.

Anchor to Specific company location or location marketsSpecific company location or location markets

The following example shows how to create a market for specific company locations.

POST https://{shop}.myshopify.com/api/{api_version}/graphql.json

Create a market for specific company locations

mutation CreateACMECompanyLocationsMarket {
marketCreate(
input: {
name: "ACME Locations",
status: "ACTIVE",
conditions: {
companyLocationsCondition: {
companyLocationIds: [
"gid://shopify/CompanyLocation/2820014102",
"gid://shopify/CompanyLocation/2445639702"
]
}
}
}
) {
market {
id
name
conditions {
conditionTypes
companyLocationsCondition {
companyLocation
applicationLevel
companyLocations(first: 10) { nodes { id name } }
}
}
}
userErrors { field code message }
}
}

JSON response

{
"marketCreate": {
"market": {
"id": "gid://shopify/Market/89508184086",
"name": "ACME Locations",
"conditions": {
"conditionTypes": [
"COMPANY_LOCATION"
],
"companyLocationsCondition": {
"applicationLevel": "SPECIFIED",
"companyLocations": {
"edges": [
{
"node": {
"id": "gid://shopify/CompanyLocation/2820014102",
"name": "6660 Kennedy Road",
}
},
{
"node": {
"id": "gid://shopify/CompanyLocation/2445639702",
"name": "7389 Lundy's Lane",
}
}
]
}
}
}
},
"userErrors": [],
}
}

Anchor to Using wildcards in markets for all company locations or locations in a regionUsing wildcards in markets for all company locations or locations in a region

Company location (B2B) or location (retail) markets can target all locations within a region. Newly created locations are automatically added to this type of market if they are part of that region

Note

A maximum of 100 total wildcard markets is enforced for each shop, regardless of the market type.

The following example shows how to create a market for all POS locations in Canada. Anytime a new POS location is created in Canada, it is automatically added to this market.

POST https://{shop}.myshopify.com/api/{api_version}/graphql.json

Create a Canada retail market

mutation CreateRetailCanada {
marketCreate(input: {
name: "Canada Retail",
conditions: {
locationsCondition: {
applicationLevel: ALL
}
regionsCondition: {
regions: [{
countryCode: CA
}]
}
}
}) {
market {
id
name
conditions {
conditionTypes
regionsCondition {
applicationLevel
regions(first: 10) { nodes { id name } }
}
locationsCondition {
applicationLevel
locations(first: 10) { nodes { id name } }
}
}
}
userErrors { field code message }
}
}

JSON response

{
"data": {
"marketCreate": {
"market": {
"id": "gid://shopify/Market/1",
"name": "Canada Retail",
"conditions": {
"conditionTypes": [
"LOCATION",
"REGION"
],
"regionsCondition": {
"applicationLevel": "SPECIFIED",
"regions": {
"edges": [
{
"node": {
"id": "gid://shopify/MarketRegionCountry/1",
"name": "Canada"
}
}
]
}
},
"locationsCondition": {
"applicationLevel": "ALL",
"locations": {
"edges": []
}
}
}
},
"userErrors": []
}
}
}


Was this page helpful?