POST
/transactional-api/set-content-package-itemsSet Content Package Items
Sets the complete list of resource items included in a content package, replacing any existing items.
Authorization: Bearer token (JWT). See Authentication.
Request
curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/set-content-package-items' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"packageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "data-entry-template",
"ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}'
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
packageId | string<uuid> | Yes | ID of the content package. |
type | enum | Yes | Resource type to set. Replaces all current items of this type in the package. One of: data-entry-template, patient-questionnaire, document-template, communication, custom-dashboard, future-action-rule. |
ids | array<string<uuid>> | Yes | IDs of the resources to include. Replaces the current set. |
Responses
200 Success.
{
"status": "ok"
}
400 Invalid request.
3 possible code values
| Code | Description | When |
|---|---|---|
missing-required-field | fieldName is required | a required field is absent |
invalid-operation | Human-readable reason. | business rule violation |
invalid-field | fieldName must be a valid UUID | a UUID field is not a valid UUID |
{
"errors": [
{
"code": "missing-required-field",
"description": "fieldName is required"
}
]
}
404 Content package not found.