LogoLogo
SupportServer Hosting
  • Sonoran CAD
  • 📱Download The App
    • Steam Browser - Workaround
    • Web Browser - Clear Cache
    • Desktop App - Clear Cache
    • GTA RP Tablet - Clear Cache
    • Steam Browser - Clear Cache
  • Why Choose Sonoran CAD?
    • 🏆Why Choose Sonoran CAD?
  • Other Products
    • 🖥️FiveM Hosting
    • 📝Sonoran CMS
    • 📡Sonoran Radio
  • Tutorials
    • Getting Started
      • Registering Your Account
      • Registering Your Community
      • Inviting Users to Your CAD
      • Granting Account Permissions
      • View Your Limits
      • Community ID and API Keys
      • Troubleshooting
    • Customization
      • Custom Domain & Login Page
      • Customizing Your Layout
      • Community Branding and Settings
      • Creating Custom Record and Report Types
      • Sharing Custom Records
      • Custom Search Types
      • Geographical Settings
      • Penal Codes
      • 10-Codes
      • Addresses and Street Names
      • Unit Status Codes
      • Tone Board
      • Custom Audio Notifications
      • Custom Emails
      • Quick Links
      • Custom Page Colors
      • User Account Restrictions
      • Configuring Multiple Servers
      • Advanced Query Strings
    • Dispatching
      • Creating a Call
      • Self Dispatch
      • Timers
      • Command Line Interface (CLI)
    • Records Management
      • Record Lookups
      • Adding a Record
      • PDF Records
      • Scene Diagram Builder
    • Administration
      • System Logs
      • Remove User Account
      • Deleting or Transferring your CAD
    • Other Features
      • Configurable Hotkeys
      • Voice Commands
      • Volume and Language
  • Integration Capabilities
    • 🗃️Paid Integration Resources
      • Mobile Command Center
      • ATM Robbery
      • In-Vehicle Radar
      • Evidence Camera
      • Power Grid
      • Speed Cameras
      • Shot Spotter
    • 🛠️Integrated Vendors
    • 📺Twitch Bodycam, Bot, & Lighting Integration
    • Database Sync and Merge
      • Database Sync Credentials
      • QB Core Mapping Tutorial
      • Troubleshooting
    • Discord Bot Integration
    • Discord Rich Presence
    • Discord Webhooks
    • TeamSpeak 3 Integration
    • Stream Deck Integration
    • 🎮FiveM
      • FiveM Installation
        • Submodule Configuration
          • Submodule Troubleshooting
          • Submodule Configuration Updates
        • FiveM Submodules
          • Body Camera
          • Call Commands
          • Check API ID
          • Civilian Integration
          • Dispatch Notify
          • Emergency Response Simulator (ERS)
          • Framework Support (ESX/QBCore) and Auto Fines
          • FivePD
          • ForceReg
          • Kick
          • Locations
          • Live Map
          • Lookups
          • Postals
          • Smart Signs
          • Sonoran Radio (sonrad)
          • Station Alert
          • Tablet & Mini-CAD
          • TeamSpeak 3
          • Traffic Stop
          • Unit Status
          • VehReg
          • WraithV2
      • FiveM Development Documentation
        • Client Functions
        • Shared Functions
        • Server Functions
        • Server Events
        • HTTP Request Handling
      • Error Codes
    • 🎮Roblox ER:LC
  • Developer API Documentation
    • 📖API Integration
      • Getting Started
        • Retrieving Your Credentials
        • Integration API ID
        • Account Secret ID
      • Push Events
        • Event Restrictions
        • Record Events
          • Record Added
          • Record Edited
          • Record Removed
        • Unit Events
          • Unit Panic
          • Unit Login
          • Unit Logoff
          • Unit Status Update
          • Unit Group Name Change
          • Unit Group Add
          • Unit Group Remove
        • Dispatch Events
          • New Dispatch
          • Modified Dispatch
          • Closed Dispatch
          • Dispatch Note
          • Attach Unit
          • Detach Unit
          • Toggle Bodycam
        • Event 911
        • Remove 911
        • Sign Updated
        • Tone Played
        • Civilian
          • Character Selected
        • ERS
          • New Callout
        • Station Alert
          • New Station Alert
      • API Endpoints
        • API Restrictions
        • Emergency
          • Identifiers
            • Get Identifiers
            • Modify Identifier
            • Set Identifier
            • Unit Panic
            • Kick Unit
            • Unit Status
            • Get Active Units
            • Update Unit Location
          • Dispatch and Emergency Calls
            • Get Calls
            • New Dispatch
            • Attach Unit
            • Detach Unit
            • Update Call Postal
            • Add Call Note
            • Update Call Primary
            • Close Dispatch
            • New 911 Call
            • Remove 911
          • Custom Blips
            • Get Map Blips
            • Add Blip
            • Modify Blip
            • Remove Blip
          • Street Signs
            • Set Street Sign Config
            • Update Street Sign
          • ERS
            • Set Available Callouts
          • Station Alert
            • Set Stations
        • Civilian
          • Set Character
          • Get Characters
          • New Character
          • Edit Character
          • Remove Character
          • DB Sync: Get Character Links
          • DB Sync: Link Character
        • General
          • Get Servers
          • Set Servers
          • Get Version
          • Set Penal Codes
          • Set API IDs
          • Custom Records
            • API Options for Adding and Modifying Records
            • Get Record Templates
            • New Record
            • Edit Record
            • Remove Record
          • Lookup By Value
          • Lookup Name or Plate
          • Get Account
          • Get Accounts
          • Check API ID
          • Apply Permission Key
          • Modify Account Permissions
          • Kick or Ban User
          • Verify Secret
          • Auth Street Signs
          • Set Postal Config
          • Set Clock Time
          • Send Photo
          • Leave Community
          • Join Community
        • Local Endpoints
          • Smart Lighting
        • Internal
          • FiveM Download
      • API Examples
        • Emergency
          • LUA Examples
            • Dispatch and Emergency Calls
              • New 911 Call
              • Remove 911
              • Add Call Note
              • Set Call Postal
            • Custom Blips
              • Add Blip
              • Add Blips
              • Add Temp Blip
              • Get Map Blips
              • Remove Blip
              • Remove Blip With Subtype
            • General
              • Lookup Name or Plate
          • JavaScript Examples
            • Dispatch and Emergency Calls
              • New 911 Call
              • Remove 911
              • Add Call Note
              • Set Call Postal
            • Custom Blips
              • Add Blip
              • Add Blips
              • Add Temp Blip
              • Get Map Blips
              • Remove Blip
              • Remove Blip With Subtype
            • General
              • Lookup Name or Plate
      • Development Branch
    • 💵Developer Bounties
    • 🌎Translation Support
  • Pricing
    • Pricing FAQ
      • Military and First Responder Discount
      • Expert Installation
      • Accessing the Payment Center
      • Create and Manage a Subscription
      • Request Discord Role
    • View and Compare Plans
  • Roadmap
    • 📋Changelog
  • Other
    • AI QA
    • Contact Us
    • Policy
      • Rocket CAD Closure
      • Terms of Service
      • Privacy Policy
      • Refund and Purchase Policy
      • Discord Bot
    • Archive
      • Fire Siren
