List all roles

GET /api/roles
<?xml version="1.0" encoding="UTF-8"?>
<roles type="array" page="1" per_page="100" total="2">

The list can be filtered with parameters:

GET /api/clients?name=Management

Shows all roles with the term “Management” in their name. It doesn’t matter if you use upper- or lowercase.
The following parameters can be used:

Parameter Description
name Name of the role

Show a specific role

GET /api/roles/{id}
<?xml version="1.0" encoding="UTF-8"?>
    <id type="integer">1</id>

Create a role

POST /api/roles
XML element Description Type Default value Mandatory
name Name of the role ALNUM yes
articles Access rights for articles (READ, UPDATE, DELETE) ENUM
clients Access rights for clients (READ, UPDATE, DELETE) ENUM
offers Access rights for estimates (READ, UPDATE, DELETE) ENUM
confirmations Access rights for confirmations (READ, UPDATE, DELETE) ENUM
invoices Access rights for invoices (READ, UPDATE, DELETE) ENUM
credit_notes Access rights for credit notes (READ, UPDATE, DELETE) ENUM
delivery_notes Access rights for delivery notes (READ, UPDATE, DELETE) ENUM
reminders Access rights for reminders (READ, UPDATE, DELETE) ENUM
settings_my_account Access rights for Settings > My account (UPDATE) ENUM
settings_documents Access rights for Settings > Documents (UPDATE) ENUM
settings_configuration Access rights for Settings > Configuration (UPDATE) ENUM
settings_administration Access rights for Settings > Administration (UPDATE) ENUM
settings_addons Access rights for Settings > Account-Add-Ons (UPDATE) ENUM
settings_my_addons Access rights for Settings > personal Add-Ons (UPDATE) ENUM

The access rights value can be:
– An empty value stands for no access rights

<?xml version="1.0" encoding="UTF-8"?>
    <id type="integer">123</id>

Edit role

PUT /api/roles/{id}

Delete role

DELETE /api/roles/{id}

You can only delete roles with no users assigned.