The Gett Developer

Welcome to the Gett Developer portal. You'll find comprehensive guides and documentation to help you start working with Gett Developer as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

API description

Gett is happy to introduce a Gett B2B Rides API – a modern and powerful tool that allows to create and manage Gett Business rides without a need to have a Gett mobile app.

Gett B2B Rides API is built the way that it easily lets 3rd-parties to integrate, test and start riding with a few simple requests.

API specification

The core capabilities of the Gett app are available through the Gett API:

Selecting a product (e.g., Gett Express, Gett Delivery, etc.)
Specifying pickup and drop-off locations
Get ETA time and price estimates
Requesting a ride
Get ride details and status

Authentication

In order to request a business ride, you will need to authenticate your business.
Once you have received your unique client_id & client_secret from Gett, these will be used to authenticate your business when calling the API.

To authenticate your business, execute the following command and replace [CLIENT_ID] and [CLIENT_SECRET] with your credentials.

curl -F 'client_id=[CLIENT_ID]' \
     -F 'client_secret=[CLIENT_SECRET]' \
     -F 'grant_type=client_credentials' \
     -F 'scope=business' \
     'https://api.gett.com/v1/oauth/token'
{
  "access_token": "[TOKEN]",
  "created_at": 1489614070,
  "expires_in": 7200,
  "scope": "business",
  "token_type": "bearer"
}

Get Products

Once you have the access token, you can get a list of products available for your business available at the specified location.

curl -X GET -H 'Authorization: Bearer [TOKEN]' \
            -H "Content-Type: application/json" \
            'https://api.gett.com/v1/business/products?latitude=32.1086622&longitude=34.8379731&business_id=[BUSINESS_ID]'
{
  "products": [
    {
      "id": "ca1bcd35-c427-4fa0-be0a-54ca5e956276",
      "display_name": "Gett Express",
      "image_url": "http://static.gett.com/services/media/media_files/75/0000_Get-Express_Selection.png"
    },
    {
      "id": "93b83484-98c8-4b6b-8103-81a046bdd85a",
      "display_name": "Gett Mehadrin",
      "image_url": "http://static.gett.com/services/media/media_files/92/0004_Gett-Mehadrin_Selection.png"
    },
    {
      "id": "08d4801f-452d-49e7-9b96-944d7c2ca722",
      "display_name": "Gett Kids",
      "image_url": "http://static.gett.com/services/media/media_files/112/0003_Gett-Kids_Selection.png"
    },
    {
      "id": "b64ca6d1-d5e8-4054-8dd8-ab858db82091",
      "display_name": "Gett Premium",
      "image_url": "http://static.gett.com/services/media/media_files/101/0002_Gett-Premium_Selection.png"
    }
  ]
}

You also can get a price estimate by making a call to Get Price Estimate endpoint and get an estimated time of arrival (ETA) by making a call to Get ETA.

Request a Business Ride

Now that you have the product, rider, pickup and destination, you can request a ride by making a POST on behalf your business to the Ride Request endpoint.

curl -X POST -H "Authorization: Bearer [TOKEN]" \
             -H "Content-Type: application/json" \
             -d '{"product_id":"ca1bcd35-c427-4fa0-be0a-54ca5e956276","rider":{"name":"Shmulik","phone_number":"972501234567"},"pickup":{"latitude":32.1085478,"longitude":34.8361347,"address":"HaBarzel 19, Tel Aviv-Yafo"},"destination":{"latitude":32.1962005,"longitude":34.8928347,"address":"Nelkin 10, Kefar Sava"},"note_to_driver":"In a huge rush, need to get there asap"}' \
             'https://api.gett.com/v1/business/rides?business_id=[BUSINESS_ID]'
{
  "ride_id": "b9f86ebf-34eb-4479-9a3e-0665255d8691",
  "product_id": "42df886b-0874-40a9-a148-894e3295cda7",
  "status": "pending",
  "rider": {
    "name": "Shmulik",
    "phone_number": "972501234567"
  },
  "pickup": {
    "latitude": 32.1085478,
    "longitude": 34.8361347,
    "address": "HaBarzel 19, Tel Aviv-Yafo"
  },
  "destination": {
    "latitude": 32.1962005,
    "longitude": 34.8928347,
    "address": "Nelkin 10, Kefar Sava"
  },
  "note_to_driver": "In a huge rush, need to get there asap",
  "scheduled_at": "2016-07-20T20:02:00+00:00"
}

Get Ride Details

Once a ride has been requested, you can get the status of the ride along with information about the status, driver details and times for any given ride ID.

curl -X GET -H 'Authorization: Bearer [TOKEN]' \
            -H 'Content-Type: application/json' \
            'https://api.gett.com/v1/business/rides/[RIDE_ID]?business_id=[BUSINESS_ID]'
{
  "ride_id": "270359184",
  "product_id": "42df886b-0874-40a9-a148-894e3295cda7",
  "status": "confirmed",
  "rider": {
    "name": "Shmulik",
    "phone_number": "972501234567"
  },
  "driver": {
    "name": "Sergey",
    "phone_number": "972501255555",
    "image_url": "https://public-api.gett.com/static/images/user.png",
    "rating": 4.8,
    "vehicle": {
      "model": "Skoda Octavia",
      "color": "Black",
      "license_plate": "123-12-121"
    },
    "location": {
      "latitude": 32.1085478,
      "longitude": 34.8361347
    }
  },
  "pickup": {
    "latitude": 32.1085478,
    "longitude": 34.8361347,
    "address": "HaBarzel 19, Tel Aviv-Yafo"
  },
  "destination": {
    "latitude": 32.1962005,
    "longitude": 34.8928347,
    "address": "Nelkin 10, Kefar Sava"
  },
  "note_to_driver": "In a huge rush, need to get there asap",
  "requested_at": "2016-07-20T20:00:00+00:00",
  "scheduled_at": "2016-07-20T20:00:00+00:00",
  "will_arrive_at": "2016-07-20T20:04:00+00:00"
}

The ride status will update as the ride progresses from start to end according to Ride State. The current ride status is indicated in the status field returned by the Get Ride Details endpoint.

Gett Ride State Transition Diagram

Updated about a year ago

Overview


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.