Get a role
Gets one role. A role of the other mode is not found (404).
Secret and trusted tokens may call this with the roles read permission.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
role_id*stringThe role's role_id.
formatted?booleanWhen true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.
falseshow?stringComma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
hide?stringComma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
timezone?stringAn IANA time zone name, such as America/New_York or UTC. It sets how date_start and date_end are read and the time zone of every date in the response. The default is the account's time zone (Settings, Technical), or UTC when it has none. A name that is not known is a 400.
The role.
application/json- response
A named set of permissions that you give to users and secret tokens. Roles are kept per mode: a test token sees only test roles.
object?"role"The object type. Always role.
"role"url?stringThe URL of this role.
urirole_id?stringThe role's ID. You may choose it when you create the role. Otherwise it is made from the name, in lower case with dashes for spaces.
date_created?stringWhen the role was created.
date-timedate_modified?stringWhen the role was last changed.
date-timetest?booleanTrue for a test role.
account_id?stringThe account the role belongs to.
name?stringThe role's name.
length <= 25comments?|Your own notes about the role.
length <= 150permission_type?|An older label kept for roles that have one. Comecero does not use it.
permissions?array<>The permissions the role gives.
formatted?Display text for the dates. Only present when you send formatted=true.
curl -X GET 'https://api.comecero.com/api/v1/roles/support'{ "object": "role", "url": "https://api.comecero.com/api/v1/roles/support", "role_id": "support", "date_created": "2026-10-01T14:36:52Z", "date_modified": "2026-10-01T14:36:52Z", "test": true, "account_id": "AB1234", "name": "Support", "comments": "Can look up and update orders and customers.", "permission_type": null, "permissions": [ { "resource": "orders", "methods": [ "read", "update" ], "allow": true }, { "resource": "customers", "methods": [ "read" ], "allow": true } ]}Create a role POST
Creates a role in the mode of the token you call with. Give it to users and secret tokens through their `roles` list. Secret and trusted tokens may call this with the `roles` create permission.
Delete a role DELETE
Deletes a role. Users and tokens that list it keep the `role_id` but no longer get its permissions. Secret and trusted tokens may call this with the `roles` delete permission.