> For the complete documentation index, see [llms.txt](https://chekin.gitbook.io/chekin-public-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chekin.gitbook.io/chekin-public-api/api-reference/guests/attach-document-ocr-checks.md).

# Attach Document OCR checks

After an ID Document OCR check, you will need to attach the intent with the correct guest of a reservation. This way, the document can be used to be sent to authorities report, for example.

## Request

<mark style="color:orange;">`PATCH`</mark> `/guests/{id}`

### **Header Parameters:**

* **Authorization** *(string) <mark style="color:red;">**\***</mark>**Mandatory***\
  Required for authentication and authorization. You'll need to include a valid token here to access the reservations

### Path Parameters:

* **id** *(string, uuid)* *<mark style="color:red;">**\***</mark>**Mandatory***\
  The unique identifier of the guest that is being updated

### **Body Parameters:**

* **reservation\_id** (*string*) *<mark style="color:red;">**\***</mark>**Mandatory***\
  The ID of the reservation associated with the guest.
* **ocr\_passed** (*boolean*) *<mark style="color:red;">**\***</mark>**Mandatory***\
  Set as `true` if the OCR scann has been accepted
* **external\_documents\_front\_side\_scan** (*uuid) <mark style="color:red;">**\***</mark>**Mandatory***\
  The ID of OCR analyzed object. Check [Get status and data analyzed](/chekin-public-api/api-reference/ocr/get-status-and-data-analyzed.md) section.
* **external\_documents\_front\_side\_scan\_service** (*ENUM) <mark style="color:red;">**\***</mark>**Mandatory***\
  Set `ocr` for ID documents check
* **external\_documents\_back\_side\_scan** (*uuid)*\
  The ID of OCR analyzed object. Check [Get status and data analyzed](/chekin-public-api/api-reference/ocr/get-status-and-data-analyzed.md) section.
* **external\_documents\_back\_side\_scan\_service** (*ENUM)*\
  Set `ocr` for ID documents check

### Example

```json
PATCH 'https://a.chekin.io/public/api/v1/guests/{{Guest_ID}}' \
--header 'Authorization: JWT {{TOKEN}}' \
--data-raw '{
    "reservation_id": "{{RESERVATION_ID}}",
    "ocr_passed": true,
    "external_documents_front_side_scan": "{{OCR_CHECK_ID}}",
    "external_documents_front_side_scan_service": "ocr",
    "external_documents_back_side_scan": "{{OCR_CHECK_ID_2}}",
    "external_documents_front_side_scan_service": "ocr"
}'
```
