# Traffics

## GET /customer/traffic/city-and-state

> Get list of states and cities for rotating and static residential proxies

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Traffics"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"CityAndState":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","description":"City and state array","items":{"type":"object"}}},"description":"City and State"},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/traffic/city-and-state":{"get":{"tags":["Traffics"],"summary":"Get list of states and cities for rotating and static residential proxies","operationId":"getCityState","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CityAndState"}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /customer/traffic/available-countries-mob

> Get list of available countries for mobile proxies

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Traffics"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"CityAndStateMob":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","items":{"type":"object"},"description":"City and state mob array"}},"description":"City and State Mob"},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/traffic/available-countries-mob":{"get":{"tags":["Traffics"],"summary":"Get list of available countries for mobile proxies","operationId":"getCityStateMob","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CityAndStateMob"}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /customer/traffic/available-countries

> Get list of available countries for residential and static

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Traffics"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"AvailableCountries":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","items":{"type":"object"},"description":"City and state array"}}},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/traffic/available-countries":{"get":{"tags":["Traffics"],"summary":"Get list of available countries for residential and static","operationId":"getCity","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableCountries"}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /customer/traffic/

> Get traffic data

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Traffics"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Traffic":{"type":"object","properties":{"byDate":{"type":"boolean","description":"Show the list grouped by date"},"dateRange":{"type":"string","description":"Date range (max: 30 days)"},"byCountries":{"type":"boolean","description":"Show the list grouped by countries"},"countriesCodes":{"type":"string","description":"Filter by specific country code"},"byErrors":{"type":"boolean","description":"Show the list grouped by errors"},"page":{"type":"number","description":"Show requested page(only when show by domains is on)"},"errorCodes":{"type":"string","description":"Filter by specific error code","enum":["200","407","502","503","404","OtherError"]},"bySubUser":{"type":"boolean","description":"Show the list grouped by sub-users"},"subUsers":{"type":"string","description":"Filter by specific sub-user"},"paginationRowsPerPage":{"type":"number","description":"Pagination Rows Per Page when using domains."},"paginationPage":{"type":"number","description":"pagination Page when using domains."},"product":{"type":"string","description":"filters by product, options: Res-Stc-Dc,Data Center,Residential,Static Residential,Mobile"}}},"LoginSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"token":{"type":"string","description":"token"}},"description":"Login credentials"},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/traffic/":{"post":{"tags":["Traffics"],"summary":"Get traffic data","operationId":"getTrafficUsage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Traffic"}}},"required":false},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginSuccess"}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
