Car Parts - OLX Partner API v1

Download OpenAPI specification:
Download

All APIs are available through REST endpoints and accept JSON as the content type for requests and corresponding responses. Each one has its version number and authentication requirements.

The generic structure for our API's endpoint is: https://api.olxgroup.com/<api>/<version>

For instance, the endpoint to manage adverts resource using the Adverts API version v1 is: https://api.olxgroup.com/advert/v1.

Contact Developer Support
developer-support@olx.com
Terms of Service https://developer.olxgroup.com/static/terms_end_conditions/re_api-en.pdf
Find more info on the documentation available https://car-parts.olxgroup.com/index.html

Server

 

Production server:

https://api.olxgroup.com
 

Oauth

 
Request or Refresh Token

Exchange an authorization code for an access and refresh tokens or an expired refresh token, for a new one.

Authorization process should be done once. You need to handle with invalid tokens, and in that case, another authorization will be needed.

Access token expires after a hour, so if you want to perform any operation you need to exchange the expired token by a new one, during a year (refresh token duration).

More here.

POST /oauth/v1/token

Header Parameters

Accept optional
Example: application/json
Authorization optional
Example: Basic YWZmNmUxODfGc7B00ZmHtOJdcRzgtBFU1N2QyMmQ1M2IoMwFlYTkdDxX1XjUzZWI0OTgyUDM4MGQ2XEYzODZiMGZi
Content-Type optional
Example: application/json
X-API-KEY required
Example: 2042034j-0406-317a-bfa0-bf214d5jf53bc

Request Body Schema

Request Body schema: application/json
grant_type
String

refresh_token
String

Requests

Example
        {"grant_type":"authorization_code", "code":"85963117d7f30047314fa27e21d5f5cba16e84f8"}
      

Responses

      {"access_token":"69394e6be1c24130b352f2706e1c1654de6cb8af", "expires_in":3600, "token_type":"Bearer", "scope":"read:adverts write:adverts read:leads read:profile_package", "refresh_token":"ccadb69d05466d06f39d3505c2dba187ac360451"}
    

Advert

 
Create Advert
POST /advert/v1

Header Parameters

Authorization optional
Example: Bearer 69394e6be1c24130b352f2706e1c1654de6cb8af
Accept optional
Example: application/json
Content-Type optional
Example: application/json
X-API-KEY required
Example: 2042034j-0406-317a-bfa0-bf214d5jf53bc

Request Body Schema

Request Body schema: application/json
category_urn
required
String

Category URN

title
required
String

Advert Title

description
required
String

Advert Description

required
Object

Contact Details

name
String

phone
String

email
String

photo
String

required
Object

Advert Price

value
Integer

currency
String

required
Object

Advert Location

lat
Number

lon
Number

exact
Boolean

Object

city_id
Number

district_id
Number

required
Array

url
String

site_urn
required
String

Target Platform URN

required
Array

urn
String

value
String

Requests

Example
        {"category_urn":"urn:concept:personal-cars", "title":"[qatest-mercury] car parts test", "description":"PRD: urn:site:olxpl - test car part for api. This advert is a test and should not be considered.", "contact":{"name":"Joaquim Silva", "phone":"918888888", "email":"joaquim@silva.tudo", "photo":"https://s3.eu-central-1.amazonaws.com/tests-resources/public/mercury-test-logo.png"}, "price":{"value":230123, "currency":"EUR"}, "location":{"lat":53.92039, "lon":17.8663, "custom_fields":{"city_id":1}}, "images":[{"url":"https://s3.eu-central-1.amazonaws.com/tests-resources/public/motors_images/car_tire.png"}, {"url":"https://s3.eu-central-1.amazonaws.com/tests-resources/public/motors_images/Tires-Blog.jpeg"}], "site_urn":"urn:site:olxpl", "attributes":[{"urn":"urn:concept:state", "value":"urn:concept:used"}, {"urn":"urn:concept:type", "value":"urn:concept:body"}]}
      

Responses

      {"transaction_id":"74c6bfc9-4163-11e8-a4a5-aff93b12a0c2", "message":"Data is valid", "data":{"uuid":"b195bdbc-9074-4bac-99a1-7248c0c98892", "last_action_status":"TO_POST"}}
    
Update Advert
PUT /advert/v1/{advert_uuid}

Header Parameters

Authorization optional
Example: Bearer 69394e6be1c24130b352f2706e1c1654de6cb8af
Accept optional
Example: application/json
Content-Type optional
Example: application/json
X-API-KEY required
Example: 2042034j-0406-317a-bfa0-bf214d5jf53bc

Path Parameters

advert_uuid required
Advert Unique ID. Example: b195bdbc-9074-4bac-99a1-7248c0c98892

Request Body Schema

Request Body schema: application/json
category_urn
required
String

Category URN

title
required
String

Advert Title

description
required
String

Advert Description

required
Object

Contact Details

name
String

phone
String

email
String

photo
String

required
Object

Advert Price

value
Integer

currency
String

required
Object

Advert Location

lat
Number

lon
Number

exact
Boolean

Object

city_id
Number

district_id
Number

required
Array

url
String

site_urn
required
String

Target Platform URN

required
Array

urn
String

value
String

Requests