Powered by GitBook
On this page
  • Record API Endpoints
  • Record Formatting

Was this helpful?

Edit on GitHub
  1. Developer API Documentation
  2. API Integration
  3. API Endpoints
  4. General

Custom Records

Sonoran CAD allows you to access, create, update, and remove highly customize records and reports via API.

PreviousSet API IDsNextAPI Options for Adding and Modifying Records

Last updated 7 months ago

Was this helpful?

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 .

Create a New Record

Add a new custom record to your community.

Edit an Existing Record

Modify and update an existing record in your community.

Remove a Record

Remove an existing record from your community.

Record Formatting

{
    "recordTypeId": -1, // This is the unique ID for this record type!
    "id": -1, // This is the individual record ID number (Leave -1 for NEW)
    "syncId": "", // This is used for DB Sync/Merge mapping - Leave Blank
    "name": "Eample Record Type", // This is the name of the record type
    "type": 1, // See TYPE enum
    "sections": [] // Array of custom record "section" objects
}

Record Type ID

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": 0, // Premade or Custom Section Type
    "label": "Some Custom Section", // Name/Header of Section
    "fields": [], // Array of "FIELD" objects
    "searchCiv": false, // If this is a civilian character section,
                        //  display the search button to help search and import character data automatically
    "searchVeh": false, // If this is a vehicle information section,
                        //  display the search button to help search and import vehicle data automatically
    "enableDuplicate": true, // Allow users to duplicate this section while filling out the record/report
    "dependency": {
        "type": "", // EQUAL, NOTEQUAL, CONTAINS
        "fid": "_5678_wxyz",
        "acceptableValues": [
            "Something",
            "Example",
        ]
    } 
}

