Advert payload and validation rules

Below you can check the structure of an advert payload, a description of each field, and each field validation rules.

🚧 Advert additional information
This table describes only the main structure of the advert. In addition to this, an advert can also contain a number of attributes and/or characteristics. These attributes can be consulted in the Taxonomy API page.

For a complete example of how an advert looks like, check out our Postman Collection . Also, you can check out the example under Publishing adverts .

Field Description Required Validation
title Title of the advert. Required string 70 chars max 16 chars min Following characters cannot be provided three times in a row: ! ? . , - = + # % & @ * _ > < : ( ) | The amount of capital letters cannot be greater than 50% of a whole text E-mail addresses and phone numbers are not allowed
description Description of the advert. Required string 9000 chars max 80 chars min Following characters cannot be provided three times in a row: ! ? . , - = + # % & @ * _ > < : ( ) | The amount of capital letters cannot be greater than 50% of a whole text E-mail addresses and phone numbers are not allowed
category_urn URN of the advert category. Required Unique category identifier (see taxonomy API)
contact.name Name of the contact person for advert customization Required string
contact.phone Phone number of contact person for advert customization. Required string 7 digits min 14 digits max
contact.email E-mail number of the contact person for advert customization. Required string with a valid e-mail address
contact.photo Photo of the contact person for advert customization. Optional string with a valid url of an image max: 1MB min height: 60px
price Price value of the advert. Required int or float
price.currency Price currency. Required Accepted values are: OLXPL: EUR, PLN OLXRO: EUR, RON
location.lat Latitude of advert location. Required decimal degrees (e.g. 38.66287, -9.075342) must be the country site coordinate
location.lon Longitude of advert location. Required decimal degrees (e.g. 38.66287, -9.075342) must be the country site coordinate
location.exact Determines if the exact location of the advert will be shown on a map. Optional boolean Accepted values are false (default if omitted) or true. Only available if coordinates are in the request.
images.url URL of an advert image. Optional Array, at least one must be sent. Smallest side must have at least 300px. HTTP response status code need to be 200.
attributes.urn URN of an attribute. Optional Refer to the taxonomy API for more information.
attributes.value The value of the attribute. Optional Refer to the taxonomy API for more information.
site_urn The site where the advert will be published to. Required Refer to supported sites for more information.
custom_fields.id Internal advert ID generated from your own application. Required string
custom_fields.reference_id An optional reference for the advert. Optional string