Imperial Characters API & Exports

The ImperialCharacters module allows a FiveM server to create, retrieve, and delete characters or vehicles in ImperialCAD using exports and backend API calls.


⚙️ Setup

Add the following to your server.cfg:

setr imperial_community_id "YOUR_COMMUNITY_ID"
set imperialAPI "YOUR_API_SECRET"

Enable debug output:

Config.debug = true

📤 Exports & Examples


🔹 NewCharacter(data, callback)

Creates a new civilian character in CAD.

Required Fields

Field
Type
Description

users_discordID

string

Discord ID of the player(This allows them to still edit and interact with API made char's)

Fname

string

First name

Mname

string

Middle name

Lname

string

Last name

Birthdate

string

Format: YYYY-MM-DD

gender

string

"Male", "Female", etc.

race

string

Race/ethnicity

hairC

string

Hair color

eyeC

string

Eye color

height

string

e.g., "6'0"

weight

string

e.g., "180"

postal

string

Postal code

address

string

Street address

city

string

City

county

string

County

phonenum

string

Phone number

dlstatus

string

e.g., "Valid" or "Suspended"

citizenid

string

Unique character ID

Example Usage

Example Response


🔹 NewCharacterAdvanced(data, callback)

Same as NewCharacter but supports license and misc details.

Additional Fields

Example

Example Response


🔹 DeleteCharacter(data, callback)

Deletes a character from CAD.

Required Fields

Field
Type

users_discordID

string

citizenid

string

Example

Example Response


🔹 GetCharacter(charid, commId, callback)

Retrieves a character by ID.

Parameters

Param
Type
Description

charid

string

Citizen ID

commId

string

Your community ID

Example

Example Response


🔹 GetCharacterAdvanced({ firstname, lastname }, callback)

Searches by name.

Parameters

Field
Type

firstname

string

lastname

string

Example

Example Response


🔹 CreateVehicle(data, callback)

Basic vehicle registration.

Required Fields

Field
Type
Required

ssn

string

plate

string

model

string

color

string

year

string

Optional (default "2015")

make

string

Optional (default "UNKNOWN")

Example

Example Response


🔹 CreateVehicleAdvanced(data, callback)

Detailed vehicle registration with owner & insurance.

Required Format

Example

Example Response


🔗 API Reference

All API's will use the same format of "https://imperialcad.app/api/1.1/wf/arrow-up-right" and then the provided API Endpoint as provided below.

TYPE https://imperialcad.app/api/1.1/wf/<API_GOES_HERE>

Type
Export
API Endpoint

POST

NewCharacter

NewCharacter

POST

NewCharacterAdvanced

NewAdvancedCharacter

POST

DeleteCharacter

DeleteCharacter

GET

GetCharacter

GetCharacter

GET

GetCharacterAdvanced

GetCharacterAdvanced

POST

CreateVehicle

registerVehicle

POST

CreateVehicleAdvanced

registeradvancedvehicle


🔐 API Authorization

All POST endpoints require the following header:


📎 License

© Imperial Solutions. Unauthorized distribution or use is prohibited.

Last updated