Migration Guide
The following guide will help you migrate from Partner API to Mercury API.
Overview
Partner API is available in the OLX platforms. Mercury API provides a similar set of functionalities but with better performance, enhanced security, increase resiliency and higher efficiency.
This guide will help developers switching any application using Partner API to post and manage content on any of the specialized platforms into Mercury API.
Checklist
- Familiarize yourself with the Mercury API syntax. Explore the methods in the API Reference.
- Figure out which Partner API endpoints your app uses, and look up the equivalent ones in Mercury API using our Partner API → Mercury API mapping table.
- Setup a webhook notification URL to receive asynchronous updates whenever an advert changes status. We expect this webhook to return an HTTP 2XX error code.
- Update your app’s code, replacing Partner API calls with Mercury API calls.
- Update the error handling in your app to utilize Mercury API errors. Check the following links for more details:
Endpoints
Here’s a mapping of how Partner API functionality maps to Mercury API. All Partner API endpoints are listed in the left column, and the equivalent Mercury API endpoints are in the right column. Some endpoints take different parameters or return different data; make sure you check out the full documentation when that’s noted. Not all Partner API and Mercury API endpoints are listed here.
Authentication
Summary | Partner API | Mercury API | Comments |
---|---|---|---|
Get Access Token | POST /api/open/oauth/token | POST /oauth/v1/token | Check documentation for Authorization Flow |
Advert Management
Summary | Partner API | Mercury API | Comments |
---|---|---|---|
Create Advert | POST /api/partner/adverts | POST /advert/v1 | |
Update Advert | PUT /api/partner/adverts/{id} | PUT /advert/v1/{advert_uuid} | |
Delete Advert | DELETE /api/partner/adverts/{id} | DELETE /advert/v1/{advert_uuid} | |
Activate Advert | POST /api/partner/adverts/{id}/commands | POST /advert/v1/{advert_uuid}/activate | Partner API endpoint requires a command field on the method's body (activate) |
Deactivate Advert | POST /api/partner/adverts/{id}/commands | POST /advert/v1/{advert_uuid}/deactivate | Partner API endpoint requires a command field on the method's body (deactivate) |
Get Advert | GET /api/partner/adverts/{id} | GET /advert/v1/{advert_uuid}/meta | The corresponding methods from Partner API and Mercury API return different payloads and not all attributes have a correspondence |
Taxonomy
Summary | Partner API | Mercury API | Comments |
---|---|---|---|
Get Categories | GET /api/partner/categories | GET /taxonomy/v1/categories/partner/{site_urn} | Returns all categories and attributes from the input site_urn |
Get Category Attributes | GET /api/partner/categories/{id}/attributes | GET /taxonomy/v1/categories/partner/{site_urn}/{category_urn} |