Firearm Endpoints
The API has been deprecated and is no longer in use.
Firearm Endpoints
Raw list of firearm endpoints:
GET /firearm/info
GET /firearm/list
POST /firearm/create
PATCH /firearm/edit
DELETE /firearm/delete
List of firearm endpoint methods
If you see the empty "firearm" array or firearm: []
This is simply just the placeholder for the firearm object structure, Which looks like this in all major requests: (Inside the array)
{
id: "ID",
userID: "USER_ID",
userName: "USER_NAME",
civilianID: "CIV_ID",
civilianName: "CIV_NAME",
stolen: "STOLEN",
serialNumber: "SERIAL_NUMBER",
model: "MODEL",
timestamp: "TIMESTAMP"
}
Firearm Information (Search)
GET
https://roleplaybot.xyz/api/firearm/info
Searches for a registered firearm, Returns information if it exists.
Headers
Authorization*
API_KEY
API Authorization Key
Guild*
GUILD_ID
Discord Guild ID
Request Body
serialNumber*
SERIAL_NUMBER
Firearm Serial Number (String) (# ID)
Firearm found and information displayed
{
found: true,
guildID: "GUILD_ID",
firearm: []
}
List Firearms
GET
https://roleplaybot.xyz/api/firearm/list
Provides every registered vehicle inside the guild
Headers
Authorization*
API_KEY
API Authorization Key
Guild*
GUILD_ID
Discord Guild ID
Accessing a guild that is not authorized apart of your API key
{
"error": "403 Forbidden",
"details": "Unauthorised guild access (20058)"
}
Create Firearm
POST
https://roleplaybot.xyz/api/firearm/create
Registers a firearm to a civilian character
Headers
Authorization*
API_KEY
API Authorization Key
Guild*
GUILD_ID
Discord Guild ID
Request Body
name*
CIV_NAME
Civilian Name (String)
model*
MODEL
Firearm Model (String)
color*
COLOR
Firearm Color (String)
Accessing a guild that is not authorized apart of your API key
{
"error": "403 Forbidden",
"details": "Unauthorised guild access (20058)"
}
Edit Firearm
PATCH
https://roleplaybot.xyz/api/firearm/edit
Edits a firearm with the specified field and value Valid Fields: - color (Value: String) - stole (Value: Boolean)
Headers
Authorization*
API_KEY
API Authorization Key
Guild*
GUILD_ID
Discord Guild ID
Request Body
name*
CIV_NAME
Civilian Name (String)
field*
FIELD
Field to edit (Must be listed in valid fields)
value*
VALUE
Value to set (Must match allocated field)
Accessing a guild that is not authorized apart of your API key
{
"error": "403 Forbidden",
"details": "Unauthorised guild access (20058)"
}
Delete Vehicle
DELETE
https://roleplaybot.xyz/api/firearm/delete
Deletes a firearm using the serial number
Headers
Authorization*
API_KEY
API Authorization Key
Guild*
GUILD_ID
Discord Guild ID
Request Body
serialNumber*
SERIAL_NUMBER
Firearm Serial Number (String) (# ID)
Successfully deleted firearm
{
guildID: "GUILD_ID",
id: "VEHICLE_ID",
success: 'Deleted registered firearm'
}
Last updated
Was this helpful?