Averbação
curl --request POST \
--url https://api.example.com/contract/averbacao \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assignee": "<string>",
"endorsement": {
"endorsement.cpf": "<string>",
"endorsement.contractStartDate": "<string>",
"endorsement.contractEndDate": "<string>",
"endorsement.firstDiscountDate": "<string>",
"endorsement.registration": "<string>",
"endorsement.workerName": "<string>",
"endorsement.contract": "<string>",
"endorsement.employerRegistrationNumber": "<string>",
"endorsement.employerName": "<string>",
"endorsement.proposal": "<string>",
"endorsement.installmentsNumber": 123,
"endorsement.installmentValue": 123,
"endorsement.loanValue": 123,
"endorsement.fundedValue": 123,
"endorsement.iofValue": 123,
"endorsement.monthlyCetValue": 123,
"endorsement.yearlyCetValue": 123,
"endorsement.monthlyRateValue": 123,
"endorsement.yearlyRateValue": 123,
"endorsement.hasGuarantees": true,
"endorsement.availableGuaranteeFgtsBalance": 123,
"endorsement.rescissionFineGuaranteeFgts": 123,
"endorsement.rescissionAllowanceGuaranteePercentage": 123
},
"contractInfo": {
"contractInfo.digitalCertificateSignatureIndicator": true,
"contractInfo.officialDocumentValidationIndicator": true,
"contractInfo.ipAddress": "<string>",
"contractInfo.signatureDateTime": "<string>",
"contractInfo.illiteracyIndicator": true,
"contractInfo.insuranceValue": 123,
"contractInfo.biometricBase": "<string>",
"contractInfo.formalizationId": "<string>",
"contractInfo.formalizationDateTime": "<string>"
},
"workerInfo": {
"workerInfo.gender": "<string>",
"workerInfo.birthdate": "<string>",
"workerInfo.motherName": "<string>",
"workerInfo.street": "<string>",
"workerInfo.number": "<string>",
"workerInfo.neighborhood": "<string>",
"workerInfo.city": "<string>",
"workerInfo.state": "<string>",
"workerInfo.zipCode": "<string>",
"workerInfo.incomeValue": 123,
"workerInfo.phones": [
{}
]
},
"paymentList": [
{
"paymentList[].cpfCnpj": "<string>",
"paymentList[].paymentValue": 123,
"paymentList[].bank": "<string>",
"paymentList[].agency": "<string>",
"paymentList[].account": "<string>",
"paymentList[].accountDigit": "<string>",
"paymentList[].accountType": 123,
"paymentList[].pixKey": "<string>"
}
]
}
'import requests
url = "https://api.example.com/contract/averbacao"
payload = {
"assignee": "<string>",
"endorsement": {
"endorsement.cpf": "<string>",
"endorsement.contractStartDate": "<string>",
"endorsement.contractEndDate": "<string>",
"endorsement.firstDiscountDate": "<string>",
"endorsement.registration": "<string>",
"endorsement.workerName": "<string>",
"endorsement.contract": "<string>",
"endorsement.employerRegistrationNumber": "<string>",
"endorsement.employerName": "<string>",
"endorsement.proposal": "<string>",
"endorsement.installmentsNumber": 123,
"endorsement.installmentValue": 123,
"endorsement.loanValue": 123,
"endorsement.fundedValue": 123,
"endorsement.iofValue": 123,
"endorsement.monthlyCetValue": 123,
"endorsement.yearlyCetValue": 123,
"endorsement.monthlyRateValue": 123,
"endorsement.yearlyRateValue": 123,
"endorsement.hasGuarantees": True,
"endorsement.availableGuaranteeFgtsBalance": 123,
"endorsement.rescissionFineGuaranteeFgts": 123,
"endorsement.rescissionAllowanceGuaranteePercentage": 123
},
"contractInfo": {
"contractInfo.digitalCertificateSignatureIndicator": True,
"contractInfo.officialDocumentValidationIndicator": True,
"contractInfo.ipAddress": "<string>",
"contractInfo.signatureDateTime": "<string>",
"contractInfo.illiteracyIndicator": True,
"contractInfo.insuranceValue": 123,
"contractInfo.biometricBase": "<string>",
"contractInfo.formalizationId": "<string>",
"contractInfo.formalizationDateTime": "<string>"
},
"workerInfo": {
"workerInfo.gender": "<string>",
"workerInfo.birthdate": "<string>",
"workerInfo.motherName": "<string>",
"workerInfo.street": "<string>",
"workerInfo.number": "<string>",
"workerInfo.neighborhood": "<string>",
"workerInfo.city": "<string>",
"workerInfo.state": "<string>",
"workerInfo.zipCode": "<string>",
"workerInfo.incomeValue": 123,
"workerInfo.phones": [{}]
},
"paymentList": [
{
"paymentList[].cpfCnpj": "<string>",
"paymentList[].paymentValue": 123,
"paymentList[].bank": "<string>",
"paymentList[].agency": "<string>",
"paymentList[].account": "<string>",
"paymentList[].accountDigit": "<string>",
"paymentList[].accountType": 123,
"paymentList[].pixKey": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assignee: '<string>',
endorsement: {
'endorsement.cpf': '<string>',
'endorsement.contractStartDate': '<string>',
'endorsement.contractEndDate': '<string>',
'endorsement.firstDiscountDate': '<string>',
'endorsement.registration': '<string>',
'endorsement.workerName': '<string>',
'endorsement.contract': '<string>',
'endorsement.employerRegistrationNumber': '<string>',
'endorsement.employerName': '<string>',
'endorsement.proposal': '<string>',
'endorsement.installmentsNumber': 123,
'endorsement.installmentValue': 123,
'endorsement.loanValue': 123,
'endorsement.fundedValue': 123,
'endorsement.iofValue': 123,
'endorsement.monthlyCetValue': 123,
'endorsement.yearlyCetValue': 123,
'endorsement.monthlyRateValue': 123,
'endorsement.yearlyRateValue': 123,
'endorsement.hasGuarantees': true,
'endorsement.availableGuaranteeFgtsBalance': 123,
'endorsement.rescissionFineGuaranteeFgts': 123,
'endorsement.rescissionAllowanceGuaranteePercentage': 123
},
contractInfo: {
'contractInfo.digitalCertificateSignatureIndicator': true,
'contractInfo.officialDocumentValidationIndicator': true,
'contractInfo.ipAddress': '<string>',
'contractInfo.signatureDateTime': '<string>',
'contractInfo.illiteracyIndicator': true,
'contractInfo.insuranceValue': 123,
'contractInfo.biometricBase': '<string>',
'contractInfo.formalizationId': '<string>',
'contractInfo.formalizationDateTime': '<string>'
},
workerInfo: {
'workerInfo.gender': '<string>',
'workerInfo.birthdate': '<string>',
'workerInfo.motherName': '<string>',
'workerInfo.street': '<string>',
'workerInfo.number': '<string>',
'workerInfo.neighborhood': '<string>',
'workerInfo.city': '<string>',
'workerInfo.state': '<string>',
'workerInfo.zipCode': '<string>',
'workerInfo.incomeValue': 123,
'workerInfo.phones': [{}]
},
paymentList: [
{
'paymentList[].cpfCnpj': '<string>',
'paymentList[].paymentValue': 123,
'paymentList[].bank': '<string>',
'paymentList[].agency': '<string>',
'paymentList[].account': '<string>',
'paymentList[].accountDigit': '<string>',
'paymentList[].accountType': 123,
'paymentList[].pixKey': '<string>'
}
]
})
};
fetch('https://api.example.com/contract/averbacao', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"requestId": "e7f8a9b0-c1d2-3456-e7f8-a9b0c1d23456",
"status": "queued",
"_links": {
"self": { "href": "/dataprev-controller/contract/averbacao", "method": "POST" },
"result": { "href": "/dataprev-controller/request/e7f8a9b0-c1d2-3456-e7f8-a9b0c1d23456", "method": "GET" }
}
}
Contratação Ativa
Averbação
Envio dos dados do contrato à DATAPREV para inclusão da averbação
POST
/
contract
/
averbacao
Averbação
curl --request POST \
--url https://api.example.com/contract/averbacao \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assignee": "<string>",
"endorsement": {
"endorsement.cpf": "<string>",
"endorsement.contractStartDate": "<string>",
"endorsement.contractEndDate": "<string>",
"endorsement.firstDiscountDate": "<string>",
"endorsement.registration": "<string>",
"endorsement.workerName": "<string>",
"endorsement.contract": "<string>",
"endorsement.employerRegistrationNumber": "<string>",
"endorsement.employerName": "<string>",
"endorsement.proposal": "<string>",
"endorsement.installmentsNumber": 123,
"endorsement.installmentValue": 123,
"endorsement.loanValue": 123,
"endorsement.fundedValue": 123,
"endorsement.iofValue": 123,
"endorsement.monthlyCetValue": 123,
"endorsement.yearlyCetValue": 123,
"endorsement.monthlyRateValue": 123,
"endorsement.yearlyRateValue": 123,
"endorsement.hasGuarantees": true,
"endorsement.availableGuaranteeFgtsBalance": 123,
"endorsement.rescissionFineGuaranteeFgts": 123,
"endorsement.rescissionAllowanceGuaranteePercentage": 123
},
"contractInfo": {
"contractInfo.digitalCertificateSignatureIndicator": true,
"contractInfo.officialDocumentValidationIndicator": true,
"contractInfo.ipAddress": "<string>",
"contractInfo.signatureDateTime": "<string>",
"contractInfo.illiteracyIndicator": true,
"contractInfo.insuranceValue": 123,
"contractInfo.biometricBase": "<string>",
"contractInfo.formalizationId": "<string>",
"contractInfo.formalizationDateTime": "<string>"
},
"workerInfo": {
"workerInfo.gender": "<string>",
"workerInfo.birthdate": "<string>",
"workerInfo.motherName": "<string>",
"workerInfo.street": "<string>",
"workerInfo.number": "<string>",
"workerInfo.neighborhood": "<string>",
"workerInfo.city": "<string>",
"workerInfo.state": "<string>",
"workerInfo.zipCode": "<string>",
"workerInfo.incomeValue": 123,
"workerInfo.phones": [
{}
]
},
"paymentList": [
{
"paymentList[].cpfCnpj": "<string>",
"paymentList[].paymentValue": 123,
"paymentList[].bank": "<string>",
"paymentList[].agency": "<string>",
"paymentList[].account": "<string>",
"paymentList[].accountDigit": "<string>",
"paymentList[].accountType": 123,
"paymentList[].pixKey": "<string>"
}
]
}
'import requests
url = "https://api.example.com/contract/averbacao"
payload = {
"assignee": "<string>",
"endorsement": {
"endorsement.cpf": "<string>",
"endorsement.contractStartDate": "<string>",
"endorsement.contractEndDate": "<string>",
"endorsement.firstDiscountDate": "<string>",
"endorsement.registration": "<string>",
"endorsement.workerName": "<string>",
"endorsement.contract": "<string>",
"endorsement.employerRegistrationNumber": "<string>",
"endorsement.employerName": "<string>",
"endorsement.proposal": "<string>",
"endorsement.installmentsNumber": 123,
"endorsement.installmentValue": 123,
"endorsement.loanValue": 123,
"endorsement.fundedValue": 123,
"endorsement.iofValue": 123,
"endorsement.monthlyCetValue": 123,
"endorsement.yearlyCetValue": 123,
"endorsement.monthlyRateValue": 123,
"endorsement.yearlyRateValue": 123,
"endorsement.hasGuarantees": True,
"endorsement.availableGuaranteeFgtsBalance": 123,
"endorsement.rescissionFineGuaranteeFgts": 123,
"endorsement.rescissionAllowanceGuaranteePercentage": 123
},
"contractInfo": {
"contractInfo.digitalCertificateSignatureIndicator": True,
"contractInfo.officialDocumentValidationIndicator": True,
"contractInfo.ipAddress": "<string>",
"contractInfo.signatureDateTime": "<string>",
"contractInfo.illiteracyIndicator": True,
"contractInfo.insuranceValue": 123,
"contractInfo.biometricBase": "<string>",
"contractInfo.formalizationId": "<string>",
"contractInfo.formalizationDateTime": "<string>"
},
"workerInfo": {
"workerInfo.gender": "<string>",
"workerInfo.birthdate": "<string>",
"workerInfo.motherName": "<string>",
"workerInfo.street": "<string>",
"workerInfo.number": "<string>",
"workerInfo.neighborhood": "<string>",
"workerInfo.city": "<string>",
"workerInfo.state": "<string>",
"workerInfo.zipCode": "<string>",
"workerInfo.incomeValue": 123,
"workerInfo.phones": [{}]
},
"paymentList": [
{
"paymentList[].cpfCnpj": "<string>",
"paymentList[].paymentValue": 123,
"paymentList[].bank": "<string>",
"paymentList[].agency": "<string>",
"paymentList[].account": "<string>",
"paymentList[].accountDigit": "<string>",
"paymentList[].accountType": 123,
"paymentList[].pixKey": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assignee: '<string>',
endorsement: {
'endorsement.cpf': '<string>',
'endorsement.contractStartDate': '<string>',
'endorsement.contractEndDate': '<string>',
'endorsement.firstDiscountDate': '<string>',
'endorsement.registration': '<string>',
'endorsement.workerName': '<string>',
'endorsement.contract': '<string>',
'endorsement.employerRegistrationNumber': '<string>',
'endorsement.employerName': '<string>',
'endorsement.proposal': '<string>',
'endorsement.installmentsNumber': 123,
'endorsement.installmentValue': 123,
'endorsement.loanValue': 123,
'endorsement.fundedValue': 123,
'endorsement.iofValue': 123,
'endorsement.monthlyCetValue': 123,
'endorsement.yearlyCetValue': 123,
'endorsement.monthlyRateValue': 123,
'endorsement.yearlyRateValue': 123,
'endorsement.hasGuarantees': true,
'endorsement.availableGuaranteeFgtsBalance': 123,
'endorsement.rescissionFineGuaranteeFgts': 123,
'endorsement.rescissionAllowanceGuaranteePercentage': 123
},
contractInfo: {
'contractInfo.digitalCertificateSignatureIndicator': true,
'contractInfo.officialDocumentValidationIndicator': true,
'contractInfo.ipAddress': '<string>',
'contractInfo.signatureDateTime': '<string>',
'contractInfo.illiteracyIndicator': true,
'contractInfo.insuranceValue': 123,
'contractInfo.biometricBase': '<string>',
'contractInfo.formalizationId': '<string>',
'contractInfo.formalizationDateTime': '<string>'
},
workerInfo: {
'workerInfo.gender': '<string>',
'workerInfo.birthdate': '<string>',
'workerInfo.motherName': '<string>',
'workerInfo.street': '<string>',
'workerInfo.number': '<string>',
'workerInfo.neighborhood': '<string>',
'workerInfo.city': '<string>',
'workerInfo.state': '<string>',
'workerInfo.zipCode': '<string>',
'workerInfo.incomeValue': 123,
'workerInfo.phones': [{}]
},
paymentList: [
{
'paymentList[].cpfCnpj': '<string>',
'paymentList[].paymentValue': 123,
'paymentList[].bank': '<string>',
'paymentList[].agency': '<string>',
'paymentList[].account': '<string>',
'paymentList[].accountDigit': '<string>',
'paymentList[].accountType': 123,
'paymentList[].pixKey': '<string>'
}
]
})
};
fetch('https://api.example.com/contract/averbacao', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"requestId": "e7f8a9b0-c1d2-3456-e7f8-a9b0c1d23456",
"status": "queued",
"_links": {
"self": { "href": "/dataprev-controller/contract/averbacao", "method": "POST" },
"result": { "href": "/dataprev-controller/request/e7f8a9b0-c1d2-3456-e7f8-a9b0c1d23456", "method": "GET" }
}
}
Etapa obrigatória — a averbação é o passo indispensável para incluir o contrato junto à DATAPREV.
Todos os endpoints requerem autenticação via Bearer token no header
Authorization.
Consulte o guia de autenticação para obter suas credenciais e gerar um token.O path antigo
POST /contract (sem /averbacao) ainda funciona, mas está deprecated — a resposta
inclui o header Deprecation: true. Use POST /contract/averbacao.Parâmetros
string
required
CNPJ do cedente — exatamente 14 dígitos numéricos
object
required
Dados do contrato e da operação
Show child attributes
Show child attributes
string
required
CPF do trabalhador (8-11 dígitos)
string
required
Formato
ddMMyyyystring
required
Formato
ddMMyyyystring
required
Formato
ddMMyyyystring
required
Matrícula do trabalhador
string
required
Nome do trabalhador (máx. 90 caracteres)
string
required
Identificador do contrato (13-15 caracteres alfanuméricos)
string
required
Inscrição do empregador
string
required
Nome do empregador
string
Identificador da proposta (opcional)
integer
required
Número de parcelas (inteiro positivo)
number
required
Valor da parcela (> 0)
number
required
Valor do empréstimo (> 0)
number
required
Valor financiado (> 0)
number
required
Valor do IOF (≥ 0)
number
required
CET mensal (> 0)
number
required
CET anual (> 0)
number
required
Taxa mensal (> 0)
number
required
Taxa anual (> 0)
boolean
required
Se a operação tem garantias
number
Saldo FGTS de garantia (opcional)
number
Multa rescisória de garantia (opcional)
number
% de garantia sobre aviso de rescisão (opcional)
object
required
Dados da assinatura/formalização
Show child attributes
Show child attributes
boolean
required
boolean
required
string
required
IP do assinante
string
required
Formato
ddMMyyyyHHmmssboolean
required
Deve ser
false — analfabetos não são permitidosnumber
Valor do seguro (opcional)
string
Base biométrica (opcional)
string
Deve ser enviado junto com
formalizationDateTime (ambos ou nenhum)string
Formato
ddMMyyyyHHmmss — junto com formalizationIdobject
required
Dados cadastrais do trabalhador
array
required
Lista de pagamentos (ao menos 1 item). Cada item precisa de dados bancários completos OU
pixKey,
nunca os dois.Regra de negócio: a soma de todos os
paymentValue em paymentList deve ser exatamente igual a
endorsement.loanValue.Exemplo
{
"requestId": "e7f8a9b0-c1d2-3456-e7f8-a9b0c1d23456",
"status": "queued",
"_links": {
"self": { "href": "/dataprev-controller/contract/averbacao", "method": "POST" },
"result": { "href": "/dataprev-controller/request/e7f8a9b0-c1d2-3456-e7f8-a9b0c1d23456", "method": "GET" }
}
}
202 + requestId). Acompanhe o processamento em
Resultado da averbação.
Erros de /contract/* (averbação, refin e documentos)
Formato RFC7807-like — o erro vem em error.errors[], um item por campo inválido.
400 - Exemplo (/contract/*)
{
"error": {
"type": null,
"title": "Validation failed",
"detail": null,
"instance": "/dataprev-controller/contract/averbacao",
"status": 400,
"errors": [
{ "field": "X-Idempotency-Key", "message": "Header X-Idempotency-Key é obrigatório" },
{ "field": "endorsement.loanValue", "message": "endorsement.loanValue deve ser maior que 0" }
]
}
}
