Migration Guide

The following guide will help you migrate from Open API to Mercury API.

Overview

Open API is available in the specialized platforms Otomoto and Autovit. 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 Open 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 Open API endpoints your app uses, and look up the equivalent ones in Mercury API using our Open 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 Open 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 Open API functionality maps to Mercury API. All Open 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 Open API and Mercury API endpoints are listed here.

Authentication

Open API Mercury API Comments
POST /oauth/token POST /oauth/v1/token Check documentation for Authorization Flow


Open API Mercury API Comments
POST /adverts POST /advert/v1
PUT /adverts/{id} PUT /advert/v1/{advert_uuid}
DELETE /adverts/{id} DELETE /advert/v1/{advert_uuid}
PUT /adverts/{id}/status POST /advert/v1/{advert_uuid}/activate Open API endpoint requires a status field on the method's body (active)
PUT /adverts/{id}/status POST /advert/v1/{advert_uuid}/deactivate Open API endpoint requires a status field on the method's body (deactivated)
GET /adverts/{id} GET /advert/v1/{advert_uuid}/meta The corresponding methods from Open API and Mercury API return different payloads and not all attributes have a correspondence


Taxonomy

Open API Mercury API Comments
GET /categories GET /taxonomy/v1/categories/partner/{site_urn} Returns all categories and attributes from the input site_urn
GET /categories/{id} GET /taxonomy/v1/categories/partner/{site_urn}/{category_urn}