Cancel Appointment

DELETE /trainer-appointment/{trainer_appointment_id}

Cancel a trainer appointment that hasn't started or ended yet. You can only cancel your own appointment using JWT.

Path parameters

  • trainer_appointment_id integer Required

    Id of the appointment in database (retrieved using GET /bank-card)

Responses

  • 200 application/json

    Successful appointment cancellation.

    Hide response attribute Show response attribute object
    • success boolean

      Whether an appointment is cancelled

  • 400 application/json

    Validation error of given input.

    Hide response attributes Show response attributes object
    • success boolean

      Whether query is successful

    • error array[object]

      Validation error of given input.

      Hide error attributes Show error attributes object
      • code string

        Error type

      • expected string

        What was expected

      • received string

        What's the error

      • path array[string]

        What caused an error

      • message string

        Error description

  • 401 application/json

    User is not unauthorized or permissions are missing.

    Hide response attributes Show response attributes object
    • success boolean

      Whether query is successful

    • error string

      Error message

  • 429 application/json

    Rate limit exceeded - 100 queries per 15 minutes.

    Hide response attributes Show response attributes object
    • success boolean

      Whether query is successful

    • error string

      Error message

DELETE /trainer-appointment/{trainer_appointment_id}
curl \
 --request DELETE 'http://63.141.232.244:25540/v0/trainer-appointment/{trainer_appointment_id}' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
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"
}