cURL
curl --request GET \
--url https://grm-api.vercel.app/grievances/{grievance_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://grm-api.vercel.app/grievances/{grievance_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://grm-api.vercel.app/grievances/{grievance_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://grm-api.vercel.app/grievances/{grievance_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://grm-api.vercel.app/grievances/{grievance_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://grm-api.vercel.app/grievances/{grievance_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://grm-api.vercel.app/grievances/{grievance_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"grievance": {
"title": "<string>",
"category": "<string>",
"description": "<string>",
"id": "<string>",
"user_id": "<string>",
"status": "Pending",
"created_at": "2023-11-07T05:31:56Z",
"priority": "medium",
"cpgrams_category": "<string>",
"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": {}
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Endpoint Examples
Get Grievance
Get a grievance by its ID
GET
/
grievances
/
{grievance_id}
cURL
curl --request GET \
--url https://grm-api.vercel.app/grievances/{grievance_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://grm-api.vercel.app/grievances/{grievance_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://grm-api.vercel.app/grievances/{grievance_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://grm-api.vercel.app/grievances/{grievance_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://grm-api.vercel.app/grievances/{grievance_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://grm-api.vercel.app/grievances/{grievance_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://grm-api.vercel.app/grievances/{grievance_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"grievance": {
"title": "<string>",
"category": "<string>",
"description": "<string>",
"id": "<string>",
"user_id": "<string>",
"status": "Pending",
"created_at": "2023-11-07T05:31:56Z",
"priority": "medium",
"cpgrams_category": "<string>",
"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": {}
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Retrieves a grievance by its unique identifier. This endpoint returns the complete grievance details including all fields such as title, description, category, status, timestamps, and any additional metadata related to the grievance processing.
If the grievance is not found, a 404 error is returned. The response includes a status field and the complete grievance object with all its properties.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of grievance to fetch