---
title: Close a Record
slug: close-a-record
docTags: 
createdAt: 2026-10-13T10:21:22.055Z
---

{
  "id": "MP7uhb5aZzm-3h1YcGOWo",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://developer.digitail.io/api/v1/record/{id}/close",
    "servers": [
      {
        "url": "https://developer.digitail.io/api/v1/record/{id}/close",
        "description": "Sandbox server (uses test data)"
      },
      {
        "url": "https://vet.digitail.io/api/v1/record/{id}/close",
        "description": "Production server (uses live data)"
      }
    ],
    "name": "Close a Record",
    "description": "<p>Permissions needed: CLOSE_CHECKUPS</p>\n<p>Closes the record, the same as closing it in Digitail. Draft, saved and hospitalized records can be closed. Closing a record that is already closed returns 400.</p>\n<p>A record that gets closed without being saved first also receives its record number. Closing can notify the Pet Parent that a new record is available, and sends a review request when the clinic has review requests set up.</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": "number",
                    "kind": "optional",
                    "type": "string",
                    "description": "Record number within the clinic.",
                    "example": "1024"
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "string<2>",
                    "description": "<p><code>2</code> - Closed</p>",
                    "enum": [
                      "2"
                    ]
                  },
                  {
                    "name": "opened_at",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>Clinic time zone, <code>Y-m-d H:i:s</code>.</p>",
                    "example": "2026-10-12 09:30:00"
                  },
                  {
                    "name": "closed_at",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Clinic time zone, <code>Y-m-d H:i:s</code>.</p>",
                    "example": "2026-10-12 10:15:00"
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "K4AdnntKpi_LABHbGqfTs",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://developer.digitail.io/api/v1/record/{id}/close \\\n     --header 'accept: application/json'"
        },
        {
          "id": "n3axiWrJh_DyalxVsCUl8",
          "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: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://developer.digitail.io/api/v1/record/{id}/close\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "_VayEPsYCyYgz8q1cQXbK",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://developer.digitail.io/api/v1/record/{id}/close\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "ADNQtAYaxvt-15GjXBaJi",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://developer.digitail.io/api/v1/record/{id}/close\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "K4AdnntKpi_LABHbGqfTs"
    },
    "results": {
      "languages": [
        {
          "id": "7cIvPGiQ2cAt1g_L5-ln_",
          "language": "200",
          "code": "// successful operation\n{\n  \"data\": {\n    \"id\": 1,\n    \"number\": \"1024\",\n    \"status\": \"\",\n    \"opened_at\": \"2026-10-12 09:30:00\",\n    \"closed_at\": \"2026-10-12 10:15:00\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "7cIvPGiQ2cAt1g_L5-ln_"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}