pending; o desfecho é alteração. O responsável é o do lead; sem um, o usuário dono da chave. O imóvel entra na cesta do lead, e expires_at é calculado pela validade (padrão 15 dias). Contraproposta aponta a proposta respondida em parent_proposal_id, do mesmo lead. Aceita Idempotency-Key.201: proposta registrada; Location aponta para ela.400: corpo inválido, imóvel ou proposta de origem que não resolvem.422 LEAD_NOT_OPEN: lead encerrado ou na lixeira; nada é gravado.curl --location 'https://api.veploy.com/v1/proposals?expand=responsible&expand=created_by' \
--header 'idempotency-key;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"lead_id": "9bddab70-98e6-43a9-8f32-c9788b9de0c0",
"property": {
"ref": "string"
},
"amount": "string",
"down_payment": "string",
"payment_method": "cash",
"validity_days": 1,
"notes": "string",
"parent_proposal_id": "096a9c18-f010-4074-96b9-ef96f145488b"
}'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"status": "pending",
"property": {
"ref": "string"
},
"lead_id": "9bddab70-98e6-43a9-8f32-c9788b9de0c0",
"amount": "string",
"down_payment": "string",
"currency": "str",
"payment_method": "cash",
"validity_days": 0,
"expires_at": "2019-08-24T14:15:22.123Z",
"notes": null,
"parent_proposal_id": "096a9c18-f010-4074-96b9-ef96f145488b",
"responsible_id": "58c9585a-8dec-43d5-adfc-6e46bfe76ff5",
"created_by_id": "9377d689-01fb-4abf-8450-3368d2c1924f",
"responsible": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"email": "string",
"phone": "string",
"cpf": "string",
"creci": "string",
"birth_date": "string",
"avatar_url": "string",
"role": "string",
"status": "active",
"lead_distribution_enabled": true,
"username": "string",
"invited_at": "2019-08-24T14:15:22.123Z",
"email_confirmed_at": "2019-08-24T14:15:22.123Z",
"created_at": "2019-08-24T14:15:22.123Z"
},
"created_by": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"email": "string",
"phone": "string",
"cpf": "string",
"creci": "string",
"birth_date": "string",
"avatar_url": "string",
"role": "string",
"status": "active",
"lead_distribution_enabled": true,
"username": "string",
"invited_at": "2019-08-24T14:15:22.123Z",
"email_confirmed_at": "2019-08-24T14:15:22.123Z",
"created_at": "2019-08-24T14:15:22.123Z"
},
"created_at": "2019-08-24T14:15:22.123Z",
"updated_at": "2019-08-24T14:15:22.123Z"
}
}