# First Package

When a user of your website or app is eligible to receive a mobile data package (e.g., the user made a purchase of an inventory item, and you received the money), you can issue the first data package.

{% hint style="info" %}
The activation will use your credit balance on Gigastore. You can check for the history of activations here: <https://dent.giga.store/#/your-store/history>.
{% endhint %}

To activate, you need the following:

* **inventoryItemId** - see [Offering Packages](/api/offering-packages.md)
* **metatag**, e.g. an internal transaction id (will be stored and can be retrieved via API)
* **customerEmail** - the email address of your customer (optional)
* **userIp** - current IP of the user&#x20;
* **userCountry** - country of residence (use ISO2 code)
* **expectedPrice** - the retail price of the package (optional)
* **activationMode** - type of package activations (optional) see [Activation Modes](/api/activation-modes.md)

{% hint style="info" %}
To protect your payment flow, you can add the `expectedPrice` field. In this case, our API will check the price against the retail price of the inventory item. Only if the price matches will the API allow activation.
{% endhint %}

{% hint style="warning" %}
In order to ensure compliance with regional regulations, make sure to include user's IP and Country of Residence during the registration. &#x20;
{% endhint %}

```
POST /gigastore/activations/register

Request:
{
    "inventoryItemId": "00e3e46e-faa5-465a-9321-1234567890",
    "metatag": "Comment for reseller...",
    "customerEmail": "customer_email@test.com",
    "userIp": "123.45.67.89",
    "userCountry": "GR",
    "expectedPrice":{
            "sortIndex": 0,
            "priceValue": 9.99,
            "currencyCode": "USD"
    },
  "activationMode": "NOW"
}

Response:
{
  "status": "success",
  "activatedItem": {
    "balance": {
      "activatedAt": "2024-04-30T09:55:36.430Z",
      "expiresAt": "2024-04-30T09:55:36.430Z",
      "activationMode": "NOW",
      "name": "string",
      "size": {
        "sizeValue": 0,
        "sizeUnit": "TB"
      },
      "availableBalance": {
        "sizeValue": 0,
        "sizeUnit": "TB"
      },
      "validitySize": 365,
      "validityUnit": "years"
    },
    "uid": "string",
    "metatag": "Paid in cash",
    "salesChannel": "Application Programming Interface",
    "salesChannelTypeCode": "API",
    "activationType": "DATA_PLAN",
    "purchasePrice": {
      "sortIndex": 1,
      "priceValue": 4.99,
      "currencyCode": "USD"
    },
    "retailPrice": {
      "sortIndex": 1,
      "priceValue": 4.99,
      "currencyCode": "USD"
    }
  },
  "customer": {
    "email": "customer_email@test.com",
    "uid": "123234345-234-cbd2-9321-1234567890",
    "profileUrl": "string"
  },
  "esimProfile": {
    "iccid": "string",
    "uid": "string",
    "imsi": "string",
    "activationCode": "string",
    "appleUniversalLink": "string",
    "installationUrl": "string",
    "lastSeen": "2024-04-30T09:55:36.430Z",
    "activatedAt": "2024-04-30T09:55:36.430Z",
    "state": "RELEASED"
  }
}
```

During the activation, different entries are created in the background and returned from the API:

* a **customer** linked to your account
* an **activated item**, linked to your customer
* an **eSIM profile**, linked to your customer

To use the package, the customer needs to install the eSIM profile. Please check the [eSIM Profiles](/api/esim-profiles.md) section for details.

### Multiple Packages and eSIMs

Customers can have multiple activated items and multiple eSIM profiles. Please refer to the [Customers](/api/customers.md) section of the documentation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.giga.store/api/first-package.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
