Activate and deactivate adverts

Activate ads

Endpoint: POST https://api.olxgroup.com/advert/v1/<ADVERT UUID>/activate

You can use this endpoint to activate an advert that is currently deactivated. This operation is equivalent to clicking on "restore" in the Inactive tab on the portal's My Account section.

curl --location --request POST 'https://api.olxgroup.com/advert/v1/<ADVERT UUID>/activate'\
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <YOUR API KEY>' \
--header 'Authorization: Bearer <ACCESS TOKEN>' \
--header 'User-Agent: <CRM NAME>'

Note that you can only activate ads that were deactivated:

  • through the deactivate endpoint
  • by the user on the portal (not available for imovirtual.com)

In addition "visible_in_profile"parameter returned by the Advert Notifications and Get Meta endpoints has to be set to true.

Deactivate ads

Endpoint: POST https://api.olxgroup.com/advert/v1/<ADVERT UUID>/deactivate

You can use this endpoint to deactivate an advert that is currently active.

curl --location --request POST 'https://api.olxgroup.com/advert/v1/<ADVERT UUID>/deactivate'\
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <YOUR API KEY>' \
--header 'Authorization: Bearer <ACCESS TOKEN>' \
--header 'User-Agent: <CRM NAME>'

Please note that it is not possible to deactivate previously deleted advert. If you have received a webhook with field "visible_in_profile": false it means that the advert is not present in the user's profile and cannot be deactivated.

Notifications

Activating and deactivating adverts changes their status and therefore generates lifecycle events. Check out the relevant notifications for these events on the Advert Lifecycle page.