Skip to main content

Importing Values

When importing values, you should make sure you're sending the correct data. Below you can see all possible types that can be imported and what data they require.

GENDER, ETHNICITY, BLOOD_GROUP, IMPOUND_LOT, LICENSE, VEHICLE_FLAG and OFFICER_RANK

Example URL: https://api.example.com/v1/admin/values/license or https://api.example.com/v1/admin/values/gender, etc.

Example Object

  • value: the name of the value. This will be displayed to the user.

Note: You cannot mix these, it must always be 1 type.

[
{
"value": "Male"
},
{
"value": "Female"
},
{
"value": "Other"
}
]

VEHICLE and WEAPON

Example URL: https://api.example.com/v1/admin/values/vehicle.

Example Object

  • value: the name of the car. This will be displayed to the user
  • hash: this is the game hash, optional.
[
{
"value": "My Car",
"hash": "my_car"
}
]

CODES_10

Example URL: https://api.example.com/v1/admin/values/codes_10.

Example Object

  • value: the name of the 10 code. This will be displayed to the user.
  • shouldDo: What the 10 code should do, must match: SET_OFF_DUTY, SET_ON_DUTY, SET_ASSIGNED, SET_STATUS or PANIC_BUTTON
  • type: The type of the 10 code, must match: STATUS_CODE or SITUATION_CODE.
  • color: The color of the 10 code, optional.
[
{
"value": "10-8",
"shouldDo": "SET_ON_DUTY",
"type": "STATUS_CODE"
},
{
"value": "10-42",
"shouldDo": "SET_OFF_DUTY",
"type": "STATUS_CODE"
},
{
"value": "10-6",
"shouldDo": "SET_STATUS",
"type": "STATUS_CODE"
}
]

DEPARTMENT

Example URL: https://api.example.com/v1/admin/values/department.

Example Object

  • value: the name of the department. This will be displayed to the user.
  • callsign: The callsign symbol of the department, optional.
  • type: The type of the department, must match LEO or EMS_FD
[
{
"value": "LSPD",
"type": "LEO"
},
{
"value": "LSFD",
"type": "EMS_FD"
},
{
"value": "SAPR",
"type": "LEO"
}
]

PENAL_CODE

Example URL: https://api.example.com/v1/admin/values/penal_code.

Example Object

  • title: The title of the penal-code
  • description: The description of the penal-code.
  • warningApplicable: whether there's a warning applicable
  • fines: an array of numbers with length 2 with a minimum and maximum fine.
  • bail: an array of numbers with length 2 with a minimum and maximum bail. (warningApplicable must be false)
  • prisonTerm: an array of numbers with length 2 with a minimum and maximum jail time. (warningApplicable must be false)
  • groupId: the id of the wanted group
[
{
"title": "Testing",
"description": "Hello world from 'Testing'!",
"warningApplicable": true,
"fines": [250, 250],
"prisonTerm": null,
"bail": null,
"groupId": null
},
{
"title": "Testing",
"description": "Hello world from 'Testing'!",
"warningApplicable": false,
"fines": [250, 250],
"prisonTerm": [40, 80],
"bail": [6000, 35000]
}
]

Citizens

Example URL: https://api.example.com/v1/admin/import/citizens.

Example Object

  • name: the first name of the citizen.
  • surname: The last name of the citizen
  • dateOfBirth: The date of birth. format: YYYY-MM-DD (eg: 1980-02-22)
  • gender: The id of the wanted gender. This id can be fetched via the API.
  • ethnicity: The id of the wanted ethnicity. This id can be fetched via the API.
  • hairColor, eyeColor, address, weight and height are also supported but not required. All are a string with max 255 characters.
  • driversLicenseId, weaponLicenseId, pilotLicenseId, ccwId: The id of the wanted license. This id can be fetched the API. (Optional)
  • driversLicenseCategoryIds, pilotLicenseCategoryIds: An array of ids of the wanted license category. This id can be fetched via the API. (Optional)
[
{
"name": "John",
"surname": "Doe",
"gender": "ckyr9porq0056heo7yy9r5y0w",
"ethnicity": "ckyr9pt6u0122heo71uazokcz",
"dateOfBirth": "2022-01-04",
"hairColor": "Orange",
"eyeColor": "Green",
"weight": null,
"height": null,
"driversLicenseCategoryIds": ["xxxxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxx"],
"driversLicenseId": "xxxxxxxxxxxxxxxxxxxx"
}
]

Vehicles (Registered)

(Registered Vehicles)

Example URL: https://api.example.com/v1/admin/import/vehicles.

Example Object

  • plate: The plate of the vehicle. The API will throw an error if there is a duplicate plate found.
  • ownerId: the id of the owner (citizen's id). This id can be fetched via the API.
  • modelId: The id of the wanted model. This id can be fetched via the API.
  • registrationStatusId: The id of the wanted registration status (License Value). This id can be fetched via the API.
  • color: string, max 255 characters.
[
{
"plate": "coolkids",
"ownerId": "ckz5sdu7h0276idlpg52fje0f",
"modelId": "ckz5se6va0458idlpg24lzp6u",
"registrationStatusId": "ckz5lvsxh0227cpo0q9wyo5j4",
"color": "white"
}
]

Weapons (Registered)

(Registered Weapons)

Example URL: https://api.example.com/v1/admin/import/weapons.

Example Object

  • ownerId: the id of the owner (citizen's id).
  • modelId: The id of the wanted model. This id can be fetched via the API.
  • registrationStatusId: The id of the wanted registration status (License Value). This id can be fetched via the API.
[
{
"ownerId": "ckz5sdu7h0276idlpg52fje0f",
"modelId": "ckz5se6va0458idlpg24lzp6u",
"registrationStatusId": "ckz5lvsxh0227cpo0q9wyo5j4"
}
]

Was this page helpful?