Skip to content
AlterEstate

Edit a property

PATCHhttps://secure.alterestate.com/api/v1/properties/edit/{uid}/

Updates an existing property. Send only the fields that change.

Change one field or many on a listing that already exists. Fields you omit stay as they are. The public list endpoint is read-only and cannot update a property. To change only the status, send a body with status alone. See Status below.


Authentication

Send Authorization: Token your_api_key_here. Account token. Server-side only: never send it from browser or mobile app code.


Path parameters

uidstringrequired
Property uid from List properties. Example result: cid 292960, uid JSORJ9S5AY.Example: JSORJ9S5AY

Main information

FieldTypeDescription
namestringPublic title. Maximum 300 characters. Example: Modern apartment in Naco.
short_descriptionstringShort text shown on cards. Example: Bright apartment close to parks and restaurants..
descriptionstringFull description. Example: Bright apartment with a balcony, ready for showings..
categorynumberCategory ID. See Categories below. Example: 1.
listing_typenumber[]Operations: 1 sale, 2 rent. Replaces the current list. Example: [1] or [1, 2]. Example: [1].
conditionstringCondition code. See Condition below. Example: 9.
statusstringPublication status of this property. Send one code from Status below, for example 3 to mark it sold. Send it alone to change only the status. Example: 3.
show_on_websitebooleanWhether the listing is visible on the agency website. Example: true.
featuredbooleanMark the listing as featured. Example: false.
exclusivebooleanMark the listing as exclusive. Example: true.
furnishedbooleanWhether the property is furnished. Example: false.
year_constructionstringYear the property was built. Example: 2018.

Price

FieldTypeDescription
sale_pricenumberSale price, in currency_sale. Example: 250000.
currency_salestringCurrency of sale_price. See Currencies below. Example: USD.
rent_pricenumberLong-term rent price, in currency_rent. Example: 1200.
currency_rentstringCurrency of rent_price. Example: USD.
rental_pricenumberShort-term rent price, in currency_rental. Example: 150.
currency_rentalstringCurrency of rental_price. Example: USD.
furnished_pricenumberFurnished rent price, in currency_furnished. Example: 1500.
currency_furnishedstringCurrency of furnished_price. Example: USD.
furnished_sale_pricenumberFurnished sale price, in currency_sale_furnished. Example: 270000.
currency_sale_furnishedstringCurrency of furnished_sale_price. Example: USD.
maintenance_feenumberMaintenance fee, in currency_maintenance. Example: 150.
currency_maintenancestringCurrency of maintenance_fee. Example: USD.

Features

FieldTypeDescription
roomnumberBedrooms. Example: 3.
bathroomnumberBathrooms. Example: 2.
half_bathroomsnumberHalf bathrooms. Example: 1.
parkinglotnumberParking spaces. Example: 2.
property_areanumberBuilt area. Example: 120.
terrain_areanumberLand area. Example: 180.
amenitiesnumber[]Amenity IDs. Replaces the current list. Same IDs as the features filter on List properties. Example: [74, 73].

Location

FieldTypeDescription
countrynumberCountry ID. Example: 1.
provincenumberProvince ID. See Locations. Example: 1.
citynumberCity ID. See Locations. Example: 156.
sectornumberSector ID. See Locations. Example: 2234.
addressstringStreet address. Example: Calle El Recodo 12.
address2stringAdditional address line. Example: Piso 4.
zip_codestringPostal code. Example: 10111.
latitudestringLatitude. Example: 18.4762.
longitudestringLongitude. Example: -69.9312.
hide_locationbooleanHide the exact location on the public site. Example: true.

Agent and extras

FieldTypeDescription
agentsstring[]UIDs of the agents responsible for the listing. Replaces the current list. Get uids from Users. Example: ["IZHIZ6C3Z6"].
virtual_tourstringVirtual tour URL. Do not send embed markup. Example: https://example.com/tour.
youtubeiframestringYouTube video URL. Do not send embed markup. Example: https://www.youtube.com/watch?v=dQw4w9WgXcQ.
external_routestringPublic URL of this listing on an external website. Maximum 255 characters. Example: https://example.com/propiedad/apartamento-naco.
ikeystringYour own internal property code. Example: NACO-120.

Example request

PATCH
curl --request PATCH \
  --url 'https://secure.alterestate.com/api/v1/properties/edit/JSORJ9S5AY/' \
  --header 'Authorization: Token your_api_key_here' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Modern apartment in Naco",
  "room": 3,
  "bathroom": 2,
  "sale_price": 250000,
  "currency_sale": "USD",
  "short_description": "Bright apartment close to parks and restaurants.",
  "show_on_website": true
}'

