createClassification
View as MarkdownCreate 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
| 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
inputMutationCreateClassificationInput!requiredlabelString!required — A label for display.descriptionStringoptional — A human-friendly description.metafields[CreateMetafieldInput!]optional — Any metafields to be created and assigned to the new classification.keyString!requirednamespaceString!requiredtypeString!required — Metafield value type. Prefer lowercase values such asstring. Catalog rejects uppercaseSTRING; Tax currently accepts both.valueString!required
nameStringoptional — A unique human-friendly identifier. If omitted, a name will be generated from thelabelvalue.references[CreateReferenceInput!]optional — Any references to be created and assigned to the new classification.originString!required — The origin of the reference.valueString!required — The value of the reference.
Possible returns
ClassificationClassification— A grouping of rates that share common taxation criteria.
Last updated on
How is this guide?