createJurisdiction
View as MarkdownCreate a new jurisdiction.
mutation
Requires commerce.tax:create.
Create a new jurisdiction.
metafields is optional — omit it. If you send it, the array must be nonempty; [] is rejected. Prefer type: "string" (lowercase).Required headers
| Header | Required | Description |
|---|---|---|
x-store-id | Yes | ID of the store the operation targets. Omitting it returns HTTP 200 with a GraphQL error: extensions.code: "UNAUTHENTICATED". |
Go to Authentication for credential setup.
Arguments
inputMutationCreateJurisdictionInput!requiredcountryCodeString!required — The two-character ISO 3166-1 code that identifies the country or region.adminArea1Stringoptional — The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery.adminArea2Stringoptional — The city, town, or village. Smaller thanadminArea1.adminArea3Stringoptional — The sub-locality, suburb, neighborhood, or district. Smaller thanadminArea2.adminArea4Stringoptional — The neighborhood, ward, or district. Smaller thanadminArea3.metafields[CreateMetafieldInput!]optional — Any metafields to be created and assigned to the new jurisdiction.keyString!requirednamespaceString!requiredtypeString!required — Metafield value type. Prefer lowercase values such asstring. Catalog rejects uppercaseSTRING; Tax currently accepts both.valueString!required
postalCodeStringoptional — The postal code, which is the zip code or equivalent.
Possible returns
JurisdictionJurisdiction— A geographic area or "zone" in which a rate or set of rates applies.
Last updated on
How is this guide?