Customers

Each user of your app or website that received an eSIM is called "Customer" on Gigastore API.

To create a customer via API, you need to activate the First Package and provide an email of the user.

The API returns a UID that can be used for API calls to top up additional data packages for the customer's account.

Get all customers

You can use the /gigastore/activations/customers endpoint to retrieve a list of all customers on your account. Each customer comes with details like email and uid, a totalAvailableBalance, a list of activatedItems and a list of relatedEsims.

GET /gigastore/activations/customers

Response:
[
    "customer": {
                "email": null,
                "uid": "261ef0b4-b054-4a0f-9e06-ba9193b5c0a5",
                ...
            },
            "totalAvailableBalance": {
                "sizeValue": 2,
                "sizeUnit": "GB"
            },
            "activatedItems": [
                {
                    "uid": "0b35b82f-ae46-4717-96be-12345676789",
                    "balance": {
                        "activatedAt": "2024-03-23T10:53:47Z",
                        "expiresAt": "2024-04-23T10:53:47Z",
                        ... },
                },
                {
                    "uid": "2342bc23-ae46-4717-96be-12345676789",
                    "balance": {
                        "activatedAt": "2024-04-23T10:53:47Z",
                        "expiresAt": "2024-05-23T10:53:47Z",
                        ... },
                },
                
            ],
            "relatedEsims": [
                {
                    "iccid": "891234567891234567890",
                    "imsi": "260123456789012",
                    "activationCode": "LPA:1$domain.tld$CODE123456789",
                    ...
                }
            ]
        },
    ...
]

Get specific customers

To get a specific customer, you can use different methods:

  • Fetch the customer by UID by using the gigastore/activations/customers/<uid> endpoint

  • Search for a customer by using the gigastore/activations/search-customers endpoint

Activated Items

Gigastore supports the purchase/activation of multiple packages per customer.

After the First Package, the Top-up API can be used to add another data package to an existing customer.

The customer object contains a list of all activated packages (activatedItems). Each entry contains a balance object, including the date and time of purchase, the package size (e.g. 3GB), and the currently available balance (e.g. 1,3 GB).

Total Balance

This value sums up the customer's current available balance. Gigastore handles different events internally and provides a convinient method to get the current balance.

This value is recommended for showing your users in the UI.

When creating the customer through the First Package request, an eSIM is created for this customer. That is the first related eSIM for a customer.

In case a customer lost its device, an additional eSIM can be issued (e.g. through a support request on your side) and added to the customer. In this case, multiple related eSIMs can be returned by the API.

Please see the eSIM Profiles section for details.

Last updated