Taxonomy API
Taxonomy API is outdated for Imovirtual
Reach out directly to our support team at [email protected] to receive the newest Taxonomy for Imovirtual.
There are a few ways to perform searches on the Taxonomy API. However, only one is the most correct one. You should filter by the site/marketplace you are looking for, and also, to improve the reading, it's better to also include the category on that search. Look here .
Taxonomy tree
In order to obtain the taxonomy tree for all available categories, you need to execute the following request:
curl -X GET \
'https://api.olxgroup.com/taxonomy/v1/categories/' \
-H "User-Agent: crm_name"
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: your-api-key'
Which will return something like:
{
"transaction_id": "213eaa40-2b9a-11e8-a8ac-b3d0e872f585",
"message": "success",
"data": [
{
"code": "urn:concept:realestate-for-sale",
"label": "Realestate for Sale",
"children": [
{
"code": "urn:concept:apartments-for-sale",
"label": "Apartments for Sale",
"children": null,
"attributes": [
{
"code": "urn:concept:price-negotiable",
"label": "Price Negotiable",
"type": "select",
"values": [
{
"code": "urn:concept:no",
"label": "No"
},
{
"code": "urn:concept:yes",
"label": "Yes"
}
]
},
{
"code": "urn:concept:area-m2",
"label": "Area (m2)",
"type": "input",
"values": []
},
{
"code": "urn:concept:characteristics",
"label": "Characteristics",
"type": "multiple",
"values": [
{
"code": "urn:concept:alarm",
"label": "Alarm"
},
{
"code": "urn:concept:central-heating",
"label": "Central Heating"
},
{
"code": "urn:concept:safe",
"label": "Safe"
},
{
"code": "urn:concept:elevator",
"label": "Elevator"
}
]
}
]
}
],
"attributes": null
}
]
}
In the previous example, we can see a first-level category called "Realestate for Sale". Within it, there's another category (under children
) called "Apartments for Sale". This one has no children, but it does one attribute called Price Negotiable
where you can find a couple of values, "Yes" and "No".
You can use the attribute types to help you decide how to best represent these elements on your front-end. For example, a type select
corresponds directly to an HTML select box.
These are the supported attribute types:
Type | Description |
---|---|
select | Contains a list of values such as "yes" and "no" |
input | Accepts a regular string |
multiple | Contains a list of values but allows multiple selections |
Get a single website
If you want to get the taxonomy tree for a single website, you just need to provide the corresponding site URN in the following request:
curl -X GET \
'https://api.olxgroup.com/taxonomy/v1/categories/partner/urn:site:imovirtualcom' \
-H 'Accept: application/json' \
-H "User-Agent: crm_name"
-H 'Content-Type: application/json' \
-H 'X-API-KEY: <YOUR API KEY>'
Get a single category on a website
By combining the two filters, you can get a specific category on a single website:
curl -X GET \
'https://api.olxgroup.com/taxonomy/v1/categories/partner/urn:site:imovirtualcom/urn:concept:apartments-for-sale' \
-H 'Accept: application/json' \
-H "User-Agent: crm_name"
-H 'Content-Type: application/json' \
-H 'X-API-KEY: <YOUR API KEY>'
And this last one should be the chosen one, to make any request to Taxonomy API.
Updated 23 days ago