Example response

200 OK
{
  "cid": 292960,
  "uid": "JSORJ9S5AY",
  "name": "Modern apartment in Naco",
  "room": 3,
  "bathroom": 2,
  "sale_price": 250000,
  "currency_sale": "USD",
  "short_description": "Bright apartment close to parks and restaurants.",
  "show_on_website": true
}
400 Bad Request
{
  "message": "failed",
  "details": {
    "category": [
      "Invalid pk \"999\" - object does not exist."
    ]
  }
}
403 Forbidden
{
  "detail": "No estas autorizado para visualizar esto."
}
404 Not Found
{
  "detail": "Not found."
}

Categories

IDCategory
1Apartments
2Houses
3Buildings
4Lots
5Hotels
6Commercial spaces
7Industrial warehouses
10Penthouses
13Villas
14Lofts
17Townhouses

Condition

ValueMeaning
1New
9Ready
5In construction
2Second use
3Remodeled
7In plans

Status

status is the publication state of this one property. Send the code as a string. To change only the status, send a body that contains status alone; every other field stays as it is. Create a property does not accept a status: AlterEstate assigns Published (1) or Pending (7), and you change it afterward with this call. A code that is not in this list returns 400.

ValueMeaningTypical use
1Published (Publicada)The listing is visible on the agency website and connected portals.
2Reserved (Reservada)An offer was accepted and the property is held.
3Sold (Vendida)The sale closed.
4Rented (Alquilada)The rental closed. This is the only status that keeps a release date already stored on the property.
5Deleted (Eliminado)The listing is marked eliminated.
6Unpublished (No Publicada)The listing stays in the inventory and is hidden from the public site.
7Pending (Pendiente)Waiting for approval. New listings are saved with this code when the user cannot publish by default.
8Conflict (Conflicto)The listing needs review, often because the title number already exists.
9Pending, reviewed (Pendiente Revisada)Still pending, after a review.
10Expired (Expirada)The listing expired after a long period without changes.
11Blocked (Bloqueado)Used on project units.

Change only the status

GoalBody
Publish this property{ "status": "1" }
Mark it reserved{ "status": "2" }
Mark it sold{ "status": "3" }
Mark it rented{ "status": "4" }
Hide it without deleting it{ "status": "6" }
Mark one property sold
curl -X PATCH 'https://secure.alterestate.com/api/v1/properties/edit/JSORJ9S5AY/' \
  -H 'Authorization: Token YOUR_ACCOUNT_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{ "status": "3" }'

What changes besides status

  • The previous status is kept on the property as last_status.
  • Moving the property to any status other than 4 (Rented) clears its release date and the release-date reminder.
  • Sending the status the property already has does not clear that date.
  • Price, description, photos and the assigned agents stay as they are.

Currencies

Send the amount and its currency together. Supported values: USD, DOP, MXN, COP, CRC, GTQ and PEN. AlterEstate stores the price in that currency. You do not convert it to USD.


Status codes

StatusMeaning
200The property was updated. The body is the property record.
400The body is invalid. message is "failed" and details names the field.
401The account token is missing or invalid.
403This user cannot edit this property.
404No property exists with that uid.
500Server error while processing the request.
  • Use PATCH. A PUT expects a full property payload.
  • amenities and agents, when sent, replace the current list.
  • external_route accepts at most 255 characters. A longer URL returns 400.
  • The account token comes from POST /api/v1/login/ with username and password. The response field is token. The public aetoken cannot call this endpoint.
  • The user must belong to the agency that owns the property and must be allowed to edit it: an administrator, or an agent assigned to that listing.

Frequently asked questions

Do I update a property with cid or uid?

Use uid in the URL. List properties returns cid and uid together. cid is the public listing code and is not accepted by this endpoint.

Can the public API token update a property?

No. The aetoken only reads listings. Send Authorization: Token with an account token from POST /api/v1/login/.

Do I have to send every property field?

No. PATCH updates only the fields you send. amenities and agents are the exception: sending either one replaces that whole list.

How do I change only the status of one property?

PATCH /api/v1/properties/edit/{uid}/ with a body that contains only status, for example { "status": "3" } to mark that listing sold. Only the property whose uid is in the URL changes. The codes are under Status on this page.

Last updated . Questions? Emaildev@alterestate.com.