> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-pt-br/sdks/backend-sdk/selphid/technical_documentation/api_reference/custom-events/api-v1-selphid-custom-event-ocr-finish.md).

# /api/v1/selphid/custom-event/ocr/finish

Sends custom external closing and completion events of the OCR operation to the Api Tracking platform.

```json
{"openapi":"3.0.0","info":{"title":"SelphID-SDK Rest API","version":"6.21.0"},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Default API key header name. It can be overridden at startup with `auth_api_key_header_name`."}},"schemas":{"CustomFinish":{"type":"object","description":"Data to register external operation closing and completion events in the Api Tracking platform.","properties":{"status":{"$ref":"#/components/schemas/OperationResultStatus"},"reason":{"$ref":"#/components/schemas/OperationResultReason"},"extraData":{"$ref":"#/components/schemas/ExtraData"}},"required":["status","reason","extraData"]},"OperationResultStatus":{"type":"string","description":"Result of a client-side operation, for registration in Api Tracking.","enum":["Succeeded","Denied","Error","Live","Cancelled"]},"OperationResultReason":{"type":"string","description":"Detail of the result of a client-side operation, for registration in Api Tracking.","enum":["None","InternalError","CancelledByUser","Timeout","DocumentValidationNotPassed","DocumentValidationError","AuthenticationNotPassed","AuthenticationError","LivenessNotPassed","LivenessError"]},"ExtraData":{"type":"string","description":"Tokenized data used to call the Api Tracking service after the operation, base64-encoded."},"TrackingResult":{"type":"object","description":"The result of an Api Tracking operation.","properties":{"trackingStatus":{"$ref":"#/components/schemas/TrackingStatus"},"trackingMessage":{"$ref":"#/components/schemas/TrackingMessage"}}},"TrackingStatus":{"type":"number","description":"Status returned by the Api Tracking service, or -1 if tracking is not required."},"TrackingMessage":{"type":"string","description":"Message returned by the Api Tracking service, or empty if tracking is not required."},"BadRequestResult":{"type":"object","description":"Result when incorrect parameters arrive in the request.","properties":{"status":{"type":"number"},"error":{"type":"string"},"timeStamp":{"$ref":"#/components/schemas/TimeStamp"}}},"TimeStamp":{"type":"string","description":"A date and time value in \"%Y-%m-%dT%H:%M:%SZ\" format."},"ExceptionResult":{"type":"object","description":"An error occurred in the call to the SelphID-SDK backend.","properties":{"status":{"type":"number"},"error":{"type":"string"},"exception":{"type":"string"},"timeStamp":{"$ref":"#/components/schemas/TimeStamp"}}}}},"paths":{"/api/v1/selphid/custom-event/ocr/finish":{"post":{"description":"Sends custom external closing and completion events of the OCR operation to the Api Tracking platform.","tags":["Custom Events"],"requestBody":{"description":"JSON with the operation closing data.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFinish"}}}},"responses":{"200":{"description":"Result of the event tracking.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingResult"}}}},"400":{"description":"Incorrect parameters in the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResult"}}}},"500":{"description":"An error occurred in the call to the SelphID-SDK backend.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResult"}}}}}}}}}
```
