Locations
GET/cities
Cities
List all cities.
Headers
- Name
Content-Type
- Type
- string
- Description
application/json
- Name
Authorization
- Type
- string
- Description
Beare <token>
Request
POST
/citiescurl -X GET https://api.olx.ba/cities \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {token}" \
Response
{
"data" : [
{
"id" : 1,
"name": "Federacija BiH",
"code": "FBIH",
"cantons": []
},
{
"id" : 2,
"name": "Republika srpska",
"code": "RS",
"cantons": []
},
{
"id" : 3,
"name": "Brcko Distrikt",
"code": "BD",
"cantons": []
}
]
}
GET/countries
Countries
List all countries.
Headers
- Name
Content-Type
- Type
- string
- Description
application/json
- Name
Authorization
- Type
- string
- Description
Beare <token>
Request
POST
/countriescurl -X GET https://api.olx.ba/countries \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {token}" \
Response
{
"data" : [
{
"id": 49,
"name": "Bosna i Hercegovina",
"code": "BA"
},
]
}
GET/cities/:id
City
City.
Headers
- Name
Content-Type
- Type
- string
- Description
application/json
- Name
Authorization
- Type
- string
- Description
Beare <token>
Request
POST
/cities/:idcurl -X GET https://api.olx.ba/cities/:id \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {token}" \
Response
{
"id": 1,
"name": "Sarajevo",
"zip_code": 71000,
"lat": "43.8519774",
"lon": "18.3866868",
"parent_id": null,
"pop": 10,
"country_id": 49,
"canton_id": 9,
"state_id": 1,
}
GET/country-states
Country states
Country states.
Headers
- Name
Content-Type
- Type
- string
- Description
application/json
- Name
Authorization
- Type
- string
- Description
Beare <token>
Request
POST
/country-statescurl -X GET https://api.olx.ba/country-states \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {token}" \
Response
{
"data": [
{
"id": 1,
"name": "Federacija BiH",
"code": "FBIH",
"cantons": [],
},
{
"id" : 2,
"name": "Republika srpska",
"code": "RS",
"cantons": []
},
{
"id" : 3,
"name": "Brcko Distrikt",
"code": "BD",
"cantons": []
}
]
}
GET/cantons/:id/cities
Canton cities
Canton cities.
Headers
- Name
Content-Type
- Type
- string
- Description
application/json
- Name
Authorization
- Type
- string
- Description
Beare <token>
Request
POST
/cantons/:id/citiescurl -X GET https://api.olx.ba/cantons/:id/cities \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {token}" \
Response
{
"data": [
{
"id": 133,
"name": "Centar",
"location": {
"lat": "43.8575641",
"lon": "18.4149369"
},
"canton_id": 9
},
{
"id": 132,
"name": "Novi Grad",
"location": {
"lat": "43.8404514",
"lon": "18.324795"
},
"canton_id": 9
},
]
}