# Models

## The Login object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"Login":{"required":["email","password"],"type":"object","properties":{"email":{"type":"string","description":"credentials"},"password":{"type":"string","description":"options"}},"description":"Login credentials"}}}}
```

## The LoginSuccess object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"LoginSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"token":{"type":"string","description":"token"}},"description":"Login credentials"}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}}}
```

## The SubUsersSuccess object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"SubUsersSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","description":"Data of sub users","items":{"type":"object"}}},"description":"SubUsers"}}}}
```

## The Allocate object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"Allocate":{"required":["allocate"],"type":"object","properties":{"allocate":{"type":"number","description":"allocate gb"},"product_type":{"type":"string","description":"Product type (Options: '*', 'dc', 'res', 'stc', 'mob')"}}}}}}
```

## The SubUser object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"SubUser":{"required":["customer_dashboard_email","customer_dashboard_pwd","customer_login_name","customer_login_pwd","customer_name"],"type":"object","properties":{"customer_dashboard_email":{"type":"string","description":"customer_dashboard_email"},"customer_name":{"type":"string","description":"customer_name"},"customer_dashboard_pwd":{"type":"string","description":"customer_dashboard_pwd"},"customer_login_name":{"type":"string","description":"customer_login_name"},"customer_login_pwd":{"type":"string","description":"customer_login_pwd"},"snkrs_private_pool":{"type":"number","description":"snkrs_private_pool"}}}}}}
```

## The UpdateSuccess object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"UpdateSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}},"description":"success update"}}}}
```

## The Traffic object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"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"}}}}}}
```

## The Usage object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"Usage":{"type":"object","properties":{"dateRange":{"type":"string","description":"Date range to search for package"},"planStatus":{"type":"number","description":"The plan status (1- active plans, 0- Inactive plans, 2- Standby plans, 3- All plans)"},"packageType":{"type":"number","description":"Package type (1 - dc, 2 - isp , 3 - res   )"},"bySubUser":{"type":"boolean","description":"Show the list with sub-users (For reseller only)"},"subUsers":{"type":"string","description":"Filter by specific sub-user (For reseller only)"}}}}}}
```

## The UpdatePasswordSuccess object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"UpdatePasswordSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","description":"Data of sub users","items":{"type":"object"}}},"description":"Update Password"}}}}
```

## The UpdatePasswordProps object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"UpdatePasswordProps":{"required":["new_login_pwd"],"type":"object","properties":{"new_login_pwd":{"type":"string","description":"new_login_pwd"}}}}}}
```

## The PostSubUser object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"PostSubUser":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","description":"Data of sub users","items":{"type":"object"}}},"description":"SubUsers"}}}}
```

## The MyUsage object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"MyUsage":{"type":"object","properties":{"dateRange":{"type":"string","description":"Date range to search for package"},"planStatus":{"type":"number","description":"The plan status (1- active plans, 0- Inactive plans, 2- Standby plans, 3- All plans)"}}}}}}
```

## The MyUsageSuccess object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"MyUsageSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","description":"return object","items":{"$ref":"#/components/schemas/MyUsageSuccessObj"}}},"description":"MyUsage success response"},"MyUsageSuccessObj":{"type":"object","properties":{"id":{"type":"number","description":"Plan Id"},"start_date":{"type":"string","description":"start_date of the plan"},"end_date":{"type":"string","description":"end_date of the plan"},"is_active":{"type":"boolean","description":"plan status"},"total_requests_used":{"type":"number","description":"Total requests used"},"total_gb_used":{"type":"number","description":"Total gb used"},"usage_percentage":{"type":"string","description":"Show percentage value"},"plan_gb":{"type":"number","description":"Plan gb"},"product_type":{"type":"string","description":"Product Type"}}}}}}
```

## The MyUsageSuccessObj object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"MyUsageSuccessObj":{"type":"object","properties":{"id":{"type":"number","description":"Plan Id"},"start_date":{"type":"string","description":"start_date of the plan"},"end_date":{"type":"string","description":"end_date of the plan"},"is_active":{"type":"boolean","description":"plan status"},"total_requests_used":{"type":"number","description":"Total requests used"},"total_gb_used":{"type":"number","description":"Total gb used"},"usage_percentage":{"type":"string","description":"Show percentage value"},"plan_gb":{"type":"number","description":"Plan gb"},"product_type":{"type":"string","description":"Product Type"}}}}}}
```

## The UsageByIdSuccess object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"UsageByIdSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","description":"The customer_id of the user","items":{"type":"object"}}}}}}}
```

## The AllocateIps object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"AllocateIps":{"required":["access_point","bandwidth","country_code","ips"],"type":"object","properties":{"access_point":{"type":"string","description":"Access Point"},"country_code":{"type":"string","description":"Country Code"},"ips":{"type":"number","description":"IP's to allocate"},"bandwidth":{"type":"number","description":"bandwith you want to give to sub-user"}}}}}}
```

## The AllocateIpsSuccess object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"AllocateIpsSuccess":{"required":["message","success"],"type":"object","properties":{"success":{"type":"boolean","description":"success flag"},"message":{"type":"string","description":"message"}},"description":"allocateIps success response"}}}}
```

## The CityAndState object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"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"}}}}
```

