---
updatedAt: 2026-08-28T15:01:18.000Z
agentTools:
  projectIndex: https://developer.getbright.se/llms.txt
---

# Get account invoice url

Returns the url where the invoice can be found. For enhanced security, this url should include a short lived token or similar.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Bright Kit",
    "version": "v1.0",
    "contact": {
      "name": "Bright Energy",
      "url": "https://www.getbright.se",
      "email": "support@getbright.se"
    },
    "description": "<br>\n<img src=\"https://bright-documentation-assets.s3.eu-north-1.amazonaws.com/bright-kit-logo.svg\" width=\"300\">\n\nThe following API specification is a blueprint for Bright Energy partners.\n\nPartners are required to create and expose these endpoints only to Bright Energy for fetching user data. This enables users to access your applications and all embedded features.\n",
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/licenses/MIT"
    },
    "summary": "Bright Kit"
  },
  "servers": [
    {
      "url": "https://{kitEnvironment}.{kitDomain}/{kitBasePath}",
      "description": "Variable based url structure.\n\n`kitDomain`: The domain the Bright Kit is deployed to.\n\n`kitEnvironment`: The environment to target your requests. `staging` shall be used for integration and testing purposes.\n\n`kitBasePath`: Use v1 currently.\n",
      "variables": {
        "kitDomain": {
          "default": "domain"
        },
        "kitEnvironment": {
          "default": "staging"
        },
        "kitBasePath": {
          "default": "v1"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "invoices",
      "description": "Invoices for services that have been consumed by users."
    }
  ],
  "security": [
    {
      "apiKey": []
    },
    {
      "bearerAuth": []
    }
  ],
  "externalDocs": {
    "description": "Bright Energy Developer Hub",
    "url": "https://developer.getbright.se"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Can be the obtained token from an approved authorization method (Oauth or OpenId) or a pre-generated token given to Bright Energy. Tokens must be environment specific. JWT supported."
      },
      "apiKey": {
        "type": "apiKey",
        "name": "apiKey",
        "in": "header",
        "description": "API key that is environment specific."
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "name": "BadRequestError",
              "message": "The request was malformed.",
              "status": 400,
              "error": true,
              "key": "BadRequestError",
              "uid": "y9g1f21f-a740-4346-9a79-3800fe8c8644"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "name": "ForbiddenError",
              "message": "Invalid Token.",
              "status": 401,
              "error": true,
              "key": "TOKEN_INVALID",
              "uid": "a9c1f21f-a740-4346-9a79-3800fe8c8652"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "name": "NotFoundError",
              "message": "The resource was not found.",
              "status": 404,
              "error": true,
              "key": "NotFoundError",
              "uid": "a9c1f21f-a740-4346-9a79-3800fe8c8652"
            }
          }
        }
      }
    },
    "schemas": {
      "ISO8601": {
        "type": "string",
        "minLength": 19,
        "format": "date-time",
        "pattern": "^(-?(?:[1-9][0-9]*)?[0-9]{4})(-(1[0-2]|0[1-9]))?(-(3[01]|0[1-9]|[12][0-9]))?(T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])((.[0-9]+)?|([+-](2[0-3]|[01][0-9]):([0-5][0-9]))))?(Z)?$",
        "title": "ISO8601",
        "description": "A field which should comply with the ISO 8601 standard.",
        "examples": [
          "2023-10-20T15:30:30+02:00",
          "2023-10-20T11:30:30.000Z"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "GenericError"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "An error of some origin has occurred."
            ]
          },
          "status": {
            "type": "number",
            "format": "int32",
            "minimum": 400,
            "maximum": 600,
            "examples": [
              400
            ]
          },
          "error": {
            "type": "boolean",
            "examples": [
              true
            ]
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "GenericError"
            ]
          },
          "uid": {
            "type": "string",
            "minLength": 1,
            "examples": [
              "25198069-6171-410c-bfed-5e0666402c08"
            ]
          }
        },
        "required": [],
        "title": "Error",
        "description": "The standard error object used in API responses",
        "minProperties": 6
      },
      "InvoiceUrl": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1,
            "description": "The url to be opened in a WebView.",
            "examples": [
              "https://example.com/PDF"
            ]
          },
          "expiration": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ISO8601"
              },
              {
                "description": "The date-time optional expiration date for the url."
              }
            ]
          },
          "invoiceType": {
            "type": "string",
            "enum": [
              "pdf",
              "html",
              "missing"
            ],
            "minLength": 1
          }
        },
        "required": [
          "url"
        ],
        "title": "InvoiceUrl",
        "description": "The url where the invoice can be found."
      }
    },
    "parameters": {
      "accountId": {
        "schema": {
          "type": "string",
          "minLength": 1
        },
        "required": true,
        "in": "path",
        "name": "accountId",
        "description": "The unique Id of the account.",
        "example": [
          "123456789"
        ]
      },
      "invoiceId": {
        "schema": {
          "type": "string",
          "minLength": 1
        },
        "required": true,
        "in": "path",
        "name": "invoiceId",
        "description": "The id of the invoice.",
        "example": [
          "0b82c296-f15f-4923-a4f3-b98f87529d81"
        ]
      }
    }
  },
  "paths": {
    "/accounts/{accountId}/invoices/{invoiceId}/url": {
      "get": {
        "operationId": "get-account-invoice-url",
        "summary": "Get account invoice url",
        "description": "Returns the url where the invoice can be found. For enhanced security, this url should include a short lived token or similar.",
        "tags": [
          "invoices"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accountId"
          },
          {
            "$ref": "#/components/parameters/invoiceId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceUrl"
                }
              },
              "application/pdf": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    }
  }
}
```