{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/traccar/json-schema/traccar-permission-schema.json",
  "title": "Permission",
  "description": "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 }",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/traccar-openapi.yaml#/components/schemas/Permission",
  "type": "object",
  "properties": {
    "userId": {
      "type": "integer",
      "format": "int64",
      "description": "User id, can be only first parameter"
    },
    "deviceId": {
      "type": "integer",
      "format": "int64",
      "description": "Device id, can be first parameter or second only in combination with userId"
    },
    "groupId": {
      "type": "integer",
      "format": "int64",
      "description": "Group id, can be first parameter or second only in combination with userId"
    },
    "geofenceId": {
      "type": "integer",
      "format": "int64",
      "description": "Geofence id, can be second parameter only"
    },
    "notificationId": {
      "type": "integer",
      "format": "int64",
      "description": "Notification id, can be second parameter only"
    },
    "calendarId": {
      "type": "integer",
      "format": "int64",
      "description": "Calendar id, can be second parameter only and only in combination with userId"
    },
    "attributeId": {
      "type": "integer",
      "format": "int64",
      "description": "Computed attribute id, can be second parameter only"
    },
    "driverId": {
      "type": "integer",
      "format": "int64",
      "description": "Driver id, can be second parameter only"
    },
    "managedUserId": {
      "type": "integer",
      "format": "int64",
      "description": "User id, can be second parameter only and only in combination with userId"
    },
    "commandId": {
      "type": "integer",
      "format": "int64",
      "description": "Saved command id, can be second parameter only"
    }
  }
}