---
title: Get a list of Invoices
slug: import-test-pdf/get-a-list-of-invoices
createdAt: 2025-10-28T16:28:34.258Z
---

{
  "id": "Yfqa8GD3whqEXpVycWLRF",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/api/v1/invoices",
    "servers": [],
    "name": "Get a list of Invoices",
    "description": "Returns list of Invoices",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "filter[sale_id]",
          "type": "integer",
          "description": "Sale ID"
        },
        {
          "kind": "optional",
          "name": "filter[updated_from]",
          "type": "string<date-time>",
          "description": "<p>Updated after the datetime (use iso8601 format - 2020-08-16T08:56</p><div></div>.000000Z). Updated at and created at are returned in UTC in the response<p></p>"
        },
        {
          "kind": "optional",
          "name": "filter[updated_to]",
          "type": "string<date-time>",
          "description": "<p>Updated at less or equal than the datetime (use iso8601 format - 2020-08-16T08:56</p><div></div>.000000Z). Updated at and created at are returned in UTC in the response<p></p>"
        },
        {
          "kind": "optional",
          "name": "sort",
          "type": "string",
          "description": "<p>Order by field(s) (created_at,updated_at) Use a minus before for descending order -updated_at</p>"
        },
        {
          "kind": "optional",
          "name": "include",
          "type": "string",
          "description": "<p>Additional info to include. You can use multiple, comma separated. Options: sale, sale.vet, sale.customer, sale.customer.country, sale.payments</p>"
        },
        {
          "kind": "optional",
          "name": "detailed",
          "type": "boolean",
          "description": "<p>Set to true to get the full invoice details (this significantly increases the response size and response time)</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "links",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/paths/~1api~1v1~1pets/get/responses/200/content/application~1json/schema/properties/links",
                "customType": "links",
                "schema": []
              },
              {
                "name": "meta",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/paths/~1api~1v1~1pets/get/responses/200/content/application~1json/schema/properties/meta",
                "customType": "meta",
                "schema": []
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url /api/v1/invoices \\\n     --header 'accept: application/json'"
        },
        {
          "id": "example-1-javascript",
          "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(\"/api/v1/invoices\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/api/v1/invoices\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/api/v1/invoices\"\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": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// successful operation\n{\n  \"data\": [\n    {}\n  ],\n  \"links\": {},\n  \"meta\": {}\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}