Get Contracts for an Account

get

/bcws/webresources/v1.0/subscriptions/account/{id}/packages

Gets the list of contracts for the specified account.

Note: A contract consists of a purchased package and its subscription terms.

Request

Path Parameters

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

The contracts were returned successfully.
Body ()
Root Schema : customerPackages
Type: object
Show Source
Nested Schema : billUnitPackages
Type: array
A list of purchased packages
Show Source
Nested Schema : BillUnitPackages
Type: object
A list of purchased packages
Show Source
Nested Schema : AccountGroup
Type: object
Show Source
Nested Schema : SubscriptionTerms
Type: object
Show Source
Nested Schema : serviceType
Type: array
Show Source
Nested Schema : bundles
Type: array
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : PurchasedBundle
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : ServiceGroup
Type: object
Show Source
Nested Schema : bundles
Type: array
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 an account's list of purchased packages, along with their subscription terms, 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/account/0.0.0.1+-account+1612699/packages

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.

{
  "billUnitPackages": [
    {
      "packageID": "0.0.0.1+-plan+865226",
      "packageName": "Package2_renew_with_different_term",
      "packagePurchasedDate": 1393676012000,
      "packageTerms": {
        "extension": null,
        "id": "0.0.0.1+-subscription_terms+861562",
        "termsName": "Term_12month_renew_diff",
        "termsDescription": "",
        "packageRef": {
          "id": "0.0.0.1+-plan+865226",
          "uri": null
        },
        "bundleRef": null,
        "serviceRef": null,
        "subscriberContractRef": {
          "id": "0.0.0.1+-subscriber_contract+1613147",
          "uri": null
        },
        "accountRef": {
          "id": "0.0.0.1+-account+1612699",
          "uri": null
        },
        "commitmentPeriod": 12,
        "commitmentUnit": 0,
        "commitmentStartDate": 1393660800000,
        "commitmentEndDate": 1425196800000,
        "earlyCancellationAllowed": true,
        "earlyCancellationDate": 1398927600000,
        "earlyCancellationFee": 100,
        "reducedCancellationFee": null,
        "autoRenew": true,
        "renewWithSameTerms": false,
        "bundleName": null,
        "currency": 840,
        "gracePeriod": 0,
        "gracePeriodUnit": 0,
        "earlyCancellationType": 1,
        "renewalContractTerms": {
          "extension": null,
          "id": "0.0.0.1+-subscription_terms+862905",
          "termsName": null,
          "termsDescription": null,
          "packageRef": null,
          "bundleRef": null,
          "serviceRef": null,
          "subscriberContractRef": null,
          "accountRef": null,
          "commitmentPeriod": 12,
          "commitmentUnit": 0,
          "commitmentStartDate": null,
          "commitmentEndDate": null,
          "earlyCancellationAllowed": false,
          "earlyCancellationDate": null,
          "earlyCancellationFee": 0,
          "reducedCancellationFee": null,
          "autoRenew": false,
          "renewWithSameTerms": false,
          "bundleName": null,
          "currency": 840,
          "gracePeriod": 0,
          "gracePeriodUnit": 0,
          "earlyCancellationType": 0,
          "renewalContractTerms": null
        }
      },
      "serviceType": [
        {
          "extension": null,
          "serviceId": "ip_2",
          "serviceName": "ip",
          "serviceRef": {
            "id": "0.0.0.1+-service-ip+1609947",
            "uri": null
          },
          "lastStatusChange": 1393676012000,
          "status": 10100,
          "bundles": [
            {
              "extension": null,
              "bundleID": "0.0.0.1+-deal+856633",
              "bundleName": "Ip_Deal",
              "bundleType": 1,
              "packageId": "223"
            }
          ]
        }
      ],
      "accountBundles": null,
      "packageCreatedDate": 1393676012000
    }
  ]
}
Back to Top