# Atualizar lead
Atualiza o lead com as informações no corpo do request. O id do lead no corpo precisa ser igual ao id no url da chamada. Diferente da rota POST, a rota de “atualizar lead” não lida com a geração de informações iniciais como a simulação; o que está no corpo será registrado na tabela, contanto que esteja compatível com a validação.
Para que o lead seja analisado de forma automática, todos os campos devem ser preenchidos. Endpoint da rota:
PUT https://api-partner.credihome.com.br/staging/leads/{leadId} - Staging
PUT https://api-partner.credihome.com.br/v1/production/leads/{leadId} - Produção
Corpo da requisição:
{
"buyers": [
{
"name": "Hellen Mac Cionoith",
"cpf": "47148277825",
"dateOfBirth": "2000-02-23",
"email": "hellen@email.com.br",
"maritalStatus": "married",
"marriageSystem": "partial_community_property",
"weddingDate": "2020-02-04",
"stableUnion": true,
"stableUnionDate": "2020-02-04",
"homeCountry": "Brasil",
"homeState": "SP",
"homeTown": "Alto Porã",
"contractType": "employee",
"jobTitle": "advogado",
"jobType": "agenteAdministrativo",
"dateOfEmployment": "2020-03-03",
"monthlyIncome": 20000,
"useFgts": false,
"ownsOtherProperty": false,
"gender": "F",
"mothersName": "Mae",
"fathersName": "Pai",
"bankAccounts": [
{
"bankId": "341",
"branch": "1233",
"account": "12313",
"dac": "5"
}
],
"spouse": {
"name": "Andre Amberson",
"cpf": "23365163816",
"dateOfBirth": "2020-04-01",
"gender": "M",
"liveTogether": true
},
"docs": [
{
"type": "rg",
"docNumber": "12321321",
"issuedBy": "SSP",
"issueDate": "2020-05-05",
"issueLocation": "RS",
"category": "identification"
}
],
"address": {
"city": "São Paulo",
"complement": "ap. 123",
"neighborhood": "Jardim Paulista",
"number": "123",
"streetName": "Avenida Nove de Julho",
"type": "owned",
"uf": "SP",
"zipcode": "01406-000",
"residenceTime": 13
},
"company": {
"city": "São Paulo",
"complement": "cj. 123",
"neighborhood": "Chácara Santo Antônio (Zona Sul)",
"number": "1233",
"streetName": "Rua Alexandre Dumas",
"cnpj": "04.447.305/0001-05",
"uf": "SP",
"zipcode": "04717-000",
"name": "teste"
},
"phones": [
{
"type": "cellphone",
"number": "1231232133"
}
]
},
{
"name": "Andre Amberson",
"cpf": "23365163816",
"dateOfBirth": "1998-04-01",
"email": "andream@email.com.br",
"maritalStatus": "married",
"marriageSystem": "partial_community_property",
"weddingDate": "2020-02-04",
"stableUnion": true,
"stableUnionDate": "2020-02-04",
"homeCountry": "Brasil",
"homeState": "SP",
"homeTown": "Cotia",
"contractType": "employee",
"jobTitle": "advogado",
"jobType": "advogado",
"dateOfEmployment": "2018-06-02",
"monthlyIncome": 21450,
"useFgts": false,
"ownsOtherProperty": false,
"gender": "M",
"mothersName": "Marcia Alvares",
"fathersName": "Jonas Amberson",
"bankAccounts": [
{
"bankId": "326",
"branch": "9874",
"account": "32169",
"dac": "5"
}
],
"spouse": {
"name": "Hellen Mac Cionoith",
"cpf": "47148277825",
"dateOfBirth": "2000-02-23",
"gender": "F",
"liveTogether": true
},
"docs": [
{
"type": "rg",
"docNumber": "78521396",
"issuedBy": "SSP",
"issueDate": "2002-01-05",
"issueLocation": "RS",
"category": "identification"
}
],
"address": {
"city": "São Paulo",
"complement": "ap. 123",
"neighborhood": "Jardim Paulista",
"number": "123",
"streetName": "Avenida Nove de Julho",
"type": "owned",
"uf": "SP",
"zipcode": "01406-000",
"residenceTime": 13
},
"company": {
"city": "São Paulo",
"complement": "cj. 123",
"neighborhood": "Chácara Santo Antônio (Zona Sul)",
"number": "1233",
"streetName": "Rua Alexandre Dumas",
"cnpj": "04.447.305/0001-05",
"uf": "SP",
"zipcode": "04717-000",
"name": "teste"
},
"phones": [
{
"type": "cellphone",
"number": "1231232133"
}
]
}
],
"leadId": "876c2b80-8e81-11ea-b38b-e74bae152df1",
"priority": "5",
"product": "mortgage",
"partnerId": 3214,
"authorizes": {
"email": true,
"scr": false,
"sms": true,
"voice": false,
"whatsapp": true
},
"simulation": {
"duration": 360,
"firstPayment": 3081.72,
"mortgageValue": 280000,
"type": "mortgage",
"realtyPrice": 3520651.3,
"includeRegistryFees": false,
"includeProcessingFees": false
},
"realty": {
"realtyType": "condo",
"useType": "residence",
"hasRealty": true,
"streetName": "Rua Aurora Soares Barbosa",
"debt": 1100.99,
"finality": [
"debt",
"reform",
"other"
],
"number": "775",
"complement": "775",
"neighborhood": "Vila Campesina",
"zipcode": "06023010",
"city": "Osasco",
"uf": "SP",
"age": 10,
"monthlyFees": 123,
"totalArea": 102,
"purchaseTime": "oneMonth",
"valuationContact": {
"name": "Luis",
"phone": "123132323"
}
},
"name": "Hellen Mac Cionoith",
"cpf": "47148277825",
"email": "hellen@email.com.br",
"dateOfBirth": "2000-02-23",
"phone": "11941133368"
}
Saiba mais aqui (opens new window)