Create a Flexible Ride

Creates a new Flexible Ride.

❗️

Prerequisites

Before creating a flexible ride, you should call the /estimates endpoint and use the returned
product.id as product_id in this request. This should also give you an estimate on how much
the journey could cost at claim time, but is not guaranteed for this use case, as the cost is set at
claim time.

Flexible Ride states

After created, a Flexible Ride can end up in these states:

  1. pending - Initial state.
  2. claimed - It was claimed by a user and a journey was created for it.
  3. failed - A non recoverable error ocurred during the claiming process (e.g overbudget).
  4. cancelled - It was cancelled by the owner.
  5. expired - After the expiration time was reached.

Of note is that all states besides pending are final. A Flexible Ride can be modified and claimed while it's
pending, but it becomes read only after it is changed to any other state.

📘

Expiration

Take into account that if you set a claimable_since time, the calculation
of the expiration time for the Flexible Ride will take it into consideration (expires_at will be
set N seconds after claimable_since)

⚠️

Sandbox Testing

In the sandbox environment, pickup locations must be within central Madrid (approximately 40.4361°, -3.7014°).
See Sandbox Environment for details.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Flexible Ride request

Input object needed to create a new Flexible Ride.

string | null

UTC ISO 8601 timestamp since when the flexible ride can be claimed.

integer | null

Amount of seconds from moment of creation until the Flexible Ride will expire. Can be between 3600 (1 hour) and 259200 (3 days).

string | null

Cost-center / project code.

max_price
object

Max price defined as budget ceiling on journey creation.

string | null

Driver-visible message to be set on create journey.

string

ID of the vehicle category/product used for this flexible ride, as returned by the estimates endpoint.

string | null

Journey reason to be set once created.

string

ID of the user who requested the flexible ride.

rider
object

Input data defining the rider of a journey. If your platform books journeys on behalf of your own end customers (e.g. the customers of a marketplace or app built on top of Cabify) and those customers never need to log into Cabify's own apps, we recommend leaving id empty and providing name/mobile instead, rather than creating a User per customer. This avoids having to manage account activation for people who never interact with Cabify directly, and still lets the rider follow their journey and contact the driver through the journey's public_url.

rider_metadata
object | null

Client metadata

string | null

Alias that is going to be displayed as the sender of the flexible ride on the claim page.

stops
array of objects
stops
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Callback
Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/text