# Enrollment

## enroll

> This method submits the enrollment of a person (client) to the server.

```json
{"openapi":"3.0.1","info":{"title":"SPID Server API Specification","version":"4.2.12"},"servers":[{"url":"https://<ip>:8082","description":"Generated server url"}],"paths":{"/gbs-spid-server/people":{"post":{"tags":["Enrollment"],"operationId":"enroll","summary":"enroll","description":"This method submits the enrollment of a person (client) to the server.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTransactionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExternalResult"}}}},"201":{"description":"Created"},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported Media Type","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"UserTransactionRequest":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/UserTransaction"}}},"UserTransaction":{"type":"object","properties":{"biometrics":{"type":"array","items":{"$ref":"#/components/schemas/Biometric"}},"missingBiometrics":{"type":"array","items":{"$ref":"#/components/schemas/MissingBiometric"}},"userId":{"type":"string"},"operatorId":{"type":"string"},"timestamp":{"type":"integer","format":"int64"}}},"Biometric":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"content":{"type":"string"},"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"resolution":{"type":"integer","format":"int32"}}},"MissingBiometric":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["AMPUTATED","UNAVAILABLE"]},"reason":{"type":"string"}}},"ExternalResult":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"status":{"type":"string","enum":["OK","SEARCH_PENDING","SEARCH_ENQUEUED","SEARCH_MATCH","SEARCH_NOT_MATCH","SEARCH_FAILED","ENROLL_PENDING","ENROLL_ENQUEUED","ENROLL_CACHE_OK","ENROLL_OK","ENROLL_FAILED","ENROLL_EXCEPTION","DELETE_OK","DELETE_FAILED","DELETE_PENDING","REMOTE_CAPTURE_ACCEPTED","REMOTE_CAPTURE_REFUSED","REMOTE_CAPTURE_PENDING","REMOTE_CAPTURE_AVAILABLE","REMOTE_CAPTURE_STORED","FRAUD","ERROR","ENROLL_REJECTED","PERSON_NOT_FOUND"]}}},"ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"type":{"type":"string","enum":["VALIDATION_ERROR","PROCESSING_ERROR","INTERNAL_ERROR","SECURITY_ERROR"]}}},"Error":{"type":"object","properties":{"type":{"type":"string","enum":["VALIDATION_ERROR","PROCESSING_ERROR","INTERNAL_ERROR","SECURITY_ERROR"]},"message":{"type":"string"}}}}}}
```

## getEnrollResult

> This method returns the result of an enrollment transaction, given its TGUID (ID).

```json
{"openapi":"3.0.1","info":{"title":"SPID Server API Specification","version":"4.2.12"},"servers":[{"url":"https://<ip>:8082","description":"Generated server url"}],"paths":{"/gbs-spid-server/people/transactions/{id}":{"get":{"tags":["Enrollment"],"operationId":"getEnrollResult","summary":"getEnrollResult","description":"This method returns the result of an enrollment transaction, given its TGUID (ID).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExternalResult"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported Media Type","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ExternalResult":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"status":{"type":"string","enum":["OK","SEARCH_PENDING","SEARCH_ENQUEUED","SEARCH_MATCH","SEARCH_NOT_MATCH","SEARCH_FAILED","ENROLL_PENDING","ENROLL_ENQUEUED","ENROLL_CACHE_OK","ENROLL_OK","ENROLL_FAILED","ENROLL_EXCEPTION","DELETE_OK","DELETE_FAILED","DELETE_PENDING","REMOTE_CAPTURE_ACCEPTED","REMOTE_CAPTURE_REFUSED","REMOTE_CAPTURE_PENDING","REMOTE_CAPTURE_AVAILABLE","REMOTE_CAPTURE_STORED","FRAUD","ERROR","ENROLL_REJECTED","PERSON_NOT_FOUND"]}}},"ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"type":{"type":"string","enum":["VALIDATION_ERROR","PROCESSING_ERROR","INTERNAL_ERROR","SECURITY_ERROR"]}}},"Error":{"type":"object","properties":{"type":{"type":"string","enum":["VALIDATION_ERROR","PROCESSING_ERROR","INTERNAL_ERROR","SECURITY_ERROR"]},"message":{"type":"string"}}}}}}
```

## getPerson

> This method returns the data of a person enrolled into the database, given its search keys.

