---
title: Get by id
slug: reference/mFZL-get-by-id
docTags: 
createdAt: 2025-07-10T21:22:34.175Z
---

{
  "id": "30qJdaDQ5YyUaN75Klk24",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://app.amberflo.io/business-unit/chargeback/invoice/detailed",
    "servers": [
      {
        "url": "https://app.amberflo.io/business-unit/chargeback/invoice/detailed"
      }
    ],
    "name": "Get by id",
    "description": "<p>Get a business units' chargeback invoice by id; returns a detailed invoice</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "required",
          "name": "businessUnitId",
          "type": "string",
          "description": "Id of the business unit to which the invoice belongs."
        },
        {
          "kind": "required",
          "name": "startTimeInSeconds",
          "type": "integer<int64>",
          "description": "<p>Start time of the billing period of this invoice, in <a href=\"https://en.wikipedia.org/wiki/Unix_time\" target=\"_blank\">Unix time</a> (seconds).</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "business_unit.invoice.DetailedChargebackInvoice.out",
            "schema": [
              {
                "name": "businessUnitId",
                "kind": "required",
                "type": "string",
                "description": "Id of the business unit to which the invoice belongs.",
                "example": ""
              },
              {
                "name": "startTimeInSeconds",
                "kind": "required",
                "type": "integer<int64>",
                "description": "Start time of the billing period of this invoice, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                "example": 0
              },
              {
                "name": "endTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "End time of the billing period of this invoice, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                "example": 0
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "Status of the invoice.\n",
                "modelRef": "#/components/schemas/business_unit.invoice.ChargebackInvoiceStatus.out",
                "customType": "business_unit.invoice.ChargebackInvoiceStatus.out",
                "schema": []
              },
              {
                "name": "chargebackAmount",
                "kind": "optional",
                "type": "number",
                "description": "Total chargeback amount.",
                "example": ""
              },
              {
                "name": "updateTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Last update time of this invoice, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds).",
                "example": 0
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "array",
                "description": "Breakdown by cloud provider.",
                "modelRef": "#/components/schemas/business_unit.invoice.ProviderDetails.out",
                "customType": "business_unit.invoice.ProviderDetails.out[]",
                "schema": [
                  {
                    "name": "provider",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "chargebackAmount",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "Breakdown by cloud service.",
                    "modelRef": "#/components/schemas/business_unit.invoice.ServiceDetails.out",
                    "customType": "business_unit.invoice.ServiceDetails.out[]",
                    "schema": [
                      {
                        "name": "service",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "meterApiName",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "chargebackAmount",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      },
                      {
                        "name": "details",
                        "kind": "optional",
                        "type": "array",
                        "description": "Breakdown by usage line item.",
                        "modelRef": "#/components/schemas/business_unit.invoice.ServiceLineItem.out",
                        "customType": "business_unit.invoice.ServiceLineItem.out[]",
                        "schema": [
                          {
                            "name": "pricingUnit",
                            "kind": "optional",
                            "type": "string",
                            "example": ""
                          },
                          {
                            "name": "dimensionNames",
                            "kind": "optional",
                            "type": "array",
                            "example": "",
                            "itemType": "string",
                            "customType": "string[]",
                            "itemExample": "",
                            "itemDefault": ""
                          },
                          {
                            "name": "dimensionValues",
                            "kind": "optional",
                            "type": "array",
                            "example": "",
                            "itemType": "string",
                            "customType": "string[]",
                            "itemExample": "",
                            "itemDefault": ""
                          },
                          {
                            "name": "pricingQuantity",
                            "kind": "optional",
                            "type": "number",
                            "example": ""
                          },
                          {
                            "name": "chargebackAmount",
                            "kind": "optional",
                            "type": "number",
                            "example": ""
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/business_unit.invoice.DetailedChargebackInvoice.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "-hlf928GNJA6Al_HsQ4c4",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://app.amberflo.io/business-unit/chargeback/invoice/detailed?businessUnitId=string&startTimeInSeconds=integer%3Cint64%3E' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "CtElFSQyRigx6_3gi4-xy",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/business-unit/chargeback/invoice/detailed?businessUnitId=string&startTimeInSeconds=integer<int64>\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "i-bNArv0PVZZ59O4JagFs",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/business-unit/chargeback/invoice/detailed?businessUnitId=string&startTimeInSeconds=integer<int64>\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "-JXJ5qUOdQwBrhNINJTMS",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/business-unit/chargeback/invoice/detailed?businessUnitId=string&startTimeInSeconds=integer<int64>\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "-hlf928GNJA6Al_HsQ4c4"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful request\n{\n  \"businessUnitId\": \"\",\n  \"startTimeInSeconds\": \"\",\n  \"endTimeInSeconds\": \"\",\n  \"status\": \"\",\n  \"chargebackAmount\": 0,\n  \"updateTimeInSeconds\": \"\",\n  \"details\": [\n    {\n      \"provider\": \"\",\n      \"chargebackAmount\": 0,\n      \"details\": [\n        {\n          \"service\": \"\",\n          \"meterApiName\": \"\",\n          \"chargebackAmount\": 0,\n          \"details\": [\n            {\n              \"pricingUnit\": \"\",\n              \"dimensionNames\": [\n                \"\"\n              ],\n              \"dimensionValues\": [\n                \"\"\n              ],\n              \"pricingQuantity\": 0,\n              \"chargebackAmount\": 0\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "yc1kgrLeiRFf1ym_R7kaC",
      "type": "paragraph",
      "children": [
        {
          "text": "Get a business units' chargeback invoice by id; returns a detailed invoice",
          "id": "e5s8cr1kGAMJHQYXZj0bi"
        }
      ]
    }
  ]
}