## The AvailableCountries object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"AvailableCountries":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","items":{"type":"object"},"description":"City and state array"}}}}}}
```

## The CityAndStateMob object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"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"}}}}
```

## The UnblockerPlansInput object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"UnblockerPlansInput":{"required":["end_date","plan_status","start_date"],"type":"object","properties":{"start_date":{"type":"string","description":"start date of the plan"},"end_date":{"type":"string","description":"end date of the plan"},"plan_status":{"type":"string","description":"the status of the plan (active, inactive, standby)"}}}}}}
```

## The UnblockerPlanSuccess object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"UnblockerPlanSuccess":{"required":["display_name","end_date","plan_status","start_date"],"type":"object","properties":{"end_date":{"type":"string","description":"end date of the plan"},"start_date":{"type":"string","description":"start date of the plan"},"plan_status":{"type":"boolean","description":"the status of the plan (active, inactive, standby)"},"display_name":{"type":"string","description":"display name of the plan"},"total_requests_used":{"type":"number","description":"usage of the plan in requests (will be only if the plan is in requests)"},"request_plan_size_M":{"type":"number","description":"request plan size in millions (will be only if the plan is in requests)"},"total_gb_used":{"type":"number","description":"usage of the plan in GB (will be only if the plan is in GB)"},"gb_plan_size":{"type":"number","description":"GB plan size in GB (will be only if the plan is in GB)"}}}}}}
```

## The UnblockerTrafficSuccess object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"UnblockerTrafficSuccess":{"required":["dataInBytes","product_type_id","statusCode200","statusCode401","statusCode403","statusCode404","statusCode407","statusCode502","statusCode503","statusCodeOther","successPercentage","successRequests"],"type":"object","properties":{"totalRequests":{"type":"number","description":"Total request for the group."},"successRequests":{"type":"number","description":"the number of successful requests for the group."},"dataInBytes":{"type":"number","description":"the total data transferred in bytes for the group."},"successPercentage":{"type":"number","description":"the success percentage of the requests for the group."},"date":{"type":"string","description":"the date of the group (will be only if the data is grouped by date)."},"statusCode200":{"type":"number","description":"the number of requests with status code 200 for the group."},"statusCode407":{"type":"number","description":"the number of requests with status code 407 for the group."},"statusCode502":{"type":"number","description":"the number of requests with status code 502 for the group."},"statusCode503":{"type":"number","description":"the number of requests with status code 503 for the group."},"statusCode404":{"type":"number","description":"the number of requests with status code 404 for the group."},"statusCode403":{"type":"number","description":"the number of requests with status code 403 for the group."},"statusCode401":{"type":"number","description":"the number of requests with status code 401 for the group."},"statusCodeOther":{"type":"number","description":"the number of requests with other status codes for the group."},"product_type_id":{"type":"number","description":"the product type id of the requests for the group."}}}}}}
```

## The UnblockerTrafficInput object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"UnblockerTrafficInput":{"required":["endDate","startDate"],"type":"object","properties":{"startDate":{"type":"string","description":"start date of the traffic"},"endDate":{"type":"string","description":"end date of the traffic"},"countries":{"type":"array","description":"traffic for a specific targeted country (array of 2 letter filter for specific countries)","items":{"type":"string"}},"splitByCountry":{"type":"boolean","description":"group by countries"},"splitByDate":{"type":"boolean","description":"group by date"}}}}}}
```

## The GetTrafficByDomainRequest object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"GetTrafficByDomainRequest":{"required":["endDate","startDate"],"type":"object","properties":{"startDate":{"type":"string","description":"start date of the traffic"},"endDate":{"type":"string","description":"end date of the traffic"}}}}}}
```

## The DomainTrafficEntry object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"DomainTrafficEntry":{"required":["dataInBytes","domain","successPercentage","successRequests","totalRequests"],"type":"object","properties":{"totalRequests":{"type":"number","description":"Total requests for the domain."},"successRequests":{"type":"number","description":"Successful requests for the domain."},"successPercentage":{"type":"number","description":"Success percentage for the domain."},"domain":{"type":"string","description":"The domain name."},"dataInBytes":{"type":"string","description":"Data transferred in bytes."}}}}}}
```

## The GetTrafficByDomainResponse object

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"components":{"schemas":{"GetTrafficByDomainResponse":{"required":["traffic"],"type":"object","properties":{"traffic":{"type":"array","description":"Array of traffic data grouped by domain.","items":{"$ref":"#/components/schemas/DomainTrafficEntry"}}}},"DomainTrafficEntry":{"required":["dataInBytes","domain","successPercentage","successRequests","totalRequests"],"type":"object","properties":{"totalRequests":{"type":"number","description":"Total requests for the domain."},"successRequests":{"type":"number","description":"Successful requests for the domain."},"successPercentage":{"type":"number","description":"Success percentage for the domain."},"domain":{"type":"string","description":"The domain name."},"dataInBytes":{"type":"string","description":"Data transferred in bytes."}}}}}}
```
