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

# Retrieve a list of Activations.

> 
Retrieves either:

- A list of country-level e-invoicing activations configured at the connected e-invoicing provider, or
- A list of business entities configured at the provider, depending on the query parameters used.

Each activation represents the provider's capability to support e-invoicing in a specific country and model for a given business entity.

**Business Entity Concept**

In Chargebee, a *business entity* represents a business unit or brand  under the merchant's organization. Refer [here](https://apidocs.chargebee.com/docs/api/business_entities) for more details.
In this SPI, a business entity corresponds to the closest equivalent in the provider's system (for example, a company, or tenant).

**Modes of Operation**

- When called **without parameters**, returns all activations across
  business entities (if supported by the provider).

- When called with `business_entity_id`, returns activations for that
  specific business entity.

- When called with `mode=business_entities`, returns a list of
  business entities that are active or configured in the provider.

This endpoint enables Chargebee to:

- Identify e-invoicing capabilities available for activation.
- Fetch business entity lists for provider configuration workflows.
- Retrieve activation details filtered by a specific business entity
    during country-level setup.

**Example use cases**

- During integration setup:
  `GET /einvoicing/activations?mode=business_entities`

- During country configuration:
  `GET /einvoicing/activations?business_entity_id=<provider_entity_id>`




## OpenAPI

````yaml get /einvoicing/activations
openapi: 3.0.0
info:
  description: >
    ## E-invoicing Service Provider Interface (SPI) - Overview
      Chargebee streamlines e-invoicing compliance across regions by facilitating the following operations throughout the billing lifecycle.

    1) Retrieve E-invoicing Activations:
        - Retrieves the list of country and network activations that are configured in the connected e-invoicing provider platform.
        - Each activation reflects a country and e-invoicing network that has been set up and made available by the provider.
        - Chargebee uses this operation during provider enablement to determine which activations can be offered to merchants.
    2) Document Submission:
        - Submits invoices and credit notes to external e-invoicing systems for validation, compliance processing, and delivery to tax authorities or trading partners.
    3) Status Tracking:
        - Supports asynchronous document lifecycle tracking through webhook notifications sent by the e-invoicing adapter. These updates reflect real-time status changes as documents move through validation, compliance, and regulatory delivery stages.
        - Allows on-demand status checks to retrieve the latest processing state of submitted documents, ensuring continued visibility even if webhook delivery is delayed or disrupted.
    4) Final Document Retrieval:
        - Retrieves finalized and regulator-approved documents for archiving, auditing or customer-facing use.

    Chargebee leverages external e-invoicing services to execute these
    operations effectively. These external e-invoicing servies are the 
    certified vendors offering APIs to handle e-invoicing compliance and
    document exchange with tax authorities.


    ## The Role of the E-invoicing Adapter App:
      To connect with external e-invoicing systems, Chargebee uses an E-invoicing Adapter App -  a bridge that enables secure and standardized communication between Chargebee and the e-invoicing system. This communication is governed by the E-invoicing Service Provider Interface (SPI).

    ## Building an E-invoicing Adapter App
      To integrate an e-invoicing system with Chargebee, you must implement the E-invoicing SPI by developing an adapter app. This is required in the following scenarios:

      - As an E-invoicing Provider:
        - Connect your compliance platform to Chargebee so merchants can automatically submit billing documents in a regulator-approved format.
      - As a System Integrator:
        - Build a connector that bridges a third-party e-invoicing provider and Chargebee, enabling seamless integration for merchants.

    By implementing the E-invoicing SPI, you enable Chargebee to support global
    regulatory compliance through a scalable and region-agnostic architecture.
  title: E-Invoicing Service Provider Interface
  version: 1.0.0
servers:
  - description: Production server (replace with actual service URL)
    url: https://api.example.com
  - description: Sandbox server for testing
    url: https://sandbox.example.com
security:
  - ApiKeyAuth: []
tags:
  - description: Operations related to e-invoicing activations
    name: Activations
  - description: Operations related to e-invoicing documents
    name: Documents
