> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.feryrides.co.in/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.feryrides.co.in/_mcp/server.

# Submit ride feedback

POST https://uat.feryrides.co.in/dmrc/ride/feedback
Content-Type: application/json

Optional post-ride feedback for an order.

Reference: https://docs.feryrides.co.in/api-reference/feedback/submit-feedback

## Authentication

- `x-api-key` header (required) — API key provided by Fery for DMRC integration.

## Request

### Body (application/json)

This endpoint expects a FeedbackRequest.

- `rating` (double, required)
- `feedback` (string, required)
- `orderId` (string, optional)
- `requestId` (string, optional)

## Response

### 200

Feedback submitted

- `statusCode` (integer, optional)
- `success` (boolean, optional)
- `message` (string, optional)
- `data` (FeedbackResponseData, optional)

## Errors

### 400 Bad Request Error

Validation or business rule error

- `statusCode` (integer, optional)
- `success` (boolean, optional)
- `message` (string, optional)
- `errors` (map from string to any, optional)

### 401 Unauthorized Error

Missing or invalid API key

- `statusCode` (integer, optional)
- `success` (boolean, optional)
- `message` (string, optional)
- `errors` (map from string to any, optional)

### 404 Not Found Error

Ride not found

- `statusCode` (integer, optional)
- `success` (boolean, optional)
- `message` (string, optional)
- `errors` (map from string to any, optional)

## Types

### FeedbackResponseData

- `orderId` (string, optional)
- `code` (string, optional)

## Examples

**Request**

```json
{
  "rating": 5,
  "feedback": "Smooth ride, on time",
  "orderId": "1717235676225158"
}
```

**Response**

```json
{
  "statusCode": 1,
  "success": true,
  "message": "string",
  "data": {
    "orderId": "string",
    "code": "FEEDBACK_SUBMITTED"
  }
}
```

**SDK Code**

```python Feedback_submitFeedback_example
import requests

url = "https://uat.feryrides.co.in/dmrc/ride/feedback"

payload = {
    "rating": 5,
    "feedback": "Smooth ride, on time",
    "orderId": "1717235676225158"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Feedback_submitFeedback_example
const url = 'https://uat.feryrides.co.in/dmrc/ride/feedback';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"rating":5,"feedback":"Smooth ride, on time","orderId":"1717235676225158"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Feedback_submitFeedback_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://uat.feryrides.co.in/dmrc/ride/feedback"

	payload := strings.NewReader("{\n  \"rating\": 5,\n  \"feedback\": \"Smooth ride, on time\",\n  \"orderId\": \"1717235676225158\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Feedback_submitFeedback_example
require 'uri'
require 'net/http'

url = URI("https://uat.feryrides.co.in/dmrc/ride/feedback")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"rating\": 5,\n  \"feedback\": \"Smooth ride, on time\",\n  \"orderId\": \"1717235676225158\"\n}"

response = http.request(request)
puts response.read_body
```

```java Feedback_submitFeedback_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://uat.feryrides.co.in/dmrc/ride/feedback")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"rating\": 5,\n  \"feedback\": \"Smooth ride, on time\",\n  \"orderId\": \"1717235676225158\"\n}")
  .asString();
```

```php Feedback_submitFeedback_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://uat.feryrides.co.in/dmrc/ride/feedback', [
  'body' => '{
  "rating": 5,
  "feedback": "Smooth ride, on time",
  "orderId": "1717235676225158"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Feedback_submitFeedback_example
using RestSharp;

var client = new RestClient("https://uat.feryrides.co.in/dmrc/ride/feedback");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"rating\": 5,\n  \"feedback\": \"Smooth ride, on time\",\n  \"orderId\": \"1717235676225158\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Feedback_submitFeedback_example
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "rating": 5,
  "feedback": "Smooth ride, on time",
  "orderId": "1717235676225158"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://uat.feryrides.co.in/dmrc/ride/feedback")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```