Custom Records
Sonoran CAD allows you to access, create, update, and remove highly customize records and reports via API.
Record API Endpoints
All custom records and reports utilize the same common formatting. You can manage custom records via the endpoints shown below.
Retrieve Record Templates
Access your existing custom record types built from the CAD's custom record editor.
Get Record TemplatesCreate a New Record
Add a new custom record to your community.
New RecordEdit an Existing Record
Modify and update an existing record in your community.
Edit RecordRemove a Record
Remove an existing record from your community.
Remove RecordRecord Formatting
Custom records require a strict format with several dozen different data fields. Due to the complexity, it is highly recommended to create a new custom record template in the CAD UI, and then retrieve the record template for adding new records.
Record Type ID
This is a unique ID for this record type. It is highly recommended to get all of this data from an existing custom record template that you have created in the CAD.
Record Type
The record "type" is an enumerator used to distinguish the category of the custom record/report.
Enum
Description
2
Custom Warrant
3
Custom BOLO
4
Custom License
5
Custom Vehicle Registration
7
Custom Character
8
Custom Police Record
9
Custom Police Report
10
Custom Medical Record
11
Custom Medical Report
12
Custom Fire Record
13
Custom Fire Report
14
Custom DMV Record
15
Custom Law Record
16
Custom Law Report
The "Section" object contains all of the data for a custom record section. These objects are held in the sections array in the custom record object.
Category
The category field contains an enumerator representing the section type. These correspond to the custom or premade category types in the custom record editor.
Enum
Description
0
Custom
1
Flags
5
Speed
6
Charges
9
Linked Records
The field object contains all of the data for an individual custom record field. These objects are held in the fields array in the section object.
Type
INPUT
Standard Textbox
TEXTAREA
Multi-line Textbox
SELECT
Dropdown (Uses options array)
STATUS
DB Status Enums (See below)
DATE
Date Picker
TIME
Time Picker
IMAGE
Image URL Viewer/Uploader
CHECKBOXES
List of Checkboxes (Uses options array)
LABEL
Text Label
UNIT_NUMBER
Auto filled unit number
UNIT_NAME
Auto filled unit name
UNIT_RANK
Auto filled unit rank
UNIT_AGENCY
Auto filled unit agency
UNIT_DEPARTMENT
Auto filled unit department
UNIT_SUBDIVISION
Auto filled unit subdivision
UNIT_AGENCY_LOCATION
Auto filled unit agency location
UNIT_AGENCY_ZIP
Auto filled unit agency zip
UNIT_LOCATION
Auto filled unit location
Status
The STATUS field type is required for Vehicle Registration type records and provides additional optional functionality for BOLO and Warrant records. This status allows the database to search for BOLO/Warrant records that are open or closed, and vehicle registrations that are approved or pending in the DMV panel.
The STATUS field value contains an enumeration (integer) value as follows:
0
PENDING
ACTIVE
1
APPROVED
CLOSED
2
REJECTED
N/A
Mask
Masks can be used in a field to force a specific entry format
Ex: (###) ### - #### forces a phone number format.
Token
Description
#
Numeric
S
Letter A-Z
X
Alphanumeric
UID
The UID or "Unique ID" field helps internally map Database Merge fields.
In addition, a UID field with the value of "first" and "last" are required for the civilian records. A UID field of "plate" is required for a vehicle registration record. This is how the backend process determines searchable license plate and character name values.
When you create a custom record and add in a civilian or vehicle section, the imported section will keep the same UID fields. This is how data is mapped from a character or vehicle search and placed into a custom record.
Data
The data object stores detailed objects for pre-made section types. The data object type (charge, agency info, flags, etc.) stored can be determined by the parent section's category enumeration value. If the parent section's category is not 0 (Custom) then the section will contain a single field, with the data property containing the detailed object.
Ex: record.sections[index].fields[0].data object would contain agency information if the record.sections[index].category is 2 (Agency).
Last updated
Was this helpful?

