POST
/transactional-api/update-content-packageUpdate Content Package
Updates the name, description, or availability settings of a content package.
Authorization: Bearer token (JWT). See Authentication.
Request
curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/update-content-package' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"packageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"availability": "all_healthcare_organisations",
"availableToTenants": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"availableToOdsCodes": "string"
}'
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
packageId | string<uuid> | Yes | ID of the content package to update. |
name | string (nullable) | No | New name for the package. |
description | string (nullable) | No | New description for the package. |
availability | enum (nullable) | No | New distribution scope. One of: all_healthcare_organisations, specific_organisations. |
availableToTenants | array<string<uuid>> (nullable) | No | Tenant IDs to distribute to. Required when availability is specific_organisations. |
availableToOdsCodes | string (nullable) | No | Comma-separated ODS codes to distribute to. At least one of availableToTenants or availableToOdsCodes is required when availability is specific_organisations. |
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.