paths:
  /einvoicing/activations:
    get:
      tags:
        - Activations
      summary: Retrieve a list of Activations.
      description: >

        Retrieves either:


        - A list of country-level e-invoicing activations configured at the
        connected e-invoicing provider, or

        - A list of business entities configured at the provider, depending on
        the query parameters used.


        Each activation represents the provider's capability to support
        e-invoicing in a specific country and model for a given business entity.


        **Business Entity Concept**


        In Chargebee, a *business entity* represents a business unit or brand 
        under the merchant's organization. Refer
        [here](https://apidocs.chargebee.com/docs/api/business_entities) for
        more details.

        In this SPI, a business entity corresponds to the closest equivalent in
        the provider's system (for example, a company, or tenant).


        **Modes of Operation**


        - When called **without parameters**, returns all activations across
          business entities (if supported by the provider).

        - When called with `business_entity_id`, returns activations for that
          specific business entity.

        - When called with `mode=business_entities`, returns a list of
          business entities that are active or configured in the provider.

        This endpoint enables Chargebee to:


        - Identify e-invoicing capabilities available for activation.

        - Fetch business entity lists for provider configuration workflows.

        - Retrieve activation details filtered by a specific business entity
            during country-level setup.

        **Example use cases**


        - During integration setup:
          `GET /einvoicing/activations?mode=business_entities`

        - During country configuration:
          `GET /einvoicing/activations?business_entity_id=<provider_entity_id>`
      operationId: listActivations
      parameters:
        - description: >
            Filters activations for a specific business entity.


            In Chargebee, a *business entity* represents a business unit or
            brand under the merchant's organization. In this SPI, the

            `business_entity_id` refers to the corresponding identifier in the

            e-invoicing provider’s system (for example, a company or tenant ID).


            When provided, the adapter must return only the activations that
            belong to the specified business entity.
          explode: true
          in: query
          name: business_entity_id
          required: false
          schema:
            type: string
          style: form
        - description: |
            Filters activations by country.
              
            The value must be a two-letter ISO 3166-1 alpha-2 country code
            (for example, `DE`, `FR`, `IT`).
              
            When provided, the adapter must return only the activations that
            are applicable for the specified country.
              
            This parameter is typically used during country-level e-invoicing
            configuration to determine whether a provider supports e-invoicing
            for a given country and business ent
          explode: true
          in: query
          name: country
          required: false
          schema:
            maxLength: 2
            minLength: 2
            type: string
          style: form
        - description: |
            Optional mode for controlling the response type:
            - `business_entities`: Returns list of Business Entities.
            - `activations` (default): Returns list of activations.
          explode: true
          in: query
          name: mode
          required: false
          schema:
            enum:
              - business_entities
              - activations
            type: string
          style: form
      responses:
        '200':
          content:
            application/json:
              examples:
                Business Entities response:
                  summary: Response when listing companies
                  value:
                    business_entities:
                      - id: 595e13fd-68b0-40c2-ade3-9780ce339d97
                        display_name: Acme BE
                      - id: a3f7b451-29f0-42e0-8e4d-927c0ff19de7
                        display_name: Beta GmbH
                Activations response:
                  summary: Response when listing activations for a company
                  value:
                    activations:
                      - id: 02083517-408f-4174-8c4d-42b029162f9c
                        business_entity:
                          id: 595e13fd-68b0-40c2-ade3-9780ce339d97
                          display_name: Acme Germany
                        status:
                          code: COMPLETED
                          message: Activation completed successfully.
                        country_activations:
                          - model: PEPPOL
                            country: DE
                            einvoicing_type: B2B
                            supported_document_types:
                              - ubl-invoice
                              - ubl-creditnote
                              - ubl-applicationresponse
                      - id: 02083517-408f-4174-8c4d-42b029162f9c
                        business_entity_id:
                          id: 595e13fd-68b0-40c2-ade3-9780ce339d97
                          display_name: Acme Germany
                        status:
                          code: PENDING
                          message: Activation pending.
                        country_activations:
                          - model: ZUGFERD
                            country: DE
                            einvoicing_type: B2B
                            supported_document_types:
                              - ubl-invoice
                              - ubl-creditnote
              schema:
                $ref: '#/components/schemas/listActivations_200_response'
          description: A list of activations
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500_error_response'
          description: Unexpected error while processing request.
      x-codeSamples:
        - lang: cURL
          label: Integration setup – list companies
          source: |
            curl --request GET \
              --url https://partner.app.com/einvoicing/activations?mode=companies \
              --header 'Content-Type: application/json' \
              --header 'Authorization: {"api_key": … }'
        - lang: cURL
          label: Country configuration – list activations for one company
          source: |
            curl --request GET \
              --url https://partner.app.com/einvoicing/activations?business_entity_id=595e13fd-68b0-40c2-ade3-9780ce339d97 \
              --header 'Content-Type: application/json' \
              --header 'Authorization: {"api_key": … }'
        - lang: cURL
          label: Invoice rejected (includes related application response)
          source: |
            curl --request POST \
              --url https://{domain}.chargebee.com/api/v2/invoices/{document_id}/einvoice_status \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/x-www-form-urlencoded' \
              --data-urlencode 'einvoicing_provider_id=avalara' \
              --data-urlencode 'status=REJECTED' \
              --data-urlencode 'timestamp=2025-09-04T08:17:30.112Z' \
              --data-urlencode 'related_documents[0][document_id]=appresp_7gH1KLM' \
              --data-urlencode 'related_documents[0][document_type]=ubl-applicationresponse' \
              --data-urlencode 'related_documents[0][status]=SUCCESS' \
            --data-urlencode 'related_documents[0][flow]=INBOUND' \
              --data-urlencode 'related_documents[0][timestamp]=2025-09-04T08:17:23.380Z' \
              --data-urlencode 'related_documents[0][provider_response]={"source":"avalara","received_at":"2025-12-29T12:17:47.791Z","payload":{"id":"ad110f2d-9d0a-4435-a8ea-a36caaceb8c7","companyId":"304382fd-1268-4e7b-86db-a8d51ff309d5","status":"Complete"}}'
components:
  schemas:
    listActivations_200_response:
      oneOf:
        - $ref: '#/components/schemas/activations_response'
        - $ref: '#/components/schemas/business_entities_response'
    500_error_response:
      description: An unexpected error occurred while processing your request.
      properties:
        message:
          description: A human-readable description of the unexpected error encountered.
          example: An unexpected error occurred while processing your request.
          type: string
        provider_interaction:
          $ref: >-
            #/components/schemas/document_submission_response_provider_interaction
      required:
        - message
    activations_response:
      properties:
        activations:
          items:
            $ref: '#/components/schemas/activation'
          type: array
      type: object
    business_entities_response:
      properties:
        business_entities:
          description: List of business_entities retrieved from the e-invoicing provider.
          items:
            $ref: >-
              #/components/schemas/business_entities_response_business_entities_inner
          type: array
      type: object
    document_submission_response_provider_interaction:
      description: >
        Captures the interaction between the adapter and the external
        e-invoicing provider.

        Includes both the outbound request details and the inbound response
        received from the provider.

        Intended for internally hosted adapters for audit and traceability of
        SPI transactions.
      example:
        request:
          body: '{}'
        response:
          status_code: 0
          body: '{}'
      properties:
        request:
          $ref: >-
            #/components/schemas/document_submission_response_provider_interaction_request
        response:
          $ref: >-
            #/components/schemas/document_submission_response_provider_interaction_response
      required:
        - request
        - response
      type: object
    activation:
      properties:
        id:
          description: The unique identifier of the activation
          type: string
        business_entity:
          $ref: '#/components/schemas/activation_business_entity'
        status:
          $ref: '#/components/schemas/activation_status'
        country_activations:
          items:
            $ref: '#/components/schemas/country_activation'
          type: array
      type: object
    business_entities_response_business_entities_inner:
      properties:
        id:
          description: The unique identifier of the business entity.
          example: 595e13fd-68b0-40c2-ade3-9780ce339d97
          type: string
        display_name:
          description: The display name of the business entity.
          example: Acme BE
          type: string
      type: object
    document_submission_response_provider_interaction_request:
      description: >-
        Details of the HTTP request sent by the adapter to the external
        provider.
      example:
        body: '{}'
      properties:
        body:
          description: >
            The request payload sent to the provider API, typically serialized
            as JSON.

            This should exclude any sensitive or personally identifiable
            information.
          type: object
      type: object
    document_submission_response_provider_interaction_response:
      description: Details of the HTTP response received from the external provider.
      example:
        status_code: 0
        body: '{}'
      properties:
        status_code:
          description: The HTTP status code returned by the provider.
          type: integer
        body:
          description: |
            The response body returned by the provider.
          type: object
      type: object
    activation_business_entity:
      properties:
        id:
          description: The unique identifier for the company
          type: string
        display_name:
          description: The display name of the company
          type: string
      type: object
    activation_status:
      properties:
        code:
          description: >-
            The current status of the activation as reported by the e-invoicing
            provider.
          enum:
            - COMPLETED
            - FAILED
            - PENDING
          type: string
        message:
          description: A detailed message describing the activation status.
          type: string
      type: object
    country_activation:
      properties:
        model:
          description: >
            Indicates the eInvoicing flow model that governs the document
            exchange and processing mechanism. 

            Different countries adopt different models based on legal,
            technical, and administrative mandates.

            Supported values:

            - PEPPOL: A standardized, secure eInvoicing network enabling
            cross-border electronic document exchange between businesses and
            governments.

            - EINVOICE: Traditional eInvoicing model where invoices are
            digitally exchanged between businesses and sometimes stored.

            - CLEARANCE: Invoices must be pre-approved by a tax authority before
            they are sent to the buyer.

            - REPORTING: Invoices are shared with tax authorities after
            issuance, usually for compliance and audit purposes.

            - ZUGFERD: A hybrid eInvoicing format used in Germany combining PDF
            and XML for human and machine readability.

            - CTC: Continuous Transaction Controls involve real-time or
            near-real-time invoice validation and transmission to tax
            authorities.

            - NEMHANDEL: Denmark’s national infrastructure for eInvoicing that
            supports secure delivery via specific formats like OIOUBL.

            - FACE: Spain’s centralized system (FACe/FACeB2B) for routing
            invoices to government or private recipients.

            - VERIFACTU: Spain’s mechanism for validating and reporting sales
            invoices directly to the tax agency.
          enum:
            - PEPPOL
            - EINVOICE
            - CLEARANCE
            - REPORTING
            - ZUGFERD
            - CTC
            - NEMHANDEL
            - FACE
            - VERIFACTU
          example: PEPPOL
          type: string
        country:
          description: >-
            ISO 3166-1 alpha-2 country code where the e-invoicing activation is
            applicable.
          type: string
        einvoicing_type:
          description: >-
            Specifies the type of business transaction for which e-invoicing is
            applied.
          enum:
            - B2B
            - B2C
            - B2G
          type: string
        supported_document_types:
          description: >
            The types of business documents that are supported for this country
            activation.
          example:
            - ubl-invoice
            - ubl-creditnote
            - ubl-applicationresponse
          items:
            type: string
          type: array
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: Authorization
      type: apiKey

````