Billing API

https://api.sandbox.gandi.net/v5/billing

Gandi Billing API

/v5/billing/info

https://api.sandbox.gandi.net/v5/billing/info

get Get your user account's information

Request

Headers
  • Required
    • Authorizationstring
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Body
  • application/json
    object

    With the following properties:

    • annual_balancenumber
      amount of purchased over the past 12 months since the request
    • gridstring
      price rate that is applied depending on the amount purchased over the last 12 months
    • outstanding_amountnumber
      amount of outstanding orders (payment by terms) since the last invoice
    Optional
    • prepaidobject
      prepaid account information

      With the following properties:

      • amountnumber
        current amount available in the prepaid account
      • created_atdatetime
        creation date of the prepaid account
      • currencystring
        currency in use for the prepaid account
      • updated_atdatetime
        last modification date of the prepaid account
      • warning_thresholdnumber
        amount under which a warning email is sent
    • prepaid_monthly_invoiceboolean
      indicates if orders are gathered into a single monthly invoice
    Example:
    {
      "prepaid": {
        "amount": 49856.3,
        "currency": "EUR",
        "warning_threshold": 100,
        "created_at": "2019-01-15T12:11:35Z",
        "updated_at": "2019-03-08T15:14:53Z"
      },
      "outstanding_amount": 0,
      "annual_balance": 120,
      "grid": "A"
    }

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    object

    With the following properties:

    • causestring
    • codeinteger
    • messagestring
    • objectstring

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    object

    With the following properties:

    • causestring
    • codeinteger
    • messagestring
    • objectstring

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    object

    With the following properties:

    • causestring
    • codeinteger
    • messagestring
    • objectstring

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorizationstring
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

/v5/billing/info/{sharing_id}

https://api.sandbox.gandi.net/v5/billing/info/{sharing_id}

get Get Account Information

Request

URI Parameters
    • sharing_idstring
      target organization id
Headers
  • Required
    • Authorizationstring
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Body
  • application/json
    object

    With the following properties:

    • annual_balancenumber
      amount of purchased over the past 12 months since the request
    • gridstring
      price rate that is applied depending on the amount purchased over the last 12 months
    • outstanding_amountnumber
      amount of outstanding orders (payment by terms) since the last invoice
    Optional
    • prepaidobject
      prepaid account information

      With the following properties:

      • amountnumber
        current amount available in the prepaid account
      • created_atdatetime
        creation date of the prepaid account
      • currencystring
        currency in use for the prepaid account
      • updated_atdatetime
        last modification date of the prepaid account
      • warning_thresholdnumber
        amount under which a warning email is sent
    • prepaid_monthly_invoiceboolean
      indicates if orders are gathered into a single monthly invoice
    Example:
    {
      "prepaid_monthly_invoice": false,
      "outstanding_amount": 0,
      "annual_balance": 250,
      "grid": "A"
    }

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    object

    With the following properties:

    • causestring
    • codeinteger
    • messagestring
    • objectstring

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    object

    With the following properties:

    • causestring
    • codeinteger
    • messagestring
    • objectstring

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    object

    With the following properties:

    • causestring
    • codeinteger
    • messagestring
    • objectstring

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorizationstring
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

/v5/billing/price/{type}

https://api.sandbox.gandi.net/v5/billing/price/{type}

get Return product catalog prices.

Request

URI Parameters
    • typestring

      One of: "cloud", "domain", "domain_option", "issued-cert", "mailboxv2", "openstack", "phone_advisory", "simple-hosting", "tmch"

      Minimum length: 1

Query String
  • Required
    • namearray

      Of items of type:

      • string

        Minimum length: 1

    • processesarray

      Of items of type:

      • string

        Minimum length: 1

    Optional
    • active_phaseboolean
      active phase
    • countrystring
      country
    • currencystring
      currency
    • discountsarray

      Of items of type:

      • string

        Minimum length: 1

    • duration_unitstring
      duration unit
    • extensionstring
      extension
    • featuresboolean
      features
    • gridstring
      grid
    • langstring
      lang
    • max_durationinteger
      max duration
    • pageinteger

      Default: 1

      Minimum: 1

      Which result page to retrieve. If the number is greater than the last page, an empty list is returned.
    • per_pageinteger

      Minimum: 1

      How many items to display per page.
    • prices_atdatetime
      pricing date
    • sharing_idstring
      sharing id
Headers
  • Required
    • Authorizationstring
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key

Responses

200

Headers
    • Total-Countinteger
      Total number of items.
    Optional
    • Linkstring
      Links to next and last page.
