Editing and deleting adverts

Update an advert

To update the content of an existing advert you should make a PUT request to https://api.olxgroup.com/advert/v1/<ADVERT UUID>. The body of the request should contain the full advert payload (not only the changed fields). With such payload saved in updated_advert.json, the following request would update the advert:


curl --location --request PUT 'https://api.olxgroup.com/advert/v1/<UUID>'\
--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>'
--data-raw @updated_advert.json \

Delete an advert

To delete an existing advert, you should just send a DELETE request to https://api.olxgroup.com/advert/v1/<ADVERT UUID> with an empty payload. For example:


curl --location --request DELETE 'https://api.olxgroup.com/advert/v1/<UUID>'\
--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>'

Notifications

Deleting ads change their status and therefore generate lifecycle events. Check out the relevant notifications for the event here on the Advert lifecycle page.

Editing or Deleting adverts, even if the status was not successfully updated, you will receive a notification about the status of the operation. If was completed with success or not. For more details about the notification check Setup notifications pages.

Your CRM should be prepared to handle all types of notification and to display them to the application user.