Application Packaging Standard

Last updated 18-Mar-2019

Get Fees

In this step, the external system reads all SKUs with assigned fees from the platform.

../../../_images/price-step-init.png ../../../_images/price-step-get-b.png ../../../_images/price-step-update.png ../../../_images/price-step-sync.png

Get all SKUs of Provider

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.

  1. The IDs and fees in your system may differ from the values in the above example.

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.

Get SKUs by Application

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

Conclusion

This step demonstrated the way an external system can read all SKUs with assigned fees for a specified vendor.