Validate CPF
Use the WsAcesso_validateCpf method to validate the CPF provided by the patient.
This method is used exclusively to verify whether the CPF has a valid structure and can be used in the other PBM flows.
Step 1: Get the Authentication Token and Headers
Before making any query, you must authenticate and obtain a valid JWT token.
All endpoints in this flow use the same authentication headers.
For more details, see: Authentication and Headers
Step 2: CPF Validation
Use the WsAcesso_validateCpf method to validate the structure of the patient's CPF.
Parameters
| Parameter | Type | Required | Description | Value |
|---|---|---|---|---|
| cpf | String | Yes | Patient CPF | Map Input |
GraphQL Query Example
query {
WsAcesso_validateCpf(cpf: "12345678909") {
cpfIsValid
}
}
Response Example
Valid CPF:
{
"data": {
"validateCpf": {
"cpfIsValid": true
}
}
}
Invalid CPF:
{
"data": {
"validateCpf": {
"cpfIsValid": false
}
}
}