PUT /v1/protocols/\{id\}/compounds
Service: patient-graph · operationId: (none)
Required scopes
(no scope declared — review service config)
Path parameters
id(string) required —
Request body
{
"type": "array",
"items": {
"type": "object",
"properties": {
"compound_id": {
"type": "string",
"format": "uuid"
},
"compound_slug": {
"type": "string",
"minLength": 1
},
"display_name": {
"type": "string",
"minLength": 1
},
"dose_amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
"dose_unit": {
"type": "string",
"minLength": 1
},
"route": {
"type": [
"string",
"null"
]
},
"position": {
"type": "integer",
"minimum": 0
}
},
"required": [
"compound_slug",
"display_name",
"dose_amount",
"dose_unit"
]
}
}Responses
200 Compounds upserted
{
"type": "object",
"properties": {
"protocol_id": {
"type": "string",
"format": "uuid"
},
"compounds": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"protocol_id": {
"type": "string",
"format": "uuid"
},
"compound_id": {
"type": "string",
"format": "uuid"
},
"compound_slug": {
"type": "string"
},
"display_name": {
"type": "string"
},
"dose_amount": {
"type": "string"
},
"dose_unit": {
"type": "string"
},
"route": {
"type": [
"string",
"null"
]
},
"position": {
"type": "integer"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"protocol_id",
"compound_id",
"compound_slug",
"display_name",
"dose_amount",
"dose_unit",
"route",
"position",
"created_at",
"updated_at"
]
}
}
},
"required": [
"protocol_id",
"compounds"
]
}401 Unauthorized
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}404 Protocol 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 PUT https://patient-graph.platform.loop.health/v1/protocols/{id}/compounds \
-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