Editing and deleting adverts
Edit an advert
Endpoint: PUT https://api.olxgroup.com/advert/v1/<ADVERT UUID>
This endpoint allows you to update an advert. 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/<ADVERT 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 \
Please remember that the adverts can also be managed directly on the respective website. Whenever any action is performed on the advert outside of your integration, you will be notified about the adverts status change by advert lifecycle notifications. Learn more about it in the Advert Lifecycle page.
Delete an advert
Endpoint: DELETE https://api.olxgroup.com/advert/v1/<ADVERT UUID>
This endpoint allows you to delete an existing advert. Use an empty payload for the request. For example:
curl --location --request DELETE 'https://api.olxgroup.com/advert/v1/<ADVERT 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>'
Please note that it is not possible to delete previously deleted advert. If you have receive a webhook with field "visible_in_profile": false
it means that the advert is not present in the user's profile and cannot be deleted again.
Notifications
Deleting ads changes their status and therefore generates lifecycle events. Check out the relevant notifications for the event here on the Advert Lifecycle page.
You will receive a notification about the status of the operation when editing or deleting adverts, even in cases that the operation did not succeed. For more details about the notifications check the Webhooks pages.
Your CRM should be prepared to handle all types of notifications and display them to the application users.
Updated about 1 year ago