POST /v1/patients/\{patient_id\}/medications
Service: patient-graph · operationId: (none)
Required scopes
(no scope declared — review service config)
Path parameters
patient_id(string) required —
Request body
{
"type": "object",
"properties": {
"brand_id": {
"type": "string",
"minLength": 1
},
"name": {
"type": "string",
"minLength": 1
},
"dosage": {
"type": "string",
"minLength": 1
},
"frequency": {
"type": "string",
"minLength": 1
},
"route": {
"type": "string"
},
"prescriber_id": {
"type": "string",
"format": "uuid"
},
"notes": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {},
"default": {}
}
},
"required": [
"brand_id",
"name",
"dosage",
"frequency"
]
}Responses
201 Medication prescribed
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"patient_id": {
"type": "string"
},
"brand_id": {
"type": "string"
},
"name": {
"type": "string"
},
"dosage": {
"type": "string"
},
"frequency": {
"type": "string"
},
"route": {
"type": [
"string",
"null"
]
},
"prescriber_id": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string"
},
"started_at": {
"type": "string"
},
"ended_at": {
"type": [
"string",
"null"
]
},
"notes": {
"type": [
"string",
"null"
]
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"required": [
"id",
"patient_id",
"brand_id",
"name",
"dosage",
"frequency",
"route",
"prescriber_id",
"status",
"started_at",
"ended_at",
"notes",
"metadata",
"created_at",
"updated_at"
]
}404 Patient not found
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}500 Internal error
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}Example
curl -X POST https://patient-graph.platform.loop.health/v1/patients/{patient_id}/medications \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'Related
services/patient-graph— service overview- All endpoints — directory across services
- Auth model — how scopes are enforced