```json
{"openapi":"3.0.1","info":{"title":"SPID Server API Specification","version":"4.2.12"},"servers":[{"url":"https://<ip>:8082","description":"Generated server url"}],"paths":{"/gbs-spid-server/people/{key}":{"get":{"tags":["Enrollment"],"operationId":"getPerson","summary":"getPerson","description":"This method returns the data of a person enrolled into the database, given its search keys.","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Person"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported Media Type","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"Person":{"type":"object","properties":{"approvement":{"$ref":"#/components/schemas/Approvement"},"auxiliaries":{"type":"array","items":{"$ref":"#/components/schemas/ContentData"}},"biographics":{"type":"array","items":{"$ref":"#/components/schemas/BiographicData"}},"biometrics":{"type":"array","items":{"$ref":"#/components/schemas/ContentData"}},"enroll-status":{"type":"string","enum":["ENQUEUED","PROCESSING","ENROLLED","ANOMALY","FAILED","PENDING"]},"keys":{"type":"array","items":{"$ref":"#/components/schemas/Key"}},"labels":{"type":"array","items":{"type":"string"}},"metadata":{"type":"string","format":"byte"},"person-guid":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"transaction-guid":{"type":"string"}}},"Approvement":{"type":"object","properties":{"comments":{"type":"string"},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED"]},"timestamp":{"type":"string","format":"date-time"},"user":{"type":"string"}}},"ContentData":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"content":{"type":"string"},"properties":{"$ref":"#/components/schemas/ContentProperties"},"source":{"type":"string","enum":["ORIGINAL","TEMPLATE","CONSOLIDATED_TEMPLATE"]},"type":{"type":"string","enum":["FINGERPRINT","PALMPRINT","FOOTPRINT","FACE","IRIS","VOICE","SIGNATURE","SEQUENCE_CONTROL","PLAIN_TEXT","IMAGE","AUDIO","VIDEO","NONE","OTHER","UNKNOWN"]},"format":{"type":"string","enum":["ASCII","BASE64","RAW","WSQ","PNG","JPEG","JPEG2000","TIFF","GIF","BMP","_3GP","AAC","AIFF","M4A","MP3","OGG","PCM","WAV","WMA","MKV","FLV","AVI","MOV","WMV","MP4","MPEG","MPG","M4V","PRIVATE","ISO","ANSI","NONE","OTHER","UNKNOWN"]}}},"ContentProperties":{"type":"object","properties":{"width":{"type":"integer","format":"int32","deprecated":true},"height":{"type":"integer","format":"int32","deprecated":true},"resolution":{"type":"integer","format":"int32","deprecated":true},"ratio":{"type":"number","format":"double","deprecated":true},"latent":{"type":"boolean","deprecated":true},"description":{"type":"string"},"quality":{"type":"integer","format":"int32"},"index":{"type":"string","enum":["NONE","OTHER","UNKNOWN","LEFT_LITTLE","LEFT_RING","LEFT_MIDDLE","LEFT_INDEX","LEFT_THUMB","RIGHT_THUMB","RIGHT_INDEX","RIGHT_MIDDLE","RIGHT_RING","RIGHT_LITTLE","LEFT_TOPS_CTRL","RIGHT_TOPS_CTRL","LEFT_THUMB_CTRL","RIGHT_THUMB_CTRL","LEFT_TOP","LEFT_BOTTOM","LEFT_WRITER","RIGHT_TOP","RIGHT_BOTTOM","RIGHT_WRITER","LEFT_IRIS","RIGHT_IRIS","FACE_FRONTAL","LEFT_SIDE","RIGHT_SIDE","MUGSHOT_FRONTAL","MUGSHOT_LEFT_SIDE","MUGSHOT_RIGHT_SIDE","TATOO","SCAR","MARK","SIGNATURE"]},"location":{"type":"string","enum":["NONE","OTHER","UNKNOWN","FINGERPRINT","PALM","FOOT","FACE","BACK_HEAD","LEFT_FRONT_NECK","RIGHT_FRONT_NECK","LEFT_SHOLDER","RIGHT_SHOLDER","LEFT_CHEST","RIGHT_CHEST","LEFT_ARM","RIGHT_ARM","LEFT_FOREARM","RIGHT_FOREARM","LEFT_WRIST","RIGHT_WRIST","LEFT_HAND","RIGHT_HAND","STOMACH","ABDOMEN","LEFT_RIB","RIGHT_RIB","LEFT_WAIST","RIGHT_WAIST","GROIN","LEFT_THIGH","RIGHT_THIGH","LEFT_KNEE","RIGHT_KNEE","LEFT_LOWER_LEG","RIGHT_LOWER_LEG","LEFT_FOOT","RIGHT_FOOT","LEFT_BACK_NECK","RIGHT_BACK_NECK","LEFT_BACK_SHOLDER","RIGHT_BACK_SHOLDER","LEFT_UPPER_BACK","RIGHT_UPPER_BACK","LEFT_LOWER_BACK","RIGHT_LOWER_BACK","LEFT_GLUTEUS","RIGHT_GLUTEUS","LEFT_REAR_ARM","RIGHT_REAR_ARM","LEFT_ELBOW","RIGHT_ELBOW","LEFT_REAR_FOREARM","RIGHT_REAR_FOREARM","LEFT_REAR_LEG","RIGHT_REAR_LEG","LEFT_CALF","RIGHT_CALF","LEFT_ANKLE","RIGHT_ANKLE","LEFT_HEEL","RIGHT_HEEL"]},"anomaly":{"type":"string","enum":["NONE","ADACTILY","ANKYLOSIS","ECTRODACTILY","HIPERFALANGIA","POLYDACTILY","MICRODACTILY","MACRODACTILY","SINDATILY","DAMAGED","BANDAGED","IGNORED","AMPUTATED"]},"metadata":{"type":"array","items":{"type":"string","format":"byte"}},"capture-date":{"type":"string","format":"date-time"},"capture-type":{"type":"string","enum":["FLAT","FLAT_TWO_FINGERS","ROLLED","LEFT_TOP","LEFT_BOTTOM","LEFT_WRITER","RIGHT_TOP","RIGHT_BOTTOM","RIGHT_WRITER","LIVE","FILE"]},"template-properties":{"$ref":"#/components/schemas/TemplateProperties"},"image-properties":{"$ref":"#/components/schemas/ImageProperties"},"audio-properties":{"$ref":"#/components/schemas/AudioProperties"},"video-properties":{"$ref":"#/components/schemas/VideoProperties"},"fingerprint-properties":{"$ref":"#/components/schemas/FingerprintProperties"},"face-properties":{"$ref":"#/components/schemas/FaceProperties"},"signature-properties":{"$ref":"#/components/schemas/SignatureProperties"}}},"TemplateProperties":{"type":"object","properties":{"resolution":{"type":"integer","format":"int32"}}},"ImageProperties":{"type":"object","properties":{"width":{"type":"integer","format":"int32"},"height":{"type":"integer","format":"int32"},"resolution":{"type":"integer","format":"int32"},"ratio":{"type":"number","format":"double"}}},"AudioProperties":{"type":"object","properties":{"codec":{"type":"string","enum":["PCM","FLAC","AC3","DTS","MP3","AAC","WMA","VOX","DSS","OTHER"]},"channels":{"type":"integer","format":"int32"},"sample-size":{"type":"integer","format":"int32"},"sample-rate":{"type":"integer","format":"int32"},"bit-rate":{"type":"integer","format":"int32"}}},"VideoProperties":{"type":"object","properties":{"audio-codec":{"type":"string","enum":["PCM","FLAC","AC3","DTS","MP3","AAC","WMA","VOX","DSS","OTHER"]},"video-codec":{"type":"string","enum":["X265","X264","XVID","MPEG4","_3IVX","WMV"]},"audio-bit-rate":{"type":"integer","format":"int32"},"video-bit-rate":{"type":"integer","format":"int32"},"total-bit-rate":{"type":"integer","format":"int32"},"frame-width":{"type":"integer","format":"int32"},"frame-height":{"type":"integer","format":"int32"},"frame-rate":{"type":"integer","format":"int32"}}},"FingerprintProperties":{"type":"object","properties":{"type":{"type":"string","enum":["MAIN","SEQUENCE_CONTROL"]},"nfiq":{"type":"integer","format":"int32"},"contrast":{"type":"integer","format":"int32"},"direction":{"type":"string","enum":["LEFT_TO_RIGHT","RIGHT_TO_LEFT"]},"reversions":{"type":"integer","format":"int32"},"slips":{"type":"integer","format":"int32"},"frames":{"type":"integer","format":"int32"},"latent":{"type":"boolean"},"dirty-start":{"type":"boolean"},"dirty-latter":{"type":"boolean"}}},"FaceProperties":{"type":"object","properties":{"icao":{"type":"boolean"},"glasses":{"type":"boolean"},"shoulder":{"type":"boolean"},"smiling":{"type":"boolean"},"mouth":{"$ref":"#/components/schemas/Position"},"busy-background":{"type":"boolean"},"saturated-picture":{"type":"boolean"},"blurred-picture":{"type":"boolean"},"crop-out-of-picture":{"type":"boolean"},"skin-color":{"type":"boolean"},"face-position":{"type":"boolean"},"face-right":{"type":"boolean"},"face-left":{"type":"boolean"},"face-up":{"type":"boolean"},"face-down":{"type":"boolean"},"heavy-glasses":{"type":"boolean"},"shoulder-left":{"type":"boolean"},"shoulder-right":{"type":"boolean"},"eyes-obstruction":{"type":"boolean"},"looking-down":{"type":"boolean"},"looking-up":{"type":"boolean"},"looking-right":{"type":"boolean"},"looking-left":{"type":"boolean"},"too-open-eyes":{"type":"boolean"},"too-closed-eyes":{"type":"boolean"},"red-eyes":{"type":"boolean"},"open-mouth":{"type":"boolean"},"showing-teeth":{"type":"boolean"},"left-eye":{"$ref":"#/components/schemas/Position"},"right-eye":{"$ref":"#/components/schemas/Position"},"recomended-brightness":{"type":"number","format":"float"},"recomended-contrast":{"type":"number","format":"float"},"number-of-faces":{"type":"integer","format":"int32"}}},"Position":{"type":"object","properties":{"x":{"type":"integer","format":"int32"},"y":{"type":"integer","format":"int32"}}},"SignatureProperties":{"type":"object","properties":{"notSignable":{"type":"boolean"}}},"BiographicData":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"}}},"Key":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"type":{"type":"string","enum":["VALIDATION_ERROR","PROCESSING_ERROR","INTERNAL_ERROR","SECURITY_ERROR"]}}},"Error":{"type":"object","properties":{"type":{"type":"string","enum":["VALIDATION_ERROR","PROCESSING_ERROR","INTERNAL_ERROR","SECURITY_ERROR"]},"message":{"type":"string"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.griaule.com/apis/spid/enrollment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
