GraphQL CreateMarket "message": "Can't have more than 50 markets."

ShamiqTheDev
Shopify Partner
5 0 0

Hello,

 

I am unable to create the market after deleting it.

I am using the "/admin/api/2022-04/graphql.json" version of GraphQL API.

 

This is the mutation:

 

 

mutation CreateMarket($input: MarketCreateInput!) {
  marketCreate(input: $input) {
    market {
      id
      name
    }
    userErrors {
      field
      message
    }
  }
}

 

 

 

And this is the Input:

 

 

{
  "input": {
    "enabled": true,
    "name": "BH",
    "regions": [
      {
        "countryCode": "BH"
      }
    ]
  }
}

 

 

 

 And this is the response:

 

 

{
    "data": {
        "marketCreate": {
            "market": null,
            "userErrors": [
                {
                    "field": [
                        "input"
                    ],
                    "message": "Can't have more than 50 markets."
                }
            ]
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 10,
            "actualQueryCost": 10,
            "throttleStatus": {
                "maximumAvailable": 2000.0,
                "currentlyAvailable": 1990,
                "restoreRate": 100.0
            }
        }
    }
}

 

 

 

Is anyone is facing the same? Also please share the solution as well, much appreciated.

Kind Regards,

Muhammad Shamiq Hussain
Sr. Engineer
Engineering
Gaditek
Reply 1 (1)
KB77
Shopify Staff
Shopify Staff
59 5 11

hi @ShamiqTheDev . There is currently a limitation of 50 Markets on a store. It may be reviewed later if stores appear to require more than 50 markets. However the expectation is that when using Regions and Country Codes to create markets it should not require more than 50 for merchants. The marketDelete mutation should help you to reduce markets if you have hit the limit. 

KB77 | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog