v31

latestSwagger 2.0Open Government Licence v3.0raw.githubusercontent.com2026-06-01111230.6 KB
Private

Updates the state of a bundle

Updates the state of a bundle and triggers any associated processes such as enabling public access to items in the bundle at publication time.

put/bundles/{id}/state

Path parameters

idstring required

The unique bundle ID for grouping datasets

Headers

If-Matchstring required

The RFC9110 If-Match header requires the provided entity-tag (ETag header value from the previous read request) to match the resources current entity-tag. This prevents the changes from being applied if there have been any changes to the resource since the client last read the resource. If the header value does not match a 409 Conflict error will be returned.

Request body

'DRAFT' | 'IN_REVIEW' | 'APPROVED' | 'PUBLISHED' required

The current workflow state of the bundle as a whole.

The possible states are:

  • DRAFT : Bundle has been created and is being populated with content changes.
  • IN_REVIEW: Bundle has been submitted for review.
  • APPROVED: Bundle has been approved and is awaiting release.
  • PUBLISHED : Bundle has been published and is now public.

Example request

"APPROVED"

Response

The state of the bundle that has been updated

bundle_type'MANUAL' | 'SCHEDULED' required

The type of bundle.

created_atstring date-time

The ISO8601 date-time the bundle was created at.

idstring

The bundle ID

scheduled_atstring date-time

The ISO8601 date-time the bundle is scheduled to publish at.

state'DRAFT' | 'IN_REVIEW' | 'APPROVED' | 'PUBLISHED' required

The current workflow state of the bundle as a whole.

The possible states are:

  • DRAFT : Bundle has been created and is being populated with content changes.
  • IN_REVIEW: Bundle has been submitted for review.
  • APPROVED: Bundle has been approved and is awaiting release.
  • PUBLISHED : Bundle has been published and is now public.
titlestring required

The title of the bundle

updated_atstring date-time

The ISO8601 date-time the bundle was last updated at.

managed_by'WAGTAIL' | 'DATA-ADMIN' required

The system that created and manages the bundle

Example response

{
  "bundle_type": "SCHEDULED",
  "created_by": {
    "email": "publisher@ons.gov.uk"
  },
  "created_at": "2025-04-04T07:00:00.000Z",
  "id": "9e4e3628-fc85-48cd-80ad-e005d9d283ff",
  "last_updated_by": {
    "email": "publisher@ons.gov.uk"
  },
  "preview_teams": [
    {
      "id": "1253e849-01fd-4662-bee2-63253538da93"
    }
  ],
  "scheduled_at": "2025-04-04T07:00:00.000Z",
  "state": "APPROVED",
  "title": "CPI March 2025",
  "updated_at": "2025-04-04T07:00:00.000Z",
  "managed_by": "WAGTAIL"
}