# Get Detailed Invoices GET https://app.unleash-instance.example.com/api/admin/invoices/list **Enterprise feature** undefined Reference: https://docs.getunleash.io/api/get-detailed-invoices ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get Detailed Invoices version: endpoint_operational.getDetailedInvoices paths: /api/admin/invoices/list: get: operationId: get-detailed-invoices summary: Get Detailed Invoices description: |- **Enterprise feature** undefined tags: - - subpackage_operational parameters: - name: Authorization in: header description: Header authentication of the form `undefined ` required: true schema: type: string responses: '200': description: '#/components/schemas/detailedInvoicesSchema' content: application/json: schema: $ref: '#/components/schemas/detailedInvoicesSchema' components: schemas: detailedInvoicesLineSchema: type: object properties: description: type: string description: Description of the line item quantity: type: number format: double description: Quantity of the item totalAmount: type: number format: double description: Total amount for this line item in minor currency units currency: type: string description: Currency code lookupKey: type: string description: Lookup key identifying the product/pricing startDate: type: string format: date-time description: Optional start date for the metered period endDate: type: string format: date-time description: Optional end date for the metered period limit: type: number format: double description: Optional limit associated with the line item consumption: type: number format: double description: Optional consumption associated with the line item unitPrice: type: number format: double description: Unit price for the line item required: - description - quantity - currency - lookupKey DetailedInvoicesSchemaInvoicesItems: type: object properties: invoiceDate: type: string format: date-time description: When the invoice was created dueDate: type: string format: date-time description: When the invoice is due status: type: string description: The current status of the invoice totalAmount: type: number format: double description: Total amount for the invoice subtotal: type: number format: double description: Subtotal amount for the invoice currency: type: string description: The currency code for the invoice taxAmount: type: number format: double description: Tax amount for the invoice taxPercentage: type: number format: double description: Tax percentage for the invoice invoiceURL: type: string format: uri description: A URL pointing to where the invoice can be found. invoicePDF: type: string format: uri description: A link to a PDF-version of the invoice. monthText: type: string description: Human-readable month label for the invoice period mainLines: type: array items: $ref: '#/components/schemas/detailedInvoicesLineSchema' description: Primary line items (packages, seats, etc.) usageLines: type: array items: $ref: '#/components/schemas/detailedInvoicesLineSchema' description: Usage line items (traffic, consumption usage, overages) required: - invoiceDate - status - totalAmount - subtotal - currency - taxAmount - taxPercentage - monthText - mainLines - usageLines detailedInvoicesSchema: type: object properties: planPrice: type: number format: double description: The plan price planCurrency: type: string description: The currency code for the plan price invoices: type: array items: $ref: '#/components/schemas/DetailedInvoicesSchemaInvoicesItems' description: List of invoices with their line items required: - invoices ``` ## SDK Code Examples ```python import requests url = "https://app.unleash-instance.example.com/api/admin/invoices/list" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.unleash-instance.example.com/api/admin/invoices/list'; const options = {method: 'GET', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://app.unleash-instance.example.com/api/admin/invoices/list" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://app.unleash-instance.example.com/api/admin/invoices/list") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://app.unleash-instance.example.com/api/admin/invoices/list") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://app.unleash-instance.example.com/api/admin/invoices/list', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.unleash-instance.example.com/api/admin/invoices/list"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://app.unleash-instance.example.com/api/admin/invoices/list")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```