---
title: Get a list of Sales
slug: import-test-pdf/get-a-list-of-sales
createdAt: 2025-10-28T16:28:34.273Z
---

{
  "id": "8rB5N-nvyhdqE4OTXH5d9",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/api/v1/sales",
    "servers": [],
    "name": "Get a list of Sales",
    "description": "Returns list of Sales",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "filter[id]",
          "type": "integer",
          "description": "Sale ID"
        },
        {
          "kind": "optional",
          "name": "filter[customer_id]",
          "type": "integer",
          "example": 1,
          "description": "<p>Client/Owner Id</p>"
        },
        {
          "kind": "optional",
          "name": "filter[pet_id]",
          "type": "integer",
          "description": "Pet ID"
        },
        {
          "kind": "optional",
          "name": "filter[status]",
          "type": "string",
          "description": "<p>Status (comma separated statuses: 0 - No Sale; 1 - Pending, 2 - Paid, 3 - Partial, 4 - Overdraft)</p>"
        },
        {
          "kind": "optional",
          "name": "filter[include_consolidated]",
          "type": "boolean",
          "description": "<p>Include consolidated Sales - those with consolidated=1 (default false)</p>"
        },
        {
          "kind": "optional",
          "name": "include",
          "type": "string",
          "description": "<p>Additional relations to include. Ex.: invoice,file</p>"
        },
        {
          "kind": "optional",
          "name": "filter[has_monetization]",
          "type": "boolean",
          "description": "<p>Belongs to a Record that has attached a service or treatment (total > 0);Used to include/ignore Draft Records;  Default value: true</p>"
        },
        {
          "kind": "optional",
          "name": "filter[created_at]",
          "type": "array",
          "description": "Dates between when sale was added in the platform",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "filter[updated_at]",
          "type": "array",
          "description": "Dates between when sale was last updated in the platform",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        }
      ],
      "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": "",
                "modelRef": "#/components/schemas/Sale",
                "customType": "Sale[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "clinic_id",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "1"
                  },
                  {
                    "name": "customer_id",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "1"
                  },
                  {
                    "name": "customer",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/SaleCustomer",
                    "customType": "SaleCustomer",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "John"
                      },
                      {
                        "name": "last_name",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "Doe"
                      },
                      {
                        "name": "email",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "john@example.com"
                      },
                      {
                        "name": "phone",
                        "kind": "optional",
                        "type": "string",
                        "description": "Phone number in E.164 format",
                        "example": "+16175551212."
                      },
                      {
                        "name": "address",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "Flowers St. 300, Palo Alto, 123456, USA"
                      },
                      {
                        "name": "city",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "Palo Alto"
                      },
                      {
                        "name": "street",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "Flowers St."
                      },
                      {
                        "name": "street_number",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "300"
                      },
                      {
                        "name": "country",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/Country",
                        "customType": "Country",
                        "schema": [
                          {
                            "name": "id",
                            "kind": "optional",
                            "type": "integer",
                            "description": "",
                            "example": 6
                          },
                          {
                            "name": "name",
                            "kind": "optional",
                            "type": "string",
                            "description": "",
                            "example": "United States"
                          },
                          {
                            "name": "iso_code",
                            "kind": "optional",
                            "type": "string",
                            "description": "",
                            "example": "us"
                          },
                          {
                            "name": "code",
                            "kind": "optional",
                            "type": "string",
                            "description": "",
                            "example": "usa"
                          }
                        ]
                      },
                      {
                        "name": "zip",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "123456"
                      },
                      {
                        "name": "region",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "California"
                      },
                      {
                        "name": "timezone",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "America/Los_Angeles"
                      },
                      {
                        "name": "has_app",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "",
                        "example": true
                      },
                      {
                        "name": "chatUid",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "e58ed763-928c-4155-bee9-fdbaaadc15f3"
                      }
                    ]
                  },
                  {
                    "name": "file",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/Record",
                    "customType": "Record",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "number",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "175"
                      },
                      {
                        "name": "status",
                        "kind": "optional",
                        "type": "integer",
                        "description": "`0` - Draft `1` - Saved `2` - Closed `3` - Hospitalized\n",
                        "example": 1
                      },
                      {
                        "name": "vet_id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "clinic_id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "pet_id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "sale_id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "date",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "2021-11-19"
                      },
                      {
                        "name": "reason",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "Routine checkup"
                      },
                      {
                        "name": "template_id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 0
                      },
                      {
                        "name": "comments",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": ""
                      },
                      {
                        "name": "recommendations",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": ""
                      },
                      {
                        "name": "rabic_tag_number",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": ""
                      },
                      {
                        "name": "presumptive_diagnosis",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": ""
                      },
                      {
                        "name": "diagnosis",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": ""
                      },
                      {
                        "name": "treatment",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "counter_sale",
                    "kind": "optional",
                    "type": "integer",
                    "description": "Id of the realted counter sale",
                    "example": ""
                  },
                  {
                    "name": "amount_paid",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "0.000"
                  },
                  {
                    "name": "amount_due",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "250.000"
                  },
                  {
                    "name": "edit_state_details",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "example": "",
                    "schema": [
                      {
                        "name": "state",
                        "kind": "optional",
                        "type": "integer",
                        "description": "`1` - Open `2` - Ready For Checkout `3` - Closed\n",
                        "example": 0
                      },
                      {
                        "name": "label",
                        "kind": "optional",
                        "type": "string",
                        "description": "Label of the current state\n",
                        "example": ""
                      },
                      {
                        "name": "can_transit_to",
                        "kind": "optional",
                        "type": "array",
                        "description": "",
                        "example": "",
                        "itemType": "object",
                        "customType": "object[]",
                        "schema": [
                          {
                            "name": "label",
                            "kind": "optional",
                            "type": "string",
                            "description": "",
                            "example": "labels.sale_edit_state.states.open"
                          },
                          {
                            "name": "action",
                            "kind": "optional",
                            "type": "string",
                            "description": "",
                            "example": "labels.sale_edit_state.actions.open"
                          },
                          {
                            "name": "state",
                            "kind": "optional",
                            "type": "integer",
                            "description": "",
                            "example": 1
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "integer",
                    "description": "`0` - Pending `1` - Pending `2` - Paid `3` - Partially Paid `4` - Paid (Overdraft)\n",
                    "example": 0
                  },
                  {
                    "name": "total",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "250.000"
                  },
                  {
                    "name": "global_discount_net",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "0.000"
                  },
                  {
                    "name": "global_discount_tax",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "0.000"
                  },
                  {
                    "name": "global_discount_gross",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "0.000"
                  },
                  {
                    "name": "consolidated",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "",
                    "example": false
                  },
                  {
                    "name": "created_at",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "2022-07-18T08:58:36.000000Z"
                  },
                  {
                    "name": "updated_at",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "2022-07-18T08:58:36.000000Z"
                  }
                ]
              },
              {
                "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/sales \\\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/sales\", 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/sales\")\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/sales\"\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      \"id\": 1,\n      \"clinic_id\": \"1\",\n      \"customer_id\": \"1\",\n      \"customer\": {\n        \"id\": 1,\n        \"name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"email\": \"john@example.com\",\n        \"phone\": \"+16175551212.\",\n        \"address\": \"Flowers St. 300, Palo Alto, 123456, USA\",\n        \"city\": \"Palo Alto\",\n        \"street\": \"Flowers St.\",\n        \"street_number\": \"300\",\n        \"country\": {\n          \"id\": 6,\n          \"name\": \"United States\",\n          \"iso_code\": \"us\",\n          \"code\": \"usa\"\n        },\n        \"zip\": \"123456\",\n        \"region\": \"California\",\n        \"timezone\": \"America/Los_Angeles\",\n        \"has_app\": true,\n        \"chatUid\": \"e58ed763-928c-4155-bee9-fdbaaadc15f3\"\n      },\n      \"file\": {\n        \"id\": 1,\n        \"number\": \"175\",\n        \"status\": 1,\n        \"vet_id\": 1,\n        \"clinic_id\": 1,\n        \"pet_id\": 1,\n        \"sale_id\": 1,\n        \"date\": \"2021-11-19\",\n        \"reason\": \"Routine checkup\",\n        \"template_id\": 0,\n        \"comments\": \"\",\n        \"recommendations\": \"\",\n        \"rabic_tag_number\": \"\",\n        \"presumptive_diagnosis\": \"\",\n        \"diagnosis\": \"\",\n        \"treatment\": \"\"\n      },\n      \"counter_sale\": 0,\n      \"amount_paid\": \"0.000\",\n      \"amount_due\": \"250.000\",\n      \"edit_state_details\": {\n        \"state\": 0,\n        \"label\": \"\",\n        \"can_transit_to\": [\n          {\n            \"label\": \"labels.sale_edit_state.states.open\",\n            \"action\": \"labels.sale_edit_state.actions.open\",\n            \"state\": 1\n          }\n        ]\n      },\n      \"status\": 0,\n      \"total\": \"250.000\",\n      \"global_discount_net\": \"0.000\",\n      \"global_discount_tax\": \"0.000\",\n      \"global_discount_gross\": \"0.000\",\n      \"consolidated\": false,\n      \"created_at\": \"2022-07-18T08:58:36.000000Z\",\n      \"updated_at\": \"2022-07-18T08:58:36.000000Z\"\n    }\n  ],\n  \"links\": {},\n  \"meta\": {}\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}