# Deletion

## deletePerson

> This method deletes a person from the database, given its CPF.

```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/delete/{cpf}":{"delete":{"tags":["Deletion"],"operationId":"deletePerson","summary":"deletePerson","description":"This method deletes a person from the database, given its CPF.","parameters":[{"name":"cpf","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExternalResult"}}}},"204":{"description":"No Content"},"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"}}}}}}
```

## deletePSBioPerson

> This method deletes a person from the PSBio database, given its CPF and MOT (reason for deletion, error or fraud).

```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/delete/{cpf}/{mot}":{"delete":{"tags":["Deletion"],"operationId":"deletePSBioPerson","summary":"deletePSBioPerson","description":"This method deletes a person from the PSBio database, given its CPF and MOT (reason for deletion, error or fraud).","parameters":[{"name":"cpf","in":"path","required":true,"schema":{"type":"string"}},{"name":"mot","in":"path","required":true,"schema":{"type":"string","enum":["E","F"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExternalResult"}}}},"204":{"description":"No Content"},"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"}}}}}}
```

## getDeleteResult

> This method returns the status of a delete 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/delete/{id}":{"get":{"tags":["Deletion"],"operationId":"getDeleteResult","summary":"getDeleteResult","description":"This method returns the status of a delete 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"}}}}}}
```


---

# 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/deletion.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.
