The API has been deprecated and is no longer in use.
Civilian Endpoints
Raw list of civilian endpoints:
List of civilian endpoint methods
Civilian Array Structure
If you see the empty "civilian" array or civilian: []
This is simply just the placeholder for the civilian object structure, Which looks like this in all major requests: (Inside the array)
Copy {
deceased: "DECEASED",
bolo: "BOLO",
boloReason: "REASON",
civilianAge: "AGE",
civilianDOB: "DOB",
civilianGender: "GENDER",
civilianHairColor: "HAIR COLOR",
civilianHeight: "HEIGHT",
civilianWeight: "WEIGHT",
civilianAddress: "ADDRESS",
civilianOccupation: "OCCUPATION",
registrationTimestamp: "TIMESTAMP",
}
GET
https://roleplaybot.xyz/api/civilian/info
Returns a civilians information
Request Body
Civilian Characters Name (String)
200: OK Civilian Found 400: Bad Request One or more fields are invalid 403: Forbidden Forbidden Guild Access 404: Not Found Civilian Not found
Citations, Fine, Arrests and Hospital Record arrays provide an object per action.
Copy {
"guildID": "GUILD_ID",
"userID": "USER_ID",
"userName": "USER_NAME",
"civilian": [],
"citations": [
{
"officerName": "OFFICER_NAME",
"officerID": "OFFICER_ID",
"amount": "AMOUNT",
"charges": "CHARGES",
"timestamp": "TIMESTAMP"
}
],
"fines": [
{
"officerName": "OFFICER_NAME",
"officerID": "OFFICER_ID",
"amount": "AMOUNT",
"charges": "CHARGES",
"timestamp": "TIMESTAMP"
}
],
"arrests": [
{
"officerName": "OFFICER_NAME",
"officerID": "OFFICER_ID",
"time": "TIME",
"charges": "CHARGES",
"timestamp": "TIMESTAMP"
}
],
"hospitalRecords": [
{
"medicName": "MEDIC_NAME",
"medicID": "MEDIC_ID",
"injures": "INJURES",
"time": "TIME",
"timestamp": "TIMESTAMP"
}
]
}
Invalid or missing field
Copy {
"error": "400 Bad request",
"details": "Invalid <FIELD> provided (<ERR-CODE>)"
}
Accessing a guild that is not authorized apart of your API key
Copy {
"error": "403 Forbidden",
"details": "Unauthorised guild access (20058)"
}
Civilian character could not be found
Copy {
error: "404 Not found",
details: "Character not found (10023)"
}
List Civilians
GET
https://roleplaybot.xyz/api/civilian/list
Provides an array with objects per active civilian characters, also returns a value specifying the current amount of civilians
403: Forbidden Forbidden Guild Access 200: OK Civilians Found 404: Not Found No Civilians Found
Accessing a guild that is not authorized apart of your API key
Copy {
"error": "403 Forbidden",
"details": "Unauthorised guild access (20058)"
}
One or more civilians found and listed
Copy {
amount: "CIV_AMOUNT",
guildID: "GUILD_ID",
civilians: []
}
There is no registered civilian characters inside the guild
Copy {
error: "404 Not found",
details: "Unable to find any civilian characters (20060)"
}
Create Civilian
POST
https://roleplaybot.xyz/api/civilian/create
Creates a civilian character with supplied parameters
Request Body
Creating Users ID (String)
Creating Users Name (String)
Civilian Name (String) (<100 Characters)
Civilian Age (Number) (<100)
Civilian Date Of Birth (String)
Civilian Gender (Takes: Male, Female Or Other)
Civilian Hair Color (String)
Civilian Weight in KG (Number) (<500)
Civilian Height in CM (Number) (<500)
Civilian Address (String)
Civilian Occupation (String)
403: Forbidden Forbidden Guild Access 400: Bad Request One or more fields are invalid 400: Bad Request Civilian name already exists 201: Created Created civilian 500: Internal Server Error Unable to register civilian
Accessing a guild that is not authorized apart of your API key
Copy {
"error": "403 Forbidden",
"details": "Unauthorised guild access (20058)"
}
Invalid or missing field
Copy {
"error": "400 Bad request",
"details": "Invalid <FIELD> provided (<ERR-CODE>)"
}
A civilian with that specified name already existing inside your guild
Copy {
error: "400 Bad request",
details: "Civilian character already exists (10020)"
}
Copy {
guildID: "GUILD_ID",
civilianID: "CIV_ID",
civilianName: "CIV_NAME",
userName: "USER_NAME",
userID: "USER_ID",
success: "Successfully created civilian",
civilian: []
}
Database error, Unable to register civilian character inside database. Contact RoleplayBot support
Copy {
error: "500 Internal server error",
details: "Unable to execute request (10022)"
}
Edit Civilian
PATCH
https://roleplaybot.xyz/api/civilian/edit
Edits a civilian character with the specified field and value
Valid Fields:
- hair color (Value: String)
- name (Value: String)
- age (Value: Number <100)
- dob (Value: String)
- height (Value: Number <500)
- weight (Value: Number <500)
- occupation (Value: String)
- address (Value: String)
Request Body
Field to edit (Must be listed in valid fields)
Value to set (Must match allocated field)
403: Forbidden Forbidden Guild Access 400: Bad Request One or more fields are invalid 202: Accepted Value doesn't differ 201: Created Civilian Edited 500: Internal Server Error Unable to edit civilian
Accessing a guild that is not authorized apart of your API key
Copy {
"error": "403 Forbidden",
"details": "Unauthorised guild access (20058)"
}
Copy {
"error": "400 Bad request",
"details": "Invalid <FIELD> provided (<ERR-CODE>)"
}
Setting value is the same as the current value
Copy {
error: 'Character <FIELD> is already <VALUE> (<ERR_CODE>)'
}
Civilian successfully edited
Copy {
guildID: "GUILD_ID",
civilianName: "CIV_NAME",
civilianID: "CIV_ID",
userName: "USER_NAME",
userID: "USER_ID",
field: "FIELD",
value: "VALUE",
oldValue: "OLD_VALUE",
success: 'Field updated',
civilian: []
}
Database error, Unable to edit civilian character inside database. Contact RoleplayBot support
Copy {
error: "500 Internal server error",
details: "Unable to execute request (10021)"
}
Civilian BOLO
PATCH
https://roleplaybot.xyz/api/civilian/bolo
Call to activate or deactivate a BOLO
Request Body
Set BOLO (Boolean) (*True = Activate BOLO)
BOLO Reason (Required when bolo is set to true)
403: Forbidden Forbidden Guild Access 404: Not Found Civilian Not Found 202: Accepted BOLO Already Active/inactive 201: Created BOLO Set Active/inactive 400: Bad Request One or more fields are missing/incorrect
Accessing a guild that is not authorized apart of your API key
Copy {
"error": "403 Forbidden",
"details": "Unauthorised guild access (20058)"
}
Requested civilian character cannot be found
Copy {
error: "404 Not found",
details: "Character not found (10023)"
}
Civilian has an active BOLO
Copy {
guildID: "GUILD",
userName: "USER_NAME",
userID: "USER_ID",
civilianName: "CIV_NAME",
civilianID: "CIV_ID",
error: 'BOLO is already (active/incative)',
civilian: []
}
Civilian doesn't have an active BOLO
Copy {
guildID: "GUILD",
userName: "USER_NAME",
userID: "USER_ID",
civilianName: "CIV_NAME",
civilianID: "CIV_ID",
success: 'BOLO set (active/inactive)',
civilian: []
}
The bolo or reason field is missing or invalid (Incorrect Type)
Copy {
error: "400 Bad request",
details: "Invalid <FIELD> Provided (<ERR-CODE>)"
}
Civilian Deceased
PATCH
https://roleplaybot.xyz/api/civilian/deceased
Sets a civilian deceased.
WARNING: This action is irreversible, Once a civilian is set deceased it can no longer be used.
Request Body
Deceased Value (True Boolean) (True = Set Deceased)
202: Accepted Civilian Already Deceased 400: Bad Request One or more fields are invalid 403: Forbidden Forbidden Guild Access 201: Created Civilian Marked Deceased
Copy {
guildID: "GUILD",
civilianName: "CIV_NAME",
civilianID: "CIV_ID",
userName: "USER_NAME",
userID: "USER_ID",
deceased: "DECEASED",
error: 'Character is already marked deceased'
}
The deceased field is missing or invalid (Incorrect Type)
Copy {
error: "400 Bad request",
details: "Invalid <FIELD> Provided (<ERR-CODE>)"
}
Accessing a guild that is not authorized apart of your API key
Copy {
"error": "403 Forbidden",
"details": "Unauthorised guild access (20058)"
}
Civilian has been marked deceased
Copy {
guildID: "GUILD_ID",
civilianName: "CIV_NAME",
civilianID: "CIV_ID",
userName: "USER_NAME",
userID: "USER_ID",
success: 'Marked deceased',
civilian: []
}
Delete Civilian
DELETE
https://roleplaybot.xyz/api/civilian/delete
Deletes a civilian character
Request Body
200: OK Civilian Deleted 400: Bad Request One or more fields are invalid 500: Internal Server Error Unable to delete civilian
Successfully deleted civilian
Copy {
guildID: "GUILD_ID",
civilianID: "CIV_ID",
civilianName: "CIV_NAME",
userName: "USER_NAME",
userID: "USER_ID",
success: "Deleted civilian",
civilian: []
}
Copy {
"error": "400 Bad request",
"details": "Invalid <FIELD> provided (<ERR-CODE>)"
}
Database error, Unable to delete civilian character inside database. Contact RoleplayBot support
Copy {
error: "500 Internal server error",
details: "Unable to execute request (10021)"
}