Skip to main content
POST/transactional-api/create-content-package

Create Content Package

Creates a new content package for distributing resources to organisations.

Authorization: Bearer token (JWT). See Authentication.

Request

curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/create-content-package' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"name": "string",
"availability": "all_healthcare_organisations",
"description": "string",
"availableToTenants": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"availableToOdsCodes": "string"
}'

Body parameters

FieldTypeRequiredDescription
namestringYesPackage name.
availabilityenumYesDistribution scope. Use specific_organisations to restrict to a list of tenants. One of: all_healthcare_organisations, specific_organisations.
descriptionstring (nullable)NoOptional description of the package.
availableToTenantsarray<string<uuid>> (nullable)NoTenant IDs to distribute to. Required when availability is specific_organisations.
availableToOdsCodesstring (nullable)NoComma-separated ODS codes to distribute to. At least one of availableToTenants or availableToOdsCodes is required when availability is specific_organisations.

Responses

201 Created.
{
"id": "00000000-0000-0000-0000-000000000000"
}
400 Invalid request.
3 possible code values
CodeDescriptionWhen
missing-required-fieldfieldName is requireda required field is absent
invalid-operationHuman-readable reason.business rule violation
invalid-fieldfieldName must be a valid UUIDa UUID field is not a valid UUID
{
"errors": [
{
"code": "missing-required-field",
"description": "fieldName is required"
}
]
}