🖥️
RoleplayBot Docs
  • Home
  • Website
  • Support Server
  • Invite
  • Information
    • Configuration
    • Permissions
    • Getting Started
    • Data Transfer
    • RoleplayBot+
  • Advanced Information
    • CAD/MDT Information
      • Law Enforcement MDT
      • Fire Department MDT
      • Dispatcher MDT
    • FAQ
    • Bug Tracker
  • API Documentation
    • API Introduction
    • Guides
      • API Authorization
      • Getting Started
      • Civilian Requests
      • Building a Project
    • Endpoints
      • Civilian Endpoints
      • Vehicle Endpoints
      • Firearm Endpoints
      • Medical Endpoint
      • Law Enforcement Endpoints
    • Errors
      • Error Codes
      • Rate limited
Powered by GitBook
On this page
  • Vehicle Endpoints
  • Vehicle Search
  • List Vehicles
  • Create Vehicle
  • Edit Vehicle
  • Delete Vehicle

Was this helpful?

  1. API Documentation
  2. Endpoints

Vehicle Endpoints

The API has been deprecated and is no longer in use.

Vehicle Endpoints

Raw list of vehicle endpoints:

  • GET /vehicle/plate

  • GET /vehicle/list

  • POST /vehicle/create

  • PATCH /vehicle/edit

  • DELETE /vehicle/delete

List of vehicle endpoint methods

If you see the empty "vehicle" array or vehicle: [] This is simply just the placeholder for the vehicle 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",
   impounded: "IMPOUNDED",
   stolen: "STOLEN",
   plate: "PLATE",
   model: "MODEL",
   registration: "REGISTRATION",
   insurance: "INSURANCE",
   color: "COLOR",
   colorType: "COLOR_TYPE",
   timestamp: "TIMESTAMP",
}

Vehicle Search

GET https://roleplaybot.xyz/api/vehicle/plate

Searches a civilian plate and returns the information

Headers

Name
Type
Description

Authorization*

API_KEY

API Authorization Key

Guild*

GUILD_ID

Discord Guild ID

Request Body

Name
Type
Description

plate*

PLATE

Vehicle Plate (String)

Citations, Fine, Arrests and Hospital Record arrays provide an object per action.

{
    found: true,
    guildID: "GUILD_ID",
    vehicle: []
}

Invalid or missing field

{
    "error": "400 Bad request",
    "details": "Invalid <FIELD> provided (<ERR-CODE>)"
}

Accessing a guild that is not authorized apart of your API key

{
    "error": "403 Forbidden",
    "details": "Unauthorised guild access (20058)"
}
{
    found: false,
    error: "404 Not found",
    details: "Vehicle not found (10023)"
}

List Vehicles

GET https://roleplaybot.xyz/api/vehicle/list

Provides every registered vehicle inside the guild

Headers

Name
Type
Description

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)"
}

One or more vehicles found and listed

{
    amount: "VEHICLE_AMOUNT",
    guildID: "GUILD_ID",
    vehicles: []
}

There is no registered vehicles inside the guild

{
    error: "404 Not found",
    details: "Unable to find any vehicles (20060)"
}

Create Vehicle

POST https://roleplaybot.xyz/api/vehicle/create

Registers a vehicle to a civilian character

Headers

Name
Type
Description

Authorization*

API_KEY

API Authorization Key

Guild*

GUILD_ID

Discord Guild ID

Request Body

Name
Type
Description

name*

CIV_NAME

Civilian Name (String)

plate*

PLATE

Vehicle Plate (String)

model*

MODEL

Vehicle Model (String)

color*

COLOR

Vehicle Color (String)

colorType*

COLOR_TYPE

Vehicle color type (Takes: Classic, Metallic, Matte, Metal, Pearlescent)

registration*

REGISTRATION

Vehicle registration (Takes: Valid, Expired)

insurance*

INSURANCE

Vehicle insurance (Takes: Valid, Expired, None)

Accessing a guild that is not authorized apart of your API key

{
    "error": "403 Forbidden",
    "details": "Unauthorised guild access (20058)"
}

Invalid or missing field

{
    "error": "400 Bad request",
    "details": "Invalid <FIELD> provided (<ERR-CODE>)"
}

A vehicle with that specified plate already existing inside your guild

{
    error: "400 Bad request",
    details: "Registered vehicle plate already exists (10020)"
}

Registered vehicle

{
    guildID: "GUILD_ID",
    plate: "PLATE",
    civilianName: "CIV_NAME",
    civilianID: "CIV_ID",
    success: "Registered vehicle",
    vehicle: []
}

Database error, Unable to register vehicle inside database. Contact RoleplayBot support

{
    error: "500 Internal server error",
    details: "Unable to execute request (10022)"
}

Edit Vehicle

PATCH https://roleplaybot.xyz/api/vehicle/edit

Edits a vehicle with the specified field and value Valid Fields: - color (Value: String) - insurance (Takes: Valid, Expired, None) - registration (Takes: Valid, Expired) - stole (Value: Boolean)

Headers

Name
Type
Description

Authorization*

API_KEY

API Authorization Key

Guild*

GUILD_ID

Discord Guild ID

Request Body

Name
Type
Description

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)"
}
{
    "error": "400 Bad request",
    "details": "Invalid <FIELD> provided (<ERR-CODE>)"
}

Vehicle successfully edited

{
    guildID: "GUILD_ID",
    civilianName: "CIV_NAME",
    civilianID: "CIV_ID",
    userID: "USER_ID",
    userName: "USER_NAME",
    plate: "PLATE",
    field: "FIELD",
    value: "VALUE",
    oldValue: "OLD_VALUE",
    success: 'Field updated',
    vehicle: []
}

Database error, Unable to edit vehicle inside database. Contact RoleplayBot support

{
    error: "500 Internal server error",
    details: "Unable to execute request (10021)"
}

Delete Vehicle

DELETE https://roleplaybot.xyz/api/vehicle/delete

Deletes a vehicle using the vehicle ID

Headers

Name
Type
Description

Authorization*

API_KEY

API Authorization Key

Guild*

GUILD_ID

Discord Guild ID

Request Body

Name
Type
Description

vehicleID*

VEHICLE_ID

Vehicle ID (String)

Successfully deleted vehicle

{
    guildID: "GUILD_ID",
    id: "VEHICLE_ID",
    success: 'Deleted registered vehicle'
}
{
    "error": "400 Bad request",
    "details": "Invalid <FIELD> provided (<ERR-CODE>)"
}

Database error, Unable to delete vehicle inside database. Contact RoleplayBot support

{
    error: "500 Internal server error",
    details: "Unable to execute request (10021)"
}
PreviousCivilian EndpointsNextFirearm Endpoints

Last updated 1 year ago

Was this helpful?