Integration flow

Integration flow

1. POST /ride/fare-estimate → fare quotes (scooty / cab)
2. POST /ride/create-order → orderId, otp
include user + webhookURL + serviceType
3. Receive webhooks on webhookURL
status: accepted → arrived → started → dropped
location: location_updated
4. POST /ride/cancel → optional
5. POST /ride/feedback → optional

1. Fare estimate

Call POST /ride/fare-estimate with pickup and drop coordinates.

  • Omit serviceType to receive both scooty and cab quotes
  • Use quotes[].totalAmount and quotes[].eta in your UI

2. Create order

Call POST /ride/create-order after the rider selects a service type.

Rider details

Send rider details in the create order request:

1"user": {
2 "mobile": "9999999999",
3 "firstName": "Asha",
4 "lastName": "Sharma",
5 "gender": "female"
6}

There is no separate user registration API.

Webhook URL

Send your webhook URL in the same request:

1"webhookURL": "https://your-domain.com/fery/updates"

Fery stores this URL on the ride and uses it for:

  1. Status updates
  2. Partner location updates

Include your own reference in metadata if needed. Example:

1"metadata": {
2 "partnerOrderId": "DMRC-ORDER-1001"
3}

Response

  • Use orderId for cancel, feedback, and correlating webhooks
  • Show otp to the rider
  • If code is USER_HAVE_ACTIVE_RIDE, use the returned existing orderId

3. Webhooks

Implement your webhook endpoint as described in Webhooks.

Respond with HTTP 200 or 201 for each event.

Happy-path status sequence:

acceptedarrivedstarteddropped

Location events use status: location_updated on the same URL.

4. Cancel

Call POST /ride/cancel with orderId when the customer cancels.

Fery also sends webhook status customer_cancelled.

5. Feedback

Optionally call POST /ride/feedback after the ride is completed.