Fire Employee

DELETE /employee

Fire an employee using their id (employee_id, not client_id). You can only fire an employee if you're ADMIN.

application/json

Body Required

  • Id of the employee in database (you can get it via GET /employee)

Responses

  • 200 application/json

    Successfully fired an employee.

    Hide response attribute Show response attribute object
    • success boolean

      Whether the an employee is fired

  • 400 application/json

    Validation error of given input.

    Hide response attributes Show response attributes object
  • 401 application/json

    User is not unauthorized or permissions are missing.

    Hide response attributes Show response attributes object
  • 429 application/json

    Rate limit exceeded - 100 queries per 15 minutes.

    Hide response attributes Show response attributes object
DELETE /employee
curl \
 -X DELETE http://63.141.232.244:25540/v0/employee \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"employee_id":42.0}'
Request examples
{
  "employee_id": 42.0
}
Response examples (200)
{
  "success": true
}
Response examples (400)
{
  "success": false,
  "error": [
    {
      "code": "invalid_type",
      "expected": "string",
      "received": "undefined",
      "path": [
        "client_id"
      ],
      "message": "Required"
    }
  ]
}
Response examples (401)
{
  "success": false,
  "error": "Unauthorized"
}
Response examples (429)
{
  "success": false,
  "error": "Too many requests, please try again later"
}