List all roles

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

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:

ParameterDescription
nameName of the role

Show a specific role

GET /api/roles/{id}
<?xml version="1.0" encoding="UTF-8"?>
<role>
    <id type="integer">1</id>
    <name>Master</name>
    <articles>DELETE</articles>
    <clients>DELETE</clients>
    <offers>DELETE</offers>
    <confirmations>DELETE</confirmations>
    <invoices>DELETE</invoices>
    <credit_notes>DELETE</credit_notes>
    <delivery_notes>DELETE</delivery_notes>
    <reminders>DELETE</reminders>
    <settings_my_account>UPDATE</settings_my_account>
    <settings_documents>UPDATE</settings_documents>
    <settings_configuration>UPDATE</settings_configuration>
    <settings_administration>UPDATE</settings_administration>
    <settings_addons>UPDATE</settings_addons>
    <settings_my_addons>UPDATE</settings_my_addons>
</role>

Create a role

POST /api/roles
XML elementDescriptionTypeDefault valueMandatory
nameName of the roleALNUMyes
articlesAccess rights for articles (READ, UPDATE, DELETE)ENUM
clientsAccess rights for clients (READ, UPDATE, DELETE)ENUM
offersAccess rights for estimates (READ, UPDATE, DELETE)ENUM
confirmationsAccess rights for confirmations (READ, UPDATE, DELETE)ENUM
invoicesAccess rights for invoices (READ, UPDATE, DELETE)ENUM
credit_notesAccess rights for credit notes (READ, UPDATE, DELETE)ENUM
delivery_notesAccess rights for delivery notes (READ, UPDATE, DELETE)ENUM
remindersAccess rights for reminders (READ, UPDATE, DELETE)ENUM
settings_my_accountAccess rights for Settings > My account (UPDATE)ENUM
settings_documentsAccess rights for Settings > Documents (UPDATE)ENUM
settings_configurationAccess rights for Settings > Configuration (UPDATE)ENUM
settings_administrationAccess rights for Settings > Administration (UPDATE)ENUM
settings_addonsAccess rights for Settings > Account-Add-Ons (UPDATE)ENUM
settings_my_addonsAccess rights for Settings > personal Add-Ons (UPDATE)ENUM

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

<role>
    <name>trainee</name>
    <articles>READ</articles>
    <offers>UPDATE</offers>
</role>
<?xml version="1.0" encoding="UTF-8"?>
<role>
    <id type="integer">123</id>
    <name>trainee</name>
    <articles>READ</articles>
    <clients></clients>
    <offers>UPDATE</offers>
    <confirmations></confirmations>
    <invoices></invoices>
    <credit_notes></credit_notes>
    <delivery_notes></delivery_notes>
    <reminders></reminders>
    <settings_my_account></settings_my_account>
    <settings_documents></settings_documents>
    <settings_configuration></settings_configuration>
    <settings_administration></settings_administration>
    <settings_addons></settings_addons>
    <settings_my_addons></settings_my_addons>
</role>

Edit role

PUT /api/roles/{id}
<role>
    <name>Manager</name>
</role>

Delete role

DELETE /api/roles/{id}

You can only delete roles with no users assigned.