{"id":472,"date":"2023-12-11T12:46:46","date_gmt":"2023-12-11T12:46:46","guid":{"rendered":"https:\/\/olxdoc.wpenginepowered.com\/?p=472"},"modified":"2023-12-11T12:46:46","modified_gmt":"2023-12-11T12:46:46","slug":"advert-payload-and-validation-rules","status":"publish","type":"post","link":"https:\/\/doc.olxgroup.com\/api\/?p=472","title":{"rendered":"Advert payload and validation rules"},"content":{"rendered":"\n\n\t<header id=\"content-head\">\n<h1>Advert payload and validation rules<\/h1>\n<\/header>\n<section>\n<p>Below you can check the structure of an advert payload, a description of each field, and each field validation rules.<\/p>\n<p>&nbsp;<\/p>\n<\/section>\n<h2 class='h1'>Advert additional information<\/h2>\n<p>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.<br \/>Which can be consulted in the\u00a0<a href=\"https:\/\/developer.olxgroup.com\/docs\/taxonomies-overview\" target=\"_self\" rel=\"noopener\">Taxonomy API<\/a>.<\/p>\n\tFor a complete example of what an advert looks like, check out our\u00a0<a href=\"https:\/\/developer.olxgroup.com\/docs\/postman-collection\" target=\"_self\" rel=\"noopener\">Postman Collection<\/a>.<br \/>\nAlso, you can check out the example under\u00a0<a href=\"https:\/\/developer.olxgroup.com\/docs\/publishing-adverts\" target=\"_self\" rel=\"noopener\">Publishing Adverts<\/a>.\n<p>Advert Payload and Validation Rules<\/p>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Description<\/th>\n<th>Required<\/th>\n<th>Validation<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>title<\/td>\n<td>Title of the advert.<\/td>\n<td>Required<\/td>\n<td>string<br \/>\n70 chars max (Imovirtual.pt, Storia.ro)<br \/>\n50 chars max (Otodom.pl)<br \/>\n5 chars min<br \/>\n(publication fails if limits are exceeded, title is not truncated). Title should not contain uppercase string.<\/td>\n<\/tr>\n<tr>\n<td>description<\/td>\n<td>Description of the advert.<\/td>\n<td>Required<\/td>\n<td>string<br \/>\n65535 chars max<br \/>\n50 chars min<\/td>\n<\/tr>\n<tr>\n<td>category_urn<\/td>\n<td>URN of the advert category.<\/td>\n<td>Required<\/td>\n<td>Unique category identifier (see\u00a0<a href=\"https:\/\/developer.olxgroup.com\/docs\/taxonomies-overview\" target=\"_self\" rel=\"noopener\">Taxonomy API<\/a>)<\/td>\n<\/tr>\n<tr>\n<td>contact.name<\/td>\n<td>Name of the contact person for advert customization<\/td>\n<td>Required<\/td>\n<td>string<\/td>\n<\/tr>\n<tr>\n<td>contact.phone<\/td>\n<td>Phone number of contact person for advert customization.<\/td>\n<td>Required<\/td>\n<td>string<br \/>\n7 digits min<br \/>\n14 digits max<\/td>\n<\/tr>\n<tr>\n<td>contact.email<\/td>\n<td>E-mail number of the contact person for advert customization.<\/td>\n<td>Required<\/td>\n<td>string with a valid e-mail address<\/td>\n<\/tr>\n<tr>\n<td>contact.photo<\/td>\n<td>Photo of the contact person for advert customization.<\/td>\n<td>Optional<\/td>\n<td>string with a valid url of an image<br \/>\nmax: 1MB<br \/>\nmin width: 100px<br \/>\nmin height: 100px<\/td>\n<\/tr>\n<tr>\n<td>price<\/td>\n<td>Price value of the advert.<\/td>\n<td>Required<\/td>\n<td>int or float<br \/>\n0 (zero) to hide price and display it as &#8220;on demand&#8221;, except for investments category.<\/td>\n<\/tr>\n<tr>\n<td>price.currency<\/td>\n<td>Price currency.<\/td>\n<td>Required<\/td>\n<td>Accepted values are:<br \/>\nOtodom: <strong>PLN,\u00a0EUR,\u00a0GBP<\/strong><br \/>\nImovirtual: <strong>EUR<\/strong><br \/>\nStoria: <strong>EUR,\u00a0RON<\/strong><\/td>\n<\/tr>\n<tr>\n<td>rent_price.value<\/td>\n<td>Sets the optional rent price for &#8220;for sale&#8221; categories.<\/td>\n<td>Optional<\/td>\n<td><strong><em>Otodom\/Storia only<\/em><\/strong><br \/>\nint or float<\/td>\n<\/tr>\n<tr>\n<td>rent_price.currency<\/td>\n<td>Sets the currency for the optional rent price.<\/td>\n<td>Optional<\/td>\n<td><strong><em>Otodom\/Storia only<\/em><\/strong><br \/>\nAccepted values are <strong>PLN,\u00a0EUR,\u00a0GBP.<\/strong><\/td>\n<\/tr>\n<tr>\n<td>deposit_price.value<\/td>\n<td>Sets the optional deposit value for &#8220;for rent&#8221; categories.<\/td>\n<td>Optional<\/td>\n<td><strong><em>Otodom\/Storia only<\/em><\/strong><br \/>\nint or float<\/td>\n<\/tr>\n<tr>\n<td>deposit_price.currency<\/td>\n<td>Sets the currency for the optional deposit value.<\/td>\n<td>Optional<\/td>\n<td><strong><em>Otodom\/Storia only<\/em><\/strong><br \/>\nAccepted values are <strong>PLN,\u00a0EUR,\u00a0GBP.<\/strong><\/td>\n<\/tr>\n<tr>\n<td>market<\/td>\n<td>Defines the type of market for the advert.<\/td>\n<td>Optional<\/td>\n<td>Accepted values are <strong>secondary<\/strong> (default if omitted) or <strong>primary.<\/strong><\/td>\n<\/tr>\n<tr>\n<td>parent_uuid<\/td>\n<td>UUID of the parent advert. Only valid for primary market adverts.<\/td>\n<td>Optional<\/td>\n<td>Refer to\u00a0<a href=\"https:\/\/developer.olxgroup.com\/docs\/primary-market\" target=\"_self\" rel=\"noopener\">Primary Market<\/a>\u00a0for more information.<\/td>\n<\/tr>\n<tr>\n<td>location.lat<br \/>\nlocation.lon<\/td>\n<td>Latitude and Longitude of advert location.<\/td>\n<td>Required<\/td>\n<td>decimal degrees (e.g. 38.66287, -9.075342)<br \/>\nmust be the country site coordinate<\/td>\n<\/tr>\n<tr>\n<td>location.postal_code<\/td>\n<td>Postal code of advert location.<\/td>\n<td>Optional<br \/>\n(Only required if coordinates are not in the request.)<\/td>\n<td><strong><em>Imovirtual only<\/em><\/strong><br \/>\nNote: when lat\/lon are provided, postal code is ignored.<br \/>\nCheck available Portuguese CP on\u00a0<a href=\"https:\/\/www.ctt.pt\/feapl_2\/app\/open\/postalCodeSearch\/postalCodeSearch.jspx#fndtn-addressSearchPanel\" target=\"_self\" rel=\"noopener\">CTT<\/a>\u00a0site.<\/td>\n<\/tr>\n<tr>\n<td>location.exact<\/td>\n<td>Determines if the exact location of the advert will be shown on a map.<\/td>\n<td>Optional<\/td>\n<td>boolean<br \/>\nAccepted values are <strong>false<\/strong> (default if omitted) or <strong>true.<\/strong>\u00a0Only available if coordinates are in the request.<\/td>\n<\/tr>\n<tr>\n<td>images.url<\/td>\n<td>URL of an advert image.<\/td>\n<td>Required<\/td>\n<td>Array, at least one must be sent.<br \/>\nSmallest side must have at least 300px.<br \/>\nHTTP response status code need to be 200.<\/td>\n<\/tr>\n<tr>\n<td>movie_url<\/td>\n<td>The URL for a Youtube or Vimeo movie to be displayed on the advert detail page.<\/td>\n<td>Optional<\/td>\n<td>Must be a valid Youtube or Vimeo URL (shortlinks are not accepted)<\/td>\n<\/tr>\n<tr>\n<td>virtual_walk<\/td>\n<td>The URL for a Youtube, Vimeo or a Matterport movie to be displayed on the advert detail page.<\/td>\n<td>Optional<\/td>\n<td>Must be a valid URL from Youtube, Vimeo, Cupix](<a href=\"https:\/\/www.cupix.com\/\" target=\"_self\" rel=\"noopener\">https:\/\/www.cupix.com\/<\/a>),\u00a0<a href=\"https:\/\/matterport.com\/\" target=\"_self\" rel=\"noopener\">Matterport<\/a>\u00a0or\u00a0<a href=\"https:\/\/kuula.co\/\" target=\"_self\" rel=\"noopener\">Kuula<\/a><br \/>\n(shortlinks are not accepted)<\/td>\n<\/tr>\n<tr>\n<td>floor_plan<\/td>\n<td>URL of an image.<\/td>\n<td>Optional<\/td>\n<td>Must be a valid image URL.<br \/>\n(shortlinks are not accepted)<\/td>\n<\/tr>\n<tr>\n<td>attributes.urn<\/td>\n<td>URN of an attribute.<\/td>\n<td>Optional<\/td>\n<td>Refer to the\u00a0<a href=\"https:\/\/developer.olxgroup.com\/docs\/taxonomies-overview\" target=\"_self\" rel=\"noopener\">Taxonomy API<\/a>\u00a0for more information.<\/td>\n<\/tr>\n<tr>\n<td>attributes.value<\/td>\n<td>The value of the attribute.<\/td>\n<td>Optional<\/td>\n<td>Refer to the\u00a0<a href=\"https:\/\/developer.olxgroup.com\/docs\/taxonomies-overview\" target=\"_self\" rel=\"noopener\">Taxonomy API<\/a>\u00a0for more information.<\/td>\n<\/tr>\n<tr>\n<td>attributes.urn &gt; urn:concept:net-area-m2<br \/>\nand<br \/>\nurn:concept:gross-area-m2<br \/>\nand<br \/>\nurn:concept:terrain-area-m2<br \/>\nand<br \/>\nurn:concept:usable-area-m2<\/td>\n<td>URN for an area attribute.<\/td>\n<td>Required for some category_urn<\/td>\n<td>int<br \/>\nRefer to the\u00a0<a href=\"https:\/\/developer.olxgroup.com\/docs\/taxonomies-overview\" target=\"_self\" rel=\"noopener\">Taxonomy API<\/a>\u00a0for more information.<br \/>\nAlso, check\u00a0<a href=\"https:\/\/developer.olxgroup.com\/docs\/areas-atributtes\" target=\"_self\" rel=\"noopener\">here<\/a><br \/>\nwhich are the areas available for each category.<\/td>\n<\/tr>\n<tr>\n<td>attributes.urn &gt; urn:concept:register-number<\/td>\n<td>Registration number for local accommodation<\/td>\n<td>Required for category_urn <strong>urn:concept:realestate-for-vacation<\/strong><\/td>\n<td><strong><em>Imovirtual only<\/em><\/strong><br \/>\nint<br \/>\nmust contain only the value of register number itself, we will add &#8220;\/AL&#8221; automatically.<\/td>\n<\/tr>\n<tr>\n<td>site_urn<\/td>\n<td>The site where the advert will be published to.<\/td>\n<td>Required<\/td>\n<td>Refer to\u00a0<a href=\"https:\/\/developer.olxgroup.com\/docs\/supported-sites\" target=\"_self\" rel=\"noopener\">Supported Sites<\/a>\u00a0for more information.<\/td>\n<\/tr>\n<tr>\n<td>custom_fields.id<\/td>\n<td>Internal advert ID generated from your own application.<\/td>\n<td>Required<\/td>\n<td>string<\/td>\n<\/tr>\n<tr>\n<td>custom_fields.reference_id<\/td>\n<td>An optional reference for the advert.<\/td>\n<td>Optional<\/td>\n<td>string<\/td>\n<\/tr>\n<tr>\n<td>dates related attributes<br \/>\ne.g<br \/>\nurn:concept:free-from<br \/>\nurn:concept:start-date<\/td>\n<td>Attributes related to dates<\/td>\n<td>Optional<\/td>\n<td>string format [YYYY-MM-DD]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Some extra validations are required to successfully publish adverts in the\u00a0<strong>OLX platform<\/strong>. Check\u00a0<a href=\"https:\/\/developer.olxgroup.com\/docs\/validations-required-for-olx-export\" target=\"_self\" rel=\"noopener\">here<\/a>\u00a0which are.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>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. &nbsp; 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.Which can&#8230;  <a href=\"https:\/\/doc.olxgroup.com\/api\/?p=472\" title=\"Read Advert payload and validation rules\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts\/472"}],"collection":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=472"}],"version-history":[{"count":0,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts\/472\/revisions"}],"wp:attachment":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}