This metadata API returns a list of cities within a specified country and (optionally) a specific state. It is used to configure precise city-level targeting while creating or updating deals.
GET https://apis.demand.ssp.inmobi.com/v1/meta/cities
| Field Name | Type | Is mandatory (Y/N)? | Description |
|---|---|---|---|
| Authorization | String | Y | Bearer token for authentication (Bearer <token>) |
| X-USER-ID | String | Y | The ID of the user making the request |
| X-INMOBI-ORG-ID | String | Y | The organization ID associated with the user |
| Content-Type | String | Y | Specifies the media type of the request body. Use: application/json |
| Field Name | Type | Is mandatory (Y/N)? | Description |
|---|---|---|---|
| country_id | Integer | Y | The ID of the country to filter cities by |
| state_id | Integer | N | The ID of the state to further filter cities |
curl -X GET "https://apis.demand.ssp.inmobi.com/v1/meta/cities?country_id=108&state_id=31301" \
-H "Authorization: Bearer <your bearer token>" \
-H "X-USER-ID: <test app>" \
-H "X-INMOBI-ORG-ID: <your org id>" \
-H "Content-Type: application/json" \
{
"data": {
"cities": [
{
"id": 1174474,
"name": "CARIPI",
"stateName": "AMAPA",
"stateId": 31301,
"countryName": "Brazil",
"countryId": 108
},
{
"id": 73777,
"name": "MACAPA",
"stateName": "AMAPA",
"stateId": 31301,
"countryName": "Brazil",
"countryId": 108
}
// ... more cities
],
"pageNum": 1,
"numItems": 5,
"nextPage": false,
"totalItems": 5,
"totalPages": 1
}
}
By installing this SDK update, you agree that your Children Privacy Compliance setting remains accurate or that you will update that setting, whenever there is a change in your app's audience. You may update the app's Children Privacy Compliance settings at https://publisher.inmobi.com/my-inventory/app-and-placements.
Support Center