Endpoints

Endpoints

All endpoints require:

1x-api-key: <API_KEY>
2Content-Type: application/json

Base URL (UAT): https://uat.feryrides.co.in

Use the API Reference for full schemas. This page summarizes each endpoint.


Fare estimate

POST /ride/fare-estimate

Returns trip distance, duration, and fare quotes.

Request body

1{
2 "pickupLocation": {
3 "lat": 28.459119,
4 "lng": 77.072912,
5 "address": "Metro Station Exit A"
6 },
7 "dropLocation": {
8 "lat": 28.475482,
9 "lng": 77.088265,
10 "address": "Destination"
11 }
12}
FieldRequiredDescription
pickupLocation.latyesLatitude
pickupLocation.lngyesLongitude
pickupLocation.addressnoAddress text
dropLocation.latyesLatitude
dropLocation.lngyesLongitude
dropLocation.addressnoAddress text
serviceTypenoscooty, cab, or an array of those values. If omitted, both quotes are returned.

Response 200

FieldDescription
data.requestIdFare estimate id
data.rideTimeEstimated trip duration
data.timeUnitAlways minute
data.rideDistanceEstimated trip distance
data.distanceUnitAlways km
data.quotes[]Fare quote(s)
data.quotes[].serviceTypescooty or cab
data.quotes[].totalAmountTotal fare
data.quotes[].etaEstimated partner arrival time in minutes
data.quotes[].fareBreakupFare breakup details

Create order

POST /ride/create-order

Creates a ride. Rider details must be sent in this request. Fery creates or updates the rider from the user object.

Request body

1{
2 "user": {
3 "mobile": "9999999999",
4 "firstName": "Asha",
5 "lastName": "Sharma",
6 "gender": "female"
7 },
8 "pickupLocation": {
9 "lat": 28.459119,
10 "lng": 77.072912,
11 "address": "Metro Station Exit A"
12 },
13 "dropLocation": {
14 "lat": 28.475482,
15 "lng": 77.088265,
16 "address": "Destination"
17 },
18 "serviceType": "scooty",
19 "paymentMode": "prepaid",
20 "pickupOtp": "1234",
21 "webhookURL": "https://your-domain.com/fery/updates",
22 "metadata": {
23 "partnerOrderId": "DMRC-ORDER-1001"
24 }
25}
FieldRequiredDescription
user.mobileyes10-digit mobile number
user.firstNameyesFirst name
user.lastNameyesLast name
user.gendernoRider gender
pickupLocationyesSame location shape as fare estimate
dropLocationyesSame location shape as fare estimate
serviceTypenoscooty (default) or cab
paymentModeyesPayment mode, e.g. prepaid or postpaid
pickupOtpno4-digit OTP. If omitted, Fery generates one and returns it
webhookURLyesHTTPS URL for status and location webhooks
metadatanoYour reference data. Echoed in webhooks when present
couponCodenoCoupon code, if applicable

Response 201

1{
2 "statusCode": 201,
3 "data": {
4 "orderId": "1717235676225158",
5 "requestId": "1717235676225158",
6 "status": "notStarted",
7 "otp": "1234",
8 "price": 52,
9 "serviceType": "scooty",
10 "code": "RIDE_CREATED"
11 },
12 "message": "Ride order created successfully.",
13 "success": true
14}

Response 200 — active ride already exists

If the rider already has an active ride, Fery returns the existing order with code: USER_HAVE_ACTIVE_RIDE.


Cancel order

POST /ride/cancel

Cancels an active ride. Fery also sends webhook status customer_cancelled to your saved webhookURL.

Request body

1{
2 "orderId": "1717235676225158",
3 "cancelReason": "Customer changed plans"
4}
FieldRequiredDescription
orderIdyesOrder id from create order. requestId is also accepted
cancelReasonnoCancellation reason. reason is also accepted

Response 200

code: RIDE_CANCELLED


Feedback

POST /ride/feedback

Optional endpoint to submit feedback after a completed ride.

Request body

1{
2 "orderId": "1717235676225158",
3 "rating": 5,
4 "feedback": "Smooth ride, on time"
5}
FieldRequiredDescription
orderIdyesOrder id. requestId is also accepted
ratingyesInteger from 1 to 5
feedbackyesFeedback text

Response 200

code: FEEDBACK_SUBMITTED