Create a bundle of products
Request
To create a bundle of products, send a POST request to:
http://<host>:<port>/commercial/v1/bundles
Mandatory fields (in body)
metadata
title
– bundle titledescription
– bundle description
recurrence
– the units forminDuration
(DAILY
,WEEKLY
,MONTHLY
, orYEARLY
)minDuration
– the minimum duration for the bundle (that is, the minumum period during whihc its content is available to the customer). For example, ifrecurrence
isMONTHLY
andminDuration
is1
, 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:
{
"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.