Example
        {"category_urn":"urn:concept:personal-cars", "title":"[qatest-mercury] car parts test", "description":"PRD: urn:site:olxpl - test car part for api. This advert is a test and should not be considered.", "contact":{"name":"Joaquim Silva", "phone":"918888888", "email":"joaquim@silva.tudo", "photo":"https://s3.eu-central-1.amazonaws.com/tests-resources/public/mercury-test-logo.png"}, "price":{"value":123456, "currency":"EUR"}, "location":{"lat":53.92039, "lon":17.8663, "custom_fields":{"city_id":1}}, "images":[{"url":"https://s3.eu-central-1.amazonaws.com/tests-resources/public/motors_images/car_tire.png"}, {"url":"https://s3.eu-central-1.amazonaws.com/tests-resources/public/motors_images/Tires-Blog.jpeg"}], "site_urn":"urn:site:olxpl", "attributes":[{"urn":"urn:concept:state", "value":"urn:concept:used"}, {"urn":"urn:concept:type", "value":"urn:concept:body"}]}
      

Responses

      {"transaction_id":"62445b95-89fb-4457-9197-a4674de347b", "message":"Data is valid", "data":{"uuid":"9f72349a-c0c8-43aa-8eee-59a81fb9997f", "last_action_status":"TO_PUT"}}
    
Delete Advert
DELETE /advert/v1/{advert_uuid}

Header Parameters

Authorization optional
Example: Bearer 69394e6be1c24130b352f2706e1c1654de6cb8af
Accept optional
Example: application/json
Content-Type optional
Example: application/json
X-API-KEY required
Example: 2042034j-0406-317a-bfa0-bf214d5jf53bc

Path Parameters

advert_uuid required
Advert Unique ID. Example: b195bdbc-9074-4bac-99a1-7248c0c98892

Responses

      {"transaction_id":"19594b75-9722-42d4-969b-fb13374251d9", "message":"Data is valid", "data":{"uuid":"9f72349a-c0c8-43aa-8eee-59a81fb9997f", "last_action_status":"TO_DELETE"}}
    
Activate Advert
POST /advert/v1/{advert_uuid}/activate

Header Parameters

Authorization optional
Example: Bearer 69394e6be1c24130b352f2706e1c1654de6cb8af
Accept optional
Example: application/json
Content-Type optional
Example: application/json
X-API-KEY required
Example: 2042034j-0406-317a-bfa0-bf214d5jf53bc

Path Parameters

advert_uuid required
Advert Unique ID. Example: b195bdbc-9074-4bac-99a1-7248c0c98892

Responses

      {"transaction_id":"f82995e2-cb80-48cf-8a11-4d5bb54e27c6", "message":"Data is valid", "data":{"uuid":"523f5747-ffd2-4a8b-b639-1191c0ac35c2", "last_action_status":"TO_ACTIVATE"}}
    
Deactivate Advert
POST /advert/v1/{advert_uuid}/deactivate

Header Parameters

Authorization optional
Example: Bearer 69394e6be1c24130b352f2706e1c1654de6cb8af
Accept optional
Example: application/json
Content-Type optional
Example: application/json
X-API-KEY required
Example: 2042034j-0406-317a-bfa0-bf214d5jf53bc

Path Parameters

advert_uuid required
Advert Unique ID. Example: b195bdbc-9074-4bac-99a1-7248c0c98892

Responses

      {"transaction_id":"f82995e2-cb80-48cf-8a11-4d5bb54e27c6", "message":"Data is valid", "data":{"uuid":"523f5747-ffd2-4a8b-b639-1191c0ac35c2", "last_action_status":"TO_DEACTIVATE"}}
    
Get Advert Metadata
GET /advert/v1/{advert_uuid}/meta

Header Parameters

Content-Type optional
Example: application/json
X-API-KEY required
Example: 2042034j-0406-317a-bfa0-bf214d5jf53bc
Authorization optional
Example: Bearer 69394e6be1c24130b352f2706e1c1654de6cb8af

Path Parameters

advert_uuid required
Advert Unique ID. Example: b195bdbc-9074-4bac-99a1-7248c0c98892

Responses

      {"transaction_id":"df6da103-67de-4a30-950a-6d12bb23f598", "message":"Adverts status information", "data":{"uuid":"523f5747-ffd2-4a8b-b639-1191c0ac35c2", "last_action_status":"TO_ACTIVATE", "last_action_at":"2023-03-20T12:49:21.959+0000", "custom_fields":{"id":1658768701464, "reference_id":"MCY-d93c24b9-ba14-4127-a4e8-75053x0e25c0"}}}
    
Get Adverts Metadata
GET /advert/v1/meta

Header Parameters

Content-Type optional
Example: application/json
Authorization optional
Example: Bearer 69394e6be1c24130b352f2706e1c1654de6cb8af
X-API-KEY required
Example: 2042034j-0406-317a-bfa0-bf214d5jf53bc

Responses

      {"transaction_id":"df6da103-67de-4a30-950a-6d12bb23f598", "message":"Adverts status information", "data":["Array of advert data"], "links":{"first":{"href":"https://api.shared.stg.eu-west-1.verticals.olx.org/advert/v1/meta"}, "next":{"href":"https://api.shared.stg.eu-west-1.verticals.olx.org/advert/v1/meta?exclusiveStartUuid=102392f5-f616-4ced-8faa-063427aea970"}}}
    

Taxonomy

 
Get Categories by Site
GET /taxonomy/v1/categories/partner/{site_urn}?site_urn=value&

Header Parameters

Accept optional
Example: application/json
Content-Type optional
Example: application/json
X-API-KEY required
Example: 2042034j-0406-317a-bfa0-bf214d5jf53bc

Query Parameters

site_urn required
Site URN
Get a single Category by Site
GET /taxonomy/v1/categories/partner/{site_urn}/{category_urn}?site_urn=value&category_urn=value&

Header Parameters

Accept optional
Example: application/json
Content-Type optional
Example: application/json
X-API-KEY required
Example: 2042034j-0406-317a-bfa0-bf214d5jf53bc

Query Parameters

site_urn required
Site URN. Possible values: urn:site:olxpl, urn:site:olxro
category_urn required
Category URN