Anchor to marketRegionsCreatemarket
marketRegionsCreate
mutation
Requires for queries and both
as well as
for mutations.
Deprecated. This mutation is deprecated and will be removed in the future. Use `marketCreate` or `marketUpdate` instead.
Creates regions that belong to an existing market.
Anchor to Arguments
Arguments
- Anchor to marketIdmarket•
Id ID!required The ID of the market to add the regions to.
- Anchor to regionsregions•[Market
Region requiredCreate Input!]! The regions to be created.
Was this section helpful?
Anchor to MarketRegionsCreatePayload returnsMarketRegionsCreatePayload returns
- Anchor to marketmarket•
The market object.
- Anchor to userErrorsuser•
Errors [MarketUser non-nullError!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation marketRegionsCreate($marketId: ID!, $regions: [MarketRegionCreateInput!]!) {
marketRegionsCreate(marketId: $marketId, regions: $regions) {
market {
# Market fields
}
userErrors {
field
message
}
}
}
Input
{
"marketId": "gid://shopify/<objectName>/10079785100",
"regions": [
{
"countryCode": ""
}
]
}
{
"marketId": "gid://shopify/<objectName>/10079785100",
"regions": [
{
"countryCode": ""
}
]
}
input MarketRegionCreateInput {
countryCode: CountryCode!
}