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

Get active purchased health plan for a patient

Returns the list of active purchased health plans for a specific patient.

Requires the health_plans:read permission.

GET/patients/{patient_id}/purchased-health-plans/active
Autorización
AuthorizationToken Bearer (API Key) · headerobligatorio

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

Ámbitos:health_plans:read
Parámetros de ruta
patient_idstringobligatorio

Patient ID

coincide con ^[0-9a-fA-F]{24}$
Respuestas
200

List of active purchased health plans

Al menos uno de:
PurchasedHealthPlanResponse
_idstringobligatorio

Purchased Health Plan ID

planNamestring

Health plan name

planDescriptionstring

Health plan description

isSingleAppointmentbooleanobligatorio

Whether this is a single appointment plan

totalAppointmentsintegerobligatorio

Total number of appointments in the plan

pricenumberobligatorio

Price paid for the health plan

currencystring

Currency code

expertstringobligatorio

Expert ID

patientstringobligatorio

Patient ID

healthPlanstringobligatorio

Original Health Plan ID

appointmentsstring[]obligatorio

Array of appointment IDs

remainingAppointmentsintegerobligatorio

Number of remaining appointments

pendingAmountnumberobligatorio

Pending amount to pay

any
any
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

Unauthorized - 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

Patient 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.

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
Solicitud
curl -X GET 'https://api.almendra.io/openapi/v1/patients/507f1f77bcf86cd799439011/purchased-health-plans/active' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Respuesta
{
  "_id": "507f1f77bcf86cd799439014",
  "planName": "Basic Consultation",
  "planDescription": "Standard consultation package",
  "isSingleAppointment": true,
  "totalAppointments": 1,
  "price": 100,
  "currency": "USD",
  "expert": "507f1f77bcf86cd799439012",
  "patient": "507f1f77bcf86cd799439011",
  "healthPlan": "507f1f77bcf86cd799439013",
  "appointments": [
    "507f1f77bcf86cd799439016"
  ],
  "remainingAppointments": 0,
  "pendingAmount": 0
}

¿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?