v31

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

Create a bundle

Creates a bundle in the database which groups datasets together to be published on the same date and time

post/bundles

Request body

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 request

{
  "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"
}

Response

bundle was created

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"
}