DEVELOPING

The property model

You send the JSON using our model and we translate it into each portal's format.

Mapaprop is multi-country, and for that to work there is one thing you need to understand well: the vocabulary is single. The type house is the same value in every country. What changes from one country to another is what it is called on screen — "Departamento", "Piso", "Apartamento" — and which options are available, not the value you send.

If you integrate several countries, you learn one vocabulary, not one per country.

Type and operation

In the property JSON they travel as numbers:

FieldWhat it is
typeThe property type
propertyOperationThe operation

Those numbers are stable: they mean the same thing in every country.

There are seven operations:

propertyOperationOperation
1Sale
2Rental
3Temporary rental
4Exchange
5Transfer
6Share
7Auction

There are twenty-three types and we do not list them here, because not all of them are enabled in every country. You get them from the catalog.

The catalog: where the values come from

GET /property-attributes returns, for a given country, everything that country accepts. Each entry includes:

FieldWhat it is
pa_keyThe text key — apartment, house, pool
pa_key_legacyThe stable value you send in the JSON
pa_labelThe translated label, to show to your user
pa_typeThe nature of the data: bool, list or string
pa_group_subtypeThe family, to group on screen — ammenities, spaces, services

With that you can translate in both directions: from your system to ours, and from our response into something readable for your user.

Request the catalog for the property's country, not just one. A type may be enabled in Argentina and not in Peru.

And keep this in mind: we do not validate values against the catalog. Creation validation checks that the required fields are present and of the correct type — nothing more. A value that the country does not use is not rejected: it is stored, and the property ends up published with the wrong data. The catalog is not a suggestion: it is the only way to know what to send.

The attributes

In addition to the fixed fields, the property carries an attributes array with everything else: the amenities, the finishes, the orientations. That is where the richness of the listing lives, and it is the same place for all three kinds of data:

pa_typeWhat it isWhat you send
boolIt has it or it doesn't — pool, grill, covered parkingthe attribute entry, marked as present
listOne option among several — type of air conditioning, orientationthe entry for the chosen option, with its value
stringA value with its own textthe entry, with the value's key

Copy the exact field names of each entry from the example in The property JSON object — they are not the same for the three natures, and they do not match the ones in the catalog. That example is the contract.

What you send and what we set

The catalog carries more fields than you need to send. The rule is simple: send only what you know and we don't.

Who sets it
The customer identifierWe do, from your token — if you send it in the body, it is ignored
Everything elseYou do

The attributes array is stored exactly as you send it, labels and language included: we do not rewrite it against the catalog. That means that if you make up a label, that is the one that will be displayed.

So: build each entry from the country's catalog instead of writing it by hand. Request GET /property-attributes for the property's country and copy the entry exactly as it comes.

An example of the single vocabulary

The same property, published in two countries, sends the same value:

// Argentina
{ "type": 1, "propertyOperation": 1, "currency": "USD" }

// España — mismo tipo, mismo número
{ "type": 1, "propertyOperation": 1, "currency": "EUR" }

What changes is what your user sees: in Argentina the catalog returns pa_label: "Departamento"; in Spain, pa_label: "Piso".

And if the country is not in the catalog

If GET /property-attributes does not return the country you are looking for, that country is not enabled for publishing yet. Do not convert the values by hand or assume another country's values: write to us and we will enable it.

See also