# Permission

Type: Permission

This is a permission map that contain two object indexes. It is used to link/unlink objects. Order is important. Example: { deviceId:8, geofenceId: 16 }

Schema: [Permission](https://sourcey-traccar.pages.dev/api-reference/models/permission/index.md)

- `userId` (optional)
  Type: integer, int64
  
  User id, can be only first parameter

- `deviceId` (optional)
  Type: integer, int64
  
  Device id, can be first parameter or second only in combination with userId

- `groupId` (optional)
  Type: integer, int64
  
  Group id, can be first parameter or second only in combination with userId

- `geofenceId` (optional)
  Type: integer, int64
  
  Geofence id, can be second parameter only

- `notificationId` (optional)
  Type: integer, int64
  
  Notification id, can be second parameter only

- `calendarId` (optional)
  Type: integer, int64
  
  Calendar id, can be second parameter only and only in combination with userId

- `attributeId` (optional)
  Type: integer, int64
  
  Computed attribute id, can be second parameter only

- `driverId` (optional)
  Type: integer, int64
  
  Driver id, can be second parameter only

- `managedUserId` (optional)
  Type: integer, int64
  
  User id, can be second parameter only and only in combination with userId

- `commandId` (optional)
  Type: integer, int64
  
  Saved command id, can be second parameter only