Authorization

📘

Relationship

To use the "Gett business" API, you will need to have a commercial relationship with Gett as a client or integrator on behalf of a client(s).

Once the relationship is approved by Gett, you will be able to issue OAuth 2.0 credentials (Client ID, Client Secret) to authenticate with Gett. This data will be known by your client application and Business API server. The credentials are required to receive and refresh the authentication token.

To issue Client ID, Client Secret and get Business_id you need to visit Settings - Integrations setup in the web portal with an admin role. Ensure you're set as Contact in Settings.

3452

select integration setup

1882

generate credentials

1570

The Gett Business API:

  • Uses the OAuth 2.0 protocol for authentication and authorization.
  • Supports Client Password authentication method.
NameDescription
Client_idThe ID corresponds to the Business API client.
Client_secretSecret code required to get access token
ScopePermissions granted for the token to get access to endpoints.
Business_idAccount identifier obtained from Gett

Authorization request

Your client application should use your client credentials to request an access token from the Business API auth endpoint. Other endpoints require an access token to get or manipulate data.

--request POST 'https://business-api.gett.com/oauth/token'

Authorization request params:

NameDescription
client_idClient_id obtained from Gett
client_secretClient_secret obtained from Gett
grant_typeclient_credentials
scope- Values from scopes table.
- Can have multiple values delimited by space symbol.
- See the example below.

Scopes:

Scope valueEndpoints
orderCompany settings
Products
Price estimation
booking requests
Order details
Update Order
Cancel order

for both Ride and Delivery orders
company.reference Add reference code
finance Order receipt and Business Reports API
employeeEmployees management API

Authorization request example

Parameters:

curl -s 'https://business-api.gett.com/oauth/token' \
-F 'grant_type=client_credentials' /
-F 'client_id=my_client_from_gett' \
-F 'client_secret=my_secret_from_gett' \
-F 'scope=company.reference order'

Authorize response

{
  "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6InByaW1hcnkta2V5IiwidHlwIjoiSldUIn0.eyJhdWQiOltdLCJleHAiOjE2MTI3NzQ3ODU3VCBAr_jH73Nxd_1jv-VxRRFmLHan6qYOjxpXVswLxfKzGyBL__JbJ82IzycnDKCus5v3BbJuS-rMml13R-VYt8EzCdFD9JYjmpuyUQHxL7fl5MX5Ok_VbH9NZHOw0hCkCwwAjAfR2F2Wc2t1Mh5002RRGzE8d3KQ",
  "expires_in": 899, //seconds
  "scope": "company.reference order",
  "token_type": "bearer"
}

What’s Next