curl --request PUT \
--url https://rest.newlead.ai/v1/properties/{reference} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"listings": [
{
"price": 198000,
"available": true
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({listings: [{price: 198000, available: true}]})
};
fetch('https://rest.newlead.ai/v1/properties/{reference}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://rest.newlead.ai/v1/properties/{reference}"
payload = { "listings": [
{
"price": 198000,
"available": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"object": "property",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"internal_reference": "<string>",
"type": "flat",
"type_label": "<string>",
"available": true,
"matched_operation": "sale",
"summary": "<string>",
"listings": [
{
"operation": "sale",
"price": 720,
"currency": "EUR",
"idealista_code": "100000001",
"url": "<string>",
"available": true
}
],
"city": "<string>",
"province": "<string>",
"address": "<string>",
"bedrooms": 123,
"bathrooms": 123,
"built_m2": 123,
"features": "<string>",
"description": "<string>",
"visit_hours": "<string>",
"sales_agent": {
"name": "<string>",
"phone": "<string>"
},
"agent_notes": "<string>",
"images": [
{
"url": "https://images.example.com/property/kitchen.jpg",
"label": "<string>",
"ai_generated": true
}
],
"url": "<string>",
"warnings": [
{
"code": "image_not_copied",
"param": "images.3.url",
"message": "<string>"
}
]
}{
"object": "property",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"internal_reference": "<string>",
"type": "flat",
"type_label": "<string>",
"available": true,
"matched_operation": "sale",
"summary": "<string>",
"listings": [
{
"operation": "sale",
"price": 720,
"currency": "EUR",
"idealista_code": "100000001",
"url": "<string>",
"available": true
}
],
"city": "<string>",
"province": "<string>",
"address": "<string>",
"bedrooms": 123,
"bathrooms": 123,
"built_m2": 123,
"features": "<string>",
"description": "<string>",
"visit_hours": "<string>",
"sales_agent": {
"name": "<string>",
"phone": "<string>"
},
"agent_notes": "<string>",
"images": [
{
"url": "https://images.example.com/property/kitchen.jpg",
"label": "<string>",
"ai_generated": true
}
],
"url": "<string>",
"warnings": [
{
"code": "image_not_copied",
"param": "images.3.url",
"message": "<string>"
}
]
}{
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "phone must match pattern \"^\\+[1-9]\\d{6,14}$\".",
"param": "phone",
"request_id": "req_m3k2a9_4f1c2b7e",
"doc_url": "https://docs.newlead.ai/errors#parameter_invalid"
}
}{
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "phone must match pattern \"^\\+[1-9]\\d{6,14}$\".",
"param": "phone",
"request_id": "req_m3k2a9_4f1c2b7e",
"doc_url": "https://docs.newlead.ai/errors#parameter_invalid"
}
}{
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "phone must match pattern \"^\\+[1-9]\\d{6,14}$\".",
"param": "phone",
"request_id": "req_m3k2a9_4f1c2b7e",
"doc_url": "https://docs.newlead.ai/errors#parameter_invalid"
}
}Create or replace a property
Creates the property with this reference, or replaces it entirely: a field you leave out is removed. 201 when it is created, 200 when it is replaced. Sending the same request again changes nothing, so retry freely: there is no Idempotency-Key. Send one PUT at a time per reference: two concurrent PUTs of the same reference may race on photos. Up to 50 photos are copied to our storage, in your order. A URL already copied for this property is not downloaded again. A photo that cannot be copied does not fail the request: the property is saved without it and the photo comes back in warnings. If copying takes too long, the rest come back as image_deferred: send the same request again. These properties live apart from your Idealista catalog: this route never changes a property that comes from Idealista, even with the same reference.
curl --request PUT \
--url https://rest.newlead.ai/v1/properties/{reference} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"listings": [
{
"price": 198000,
"available": true
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({listings: [{price: 198000, available: true}]})
};
fetch('https://rest.newlead.ai/v1/properties/{reference}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://rest.newlead.ai/v1/properties/{reference}"
payload = { "listings": [
{
"price": 198000,
"available": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"object": "property",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"internal_reference": "<string>",
"type": "flat",
"type_label": "<string>",
"available": true,
"matched_operation": "sale",
"summary": "<string>",
"listings": [
{
"operation": "sale",
"price": 720,
"currency": "EUR",
"idealista_code": "100000001",
"url": "<string>",
"available": true
}
],
"city": "<string>",
"province": "<string>",
"address": "<string>",
"bedrooms": 123,
"bathrooms": 123,
"built_m2": 123,
"features": "<string>",
"description": "<string>",
"visit_hours": "<string>",
"sales_agent": {
"name": "<string>",
"phone": "<string>"
},
"agent_notes": "<string>",
"images": [
{
"url": "https://images.example.com/property/kitchen.jpg",
"label": "<string>",
"ai_generated": true
}
],
"url": "<string>",
"warnings": [
{
"code": "image_not_copied",
"param": "images.3.url",
"message": "<string>"
}
]
}{
"object": "property",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"internal_reference": "<string>",
"type": "flat",
"type_label": "<string>",
"available": true,
"matched_operation": "sale",
"summary": "<string>",
"listings": [
{
"operation": "sale",
"price": 720,
"currency": "EUR",
"idealista_code": "100000001",
"url": "<string>",
"available": true
}
],
"city": "<string>",
"province": "<string>",
"address": "<string>",
"bedrooms": 123,
"bathrooms": 123,
"built_m2": 123,
"features": "<string>",
"description": "<string>",
"visit_hours": "<string>",
"sales_agent": {
"name": "<string>",
"phone": "<string>"
},
"agent_notes": "<string>",
"images": [
{
"url": "https://images.example.com/property/kitchen.jpg",
"label": "<string>",
"ai_generated": true
}
],
"url": "<string>",
"warnings": [
{
"code": "image_not_copied",
"param": "images.3.url",
"message": "<string>"
}
]
}{
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "phone must match pattern \"^\\+[1-9]\\d{6,14}$\".",
"param": "phone",
"request_id": "req_m3k2a9_4f1c2b7e",
"doc_url": "https://docs.newlead.ai/errors#parameter_invalid"
}
}{
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "phone must match pattern \"^\\+[1-9]\\d{6,14}$\".",
"param": "phone",
"request_id": "req_m3k2a9_4f1c2b7e",
"doc_url": "https://docs.newlead.ai/errors#parameter_invalid"
}
}{
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "phone must match pattern \"^\\+[1-9]\\d{6,14}$\".",
"param": "phone",
"request_id": "req_m3k2a9_4f1c2b7e",
"doc_url": "https://docs.newlead.ai/errors#parameter_invalid"
}
}Authorizations
Path Parameters
Body
Response
Replaced.
The property as saved, with warnings (empty if every photo was copied).