Skip to main content

generateBarcode

Requires permission products:product:update.

Generates an EAN-13 barcode number from a SKU. The same SKU always gives the same number, and nothing is stored. Requires permission to update products.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation GenerateBarcode($sku: String!) {
generateBarcode(sku: $sku)
}

Variables:

{
"sku": "string"
}

Response:

{
"data": {
"generateBarcode": "string"
}
}
generateBarcode(
sku: String!
): String!

Arguments​

generateBarcode.sku ● String! non-null scalar​

The SKU to derive the barcode from.

Type​

String scalar​

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.