Saltar al contenido
Almendra
Esc
↑↓navegar↵abrir⌘Jvista previa

Update or reschedule a scheduled appointment

Reschedules an appointment (scheduledTimeStart + scheduledTimeEnd) and/or changes its video conference URL. A new time also moves the Google Calendar event, the Zoom meeting and the patient’s reminder email, like rescheduling from the dashboard. Set notifyPatient to email and push the new time to the patient. Appointments that already took place cannot be rescheduled (409).

Requires the appointments:write permission.

PUT/appointments/{appointment_id}
Autorización
AuthorizationToken Bearer (API Key) · headerobligatorio

Almendra API key, bound to one professional account. Send it as Authorization: Bearer YOUR_API_KEY.

Ámbitos:appointments:write
Parámetros de ruta
appointment_idstringobligatorio

Appointment ID

coincide con ^[0-9a-fA-F]{24}$
Cuerpo de la solicitud
application/json
conferenceRoomUrlstring<uri>

Updated video conference URL

scheduledTimeStartstring<date-time>

New start time (ISO 8601). Send it together with scheduledTimeEnd to reschedule.

scheduledTimeEndstring<date-time>

New end time (ISO 8601), after scheduledTimeStart. Send it together with scheduledTimeStart.

timeZonestring

IANA time zone used to show the new time in the patient's email, Zoom and Google Calendar. Defaults to the account's time zone.

notifyPatientboolean

Email and push the new time to the patient (only if the account sends appointment emails, Settings > Notifications). Defaults to false. The reminder email always moves to the new time.

Respuestas
200

Appointment updated successfully

_idstringobligatorio

Appointment ID

patientstringobligatorio

Patient ID

expertstringobligatorio

Expert ID

appointmentStatusintegerobligatorio

Appointment status code

scheduledInfoobjectobligatorio
Mostrar propiedades
wasScheduledbooleanobligatorio
scheduledTimeStartstring<date-time>
scheduledTimeEndstring<date-time>
scheduledDurationinteger
locationstring
conferenceTypestring
conferenceRoomUrlstring
conferenceRoomIdstring
pricenumber
purchasedHealthPlanstring
createdAtstring<date-time>obligatorio
updatedAtstring<date-time>obligatorio
400

Invalid path parameter, query parameter or request body

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

401

Missing or invalid API key

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

403

The account behind the API key has no active paid plan, or the key lacks the permission this operation needs

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

404

Appointment not found

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

409

The appointment already took place, so its time cannot change; or another change to it is still running (retry)

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

415

Request body sent without Content-Type: application/json

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

429

Rate limit exceeded (600 requests per 60 seconds); retry after Retry-After seconds

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

500

Unexpected server error

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

Pruébalo
Servidor
Autorización
Parámetros
Cuerpoapplication/json
Solicitud
curl -X PUT 'https://api.almendra.io/openapi/v1/appointments/507f1f77bcf86cd799439016' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "conferenceRoomUrl": "https://zoom.us/j/1234567890",
  "scheduledTimeStart": "2024-02-01T15:00:00.000Z",
  "scheduledTimeEnd": "2024-02-01T16:00:00.000Z",
  "timeZone": "America/Lima",
  "notifyPatient": true
}'
Respuesta
{
  "_id": "507f1f77bcf86cd799439016",
  "patient": "507f1f77bcf86cd799439011",
  "expert": "507f1f77bcf86cd799439012",
  "appointmentStatus": 0,
  "scheduledInfo": {
    "wasScheduled": true,
    "scheduledTimeStart": "2024-02-01T10:00:00.000Z",
    "scheduledTimeEnd": "2024-02-01T11:00:00.000Z",
    "scheduledDuration": 60
  },
  "location": "string",
  "conferenceType": "string",
  "conferenceRoomUrl": "string",
  "conferenceRoomId": "string",
  "price": 0,
  "purchasedHealthPlan": "string",
  "createdAt": "2024-01-15T00:00:00.000Z",
  "updatedAt": "2024-01-15T00:00:00.000Z"
}

¿No encuentras lo que buscas?

Nuestro equipo responde en menos de 1 día hábil, de lunes a viernes de 9:30 a 18:00 (GMT-5).

Escríbenos

¿Te ha resultado útil esta página?