In this step, the external system reads all SKUs with assigned fees from the platform.
In this document:
From the list of Operations exposed by the SKU dispatcher, use the rateList
operation
to get the list of SKUs with the assigned fees:
GET /aps/2/services/sku-manager/vendor/0ab950d1-abc9-4433-a87d-8ba009bf4bce/rates
The response contains a list of all SKUs with the assigned fees. The following example shows only two SKU structures for demo:
HTTP/1.1 200 OK
[
{
"id": 2,
"feeTypes": [
"RECURRING"
],
"price": {
"value": "4.25",
"code": "USD"
},
"msrp": {...},
"name": "user-management-1month-recurring",
"description": {
"en_US": "Demo cloud VPS and User Management service - 1 month recurring fee."
},
"plans": [
"4"
]
},
{
"id": 5,
"feeTypes": [
"RECURRING"
],
"price": {
"value": "1.5",
"code": "USD"
},
"msrp": {...},
"name": "user-management-resource-PremiumProfile-recurring",
"description": {...},
"plans": [
"4"
],
"resources": [
"1000107"
]
},
...
]
Note
1. Although the SKU ID ensures the uniqueness of the SKU, however, the response can contain SKU objects with duplicated IDs. It occurs when a SKU is assigned to two or more fees with different fee values.
The following response excerpt shows two SKU structures with the same ID bound to the setup fee in two different plans (plan #4 and plan #5):
[
{
"id": 2,
"feeTypes": [
"RECURRING"
],
"price": {
"value": "4.25",
"code": "USD"
},
"msrp": { ... },
"name": "user-management-1month-recurring",
"description": {
"en_US": "Demo cloud VPS and User Management service - 1 month recurring fee."
},
"plans": [
"4"
]
},
{
"id": 2,
"feeTypes": [
"RECURRING"
],
"price": {
"value": "0.0",
"code": "USD"
},
"msrp": { ... },
"name": "user-management-1month-recurring",
"description": {
"en_US": "Demo cloud VPS and User Management service - 1 month recurring fee."
},
"plans": [
"5"
]
},
...
]
If the external system reads the SKUs for the first time, it can import the list of SKUs to its SKU catalog.
The SKU API allows getting a list of SKUs assigned to those fees that participate in selling services of a
particular application. This is possible by adding a custom filter id={AppId}
, where {AppId} is the APS ID
assigned to the application in its APP-META.xml
file. For example:
GET /aps/2/services/sku-manager/vendor/0ab950d1-abc9-4433-a87d-8ba009bf4bce/rates?appId=http://aps-standard.org/samples/bss-starter
This step demonstrated the way an external system can read all SKUs with assigned fees for a specified vendor.