Skip to main content
Skip table of contents

Create a bundle of products

Request

To create a bundle of products, send a POST request to:

http://<host>:<port>/commercial/v1/bundles
Note that a bundle is an entity that only exists within Orders. A bundle can only be created and managed through the Orders APIs – it cannot be created via ingest or using the CPM APIs.

Mandatory fields (in body)

  • metadata
    • title – bundle title
    • description – bundle description
  • recurrence – the units for minDuration (DAILY, WEEKLY, MONTHLY, or YEARLY)
  • minDuration – the minimum duration for the bundle (that is, the minumum period during whihc its content is available to the customer). For example, if recurrence is MONTHLY and minDuration is 1, the minumum duration is one month.
  • availability
    • start – the start date from which the bundle is available (in ISO-8601 UTC format)
    • end – the end date, after which the bundle will no longer be available (in ISO-8601 UTC format)

For all available fields, see Orders API documentation.

Example

A request with this payload creates a bundle containing the specified products:

CODE
{
  "metadata": {
    "en_GB": {
      "title": "Gold",
      "description": "Premier content"
    },
    "fr_FR": {
      "title": "d'Or",
      "description": "Le meilleur"
    }
  },
  "products": [
    "entertainment_1",
    "movies_7",
    "sport_3"
  ],
  "price": 12.99,
  "currency": "GBP",
  "recurrence": "monthly",
  "minDuration": 1,
  "availability": {
    "start": {},
    "end": {}
  },
  "external": {
    "externalId": "310-772-7393",
    "url": "http://crm.mpp.co.uk/products/310-772-7393"
  }
}

Response

A successful request returns an HTTP 201 status. The response includes the complete bundle object.

An unsuccessful request returns an HTTP 400 request if there was a problem with the request.

See also

For full details of this API, see Orders API documentation.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.