Billing API

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

Gandi Billing API

/v5/billing/info

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

get Get your user account's information

Request

Headers
  • Required
    • Authorization ⁠string
      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_balance ⁠number
      amount of purchased over the past 12 months since the request
    • grid ⁠string
      price rate that is applied depending on the amount purchased over the last 12 months
    • outstanding_amount ⁠number
      amount of outstanding orders (payment by terms) since the last invoice
    Optional
    • prepaid ⁠object
      prepaid account information

      With the following properties:

      • amount ⁠number
        current amount available in the prepaid account
      • created_at ⁠datetime
        creation date of the prepaid account
      • currency ⁠string
        currency in use for the prepaid account
      • updated_at ⁠datetime
        last modification date of the prepaid account
      • warning_threshold ⁠number
        amount under which a warning email is sent
    • prepaid_monthly_invoice ⁠boolean
      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:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

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

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

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:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

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
    • Authorization ⁠string
      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.gandi.net/v5/billing/info/{sharing_id}

get Get Account Information

Request

URI Parameters
    • sharing_id ⁠string
      target organization id
Headers
  • Required
    • Authorization ⁠string
      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_balance ⁠number
      amount of purchased over the past 12 months since the request
    • grid ⁠string
      price rate that is applied depending on the amount purchased over the last 12 months
    • outstanding_amount ⁠number
      amount of outstanding orders (payment by terms) since the last invoice
    Optional
    • prepaid ⁠object
      prepaid account information

      With the following properties:

      • amount ⁠number
        current amount available in the prepaid account
      • created_at ⁠datetime
        creation date of the prepaid account
      • currency ⁠string
        currency in use for the prepaid account
      • updated_at ⁠datetime
        last modification date of the prepaid account
      • warning_threshold ⁠number
        amount under which a warning email is sent
    • prepaid_monthly_invoice ⁠boolean
      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:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

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

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

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:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

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
    • Authorization ⁠string
      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.gandi.net/v5/billing/price/{type}

get Return product catalog prices.

Request

URI Parameters
    • type ⁠string

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

      Minimum length: 1

Query String
  • Required
    • name ⁠array

      Of items of type:

      • string

        Minimum length: 1

    • processes ⁠array

      Of items of type:

      • string

        Minimum length: 1

    Optional
    • active_phase ⁠boolean
      active phase
    • country ⁠string
      country
    • currency ⁠string
      currency
    • discounts ⁠array

      Of items of type:

      • string

        Minimum length: 1

    • duration_unit ⁠string
      duration unit
    • extension ⁠string
      extension
    • features ⁠boolean
      features
    • grid ⁠string
      grid
    • lang ⁠string
      lang
    • max_duration ⁠integer
      max duration
    • page ⁠integer

      Default: 1

      Minimum: 1

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

      Minimum: 1

      How many items to display per page.
    • prices_at ⁠datetime
      pricing date
    • sharing_id ⁠string
      sharing id
Headers
  • Required
    • Authorization ⁠string
      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
    • Filtered-Count ⁠integer
      Number of items returned by the API call.
    • Total-Count ⁠integer
      Total number of items.
    Optional
    • Link ⁠string
      Links to next and last page.
Body
  • application/json
    ⁠object

    With the following properties:

    • currency ⁠string

      Minimum length: 1

    • grid ⁠string

      Minimum length: 1

    • products ⁠array

      Default: []

      list of products

      Of items of type:

      • object

        With the following properties:

        • name ⁠string

          Minimum length: 1

        • phases ⁠array

          Default: []

          list of phases

          Of items of type:

          • object

            With the following properties:

            • name ⁠string

              Minimum length: 1

              name
            • starts_at ⁠datetime
              start date of the phase
            Optional
            • ends_at ⁠datetime
              end date of the phase
        • prices ⁠array

          Default: []

          list of prices

          Of items of type:

          • object

            With the following properties:

            • discount ⁠boolean
              discount
            • duration_unit ⁠string

              Minimum length: 1

              duration unit
            • features ⁠array

              Default: []

              Of items of type:

              • object

                With the following properties:

                • name ⁠string

                  Minimum length: 1

                  name
                • name_label? ⁠string

                  Minimum length: 1

                  name label
                • type ⁠string

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

                  Minimum length: 1

                  type
                • value ⁠string

                  Minimum length: 1

                  value
                • value_label? ⁠string

                  Minimum length: 1

                  value label
            • max_duration ⁠integer
              max duration
            • min_duration ⁠integer
              min duration
            • options ⁠object

              Default: {}

              options

              With the following properties:

              Optional
              • addresses ⁠string
                certificates details - addresses
              • addresses_label ⁠string
                certificates details - addresses label
              • commitment ⁠boolean
                commitment
              • cores ⁠integer
                openstack attributes - cores
              • duration_change ⁠string
                domain attributes - duration change
              • duration_change_label ⁠string
                domain attributes - duration change label
              • extension ⁠string
                extension related to a domain option
              • force_registration_display ⁠boolean
                domain attributes - force registration display
              • memory ⁠integer
                openstack attributes - memory
              • name_label ⁠string
                openstack attributes - name label
              • offer ⁠string
                certificates attributes - offer
              • offer_label ⁠string
                certificates attributes - offer label
              • phase ⁠string
                phase
              • sgc ⁠boolean
                certificates details - sgc
              • sgc_label ⁠string
                certificates details - sgc label
              • size ⁠string
                pass attributes - size
              • size_label ⁠string
                pass attributes - size label
              • trial ⁠boolean
                trial
              • value ⁠string
              • warranty ⁠string
                certificates details - warranty
              • warranty_label ⁠string
                certificates details - warranty label
            • price_after_taxes ⁠number
              price after taxes
            • price_before_taxes ⁠number
              price before taxes
            Optional
            • normal_price_after_taxes ⁠number
              normal price after taxes
            • normal_price_before_taxes ⁠number
              normal price before taxes
            • type ⁠string
        • process ⁠string
          process
        • status ⁠string

          Minimum length: 1

          status
        • taxes ⁠array

          Default: []

          list of taxes

          Of items of type:

          • object

            With the following properties:

            • name ⁠string

              Minimum length: 1

            • rate ⁠number
            • type ⁠string

              Minimum length: 1

            Optional
            • name_label ⁠string
    • taxes ⁠array
      list of taxes

      Of items of type:

      • object

        With the following properties:

        • name ⁠string

          Minimum length: 1

        • rate ⁠number
        • type ⁠string

          Minimum length: 1

        Optional
        • name_label ⁠string
    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:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

401

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

    With the following properties:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

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:

    • cause ⁠string
    • code ⁠integer
    • message ⁠string
    • object ⁠string

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
    • Authorization ⁠string
      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