Body
  • application/json
    object

    With the following properties:

    • currencystring

      Minimum length: 1

    • gridstring

      Minimum length: 1

    • productsarray

      Default: []

      list of products

      Of items of type:

      • object

        With the following properties:

        • namestring

          Minimum length: 1

        • phasesarray

          Default: []

          list of phases

          Of items of type:

          • object

            With the following properties:

            • namestring

              Minimum length: 1

              name
            • starts_atdatetime
              start date of the phase
            Optional
            • ends_atdatetime
              end date of the phase
        • pricesarray

          Default: []

          list of prices

          Of items of type:

          • object

            With the following properties:

            • discountboolean
              discount
            • duration_unitstring

              Minimum length: 1

              duration unit
            • featuresarray

              Default: []

              Of items of type:

              • object

                With the following properties:

                • namestring

                  Minimum length: 1

                  name
                • name_label?string

                  Minimum length: 1

                  name label
                • typestring

                  One of: "boolean", "string", "int", "float"

                  Minimum length: 1

                  type
                • valuestring

                  Minimum length: 1

                  value
                • value_label?string

                  Minimum length: 1

                  value label
            • max_durationinteger
              max duration
            • min_durationinteger
              min duration
            • optionsobject

              Default: {}

              options

              With the following properties:

              Optional
              • addressesstring
                certificates details - addresses
              • addresses_labelstring
                certificates details - addresses label
              • commitmentboolean
                commitment
              • coresinteger
                openstack attributes - cores
              • duration_changestring
                domain attributes - duration change
              • duration_change_labelstring
                domain attributes - duration change label
              • extensionstring
                extension related to a domain option
              • force_registration_displayboolean
                domain attributes - force registration display
              • memoryinteger
                openstack attributes - memory
              • name_labelstring
                openstack attributes - name label
              • offerstring
                certificates attributes - offer
              • offer_labelstring
                certificates attributes - offer label
              • phasestring
                phase
              • sgcboolean
                certificates details - sgc
              • sgc_labelstring
                certificates details - sgc label
              • sizestring
                pass attributes - size
              • size_labelstring
                pass attributes - size label
              • trialboolean
                trial
              • valuestring
              • warrantystring
                certificates details - warranty
              • warranty_labelstring
                certificates details - warranty label
            • price_after_taxesnumber
              price after taxes
            • price_before_taxesnumber
              price before taxes
            Optional
            • normal_price_after_taxesnumber
              normal price after taxes
            • normal_price_before_taxesnumber
              normal price before taxes
            • typestring
        • processstring
          process
        • statusstring

          Minimum length: 1

          status
        • taxesarray

          Default: []

          list of taxes

          Of items of type:

          • object

            With the following properties:

            • namestring

              Minimum length: 1

            • ratenumber
            • typestring

              Minimum length: 1

            Optional
            • name_labelstring
    • taxesarray
      list of taxes

      Of items of type:

      • object

        With the following properties:

        • namestring

          Minimum length: 1

        • ratenumber
        • typestring

          Minimum length: 1

        Optional
        • name_labelstring
    Example:
    {
      "currency": "EUR",
      "grid": "A",
      "taxes": [
        {
          "name": "vat",
          "name_label": "VAT",
          "rate": 25,
          "type": "service"
        }
      ],
      "products": [
        {
          "name": ".com",
          "phases": [],
          "prices": [
            {
              "discount": false,
              "duration_unit": "y",
              "features": [],
              "max_duration": 2,
              "min_duration": 1,
              "options": {
                "phase": "golive"
              },
              "price_before_taxes": 12.54,
              "price_after_taxes": 15.68
            },
            {
              "discount": false,
              "duration_unit": "y",
              "features": [],
              "max_duration": 10,
              "min_duration": 3,
              "options": {
                "phase": "golive"
              },
              "price_before_taxes": 10.66,
              "price_after_taxes": 13.32
            }
          ],
          "status": "available",
          "process": "create",
          "taxes": [
            {
              "name": "vat",
              "name_label": "VAT",
              "rate": 25,
              "type": "service"
            }
          ]
        }
      ]
    }

403

Access to the resource is denied. Mainly due to a lack of permissions to access it.
Body
  • application/json
    object

    With the following properties:

    • causestring
    • codeinteger
    • messagestring
    • objectstring

401

Bad authentication attempt because of a wrong API Key.
Body
  • application/json
    object

    With the following properties:

    • causestring
    • codeinteger
    • messagestring
    • objectstring

403

In case the bearer token has expired, does not have enought permission or does not exists.
Body
  • application/json
    object

    With the following properties:

    • causestring
    • codeinteger
    • messagestring
    • objectstring

Secured by

Http Authorization Scheme

This authentication scheme allows you to pass your Personal Access Token and be granted access to permissions and resources scoped by this token.

Tokens are created in the Organization Tab of the Gandi Admin application, choose the organization the token will have access too. Then go to the sharing tab, and click on "Create a token" button.

The authentication scheme Apikey allows also you to pass your Gandi API Key, but has been deprecated.

Headers
  • Required
    • Authorizationstring
      The Authorization header must start with Bearer for access token, or Apikey depending of the authentication scheme. Apikey is deprecated and be replaced by personal access token.
      Example: Bearer pat_abc-123
      Example: Apikey your-api-key