City Serviceable API:
This API basically tells us about the serviceability of our services(like pharmacy and OTC) in that city.
Query Parameters
- city stringExample: Noida
Header Parameters
- X-Access-Key string
Default value:
1mg_client_access_key
Responses
- 200
- 400
OK
Response Headers
- application/json
- Schema
- Example (from schema)
- Example
Schema
- object
{}
{
"data": {
"serviceable": true,
"otc_available": true,
"pharma_available": true,
"city": "New Delhi"
},
"status_code": 200
}
Bad Request
Response Headers
- application/json
- Schema
- Example (from schema)
- Example
Schema
- object
{}
{
"is_success": false,
"status_code": 400,
"error": {
"message": "Invalid request",
"errors": [
{
"message": "Invalid request"
}
]
}
}
GET /api/v4/city-serviceable
Request
Request
curl / cURL
curl -L -X GET 'https://jupiterapi.1mg.com/api/v4/city-serviceable' \
-H 'Accept: application/json'
python / requests
curl -L -X GET 'https://jupiterapi.1mg.com/api/v4/city-serviceable' \
-H 'Accept: application/json'
go / native
curl -L -X GET 'https://jupiterapi.1mg.com/api/v4/city-serviceable' \
-H 'Accept: application/json'
nodejs / axios
curl -L -X GET 'https://jupiterapi.1mg.com/api/v4/city-serviceable' \
-H 'Accept: application/json'
ruby / Net::HTTP
curl -L -X GET 'https://jupiterapi.1mg.com/api/v4/city-serviceable' \
-H 'Accept: application/json'
csharp / RestSharp
curl -L -X GET 'https://jupiterapi.1mg.com/api/v4/city-serviceable' \
-H 'Accept: application/json'
php / cURL
curl -L -X GET 'https://jupiterapi.1mg.com/api/v4/city-serviceable' \
-H 'Accept: application/json'
java / OkHttp
curl -L -X GET 'https://jupiterapi.1mg.com/api/v4/city-serviceable' \
-H 'Accept: application/json'
powershell / RestMethod
curl -L -X GET 'https://jupiterapi.1mg.com/api/v4/city-serviceable' \
-H 'Accept: application/json'