Offering Packages

The data packages that are offered to your users for sale are defined by the inventory. You can define the inventory following the Configure Inventory section. The inventory API can be used to show available packages to the end-user.

DENT offers an inventory of data packages (items) that differ in

  • Covered Countries

  • Size

  • Validity

  • Price

Each item also has a unique ID, later referred as inventoryItemId.

GET /gigastore/products/inventory

Response:
{
    "items": [
        {
            "id": "14ed2704-35ff-4feb-82a3-12345678abcd",
            "productId": "12345678-1234-abcd-1234-12345678abcd",
            "name": "eSIM Worldwide 50 MB",
            "sizeValue": 50,
            "sizeUnit": "MB",
            "validitySize": 365,
            "validityUnit": "days",
            "validityUnlimited": false,
            "countrySet": "WWW",
            "prices": [
                {
                    "sortIndex": 0,
                    "priceValue": 1.49,
                    "currencyCode": "USD"
                }
            ],
            "retailPrices": [
                {
                    "sortIndex": 0,
                    "priceValue": 4.99,
                    "currencyCode": "USD"
                }
            ],

...

Covered Countries

Each package refers to a set of supported countries, the countrySet. This set can contain one country (single country package) or many countries like the Worldwide data package.

You can find the supported countries set in the Gigastore portal and via API in the Countries API section.

Size

The size of a data package defines the usable amount of data. The size is split into sizeValue and sizeUnit.

  • 50MB: sizeValue = 50 and sizeUnit = "MB"

  • 10GB: sizeValue = 10 and sizeUnit = "GB"

These values can be used to show the user the size of the package.

Please remember that 1 GB equals 1024 MB.

Validity

DENT provides data packages with different days of validity to be sold and activated to end users.

which The validity of a data package defines the period within the package can be used. The validity timer starts with the activation of the package.

The validity is split into validitySize and validityUnit.

  • 30 days: validitySize = 30 and validityUnit = "days"

Price

Each package has a purchase price and a retail price.

The purchase price will be deducted from your credit balance when activating a package.

The retail price is intended to be shown to your users. You can define the retail price for each package in the Gigastore portal.

The API will provide both prices:

"prices": [
    {
        "sortIndex": 0,
        "priceValue": 1.49,
        "currencyCode": "USD"
    }
],
"retailPrices": [
    {
        "sortIndex": 0,
        "priceValue": 4.99,
        "currencyCode": "USD"
    }
],

The retailsPrices array refers to the retail price of the package.

The prices array refers to the purchase price of the package.

The API already supports multiple prices to be able to return different currencies later. We recommend filtering for currencyCode=USD.

Last updated