check_items_billing
The check_items_billing function is used to check the current user’s access rights to items.
svc=core/check_items_billing¶ms={"items":[<long>],
"accessFlags":<long>,
"serviceName":"<text>"}
During the request processing, both available services and access rights to items are checked. If, for example, a user has access right to create reports in some resource, but has already reached the limit of allowed report templates according to the cost table, the resource is not shown in the result array.
Parameters
Name | Description |
---|---|
items | The array of item IDs. |
accessFlags | Access flags (described below). |
serviceName | The name of the service (see the get_account_data page). |
Returned result
[
<long> /* array of items that the user can access */
]
Possible error codes:
Code | Description |
---|---|
4 | Wrong input parameters. |
Access flags
General
Flag | Description |
---|---|
0x0001 | View object and its basic properties. |
0x0002 | View detailed object properties. |
0x0004 | Manage access to this object. |
0x0008 | Delete object. |
0x0010 | Rename object. |
0x0020 | View custom fields. |
0x0040 | Manage custom fields. |
0x0080 | Edit not mentioned properties. |
0x0100 | Change icon. |
0x0200 | Request reports and messages. |
0x0400 | Edit ACL-propagated objects. |
0x0800 | Manage object log. |
0x1000 | View admin fields. |
0x2000 | Manage admin fields. |
0x4000 | View and download files. |
0x8000 | Upload and delete files. |
Units and unit groups
Flag | Description |
---|---|
0x0000100000 | Edit connectivity settings (device type, unique ID, phone, access password, message validity filtration). |
0x0000200000 | Create, edit, and delete sensors. |
0x0000400000 | Edit counters. |
0x0000800000 | Delete messages. |
0x0001000000 | Send commands. |
0x0002000000 | Manage events. |
0x0004000000 | View connectivity settings (device type, unique ID, phone, access password, message validity filtration). |
0x0010000000 | View service intervals. |
0x0020000000 | Create, edit, and delete service intervals. |
0x0040000000 | Import messages. |
0x0080000000 | Export messages. |
0x0400000000 | View commands. |
0x0800000000 | Create, edit, and delete commands. |
0x4000000000 | Edit trip detector. |
0x8000000000 | Use unit in jobs, notifications, routes, retranslators. |
Users
Flag | Description |
---|---|
0x100000 | Manage user's access rights. |
0x200000 | Act on behalf of this user (create objects, log in, etc.). |
0x400000 | Change flags for given user (allows changing the additional properties of the user; see the update_user_flags function). |
Retranslators
Flag | Description |
---|---|
0x100000 | Edit retranslator properties including start/stop. |
0x200000 | Add or remove units from retranslator, change their UIDs. |
Resources (Accounts)
Flag | Description |
---|---|
0x0000000100000 | View notifications. |
0x0000000200000 | Create, edit, and delete notifications. |
0x0000001000000 | View geofences. |
0x0000002000000 | Create, edit, and delete geofences. |
0x0000004000000 | View jobs. |
0x0000008000000 | Create, edit, and delete jobs. |
0x0000010000000 | View report templates. |
0x0000020000000 | Create, edit, and delete report templates. |
0x0000040000000 | View drivers. |
0x0000080000000 | Create, edit, and delete drivers. |
0x0000100000000 | Manage account. |
0x0000200000000 | View orders. |
0x0000400000000 | Create, edit, and delete orders. |
0x0000800000000 | View passengers. |
0x0001000000000 | Create, edit, and delete passengers. |
0x0100000000000 | View trailers. |
0x0200000000000 | Create, edit, and delete trailers. |
Routes
Flag | Description |
---|---|
0x0000000100000 | Edit route properties. |
Other
Flag | Description |
---|---|
0xfffffffffffffff | Gives full access rights to an object. |