Skip to main content

Appointment Reschedule

This endpoint allows you to reschedule an appointment to a new time. If the time is valid, we will attempt to reschedule the appointment with the same employee. If that employee is not available, another employee belonging to the specified employee group will be selected randomly.

PUT
/api/v2/appointments/:appointment_id/group/:group_id/book

Request

Example request
curl -X PUT \
    -H "Content-Type: application/json" \
    --user "YOUR_API_KEY:" \
    -d '{
      "appointment": {
        "start": "2019-07-20T14:00:00"
      }
    }' \
    "https://api.funnelleasing.com/api/v2/appointments/952/group/123/book"

Response

200 OKapplication/json
{
  "data": {
    "appointment": {
      "id": 952,
      "status": 30,
      "start": "2019-07-20T05:00:00+00:00",
      "end": "2019-07-20T05:30:00+00:00",
      "notes": "Please mind the gap",
      "location": "Near the fountain of the building's main entrance"
    }
  }
}

Errors specific to this endpoint

Appointment Not Found (404)

If appointment_id doesn't match an existing appointment for your company, a 404 error response will be returned. Note the id value here is an array. The Appointment Deletion endpoint returns the same error text as a bare string for the same situation, not an array.

404 Not Foundapplication/json
{
  "errors": {
    "appointment": { "id": ["Appointment id=890 does not exist"] }
  }
}

Invalid Appointment Time (400)

Below is an example error response. In this example, attempting to reschedule an appointment in the past.

400 Bad Requestapplication/json
{
  "errors": {
    "appointment": {
      "start": ["The date and time you selected is in the past"]
    }
  }
}