> ## Documentation Index
> Fetch the complete documentation index at: https://help.withallo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Obtenir une eSIM

> Returns the status of an eSIM you ordered, its current tier and, once it is `ACTIVE`, its mobile data use this month. Use it to poll for readiness if you do not receive webhooks. Requires the `PARTNER` scope.

> [!NOTE]
>
> **Scope requis :** `PARTNER`

Renvoie le statut d'une eSIM que vous avez commandée, son palier et sa consommation de données mobiles ce mois-ci. Les webhooks [`partner.esim.ready`](https://help.withallo.com/fr/v2/api-reference/webhooks/event-catalog#partneresimready) et [`partner.esim.failed`](https://help.withallo.com/fr/v2/api-reference/webhooks/event-catalog#partneresimfailed) vous préviennent quand le statut change. Sans endpoint webhook, interrogez cet endpoint à la place, dans la [limite](https://help.withallo.com/fr/v2/api-reference/guides/rate-limits.md) de 20 requêtes de lecture par seconde et par clé.

| `status` | Signification |
| - | - |
| `PROVISIONING` | L'eSIM est commandée mais pas encore prête. Cela prend en général 5 à 15 minutes. |
| `ACTIVE` | L'eSIM est prête. Les appels vers le numéro sonnent sur l'eSIM. Obtenez le [code d'activation](https://help.withallo.com/fr/v2/api-reference/white-label/get-esim-activation-code.md) pour la remettre à votre client. |
| `FAILED` | La commande n'a pas abouti. `failure_code` en donne la raison. |
| `REVOKED` | L'eSIM a été [révoquée](https://help.withallo.com/fr/v2/api-reference/white-label/revoke-esim.md), ou remplacée par une eSIM plus récente sur le même numéro. Elle ne fonctionne plus sur son téléphone, et les appels vers le numéro sonnent sur les apps Allo. |

`failure_code` vaut `null` sauf si `status` vaut `FAILED`. Vous ne pouvez consulter que les eSIM commandées sur des comptes créés par votre propre clé API. Tout autre id échoue avec `PARTNER_ESIM_NOT_FOUND`.

## Palier

* `tier` est le palier actuel de l'eSIM. Il change quand une montée de palier demandée avec [Changer le palier d'une eSIM](https://help.withallo.com/fr/v2/api-reference/white-label/change-esim-tier.md) est payée, ou quand une baisse prévue s'applique. D'ici là, c'est le palier commandé.
* `scheduled_tier` est le palier vers lequel une baisse prévue fera passer l'eSIM, et `scheduled_tier_at` la date à laquelle elle s'applique, à la fin de la période déjà payée. Les deux valent `null` quand aucune baisse n'est prévue.

## Consommation de données

`data` donne la consommation de données mobiles de l'eSIM pour le mois en cours. Il vaut `null` sauf si `status` vaut `ACTIVE`.

| Champ | Signification |
| - | - |
| `used_mb` | Données mobiles utilisées ce mois-ci, en Mo. `null` tant que le réseau ne l'a pas encore remontée. |
| `allowance_mb` | Données mobiles dont l'eSIM dispose ce mois-ci, en Mo : les données du palier plus les [recharges](https://help.withallo.com/fr/v2/api-reference/white-label/buy-esim-topup.md) achetées ce mois-ci. |
| `remaining_mb` | `allowance_mb` moins `used_mb`, en Mo, jamais en dessous de 0. `null` quand `used_mb` vaut `null`. |
| `cycle_started_at` | Début du mois en cours, en UTC. |
| `cycle_ends_at` | Fin du mois en cours, en UTC. Le mois suivant commence à cette heure-là. |

* Le cycle est le mois civil, à l'heure de Paris. Les dates sont en UTC : en novembre 2026, le cycle va de `2026-10-31T23:00:00` à `2026-11-30T23:00:00`.
* Allo lit la consommation en direct sur le réseau à chaque appel. Elle peut avoir quelques minutes de retard sur l'usage réel.
* Quand l'eSIM atteint son quota, les données mobiles s'arrêtent jusqu'au mois suivant ou jusqu'à l'[achat d'une recharge](https://help.withallo.com/fr/v2/api-reference/white-label/buy-esim-topup.md). Les appels et les SMS continuent de fonctionner. La ligne n'est jamais facturée pour des données au-delà du quota.
* Allo envoie [`partner.esim.data_low`](https://help.withallo.com/fr/v2/api-reference/webhooks/event-catalog#partneresimdata_low) quand l'eSIM a utilisé 80 % de son quota, et [`partner.esim.data_exhausted`](https://help.withallo.com/fr/v2/api-reference/webhooks/event-catalog#partneresimdata_exhausted) quand elle l'a utilisé en entier. Inutile d'interroger cet endpoint pour surveiller les données.


## OpenAPI

````yaml GET /v2/api/partner/esims/{id}
openapi: 3.0.3
info:
  title: Allo API
  description: >-
    Allo API provides programmatic access to your Allo account, allowing you to
    manage webhooks, retrieve calls and contacts, and send SMS messages.


    All requests to `/v1/api/**` endpoints automatically go through quota
    checking and scope validation.
  version: 1.0.0
  contact:
    name: Allo Support
servers:
  - url: https://api.withallo.com
    description: Production server
security: []
tags:
  - name: Summary Templates
    description: >-
      Manage call summary templates that control how AI-generated call summaries
      are structured for your team.
  - name: Webhooks
    description: >-
      Manage webhook endpoints to receive real-time notifications about events
      in your Allo account. Each endpoint subscribes to one or more event topics
      and is verified with a signing secret.
  - name: Calls
    description: >-
      Retrieve and search call records with filtering and pagination. Filter
      calls by your Allo phone number.
  - name: Contacts
    description: >-
      Search and retrieve contact information with sorting and pagination.
      Includes engagement level tracking.
  - name: SMS
    description: Send SMS messages to phone numbers using your Allo numbers.
  - name: Fax
    description: >-
      Send a PDF as a fax from an Allo line with fax turned on. Sent and
      received faxes appear in conversation items.
  - name: Phone Numbers
    description: Retrieve information about your Allo phone numbers.
  - name: Analytics
    description: Pre-computed call metrics, team performance, and outbound dial funnel
  - name: CRM
    description: Manage people, companies, and deals in your CRM.
  - name: Notes
    description: >-
      Internal team notes on conversations and CRM people, with @mention
      support. Notes are never visible to the contact.
  - name: Threads
    description: >-
      Team discussion threads attached to a conversation item (call, SMS, or
      conversation note). One thread per item.
  - name: AI Receptionist
    description: >-
      Read and write the AI receptionist configuration of a phone line: business
      details, voice, prompt, capabilities, business hours, transfer rules,
      scheduling calendars and knowledge sources.
  - name: Inboxes
    description: >-
      Personal inboxes: saved views of one or more lines, optionally narrowed to
      phone-menu options, with their own filters and notification setting.
paths:
  /v2/api/partner/esims/{id}:
    get:
      tags:
        - White label
      summary: Get eSIM
      description: >-
        Returns the status of an eSIM you ordered, its current tier and, once it
        is `ACTIVE`, its mobile data use this month. Use it to poll for
        readiness if you do not receive webhooks. Requires the `PARTNER` scope.
      operationId: getPartnerEsim
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The eSIM id returned by Order eSIM (`eso-*`).
      responses:
        '200':
          description: eSIM
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: The eSIM id (`eso-*`).
                        example: eso-2F6A1C9D4B7E8A0F3D5C6B9A1E2F4D7C8B0A3E61
                      account_id:
                        type: string
                        description: The account the eSIM was ordered for.
                        example: usr-575966AF3661061265263C58882BC409D2A427B8
                      partner_client_ref:
                        type: string
                        nullable: true
                        description: Your own reference, set when the account was created.
                        example: crm-12345
                      phone_number:
                        type: string
                        description: The number the eSIM carries.
                        example: '+33745805999'
                      tier:
                        type: string
                        description: >-
                          The eSIM's current tier code. It changes when an
                          upgrade is paid or a scheduled downgrade applies.
                        example: ESIM_20GB
                      status:
                        type: string
                        enum:
                          - PROVISIONING
                          - ACTIVE
                          - FAILED
                          - REVOKED
                        description: >-
                          `PROVISIONING`: ordered, not ready yet. `ACTIVE`:
                          ready, calls to the number ring the eSIM. `FAILED`:
                          the order did not complete, see `failure_code`.
                          `REVOKED`: the eSIM was revoked, or replaced by a
                          later eSIM on the same number, and no longer works.
                        example: PROVISIONING
                      failure_code:
                        type: string
                        nullable: true
                        description: >-
                          Why the order failed. Set only when `status` is
                          `FAILED`.
                        example: null
                      data:
                        type: object
                        nullable: true
                        description: >-
                          Mobile data use for the current cycle, the calendar
                          month in Paris time. `null` unless `status` is
                          `ACTIVE`. Read live from the network on each call: it
                          can lag real use by a few minutes.
                        properties:
                          used_mb:
                            type: integer
                            format: int64
                            description: >-
                              Mobile data used this month, in MB. `null` when
                              the network has not reported it yet.
                            example: 3172
                            nullable: true
                          allowance_mb:
                            type: integer
                            format: int64
                            description: >-
                              Mobile data the eSIM can use this month, in MB:
                              the tier's data plus the top-ups bought this
                              month.
                            example: 25600
                          remaining_mb:
                            type: integer
                            format: int64
                            description: >-
                              `allowance_mb` minus `used_mb`, in MB. `null` when
                              `used_mb` is `null`.
                            example: 22428
                            nullable: true
                          cycle_started_at:
                            type: string
                            format: date-time
                            description: >-
                              Start of the current cycle, in UTC: midnight on
                              the 1st of the month in Paris time.
                            example: '2026-10-31T23:00:00'
                          cycle_ends_at:
                            type: string
                            format: date-time
                            description: >-
                              End of the current cycle, in UTC: midnight on the
                              1st of the next month in Paris time.
                            example: '2026-11-30T23:00:00'
                      created_at:
                        type: string
                        format: date-time
                        description: When the eSIM was ordered.
                        example: '2026-10-14T10:05:00'
                      scheduled_tier:
                        type: string
                        nullable: true
                        description: >-
                          The tier a scheduled downgrade will switch the eSIM
                          to. `null` when no downgrade is scheduled.
                        example: null
                      scheduled_tier_at:
                        type: string
                        format: date-time
                        nullable: true
                        description: >-
                          When the scheduled downgrade applies: the end of the
                          period already paid. `null` when no downgrade is
                          scheduled.
                        example: null
              example:
                data:
                  id: eso-2F6A1C9D4B7E8A0F3D5C6B9A1E2F4D7C8B0A3E61
                  account_id: usr-575966AF3661061265263C58882BC409D2A427B8
                  partner_client_ref: crm-12345
                  phone_number: '+33745805999'
                  tier: ESIM_20GB
                  scheduled_tier: null
                  scheduled_tier_at: null
                  status: ACTIVE
                  failure_code: null
                  data:
                    used_mb: 3172
                    allowance_mb: 25600
                    remaining_mb: 22428
                    cycle_started_at: '2026-10-31T23:00:00'
                    cycle_ends_at: '2026-11-30T23:00:00'
                  created_at: '2026-10-14T10:05:00'
        '401':
          $ref: '#/components/responses/ApiUnauthorized'
        '403':
          description: The API key lacks the PARTNER scope.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
        '404':
          description: >-
            No eSIM with this id was ordered on an account your API key
            provisioned (PARTNER_ESIM_NOT_FOUND).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
        '429':
          $ref: '#/components/responses/ApiRateLimited'
      security:
        - ApiKeyAuth: []
components:
  responses:
    ApiUnauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiRateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  schemas:
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            request_id:
              type: string
            retry_after_seconds:
              type: integer
              nullable: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.