{"id":977,"date":"2024-01-28T15:30:44","date_gmt":"2024-01-28T15:30:44","guid":{"rendered":"https:\/\/olxdoc.wpenginepowered.com\/?p=977"},"modified":"2024-01-29T11:48:09","modified_gmt":"2024-01-29T11:48:09","slug":"update-advert-2","status":"publish","type":"post","link":"https:\/\/doc.olxgroup.com\/api\/?p=977","title":{"rendered":"Update advert"},"content":{"rendered":"\r\n<h2>Update advert<\/h2>\r\n<h5>AUTHORIZATIONS: <i>access_token<\/i><\/h5>\r\n<h5>PATH\u00a0PARAMETERS<\/h5>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td title=\"advertId\">advertId required<\/td>\r\n<td>integer<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<h5>REQUEST BODY SCHEMA:\u00a0application\/json<\/h5>\r\n<p>object<\/p>\r\n<p>Please check description and an example in\u00a0<a href=\"https:\/\/developer.olx.ro\/api\/doc#operation_create_advert\">Create advert<\/a>\u00a0section. All parameters are the same as in\u00a0<a href=\"https:\/\/developer.olx.ro\/api\/doc#operation_create_advert\">Create advert<\/a>\u00a0section.<\/p>\r\n<h3>Responses<\/h3>\r\n<p><strong>200<\/strong><\/p>\r\n<p>Status 200<\/p>\r\n<h5>RESPONSE SCHEMA:\u00a0application\/json<\/h5>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td title=\"id\">id required<\/td>\r\n<td>integer<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"status\">status required<\/td>\r\n<td>string Enum:\u00a0<strong>&#8220;new&#8221;<\/strong> <strong>&#8220;active&#8221;\u00a0&#8220;limited&#8221;<\/strong>\u00a0<strong>&#8220;removed_by_user&#8221;<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"url\">url required<\/td>\r\n<td>string\r\n<p>Advert URL in OLX<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"created_at\">created_at required<\/td>\r\n<td>string\r\n<p>Date of creation<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"activated_at\">activated_at required<\/td>\r\n<td>string\r\n<p>Date of last activation<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"valid_to\">valid_to required<\/td>\r\n<td>string<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"title\">title required<\/td>\r\n<td>string<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"description\">description required<\/td>\r\n<td>string<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"category_id\">category_id<\/td>\r\n<td>number<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"advertiser_type\">advertiser_type<\/td>\r\n<td>string Enum:\u00a0<strong>&#8220;private&#8221;<\/strong> <strong>&#8220;business&#8221;<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"external_id\">external_id<\/td>\r\n<td>string\r\n<p>Advert&#8217;s ID in origin system<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"external_url\">external_url<\/td>\r\n<td>string\r\n<p>Advert&#8217;s URL in origin system<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"contact\"><button aria-label=\"expand contact\">contact<\/button> required<\/td>\r\n<td>object<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"location\"><button aria-label=\"expand location\">location<\/button><\/td>\r\n<td>object<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"images\"><button aria-label=\"expand images\">images<\/button><\/td>\r\n<td>Array of\u00a0objects<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"price\"><button aria-label=\"expand price\">price<\/button><\/td>\r\n<td>object\r\n<p>Used by most of the categories, i.e. cars, houses, clothes, etc.<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"salary\"><button aria-label=\"expand salary\">salary<\/button><\/td>\r\n<td>object\r\n<p>Used by some of the categories, i.e. jobs.<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"attributes\"><button aria-label=\"expand attributes\">attributes<\/button><\/td>\r\n<td>Array of\u00a0objects<\/td>\r\n<\/tr>\r\n<tr>\r\n<td title=\"courier\">courier<\/td>\r\n<td>boolean\r\n<p>Is delivery possible. If true that means that delivery is possible. (Available in BG, KZ, PT, RO).<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p>OLX Production Server<\/p>\r\n<p>https:\/\/www.olx.ro\/api\/partner\/adverts\/{advertId} <code>PUT\r\n\/adverts\/{advertId}\r\nRequest samples\r\nPayload\r\nContent type\r\napplication\/json\r\n{ }\r\nResponse samples\r\n200\r\nContent type\r\napplication\/json\r\n{\r\n\"id\": 123,\r\n\"status\": \"active\",\r\n\"url\": \"https:\/\/www.olx.ro\/oferta\/url.html\",\r\n\"created_at\": \"2018-02-02 09:35:16\",\r\n\"activated_at\": \"2018-02-02 09:32:52\",\r\n\"valid_to\": \"2018-03-04 09:32:52\",\r\n\"title\": \"This is title\",\r\n\"description\": \"This is description\",\r\n\"category_id\": 123,\r\n\"advertiser_type\": \"private\",\r\n\"external_id\": 12345,\r\n\"external_url\": \"http:\/\/myshop.com\/advert\/123\",\r\n\"contact\": {\r\n\"name\": \"John\",\r\n\"phone\": 123123123,\r\n\"location\": {}\r\n},\r\n\"images\": [\r\n{},\r\n{}\r\n],\r\n\"price\": {\r\n\"value\": 123,\r\n\"currency\": \"PLN\",\r\n\"negotiable\": false,\r\n\"trade\": false,\r\n\"budget\": false\r\n},\r\n\"salary\": null,\r\n\"attributes\": [\r\n{},\r\n{}\r\n],\r\n\"courier\": null\r\n}\t\t\t<\/code> <button>Copy<\/button> PUT \/adverts\/{advertId} Request samples Payload Content type application\/json { } Response samples 200 Content type application\/json { &#8220;id&#8221;: 123, &#8220;status&#8221;: &#8220;active&#8221;, &#8220;url&#8221;: &#8220;https:\/\/www.olx.ro\/oferta\/url.html&#8221;, &#8220;created_at&#8221;: &#8220;2018-02-02 09:35:16&#8221;, &#8220;activated_at&#8221;: &#8220;2018-02-02 09:32:52&#8221;, &#8220;valid_to&#8221;: &#8220;2018-03-04 09:32:52&#8221;, &#8220;title&#8221;: &#8220;This is title&#8221;, &#8220;description&#8221;: &#8220;This is description&#8221;, &#8220;category_id&#8221;: 123, &#8220;advertiser_type&#8221;: &#8220;private&#8221;, &#8220;external_id&#8221;: 12345, &#8220;external_url&#8221;: &#8220;http:\/\/myshop.com\/advert\/123&#8221;, &#8220;contact&#8221;: { &#8220;name&#8221;: &#8220;John&#8221;, &#8220;phone&#8221;: 123123123, &#8220;location&#8221;: {} }, &#8220;images&#8221;: [ {}, {} ], &#8220;price&#8221;: { &#8220;value&#8221;: 123, &#8220;currency&#8221;: &#8220;PLN&#8221;, &#8220;negotiable&#8221;: false, &#8220;trade&#8221;: false, &#8220;budget&#8221;: false }, &#8220;salary&#8221;: null, &#8220;attributes&#8221;: [ {}, {} ], &#8220;courier&#8221;: null } Copied to clipboard<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Update advert AUTHORIZATIONS: access_token PATH\u00a0PARAMETERS advertId required integer REQUEST BODY SCHEMA:\u00a0application\/json object Please check description and an example in\u00a0Create advert\u00a0section. All parameters are the same as in\u00a0Create advert\u00a0section. Responses 200 Status 200 RESPONSE SCHEMA:\u00a0application\/json id required integer status required string Enum:\u00a0&#8220;new&#8221; &#8220;active&#8221;\u00a0&#8220;limited&#8221;\u00a0&#8220;removed_by_user&#8221; url required string Advert URL in OLX created_at required string Date of creation&#8230;  <a href=\"https:\/\/doc.olxgroup.com\/api\/?p=977\" title=\"Read Update advert\">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":[108],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts\/977"}],"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=977"}],"version-history":[{"count":0,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts\/977\/revisions"}],"wp:attachment":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}