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>
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 |
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>
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:
– 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>
PUT /api/roles/{id}
<role> <name>Manager</name> </role>
DELETE /api/roles/{id}
You can only delete roles with no users assigned.