Get a connection
/care/v1/connection/{connection_id}/get/documentpatient:writeBAA requiredReturns a connection between your company and a patient, with its status brought up to date.
Nothing can be booked for the patient until the status is active. Read the connection, or
trust the connection.approved event, to learn that the patient approved; never trust the
status in the return URL. A connection that does not exist, is not a care connection, or
belongs to another company or mode, answers not_found. Needs the patient:write scope.
Path parameters
connection_idstringrequiredThe ID of the connection, as
createanswered it.Min length 1 · Max length 200 · Pattern ^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$
Response 200
approved_atstring (date-time)nullableWhen the patient approved the connection, in UTC.
nulluntil then.company_idstringrequiredThe ID of your company, the one that owns the connection.
connection_idstringrequiredThe ID of the connection. Use it to read or revoke the connection and to match
connection.approved,connection.declinedandconnection.revokedevents.created_atstring (date-time)requiredWhen the connection was created, in UTC.
external_idstringrequiredYour own ID for the patient, as you sent it.
revoked_atstring (date-time)nullableWhen the connection ended, in UTC.
nullwhile it has not ended.revoked_byenumnullableWho ended the connection:
patient(the patient),partner(your company) oradmin.nullwhile it has not ended.patientpartneradmin
scopesarray of enumrequiredWhat the patient allowed your company to do.
care.bookingsbooks and reads visits,care.reportsreads visit reports,care.health-profilereads and updates the health profile. Only the scopes your key may ask for are listed.statusenumrequiredpendinguntil the patient decides, thenactive,declinedorrevoked. Nothing can be booked for the patient until the connection isactive. Trust theconnection.approvedevent or read the connection; never trust the status in the return URL, because anyone can edit a URL.pendingactivedeclinedrevoked
userstring (uuid)requiredThe ID of the patient's Nurish'd user the connection is with. Use it to read the patient and, later, to book visits for them.
Errors
Every error has this shape. Branch on code, not on message. request_id equals the X-Request-Id response header.
{
"error": {
"code": "not_found",
"message": "The object does not exist.",
"request_id": "req_0123456789abcdef0123456789abcdef"
}
}| Status | Code | Meaning |
|---|---|---|
401 | invalid_api_key | The API key is missing or not valid. |
403 | company_archived | This company is archived. |
403 | company_not_live | The company must be live to use prod keys. |
403 | company_suspended | This company is suspended. |
403 | scope_not_granted | This API key does not have the patient:write scope. |
404 | not_found | The requested resource was not found. |
422 | validation_error | path.connection_id: String should match pattern '^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$' |
429 | rate_limited | Too many requests. Wait before calling again. |
500 | internal_error | Something went wrong on our side. Please try again later. |
502 | upstream_error | A Nurish'd service could not complete the request. |
503 | upstream_unavailable | A Nurish'd service is unavailable. Please try again later. |
504 | upstream_timeout | A Nurish'd service did not answer in time. Please try again. |