Get Bundles for Purchase

get

/bcws/webresources/v1.0/subscriptions/bundles/{id}

Gets the list of bundles that are available for purchase.

Request

Path Parameters
  • The ID for the service type for which the associated bundles need to be retrieved. For example, 0.0.0.1+-service-email+23456 to retrieve the bundles for the email service type.
Query Parameters
  • Whether to include the charge and discount offer details (offers) or not (any other value).

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

The list of bundles was returned successfully.
Body ()
Root Schema : bundleList
Type: object
Show Source
Nested Schema : bundle
Type: array
A bundle.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : bundle
Type: object
A bundle.
Show Source
Nested Schema : chargeoffers
Type: array
The list of charge offers in the bundle.
Show Source
Nested Schema : discountoffers
Type: array
The list of discount offers in the bundle.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : Service
Type: object
Show Source
Nested Schema : SubscriptionTerms
Type: object
Show Source
Nested Schema : Chargeoffers
Type: object
The list of charge offers in the bundle.
Show Source
Nested Schema : Discountoffers
Type: object
The list of discount offers in the bundle.
Show Source
Nested Schema : discounts
Type: array
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : products
Type: array
Show Source
Nested Schema : Discriminator: @class
Type: object
Show Source
Nested Schema : Discount
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : Product
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : aliasList
Type: array
The list of aliases associated with the service.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : AliasList
Type: object
The list of aliases associated with the service.
Show Source
Nested Schema : extension
Type: object
The extended attributes.

500 Response

An internal server error occurred.
Back to Top

Examples

This example shows how to get the bundles that are available to purchase for a specified service and show the charge and discount offers by submitting a GET request on the REST resource using cURL. For more information about cURL, see "Use cURL".

cURL Command

curl -X GET 'http://hostname:port/bcws/webresources/version/subscriptions/bundles/0.0.0.1+-service-email+166825?expand=offers'

where:

  • hostname is the URL for the Billing Care REST server.
  • port is the port for the Billing Care REST server.
  • version is the version of the API you're using, such as v1.0.

Example of Response Body

This example shows the contents of the response body in JSON format. Because the optional expand=offers parameter was used, the charge and discount offer details are shown.

{
    "extension": null,
    "bundle": [
        {
            "extension": null,
            "bundleId": "0.0.0.1+-deal+171251",
            "name": "Deal with cycle forward product",
            "permitted": "/service/email",
            "creationDate": 1602751532000,
            "description": "Deal with cycle forward product",
            "validTo": 0,
            "tags": "Uncategorized",
            "ref": {
                "id": "0.0.0.1+-deal+171251",
                "uri": null
            },
            "chargeoffers": [
                {
                    "name": "Product with cycle forward event",
                    "description": "Product with cycle forward charge more than 1000",
                    "ref": {
                        "id": "0.0.0.1+-product+168179",
                        "uri": null
                    }
                }
            ],
            "discountoffers": [],
            "subscriptionTerms": null,
            "service": null
        },
        {
            "extension": null,
            "bundleId": "0.0.0.1+-deal+150499",
            "name": "Deal 1 with product 1",
            "permitted": "/service/email",
            "creationDate": 1600954479000,
            "description": "This is the deal with product 1.",
            "validTo": 0,
            "tags": "Uncategorized",
            "ref": {
                "id": "0.0.0.1+-deal+150499",
                "uri": null
            },
            "chargeoffers": [
                {
                    "name": "Product1",
                    "description": "Test product 1",
                    "ref": {
                        "id": "0.0.0.1+-product+151267",
                        "uri": null
                    }
                }
            ],
            "discountoffers": [
                {
                    "ref": {
                        "id": "0.0.0.1+-discount+159928",
                        "uri": null
                    },
                    "name": "Discount 1",
                    "description": "Discount on email service"
                }
            ],
            "subscriptionTerms": null,
            "service": null
        },
        {
            "extension": null,
            "bundleId": "0.0.0.1+-deal+149475",
            "name": "Deal 2 with product 1(2)",
            "permitted": "/service/email",
            "creationDate": 1600954479000,
            "description": "This is the deal with product 1(2).",
            "validTo": 0,
            "tags": "Uncategorized",
            "ref": {
                "id": "0.0.0.1+-deal+149475",
                "uri": null
            },
            "chargeoffers": [
                {
                    "name": "Product1(2)",
                    "description": "Test product 1-(2)",
                    "ref": {
                        "id": "0.0.0.1+-product+148963",
                        "uri": null
                    }
                }
            ],
            "discountoffers": [],
            "subscriptionTerms": null,
            "service": null
        },
        {
            "extension": null,
            "bundleId": "0.0.0.1+-deal+57399",
            "name": "Deal 1b - Standard Email Access",
            "permitted": "/service/email",
            "creationDate": 1589180602000,
            "description": "",
            "validTo": 0,
            "tags": "Uncategorized",
            "ref": {
                "id": "0.0.0.1+-deal+57399",
                "uri": null
            },
            "chargeoffers": [
                {
                    "name": "Product 1b - Email Account",
                    "description": "Charges monthly for 1 email account.",
                    "ref": {
                        "id": "0.0.0.1+-product+61271",
                        "uri": null
                    }
                }
            ],
            "discountoffers": [],
            "subscriptionTerms": null,
            "service": null
        },
        {
            "extension": null,
            "bundleId": "0.0.0.1+-deal+58423",
            "name": "Deal 2b - Discounted Email Access",
            "permitted": "/service/email",
            "creationDate": 1589180602000,
            "description": "",
            "validTo": 0,
            "tags": "Uncategorized",
            "ref": {
                "id": "0.0.0.1+-deal+58423",
                "uri": null
            },
            "chargeoffers": [
                {
                    "name": "Product 2b - Email Account, No Fees",
                    "description": "",
                    "ref": {
                        "id": "0.0.0.1+-product+59863",
                        "uri": null
                    }
                }
            ],
            "discountoffers": [],
            "subscriptionTerms": null,
            "service": null
        }
    ]
}
Back to Top