post
https://phoenix-qa.egovernments.org/api/v1.0/complaint/create?access_token=&json_complaint=
Create a Complaint object in the system.
Params
-
json_complaint - Complaint details as json object string like
{ "locationId":298, ---- Complaint location id "complaintTypeId":78, ---- Complaint type id "details":"test complaint", ---- Description of the complaint(Min 10 - Max 500 chars) "landmarkDetails":"landmark" ---- Complaint landmark details (Max 200 chars) }above json format only valid if you want to file a complaint without gps data (lat and long)
Or If you want to file a complaint with gps data then json format should be like below :{ "lat":14.796951937351869, ---- Latitude of complaint location "lng":78.29030089080334, ---- Longitude of complaint Location "complaintTypeId":78, ---- Complaint type id "details":"test complaint", ---- Description of the complaint(Min 10 - Max 500 chars) "landmarkDetails":"landmark" ---- Complaint landmark details (Max 200 chars) } -
files - This param used for upload complaint media files (up-to 3 max).
Response data format described below
| JSON Key | Data Type | Description |
|---|---|---|
| status | JSON Object | |
| status --> type | String | Denotes whether success or failure |
| status --> message | String | Response message |
| result | JSON Object | |
| result --> detail | String | Complaint description |
| result --> crn | String | Complaint number |
| result --> createdDate | String | Date of complaint created |
| result --> status | String | Complaint status |
| result --> childLocationName | String | Complaint location name (it's only available when user register complaint with location name) |
| result --> locationName | String | Complaint location ward details |
| result --> lat | Number (Double) | Latitude of complaint location (it's only available when user register complaint with gps) |
| result --> lng | Number (Double) | Longitude of complaint location (it's only available when user register complaint with gps) |
| result --> complaintTypeId | Number | Complaint type id |
| result --> complaintTypeName | String | Complaint type name |
| result --> landmarkDetails | String | Complaint landmark details |
| result --> supportDocsSize | Number | Denotes how many images are uploaded for this complaint |
