Skip to main content

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

ParameterTypeRequiredDescriptionValue
cpfStringYesPatient CPFMap Input

GraphQL Query Example

query {
WsAcesso_validateCpf(cpf: "12345678909") {
cpfIsValid
}
}

Response Example

Valid CPF:

{
"data": {
"validateCpf": {
"cpfIsValid": true
}
}
}

Invalid CPF:

{
"data": {
"validateCpf": {
"cpfIsValid": false
}
}
}