Category

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", // Field type (See Enum)
    "label": "Some Field Name",
    "value": "", // Field value - MUST be converted into a string
    "size": 6, // Integer value 1-12 for column width (6 = 1/2 the row width)
    "data": {}, // Object storing data for premade sections
    "options": ["Option 1", "Another Option"], // Options for dropdown or checkb
    "isPreviewed": false, // Should this field be seen in the lookup preview table?
    "isSupervisor": false, // Is this field restricted to supervisors only?
    "isRequired": false, // Is this field required to be filled before submitting?
    "unique": false, // Ensure unique value against any other records of this type (recordTypeId) - Non-DB Sync and custom sections only!
    "readOnly": false, // Prevent users from modifying auto-filled fields
    "mask": "###", // Force 3 number entry (See Details)
    "maskReverse": false, // Fill mask in reverse order (Money)
    "dbMap": false, // Allow this field to be mapped with DB Sync
    "isFromSync": false, // DB Sync Internal Processing (Ignore)
    "uid": "_1234_abcd", // Random unique field ID (DB Sync and Merge)
    "dependency": {
        "type": "", // Unused
        "fid": "_5678_wxyz",
        "acceptableValues": [
            "Something",
            "Example",
        ]
    }
}

Type

INPUT

Standard Textbox

TEXTAREA

Multi-line Textbox

ADDRESS

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:

Enumerator (Int)
DMV Records
Warrant/BOLO Records

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).

// Flags (Section Category 1)
{
   "flags": ["Some Flag", "Another Flag"]
}

// Agency (Section Category 2)
{
   "name": "LSPD", // Agency Name
   "recordNumber": -1, // New Record ID
   "date": "01/01/2020",
   "officer": "John Doe",
   "location": "1234 E. Test St",
   "zip": "12345",
   "badge": "A10"
}

// Speed (Section Category 5)
{
   "vehicleSpeed": "70",
   "speedLimit": "45",
   "paceType": "Radar",
   "date": "01/01/2020",
   "time": "10:00 PM",
   "fine": 350
}

// Charges (Section Category 6)
{
   "arrestCharge": "Assault",
   "arrestChargeType": "Misdemeanor",
   "arrestChargeCounts": 1,
   "arrestChargeCode": "A(102)",
   "arrestBondType": "Federal Bail Bond",
   "arrestBondAmount": 50000,
   "jailTime": "5 Years"
}

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 for adding new records.

This is a unique ID for this record type. It is highly recommended to get all of this data from an that you have created in the CAD.

The category field contains an enumerator representing the section type. These correspond to the custom or premade category types in the .

📖
custom record editor
Get Record Templates
New Record
Edit Record
Remove Record
retrieve the record template
existing custom record template
custom record editor
Auto-filter Dropdown of Street Addresses