The REST API enables external systems to get data about products available in the product catalog.
The platform exposes operations with its product catalog on the /products endpoint.
In this document:
The product catalog available through the platform API is a list of offers that each contain several products. The hierarchical product components that you see in the platform UI map to the flat list of products in the API as follows:
service plan -> offer
resource rate -> product
(available through the API)
Note
Although offers are not visible in the API, they affect subscription creation in a way that all subscribed products of one offer will be in one subscription.
In a user interface (UI) at the provider level (the upper level in the account hierarchy), original products are represented by resources uniquely identified by MPN (Manufacturer Part Number) as in this example:
Note
The above list is not visible for resellers; this is only to illustrate how MPNs look.
The MPN values here and in all other examples are fictitious and any correspondences with real values are coincidental.
This step demonstrates how you can get a list of products configured as resource rates in delegated service plans. This is how they look in the reseller control panel (inside a service plan):
To get a list of all products, your external management system must send the following request to the platform:
GET /products HTTP/1.1
Authorization: Bearer eyJwcm...0fQtrLk4RToj51HAmsRXO78
X-Subscription-Key: 066a6b...33b16
If successful, the response looks like this:
HTTP/1.1 200 OK
{
"data": [
{
"mpn": "53fc25f7-6639-4f78-bb44-3c2dfec3ed40",
"name": "Office 365 Extra File Storage",
"serviceName": "O365",
"minimumQuantity": "0.0",
"maximumQuantity": "5000.0",
"costs": [
{
"currency": "USD",
"amount": "1.05",
"type": "recurring"
}
],
"prices": [
{
"currency": "USD",
"amount": "1.15",
"type": "recurring"
}
],
"billingPeriod": {
"type": "month",
"duration": 1
},
"subscriptionPeriod": {
"type": "month",
"duration": 1
},
"dependsOn": [
"91fd106f-4b2c-4938-95ac-f54f74e9a239"
]
},
{
"mpn": "91fd106f-4b2c-4938-95ac-f54f74e9a239",
"name": "Office 365 Enterprise E1",
"serviceName": "O365",
"minimumQuantity": "1.0",
"maximumQuantity": "5000.0",
"costs": [
{
"currency": "USD",
"amount": "17.5",
"type": "recurring"
}
],
"prices": [
{
"currency": "USD",
"amount": "19.8",
"type": "recurring"
}
],
"billingPeriod": {
"type": "month",
"duration": 1
},
"subscriptionPeriod": {
"type": "month",
"duration": 1
},
"dependsOn": [ ]
},
{ /* Other Products */ }
],
"pagination": {
"offset": 0,
"limit": 10,
"total": 11
}
}
The above response displays that the first product (an Office 365 add-on service) depends on the second product (the Office 365 license) in the list. A subscription cannot contain add-on products without the license.
Note
If you place the order for a product with a non-unique MPN (for example, if the MPN is duplicated in the product catalog), the error message in response will contain the explanation that you need to provide additional parameters. Therefore, you must provide more parameters in the request to identify such product. The following parameters are used to identify a product (from the most to least important): mpn, vendor, subscriptionPeriod, billingPeriod. See the example below:
{
"customerId": "1012954",
"poNumber": "myponumber"
"type": "sales",
"products": [
{
"mpn": "bd938-058f-4927-bba3-ae36b1d2501c",
"vendor": "somevendor",
"billingPeriod": {
"type": "month",
"duration": 1
},
"subscriptionPeriod": {
"type": "year",
"duration": 1
}
}
]
}
After this phase, the external system that works on behalf of a reseller has all the necessary data to request the selected products for this reseller’s customers.