---
title: Retrieve a Purchase Order
slug: retrieve-a-purchase-order
docTags: 
createdAt: 2026-09-15T14:46:26.795Z
---

{
  "id": "nAKUfX2QyCVkEUncYg5OS",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://developer.digitail.io/api/v1/purchase-orders/{id}",
    "servers": [
      {
        "url": "https://developer.digitail.io/api/v1/purchase-orders/{id}",
        "description": "Sandbox server (uses test data)"
      },
      {
        "url": "https://vet.digitail.io/api/v1/purchase-orders/{id}",
        "description": "Production server (uses live data)"
      }
    ],
    "name": "Retrieve a Purchase Order",
    "description": "<p>Permissions needed: <code>VIEW_ORDERS</code>.</p>\n<p>Returns the purchase order with its items; each item carries <code>is_received</code>. The clinic is resolved from the <code>X-ClinicId</code> header and must match the order's clinic.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "passport",
          "name": "passport",
          "kind": "optional",
          "type": "oauth2",
          "description": "Laravel passport oauth2 security.",
          "oauth2Flows": {
            "authorizationCode": {
              "authorizationUrl": "https://digitail.test/oauth/authorize",
              "tokenUrl": "https://digitail.test/oauth/token",
              "refreshUrl": "https://digitail.test/oauth/token"
            }
          }
        },
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "clinic_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "supplier_id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 1
                  },
                  {
                    "name": "supplier",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "example": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "cif",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "RO123456"
                      },
                      {
                        "name": "register_no",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "J22/12345/2025"
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "Supplier A"
                      },
                      {
                        "name": "address",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "123 Main Street, Anytown, USA, 12345"
                      },
                      {
                        "name": "subsidiary_address",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "123 Supply Chain Way, Logistics City, CA 90210"
                      },
                      {
                        "name": "administrator",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "John Doe"
                      },
                      {
                        "name": "is_vat_payer",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "",
                        "example": true
                      },
                      {
                        "name": "bank_name",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "ING BANK"
                      },
                      {
                        "name": "bank_account",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "RO66BACX0000001234567890"
                      },
                      {
                        "name": "bank_address",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "123 Main Street, Anytown, USA, 12345"
                      },
                      {
                        "name": "bank_swift",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "INGBROBUXXX"
                      },
                      {
                        "name": "external_source",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": ""
                      },
                      {
                        "name": "external_id",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": ""
                      }
                    ]
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "string<draft | pending | backorder | completed>",
                    "description": "",
                    "example": "completed",
                    "enum": [
                      "draft",
                      "pending",
                      "backorder",
                      "completed"
                    ]
                  },
                  {
                    "name": "purchase_order_number",
                    "kind": "optional",
                    "type": "integer",
                    "description": "Unique purchase order number. Automatically generated by the system. Can be used to search for the purchase order.",
                    "example": 1
                  },
                  {
                    "name": "date",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "2021-08-01T00:00:00.000Z",
                    "format": "date-time"
                  },
                  {
                    "name": "reception_committee",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "example": "[\"Jane\",\"John\"]",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "order_type",
                    "kind": "optional",
                    "type": "string<original | backorder>",
                    "nullable": true,
                    "description": "",
                    "enum": [
                      "original",
                      "backorder"
                    ]
                  },
                  {
                    "name": "document_type",
                    "kind": "optional",
                    "type": "string< | 1 | 2 | 3 | 4 | 5 | 6>",
                    "description": "<p>empty: NO_DOCUMENT, 1: INVOICE, 2: RECEIPT, 3: BILL, 4: NOTICE, 5: TRANSFER_NOTE, 6: CASH_REGISTER_RECEIPT</p>",
                    "example": 1,
                    "enum": [
                      "",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5",
                      "6"
                    ]
                  },
                  {
                    "name": "document_date",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "2021-08-01T00:00:00.000Z",
                    "format": "date-time"
                  },
                  {
                    "name": "document_number",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "123"
                  },
                  {
                    "name": "document_series",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "DGT"
                  },
                  {
                    "name": "document_due_date",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "2021-08-01T00:00:00.000Z",
                    "format": "date-time"
                  },
                  {
                    "name": "global_discount",
                    "kind": "optional",
                    "type": "number",
                    "description": "",
                    "example": 10
                  },
                  {
                    "name": "updated_at",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "example": "2021-08-01T00:00:00.000Z",
                    "format": "date-time"
                  },
                  {
                    "name": "cogs_subtotal",
                    "kind": "optional",
                    "type": "number",
                    "description": "Visible only when viewing individual purchase order.",
                    "example": 10
                  },
                  {
                    "name": "cogs_tax",
                    "kind": "optional",
                    "type": "number",
                    "description": "Visible only when viewing individual purchase order.",
                    "example": 1
                  },
                  {
                    "name": "cogs_total",
                    "kind": "optional",
                    "type": "number",
                    "description": "Visible only when viewing individual purchase order.",
                    "example": 11
                  },
                  {
                    "name": "selling_price_subtotal",
                    "kind": "optional",
                    "type": "number",
                    "description": "Visible only when viewing individual purchase order.",
                    "example": 10
                  },
                  {
                    "name": "selling_price_tax",
                    "kind": "optional",
                    "type": "number",
                    "description": "Visible only when viewing individual purchase order.",
                    "example": 1
                  },
                  {
                    "name": "selling_price_total",
                    "kind": "optional",
                    "type": "number",
                    "description": "Visible only when viewing individual purchase order.",
                    "example": 11
                  },
                  {
                    "name": "goods_subtotal",
                    "kind": "optional",
                    "type": "number",
                    "description": "Visible only when viewing multiple purchase orders.",
                    "example": 7
                  },
                  {
                    "name": "consumables_subtotal",
                    "kind": "optional",
                    "type": "number",
                    "description": "Visible only when viewing multiple purchase orders.",
                    "example": 3
                  },
                  {
                    "name": "items",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "product_id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "",
                        "example": 1
                      },
                      {
                        "name": "product",
                        "kind": "optional",
                        "type": "object",
                        "description": "Details related to the product the Purchase Order Item is linked to. Included only when receiving a single purchase order.",
                        "example": "",
                        "schema": [
                          {
                            "name": "name",
                            "kind": "optional",
                            "type": "string",
                            "description": "",
                            "example": "Product Name"
                          },
                          {
                            "name": "fixed_fee",
                            "kind": "optional",
                            "type": "number<float>",
                            "description": "",
                            "example": 0,
                            "format": "float"
                          },
                          {
                            "name": "unit",
                            "kind": "optional",
                            "type": "string",
                            "description": "",
                            "example": "Box"
                          },
                          {
                            "name": "last_cogs",
                            "kind": "optional",
                            "type": "object",
                            "description": "<p>Last cost of goods sold for the product, per unit and per sub-unit. COGS doesnt include tax.</p>",
                            "example": "",
                            "schema": [
                              {
                                "name": "unit",
                                "kind": "optional",
                                "type": "number<float>",
                                "nullable": true,
                                "description": "",
                                "example": 10,
                                "format": "float"
                              },
                              {
                                "name": "subunit",
                                "kind": "optional",
                                "type": "number<float>",
                                "description": "",
                                "example": 2.5,
                                "format": "float"
                              }
                            ]
                          },
                          {
                            "name": "last_price",
                            "kind": "optional",
                            "type": "string",
                            "nullable": true,
                            "description": "<p>Last selling price recorded for the product, as a decimal string.</p>",
                            "example": "10.00"
                          },
                          {
                            "name": "last_price_includes_tax",
                            "kind": "optional",
                            "type": "boolean",
                            "description": "",
                            "example": false
                          },
                          {
                            "name": "price",
                            "kind": "optional",
                            "type": "number<float>",
                            "description": "Current selling price of the product.",
                            "example": 25,
                            "format": "float"
                          },
                          {
                            "name": "price_includes_tax",
                            "kind": "optional",
                            "type": "boolean",
                            "description": "",
                            "example": true
                          },
                          {
                            "name": "is_newly_auto_created",
                            "kind": "optional",
                            "type": "boolean",
                            "description": "",
                            "example": true
                          },
                          {
                            "name": "is_disabled",
                            "kind": "optional",
                            "type": "boolean",
                            "description": "",
                            "example": false
                          },
                          {
                            "name": "is_deleted",
                            "kind": "optional",
                            "type": "boolean",
                            "description": "",
                            "example": false
                          },
                          {
                            "name": "external_source",
                            "kind": "optional",
                            "type": "string",
                            "nullable": true,
                            "description": "<p>Provider the product was imported from (e.g. vetcove, external), if any.</p>",
                            "example": "external"
                          }
                        ]
                      },
                      {
                        "name": "batch",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "123"
                      },
                      {
                        "name": "expiration_date",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "nullable": true,
                        "description": "",
                        "example": "2027-01-01T00:00:00.000000Z",
                        "format": "date-time"
                      },
                      {
                        "name": "quantity",
                        "kind": "optional",
                        "type": "number<float>",
                        "description": "",
                        "example": 1,
                        "format": "float"
                      },
                      {
                        "name": "cogs",
                        "kind": "optional",
                        "type": "string",
                        "description": "<p>Unit cost of goods sold, as a decimal string. Does not include tax.</p>",
                        "example": "658.73"
                      },
                      {
                        "name": "cogs_discount_value",
                        "kind": "optional",
                        "type": "number<float>",
                        "description": "",
                        "example": 0,
                        "format": "float"
                      },
                      {
                        "name": "cogs_discount_is_fixed",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "<p>True if discount is fixed amount, false if discount is percentage.</p>",
                        "example": false
                      },
                      {
                        "name": "supplier_tax",
                        "kind": "optional",
                        "type": "number<float>",
                        "description": "",
                        "example": 1,
                        "format": "float"
                      },
                      {
                        "name": "price",
                        "kind": "optional",
                        "type": "string",
                        "description": "<p>Unit selling price, as a decimal string.</p>",
                        "example": "295.20"
                      },
                      {
                        "name": "selling_tax",
                        "kind": "optional",
                        "type": "number<float>",
                        "description": "",
                        "example": 1,
                        "format": "float"
                      },
                      {
                        "name": "markup",
                        "kind": "optional",
                        "type": "number<float>",
                        "description": "Markup of the product. calculated on cogs and selling price",
                        "example": 50.473,
                        "format": "float"
                      },
                      {
                        "name": "consumed",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "<p>True if current batch of product was consumed. Product data non-editable if true</p>",
                        "example": false
                      },
                      {
                        "name": "unit_cogs_post_discount_net",
                        "kind": "optional",
                        "type": "number<float>",
                        "description": "",
                        "example": 10,
                        "format": "float"
                      },
                      {
                        "name": "cogs_post_discount_gross",
                        "kind": "optional",
                        "type": "number<float>",
                        "description": "",
                        "example": 10,
                        "format": "float"
                      },
                      {
                        "name": "unit_cogs_post_supplier_discount_net",
                        "kind": "optional",
                        "type": "number<float>",
                        "description": "<p>Unit COGS after the supplier discount, before the order (global) discount is allocated</p>",
                        "example": 10,
                        "format": "float"
                      },
                      {
                        "name": "cogs_post_supplier_discount_gross",
                        "kind": "optional",
                        "type": "number<float>",
                        "description": "<p>Total COGS with supplier tax after the supplier discount, before the order (global) discount is allocated</p>",
                        "example": 10,
                        "format": "float"
                      },
                      {
                        "name": "consumable",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "",
                        "example": false
                      },
                      {
                        "name": "sub_unit_cogs",
                        "kind": "optional",
                        "type": "number<float>",
                        "description": "<p>Unit cost divided by the product formula (cost per sub-unit).</p>",
                        "example": 329.36,
                        "format": "float"
                      },
                      {
                        "name": "is_received",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "Whether the line was received. Set when the order is completed.",
                        "example": true
                      },
                      {
                        "name": "override_sale_price",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "",
                        "example": false
                      },
                      {
                        "name": "cogs_prefilled_from_vetcove",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "Whether the COGS still holds the unit price Vetcove sent when it created the order. Cleared on the first COGS edit.",
                        "example": false
                      }
                    ]
                  },
                  {
                    "name": "unreceived_disabled_items",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/paths/~1api~1v1~1purchase-orders~1%7Bid%7D/get/responses/200/content/application~1json/schema/properties/data/properties/items/items",
                    "customType": "items[]",
                    "schema": []
                  },
                  {
                    "name": "related_order",
                    "kind": "optional",
                    "type": "object",
                    "nullable": true,
                    "description": "<p>Included on request. The backorder created for this order's unreceived lines, or the original order this backorder was split from. Carries the same fields as a purchase order except <code>items</code> and <code>related_order</code>.</p>",
                    "example": "",
                    "schema": []
                  },
                  {
                    "name": "items_count",
                    "kind": "optional",
                    "type": "number",
                    "description": "Visible only when viewing multiple purchase orders.",
                    "example": 3
                  },
                  {
                    "name": "has_consumed_items",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Visible only when viewing multiple purchase orders.",
                    "example": true
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "TDIBBC1pWS9iOjqPUvOVn",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://developer.digitail.io/api/v1/purchase-orders/{id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "KjB6wIVRGsyZjd2i7Daiw",
          "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://developer.digitail.io/api/v1/purchase-orders/{id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ZaMwVCEyESjARpygtJfd9",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://developer.digitail.io/api/v1/purchase-orders/{id}\")\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": "E4oWhCO8-nrcGgYNwSRRn",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://developer.digitail.io/api/v1/purchase-orders/{id}\"\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": "TDIBBC1pWS9iOjqPUvOVn"
    },
    "results": {
      "languages": [
        {
          "id": "PBv5yJxVQsPZXbkpwACnv",
          "language": "200",
          "code": "// successful operation\n{\n  \"data\": {\n    \"id\": 1,\n    \"clinic_id\": 1,\n    \"supplier_id\": 1,\n    \"supplier\": {\n      \"id\": 1,\n      \"cif\": \"RO123456\",\n      \"register_no\": \"J22/12345/2025\",\n      \"name\": \"Supplier A\",\n      \"address\": \"123 Main Street, Anytown, USA, 12345\",\n      \"subsidiary_address\": \"123 Supply Chain Way, Logistics City, CA 90210\",\n      \"administrator\": \"John Doe\",\n      \"is_vat_payer\": true,\n      \"bank_name\": \"ING BANK\",\n      \"bank_account\": \"RO66BACX0000001234567890\",\n      \"bank_address\": \"123 Main Street, Anytown, USA, 12345\",\n      \"bank_swift\": \"INGBROBUXXX\",\n      \"external_source\": \"\",\n      \"external_id\": \"\"\n    },\n    \"status\": \"completed\",\n    \"purchase_order_number\": 1,\n    \"date\": \"2021-08-01T00:00:00.000Z\",\n    \"reception_committee\": [\n      \"\"\n    ],\n    \"order_type\": \"\",\n    \"document_type\": 1,\n    \"document_date\": \"2021-08-01T00:00:00.000Z\",\n    \"document_number\": \"123\",\n    \"document_series\": \"DGT\",\n    \"document_due_date\": \"2021-08-01T00:00:00.000Z\",\n    \"global_discount\": 10,\n    \"updated_at\": \"2021-08-01T00:00:00.000Z\",\n    \"cogs_subtotal\": 10,\n    \"cogs_tax\": 1,\n    \"cogs_total\": 11,\n    \"selling_price_subtotal\": 10,\n    \"selling_price_tax\": 1,\n    \"selling_price_total\": 11,\n    \"goods_subtotal\": 7,\n    \"consumables_subtotal\": 3,\n    \"items\": [\n      {\n        \"id\": 1,\n        \"product_id\": 1,\n        \"product\": {\n          \"name\": \"Product Name\",\n          \"fixed_fee\": \"\",\n          \"unit\": \"Box\",\n          \"last_cogs\": {\n            \"unit\": 10,\n            \"subunit\": 2.5\n          },\n          \"last_price\": \"10.00\",\n          \"last_price_includes_tax\": false,\n          \"price\": 25,\n          \"price_includes_tax\": true,\n          \"is_newly_auto_created\": true,\n          \"is_disabled\": false,\n          \"is_deleted\": false,\n          \"external_source\": \"external\"\n        },\n        \"batch\": \"123\",\n        \"expiration_date\": \"2027-01-01T00:00:00.000000Z\",\n        \"quantity\": 1,\n        \"cogs\": \"658.73\",\n        \"cogs_discount_value\": \"\",\n        \"cogs_discount_is_fixed\": false,\n        \"supplier_tax\": 1,\n        \"price\": \"295.20\",\n        \"selling_tax\": 1,\n        \"markup\": 50.473,\n        \"consumed\": false,\n        \"unit_cogs_post_discount_net\": 10,\n        \"cogs_post_discount_gross\": 10,\n        \"unit_cogs_post_supplier_discount_net\": 10,\n        \"cogs_post_supplier_discount_gross\": 10,\n        \"consumable\": false,\n        \"sub_unit_cogs\": 329.36,\n        \"is_received\": true,\n        \"override_sale_price\": false,\n        \"cogs_prefilled_from_vetcove\": false\n      }\n    ],\n    \"unreceived_disabled_items\": [\n      \"\"\n    ],\n    \"related_order\": {},\n    \"items_count\": 3,\n    \"has_consumed_items\": true\n  }\n}"
        }
      ],
      "selectedLanguageId": "PBv5yJxVQsPZXbkpwACnv"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}