GET
/
grievances
/
user
/
{user_id}
curl --request GET \
  --url https://grm-api.vercel.app/grievances/user/{user_id} \
  --header 'Authorization: Bearer <token>'
{
  "status": "<string>",
  "total": 123,
  "page": 123,
  "size": 123,
  "grievances": [
    {
      "title": "<string>",
      "category": "<string>",
      "description": "<string>",
      "priority": "medium",
      "cpgrams_category": "<string>",
      "id": "<string>",
      "user_id": "<string>",
      "status": "Pending",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "resolution_notes": "<string>",
      "grievance_received_date": "2023-11-07T05:31:56Z",
      "grievance_closing_date": "2023-11-07T05:31:56Z",
      "organisation_closing_date": "2023-11-07T05:31:56Z",
      "org_status_date": "2023-11-07T05:31:56Z",
      "reported_as_covid19_case_date": "2023-11-07T05:31:56Z",
      "covid19_category": "<string>",
      "reformed_flag": false,
      "reformed_top_level_category": "<string>",
      "reformed_last_level_category": "<string>",
      "forwarded_to_subordinate": false,
      "forwarded_to_subordinate_details": "<string>",
      "rating": 123,
      "feedback": "<string>",
      "satisfaction_level": "<string>",
      "final_reply": "<string>",
      "appeal_no": "<string>",
      "appeal_date": "2023-11-07T05:31:56Z",
      "appeal_reason": "<string>",
      "appeal_closing_date": "2023-11-07T05:31:56Z",
      "appeal_closing_remarks": "<string>",
      "organisation_grievance_receive_date": "2023-11-07T05:31:56Z",
      "organisation_grievance_close_date": "2023-11-07T05:31:56Z",
      "officers_forwarding_grievance": "<string>",
      "date_of_receiving": "2023-11-07T05:31:56Z",
      "officer_closed_by": "<string>",
      "final_status": "<string>",
      "classified_category": "<string>",
      "formatted_fields": "<string>",
      "follow_up_questions": [
        "<string>"
      ],
      "missing_information": true,
      "is_correct_category": true,
      "category_data": {}
    }
  ]
}

Retrieves all grievances associated with a specific user, with support for pagination. This endpoint allows you to fetch either all grievances for a user or paginate through them using the query parameters.

Pagination

The endpoint supports the following query parameters for pagination:

  • fetch_all (boolean): When set to true, returns all grievances for the user without pagination. Default is false.
  • page (integer): The page number to retrieve. Default is 1.
  • size (integer): Number of grievances per page. Default is 10, maximum is 100.

Response

The response includes:

  • status: Operation status
  • total: Total number of grievances for the user
  • page: Current page number
  • size: Number of items per page
  • grievances: Array of grievance objects with complete details

If the user is not found, a 404 error is returned.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

user_id
string
required

ID of the user whose grievances to fetch

Query Parameters

fetch_all
boolean
default:false

Whether to fetch all grievances or paginate

page
integer
default:1

Page number for pagination

Required range: x >= 1
size
integer
default:10

Number of items per page

Required range: 1 <= x <= 100

Response

200
application/json

List of user grievances

The response is of type object.