Skip to main content

suggestBrandCode

Requires at least one of the permissions products:brand:create or products:brand:update.

Suggests an unused brand code for a brand name: the name upper-cased with punctuation dropped and spaces turned into underscores, numbered (_2, _3…) when a brand in your organization already uses it. Only a suggestion — creating the brand still refuses a code that is taken. Needs the brands create or update permission.

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:

query SuggestBrandCode($name: String!) {
suggestBrandCode(name: $name)
}

Variables:

{
"name": "string"
}

Response:

{
"data": {
"suggestBrandCode": "string"
}
}
suggestBrandCode(
name: String!
): String!

Arguments​

suggestBrandCode.name ● String! non-null scalar​

The brand name to build the code 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.