Customer roles, such as wholesale customers. Discounts and prices can target a role.
List roles
Returns the shop's customer roles, newest first.
query Parameters
limitThe number of items to return. Must be a decimal integer; any other value returns 400. There is no page size cap, but large pages take longer: follow the next link to read a long list.
offsetThe number of items to skip. Must be a decimal integer; any other value returns 400.
List roles › Responses
A page of roles.
Create a role
Creates a customer role. labels needs at least one element with a non-empty label.
Create a role › Request Body
nameThe role's internal name.
The display name per language. Each element needs a non-empty label.
codeYour own code for the role. null sets an empty string.
The description per language.
Create a role › Responses
The created role.
hrefThe URL of the request.
The role, as the only element.
Get a role
Returns one customer role.
path Parameters
role-idThe role's id.
Get a role › Responses
The role.
hrefThe URL of the request.
The role, as the only element.
Update a role
Updates the fields you send and keeps the others. In labels and descriptions, languages you leave out keep their stored values.
path Parameters
role-idThe role's id.
Update a role › Request Body
nameThe role's internal name.
codeYour own code for the role. null sets an empty string.
Display names to add or change, one element per language. Languages you leave out keep their stored values. A language the role has no label for yet needs a non-empty label.
Descriptions to add or change, one element per language.
Update a role › Responses
The updated role.
hrefThe URL of the request.
The role, as the only element.