Support

createClassification

View as Markdown

Create a new classification.

mutation

Requires commerce.tax:create.

Create a new classification.

metafields and references are optional — omit them. If you send metafields, 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 MutationCreateClassificationInput! required
    • label String! required — A label for display.
    • description String optional — A human-friendly description.
    • metafields [CreateMetafieldInput!] optional — Any metafields to be created and assigned to the new classification.
      • 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
    • name String optional — A unique human-friendly identifier. If omitted, a name will be generated from the label value.
    • references [CreateReferenceInput!] optional — Any references to be created and assigned to the new classification.
      • origin String! required — The origin of the reference.
      • value String! required — The value of the reference.

Possible returns

  • Classification Classification — A grouping of rates that share common taxation criteria.

Last updated on

How is this guide?