{"id":311,"date":"2023-12-04T04:39:20","date_gmt":"2023-12-04T04:39:20","guid":{"rendered":"https:\/\/olxdoc.wpenginepowered.com\/?p=311"},"modified":"2023-12-11T07:25:44","modified_gmt":"2023-12-11T07:25:44","slug":"deactivate-an-existing-advert","status":"publish","type":"post","link":"https:\/\/doc.olxgroup.com\/api\/?p=311","title":{"rendered":"Deactivate an existing advert"},"content":{"rendered":"\n\n\t<p><strong>POST<\/strong>:\u00a0<a href=\"https:\/\/www.autovit.ro\/api\/open\/account\/adverts\/:id\/deactivate\">https:\/\/www.autovit.ro\/api\/open\/account\/adverts\/:id\/deactivate<\/a><\/p>\n<p><strong>Permission:\u00a0<em>write<\/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<strong class='bg-tag-blue font-bold tag'>Example request:<\/strong><code>POST \/account\/adverts\/49473\/deactivate HTTP\/1.1\n{\n     \"reason\": {\n         \"id\": \"1\",\n         \"description\": \"Reason to deactivate the Ad\"\n     }\n }\n User-Agent: $USER_EMAIL\n Content-Type: application\/json\n Authorization: Bearer $ACCESS_TOKEN<\/code><button onclick=\"copyJson('copy_44474')\">Copy<\/button>\nPOST \/account\/adverts\/49473\/deactivate HTTP\/1.1\n{\n     &#8220;reason&#8221;: {\n         &#8220;id&#8221;: &#8220;1&#8221;,\n         &#8220;description&#8221;: &#8220;Reason to deactivate the Ad&#8221;\n     }\n }\n User-Agent: $USER_EMAIL\n Content-Type: application\/json\n Authorization: Bearer $ACCESS_TOKEN\nCopied to clipboard\n <strong class='text-green font-bold'>Success response:<\/strong><code>HTTP\/1.1 204 No Content<\/code><button onclick=\"copyJson('copy_40776')\">Copy<\/button>\nHTTP\/1.1 204 No Content\nCopied to clipboard\n <strong class='text-red font-bold'>Error response example:<\/strong><code>HTTP\/1.1 400 Bad Request\n{\n    \"error\":\n    {\n        \"type\": \"BadRequestException\",\n        \"message\": \"You have to provide correct ID.\"\n    }\n}<\/code><button onclick=\"copyJson('copy_1266')\">Copy<\/button>\nHTTP\/1.1 400 Bad Request\n{\n    &#8220;error&#8221;:\n    {\n        &#8220;type&#8221;: &#8220;BadRequestException&#8221;,\n        &#8220;message&#8221;: &#8220;You have to provide correct ID.&#8221;\n    }\n}\nCopied to clipboard\n \n","protected":false},"excerpt":{"rendered":"<p>POST:\u00a0https:\/\/www.autovit.ro\/api\/open\/account\/adverts\/:id\/deactivate Permission:\u00a0write Header Field Type Description User-Agent string Account email. Example request:POST \/account\/adverts\/49473\/deactivate HTTP\/1.1 { &#8220;reason&#8221;: { &#8220;id&#8221;: &#8220;1&#8221;, &#8220;description&#8221;: &#8220;Reason to deactivate the Ad&#8221; } } User-Agent: $USER_EMAIL Content-Type: application\/json Authorization: Bearer $ACCESS_TOKENCopy POST \/account\/adverts\/49473\/deactivate HTTP\/1.1 { &#8220;reason&#8221;: { &#8220;id&#8221;: &#8220;1&#8221;, &#8220;description&#8221;: &#8220;Reason to deactivate the Ad&#8221; } } User-Agent: $USER_EMAIL Content-Type: application\/json Authorization:&#8230;  <a href=\"https:\/\/doc.olxgroup.com\/api\/?p=311\" title=\"Read Deactivate an existing 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":[7],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts\/311"}],"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=311"}],"version-history":[{"count":0,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=\/wp\/v2\/posts\/311\/revisions"}],"wp:attachment":[{"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doc.olxgroup.com\/api\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}