{"id":345,"date":"2023-12-04T05:21:47","date_gmt":"2023-12-04T05:21:47","guid":{"rendered":"https:\/\/olxdoc.wpenginepowered.com\/?p=345"},"modified":"2023-12-11T11:04:45","modified_gmt":"2023-12-11T11:04:45","slug":"read-advert-data","status":"publish","type":"post","link":"https:\/\/doc.olxgroup.com\/api\/?p=345","title":{"rendered":"Read advert data"},"content":{"rendered":"\n\n\t<p>This section is restricted for partners use. If You accessing API with &#8220;password&#8221; grant type &#8211; go to\u00a0Account\u00a0section Advert is a base domain model containing all the information about advertisement (title, description and price among others) and the params &#8211; set of relevant properties describing thing being subject of given advert.<\/p>\n<p><strong>GET<\/strong>: <a href=\"https:\/\/www.autovit.ro\/api\/open\/adverts\/:id\">https:\/\/www.autovit.ro\/api\/open\/adverts\/:id<\/a><\/p>\n<p><strong>Permission:<em> read<\/em><\/strong><\/p>\n<h2>Header<\/h2>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>User-Agent<\/td>\n<td>string<\/td>\n<td>Account email.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Path Param<\/h2>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>id<\/td>\n<td>Number<\/td>\n<td>Adverts unique ID<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Query Param<\/h2>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>voptional<\/td>\n<td>Number<\/td>\n<td>Optional parameter to specify which version to use (2 &#8211; for new version; anything else for OLD version)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n<strong class='bg-tag-blue font-bold tag'>Example request:<\/strong><code>HTTP\/1.1 GET \/adverts\/999\nUser-Agent: $USER_EMAIL\nContent-Type: application\/json\nAuthorization: Bearer $ACCESS_TOKEN<\/code><button onclick=\"copyJson('copy_16156')\">Copy<\/button>\nHTTP\/1.1 GET \/adverts\/999\nUser-Agent: $USER_EMAIL\nContent-Type: application\/json\nAuthorization: Bearer $ACCESS_TOKEN\nCopied to clipboard\n <strong class='text-green font-bold'>Success response:<\/strong><code>HTTP\/1.1 200 OK\n{\n    \"id\": 999,\n    \"user_id\": 1,\n    \"status\": \"active\",\n    \"title\": \"Advert title\",\n    \"url\": \"http:\/\/{example.com}\/ad\/{example}.html\",\n    \"created_at\": \"2015-10-01 10:54:11\",\n    \"valid_to\": \"2015-10-15 11:05:34\",\n    \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\",\n    \"category_id\": 29,\n    \"region_id\": 3,\n    \"city_id\": 24545,\n    \"municipality\": \"Municipality name\",\n    \"city\":\n    {\n        \"ro\": \"City name\",\n        \"en\": \"City name\"\n    },\n    \"coordinates\":\n    {\n        \"latitude\": 51.26247,\n        \"longitude\": 15.56956,\n        \"radius\": 4,\n        \"zoom_level\": 12\n    },\n    \"advertiser_type\": \"private\",\n    \"contact\":\n    {\n        \"person\": \"John Doe\"\n    },\n    \"params\":\n    {\n        \"make\": \"ford\",\n        \"model\": \"focus\",\n        \"version\": \"mk1-1998-2004\",\n        \"year\": 2003,\n        \"mileage\": 199000,\n        \"fuel_type\": \"petrol\",\n        \"engine_capacity\": 1600,\n        \"engine_power\": 120,\n        \"gearbox\": \"manual\",\n        \"transmission\": \"front-wheel\",\n        \"co2_emissions\": 136,\n        \"particle_filter\": \"1\",\n        \"damaged\": \"0\",\n        \"body_type\": \"hatchback\",\n        \"door_count\": 4,\n        \"color\": \"violet\",\n        \"metallic\": \"1\",\n        \"pearl\": \"1\",\n        \"matt\": \"0\",\n        \"acrylic\": \"0\",\n        \"nr_seats\": 5,\n        \"rhd\": \"1\",\n        \"features\":\n        [\n            \"abs\",\n            \"alarm\",\n            \"alloy-wheels\"\n        ],\n        \"price\":\n        {\n            \"0\": \"arranged\",\n            \"1\": 20000,\n            \"currency\": \"RON\",\n            \"gross_net\": \"gross\"\n        },\n        \"vat_discount\": \"0\",\n        \"vat\": \"1\",\n        \"financial_option\": \"0\",\n        \"leasing_concession\": \"0\",\n        \"country_origin\": \"d\",\n        \"date_registration\": \"2003-3-01\",\n        \"vin\": \"WF0WXXGCDW6M23967\",\n        \"registered\": \"1\",\n        \"original_owner\": \"0\",\n        \"no_accident\": \"0\",\n        \"service_record\": \"1\",\n        \"historical_vehicle\": \"0\",\n        \"tuning\": \"0\",\n        \"approval_for_goods\": \"0\"\n    },\n    \"photos\":\n    {\n        \"1\":\n        {\n            \"1080x720\": \"http:\/\/lorempixel.com\/1080\/720\/transport\/9\/\",\n            \"732x488\": \"http:\/\/lorempixel.com\/732\/488\/transport\/9\/\",\n            \"320x240\": \"http:\/\/lorempixel.com\/320\/240\/transport\/9\/\",\n            \"148x110\": \"http:\/\/lorempixel.com\/148\/110\/transport\/9\/\"\n        },\n        \"2\":\n        {\n            \"1080x720\": \"http:\/\/lorempixel.com\/1080\/720\/transport\/2\/\",\n            \"732x488\": \"http:\/\/lorempixel.com\/732\/488\/transport\/2\/\",\n            \"320x240\": \"http:\/\/lorempixel.com\/320\/240\/transport\/2\/\",\n            \"148x110\": \"http:\/\/lorempixel.com\/148\/110\/transport\/2\/\"\n        },\n        \"3\":\n        {\n            \"1080x720\": \"http:\/\/lorempixel.com\/1080\/720\/transport\/7\/\",\n            \"732x488\": \"http:\/\/lorempixel.com\/732\/488\/transport\/7\/\",\n            \"320x240\": \"http:\/\/lorempixel.com\/320\/240\/transport\/7\/\",\n            \"148x110\": \"http:\/\/lorempixel.com\/148\/110\/transport\/7\/\"\n        }\n    },\n    \"image_collection_id\": 817443447,\n    \"external_partner_code\": \"partner-code\",\n    \"external_id\": \"126\",\n    \"last_update_date\": \"2015-10-15 11:05:35\",\n    \"new_used\": \"used\"\n}<\/code><button onclick=\"copyJson('copy_4982')\">Copy<\/button>\nHTTP\/1.1 200 OK\n{\n    &#8220;id&#8221;: 999,\n    &#8220;user_id&#8221;: 1,\n    &#8220;status&#8221;: &#8220;active&#8221;,\n    &#8220;title&#8221;: &#8220;Advert title&#8221;,\n    &#8220;url&#8221;: &#8220;http:\/\/{example.com}\/ad\/{example}.html&#8221;,\n    &#8220;created_at&#8221;: &#8220;2015-10-01 10:54:11&#8221;,\n    &#8220;valid_to&#8221;: &#8220;2015-10-15 11:05:34&#8221;,\n    &#8220;description&#8221;: &#8220;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&#8221;,\n    &#8220;category_id&#8221;: 29,\n    &#8220;region_id&#8221;: 3,\n    &#8220;city_id&#8221;: 24545,\n    &#8220;municipality&#8221;: &#8220;Municipality name&#8221;,\n    &#8220;city&#8221;:\n    {\n        &#8220;ro&#8221;: &#8220;City name&#8221;,\n        &#8220;en&#8221;: &#8220;City name&#8221;\n    },\n    &#8220;coordinates&#8221;:\n    {\n        &#8220;latitude&#8221;: 51.26247,\n        &#8220;longitude&#8221;: 15.56956,\n        &#8220;radius&#8221;: 4,\n        &#8220;zoom_level&#8221;: 12\n    },\n    &#8220;advertiser_type&#8221;: &#8220;private&#8221;,\n    &#8220;contact&#8221;:\n    {\n        &#8220;person&#8221;: &#8220;John Doe&#8221;\n    },\n    &#8220;params&#8221;:\n    {\n        &#8220;make&#8221;: &#8220;ford&#8221;,\n        &#8220;model&#8221;: &#8220;focus&#8221;,\n        &#8220;version&#8221;: &#8220;mk1-1998-2004&#8221;,\n        &#8220;year&#8221;: 2003,\n        &#8220;mileage&#8221;: 199000,\n        &#8220;fuel_type&#8221;: &#8220;petrol&#8221;,\n        &#8220;engine_capacity&#8221;: 1600,\n        &#8220;engine_power&#8221;: 120,\n        &#8220;gearbox&#8221;: &#8220;manual&#8221;,\n        &#8220;transmission&#8221;: &#8220;front-wheel&#8221;,\n        &#8220;co2_emissions&#8221;: 136,\n        &#8220;particle_filter&#8221;: &#8220;1&#8221;,\n        &#8220;damaged&#8221;: &#8220;0&#8221;,\n        &#8220;body_type&#8221;: &#8220;hatchback&#8221;,\n        &#8220;door_count&#8221;: 4,\n        &#8220;color&#8221;: &#8220;violet&#8221;,\n        &#8220;metallic&#8221;: &#8220;1&#8221;,\n        &#8220;pearl&#8221;: &#8220;1&#8221;,\n        &#8220;matt&#8221;: &#8220;0&#8221;,\n        &#8220;acrylic&#8221;: &#8220;0&#8221;,\n        &#8220;nr_seats&#8221;: 5,\n        &#8220;rhd&#8221;: &#8220;1&#8221;,\n        &#8220;features&#8221;:\n        [\n            &#8220;abs&#8221;,\n            &#8220;alarm&#8221;,\n            &#8220;alloy-wheels&#8221;\n        ],\n        &#8220;price&#8221;:\n        {\n            &#8220;0&#8221;: &#8220;arranged&#8221;,\n            &#8220;1&#8221;: 20000,\n            &#8220;currency&#8221;: &#8220;RON&#8221;,\n            &#8220;gross_net&#8221;: &#8220;gross&#8221;\n        },\n        &#8220;vat_discount&#8221;: &#8220;0&#8221;,\n        &#8220;vat&#8221;: &#8220;1&#8221;,\n        &#8220;financial_option&#8221;: &#8220;0&#8221;,\n        &#8220;leasing_concession&#8221;: &#8220;0&#8221;,\n        &#8220;country_origin&#8221;: &#8220;d&#8221;,\n        &#8220;date_registration&#8221;: &#8220;2003-3-01&#8221;,\n        &#8220;vin&#8221;: &#8220;WF0WXXGCDW6M23967&#8221;,\n        &#8220;registered&#8221;: &#8220;1&#8221;,\n        &#8220;original_owner&#8221;: &#8220;0&#8221;,\n        &#8220;no_accident&#8221;: &#8220;0&#8221;,\n        &#8220;service_record&#8221;: &#8220;1&#8221;,\n        &#8220;historical_vehicle&#8221;: &#8220;0&#8221;,\n        &#8220;tuning&#8221;: &#8220;0&#8221;,\n        &#8220;approval_for_goods&#8221;: &#8220;0&#8221;\n    },\n    &#8220;photos&#8221;:\n    {\n        &#8220;1&#8221;:\n        {\n            &#8220;1080&#215;720&#8221;: &#8220;http:\/\/lorempixel.com\/1080\/720\/transport\/9\/&#8221;,\n            &#8220;732&#215;488&#8221;: &#8220;http:\/\/lorempixel.com\/732\/488\/transport\/9\/&#8221;,\n            &#8220;320&#215;240&#8221;: &#8220;http:\/\/lorempixel.com\/320\/240\/transport\/9\/&#8221;,\n            &#8220;148&#215;110&#8221;: &#8220;http:\/\/lorempixel.com\/148\/110\/transport\/9\/&#8221;\n        },\n        &#8220;2&#8221;:\n        {\n            &#8220;1080&#215;720&#8221;: &#8220;http:\/\/lorempixel.com\/1080\/720\/transport\/2\/&#8221;,\n            &#8220;732&#215;488&#8221;: &#8220;http:\/\/lorempixel.com\/732\/488\/transport\/2\/&#8221;,\n            &#8220;320&#215;240&#8221;: &#8220;http:\/\/lorempixel.com\/320\/240\/transport\/2\/&#8221;,\n            &#8220;148&#215;110&#8221;: &#8220;http:\/\/lorempixel.com\/148\/110\/transport\/2\/&#8221;\n        },\n        &#8220;3&#8221;:\n        {\n            &#8220;1080&#215;720&#8221;: &#8220;http:\/\/lorempixel.com\/1080\/720\/transport\/7\/&#8221;,\n            &#8220;732&#215;488&#8221;: &#8220;http:\/\/lorempixel.com\/732\/488\/transport\/7\/&#8221;,\n            &#8220;320&#215;240&#8221;: &#8220;http:\/\/lorempixel.com\/320\/240\/transport\/7\/&#8221;,\n            &#8220;148&#215;110&#8221;: &#8220;http:\/\/lorempixel.com\/148\/110\/transport\/7\/&#8221;\n        }\n    },\n    &#8220;image_collection_id&#8221;: 817443447,\n    &#8220;external_partner_code&#8221;: &#8220;partner-code&#8221;,\n    &#8220;external_id&#8221;: &#8220;126&#8221;,\n    &#8220;last_update_date&#8221;: &#8220;2015-10-15 11:05:35&#8221;,\n    &#8220;new_used&#8221;: &#8220;used&#8221;\n}\nCopied to clipboard\n <strong class='text-red font-bold'>Error response example:<\/strong><code>HTTP\/1.1 404 Not Found\n{\n    \"error\":\n    {\n        \"type\": \"NotFoundException\",\n        \"message\": \"Advert 999 not found.\"\n    }\n}<\/code><button onclick=\"copyJson('copy_11121')\">Copy<\/button>\nHTTP\/1.1 404 Not Found\n{\n    &#8220;error&#8221;:\n    {\n        &#8220;type&#8221;: &#8220;NotFoundException&#8221;,\n        &#8220;message&#8221;: &#8220;Advert 999 not found.&#8221;\n    }\n}\nCopied to clipboard\n \n","protected":false},"excerpt":{"rendered":"<p>This section is restricted for partners use. If You accessing API with &#8220;password&#8221; grant type &#8211; go to\u00a0Account\u00a0section Advert is a base domain model containing all the information about advertisement (title, description and price among others) and the params &#8211; set of relevant properties describing thing being subject of given advert. GET: https:\/\/www.autovit.ro\/api\/open\/adverts\/:id Permission: read&#8230;  <a href=\"https:\/\/doc.olxgroup.com\/api\/?p=345\" title=\"Read Read advert data\">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":[8],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts\/345"}],"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=345"}],"version-history":[{"count":0,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts\/345\/revisions"}],"wp:attachment":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}