🖥️
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
  • Law Enforcement Endpoints
  • Civilian Records
  • Check Impound
  • Arrest Civilian
  • Cite Civilian
  • Fine Civilian
  • Impound Vehicle

Was this helpful?

  1. API Documentation
  2. Endpoints

Law Enforcement Endpoints

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

Law Enforcement Endpoints

Raw list of LEO endpoints:

  • GET /leo/records

  • GET /leo/impound

  • POST /leo/arrest

  • POST /leo/cite

  • POST /leo/fine

  • PATCH /leo/impound

List of Law enforcement endpoint methods

Civilian Records

GET https://roleplaybot.xyz/api/leo/records

Searches a civilians arrests, citations and fines

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)

Civilian found and records listed

{
    guildID: "GUILD_ID",
    civilianName: "CIV_NAME",
    civilianID: "CIV_ID",
    citationAmount: "CITE_AMOUNT",
    fineAmount: "FINE_AMOUNT",
    arrestAmount: "ARREST_AMOUNT",
    citations: [
        {
            count: "COUNT",
            officersName: "OFFICER_NAME",
            officersID: "OFFICER_ID",
            amount: "AMOUNT",
            charges: "CHARGES",
            timestamp: "TIMESTAMP"
        }
    ],
    fines: [
        {
            count: "COUNT",
            officersName: "OFFICER_NAME",
            officersID: "OFFICER_ID",
            amount: "AMOUNT",
            charges: "CHARGES",
            timestamp: "TIMESTAMP"
        }
    ],
    arrests: [
        {
            count: "COUNT",
            officersName: "OFFICER_NAME",
            officersID: "OFFICER_ID",
            time: "JAIL_TIME",
            charges: "CHARGES",
            timestamp: "TIMESTAMP"
        }
    ]
}

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)"
}
{
    error: "404 Not found",
    details: "Character not found (10023)"
}

Check Impound

GET https://roleplaybot.xyz/api/leo/impound

Checks if a vehicle is impounded

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)

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

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

Vehicle found and impounded value displayed

{
    guildID: "GUILD_ID",
    plate: "PLATE",
    id: "ID",
    impounded: "IMPOUNDED",
    impoundedFee: "IMPOUND_FEE"
}

Requested vehicle was not found

{
    error: "404 Not found",
    details: "Vehicle not found (10023)"
}

Arrest Civilian

POST https://roleplaybot.xyz/api/leo/arrest

Forms an arrest report on a civilian

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)

officerName*

OFFICER_NAME

Arresting Officers Discord Name (String)

officerID*

OFFICER_ID

Arresting Officers Discord ID (String)

charges*

CHARGES

Arrest Charges (String)

time*

TIME

Jail Time (Number) (>5000)

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

Successfully arrested civilian

{
    guildID: "GUILD_ID",
    civilianName: "CIV_NAME",
    civilianID: "CIV_ID",
    success: `Arrested civilian`,
    arrest: [
        {
            officersName: "OFFICER_NAME",
            officersID: "OFFICER_ID",
            time: "<TIME> Seconds",
            charges: "CHARGES",
            timestamp: "TIMESTAMP"
        }
    ]
}

Requested civilian could not be found

{
    error: "404 Not found",
    details: "Character not found (10023)"
}

Cite Civilian

POST https://roleplaybot.xyz/api/leo/cite

Creates a citation and issues it to a civilian

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)

officerName*

OFFICER_NAME

Citing Officers Discord Name (String)

officerID*

OFFICER_ID

Citing Officers Discord ID (String)

charges*

CHARGES

Citation Charges (String)

amount*

AMOUNT

Cite Amount (Number) (>5000)

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

Successfully cited civilian

{
    guildID: "GUILD_ID",
    civilianName: "CIV_NAME",
    civilianID: "CIV_ID",
    success: "Cited civilian",
    citation: [
        {
            officersName: "OFFICER_NAME",
            officersID: "OFFICER_ID",
            amount: "$<AMOUNT>",
            charges: "CHARGES",
            timestamp: "TIMESTAMP"
        }
    ]
}

Requested civilian could not be found

{
    error: "404 Not found",
    details: "Character not found (10023)"
}

Fine Civilian

POST https://roleplaybot.xyz/api/leo/fine

Fines a civilian

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)

officerName*

OFFICER_NAME

Fining Officers Discord Name (String)

officerID*

OFFICER_ID

Fining Officers Discord ID (String)

charges*

CHARGES

Fine Charges (String)

amount*

AMOUNT

Fine Amount (Number) (>5000)

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

Successfully fined civilian

{
    guildID: "GUILD_ID",
    civilianName: "CIV_NAME",
    civilianID: "CIV_ID",
    success: "Fined civilian",
    fine: [
        {
            officersName: "OFFICER_NAME",
            officersID: "OFFICER_ID",
            amount: "$<AMOUNT>",
            charges: "CHARGES",
            timestamp: "TIMESTAMP"
        }
    ]
}

Requested civilian could not be found

{
    error: "404 Not found",
    details: "Character not found (10023)"
}

Impound Vehicle

PATCH https://roleplaybot.xyz/api/leo/impound

Impound or lift the impound of a registered vehicle

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)

impound*

IMPOUND

Impound Stated Vehicle (Boolean)

fee

FEE

Impound Fee (Number) (>5000) (Only if impound statement true)

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

Impounded Vehicle

{
    guildID: "GUILD_ID",
    plate: "PLATE",
    userID: "USER_ID",
    userName: "USER_NAME",
    civilianName: "CIV_NAME",
    civilianID: "CIV_ID",
    impounded: true,
    error: "Vehicle impounded",
    vehicle: [
        {
            impoundedFee: "FEE",
            stolen: "STOLEN",
            model: "MODEL",
            registration: "REGISTRATION",
            insurance: "INSURANCE",
            color: "COLOR",
            colorType: "COLOR_TYPE",
            timestamp: "TIMESTAMP",
        }
    ]
}

Database error, Unable to edit impound. Contact RoleplayBot support

{
    error: "500 Internal server error",
    details: "Unable to execute request (10022)"
}
{
    guildID: "GUILD_ID",
    plate: "PLATE",
    userID: "USER_ID",
    userName: "USER_NAME",
    civilianName: "CIV_NAME",
    civilianID: "CIV_ID",
    impounded: false,
    error: "Vehicle removed from impounded",
    vehicle: [
        {
            impoundedFee: null,
            stolen: "STOLEN",
            model: "MODEL",
            registration: "REGISTRATION",
            insurance: "INSURANCE",
            color: "COLOR",
            colorType: "COLOR_TYPE",
            timestamp: "TIMESTAMP",
        }
    ]
}
{
    error: "404 Not found",
    details: "Vehicle not found (10023)"
}
PreviousMedical EndpointNextErrors

Last updated 1 year ago

Was this helpful?