API is in Alpha and may change at any time.
API Resources > Emergency
Unit Location
Update your unit's location in the CAD via API.
Update Unit Location
POST api/v1/emergency/unit_location
Request Body
Name | Type | Description | Default |
---|---|---|---|
user_id | number | Discord ID of the player. | Required |
location | string | Location of player. | Required |
Example Request Body
{
"user_id": 123456789123456789,
"location": "234 Route 68, Sandy Shores"
}
Responses
200 A successful call.
{
"success": true,
"message": "Location updated.",
"data": []
}
200 with error message if the unit was not found.
{
"success": false,
"message": "No active unit found for the given user.",
"data": []
}
200 with validation errors.
{
"success": false,
"message": "Validation errors",
"data": {
"user_id": [
"The user id field is required.",
"The user id must be a number."
],
"location": [
"The is location field is required."
]
}
}
Still have questions?
Still have questions? Talk to support.