Support

createJurisdiction

View as Markdown

Create 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

HeaderRequiredDescription
x-store-idYesID 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

  • input MutationCreateJurisdictionInput! required
    • countryCode String! required — The two-character ISO 3166-1 code that identifies the country or region.
    • adminArea1 String optional — The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery.
    • adminArea2 String optional — The city, town, or village. Smaller than adminArea1.
    • adminArea3 String optional — The sub-locality, suburb, neighborhood, or district. Smaller than adminArea2.
    • adminArea4 String optional — The neighborhood, ward, or district. Smaller than adminArea3.
    • metafields [CreateMetafieldInput!] optional — Any metafields to be created and assigned to the new jurisdiction.
      • key String! required
      • namespace String! required
      • type String! required — Metafield value type. Prefer lowercase values such as string. Catalog rejects uppercase STRING; Tax currently accepts both.
      • value String! required
    • postalCode String optional — The postal code, which is the zip code or equivalent.

Possible returns

  • Jurisdiction Jurisdiction — A geographic area or "zone" in which a rate or set of rates applies.

Last updated on

How is this guide?