LogoLogo
  • Overview
    • How to obtain an API key?
  • Webhooks
    • About Webhooks
    • Quickstart Guide
      • Set up your server
      • Creating a webhook
      • Configure your server
      • Review your webhooks
      • Secure webhooks
    • Webhook events
      • About events
      • Event List
    • Troubleshooting
  • REST API
    • Overview
      • Current Version
      • Authentication
      • Pagination
    • Quickstart Guide
      • Find the API key
      • Playground
    • API References
      • Rides
      • Search
      • Customers
      • Drivers
      • Webhooks
      • Auth
    • Errors
      • Error codes
    • Troubleshooting
Powered by GitBook
On this page

Was this helpful?

  1. REST API
  2. API References

Customers

PreviousSearchNextDrivers

Last updated 2 years ago

Was this helpful?

About the Customer API

The EverTransit Customer API allows you to create a new customer, list customers from a given email, and retrieve the details of a particular customer by its ID. To make your requests, you can use the endpoints and their methods listed below.

Endpoints

The Customer object

{
   "id": "5f886c22fe5dd800318f8092",
   "firstName": "John",
   "lastName": "Doe",
   "email": "john@example.com",
   "phoneNumber": "+19545556666",
   "createdTime": "2022-08-18T01:10:16.000Z",
}

Attributes

Name
Type
Description

firstName

string

The first name of the customer.

lastName

string

The last name of the customer.

email

string

The email of the customer.

id

string

A unique identifier for the customer.

phoneNumber

string

The phone number of the customer.

createdTime

string

The date and time the customer was created in ISO format.

hits

array

Information about the ride that matches the search criteria. For example, the ID, passengers, status, destination, service level, rider, driver, etc.

totalHits

number

The number of matching criteria from the search result.

Create a customer

List customers

Retrieve a customer

API playground for creating a customer
API playground for listing customers
API playground for retrieving a customer
Create a customer
List customers
Retrieve a customer

List customers.

get

Retrieves a list of customers that matches the criteria.

Authorizations
Query parameters
emailstring · emailOptional

Only customers with this email will be returned.

Example: john@test.com
limitinteger · int32 · min: 1Optional

The limit of items per page in the response.

Default: 20Example: 10
pageinteger · int32 · min: 1Optional

Specify the page to retrieve. You will need to use it if you want to retrieve specific pages.

Default: 1Example: 1
Responses
200
Results that match the criteria.
application/json
400
Bad request.
application/json
401
Unauthorized.
application/json
get
GET /v2beta/customers HTTP/1.1
Host: endpoints.evertransit.com
Accept: */*
{
  "hits": [
    {
      "id": "5f886c22fe5dd800318f809j",
      "email": "john@mail.com",
      "firstName": "John",
      "lastName": "Doe",
      "phoneNumber": "+123456789",
      "createdTime": "2022-08-16T22:06:24.024Z"
    }
  ],
  "totalHits": 1
}

Retrieve a customer.

get

Retrieve a customer by its ID.

Authorizations
Path parameters
customerIdstringRequired

A unique identifier for the customer.

Example: 507f191e810c19729de860jk
Responses
200
The customer was retrieved successfully.
application/json
401
Unauthorized.
application/json
404
Not found.
application/json
get
GET /v2beta/customers/{customerId} HTTP/1.1
Host: endpoints.evertransit.com
Accept: */*
{
  "id": "5f886c22fe5dd800318f809j",
  "email": "john@mail.com",
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "+123456789",
  "createdTime": "2022-08-16T22:06:24.024Z"
}
  • About the Customer API
  • The Customer object
  • Create a customer
  • POSTCreate a customer.
  • List customers
  • GETList customers.
  • Retrieve a customer
  • GETRetrieve a customer.

Create a customer.

post

Create a customer.

Authorizations
Body
emailstring · emailRequired

The email of the customer.

Example: jhon@mail.com
firstNamestringRequired

The first name of the customer.

Example: John
lastNamestringRequired

The last name of the customer.

Example: Doe
phoneNumberstringRequired

The phone number of the customer.

Example: +123456789
Responses
200
The customer was created successfully.
application/json
400
Bad request.
application/json
401
Unauthorized.
application/json
post
POST /v2beta/customers HTTP/1.1
Host: endpoints.evertransit.com
Content-Type: application/json
Accept: */*
Content-Length: 88

{
  "email": "jhon@mail.com",
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "+123456789"
}
{
  "id": "5f886c22fe5dd800318f809j",
  "email": "john@mail.com",
  "firstName": "John",
  "lastName": "Doe",
  "phoneNumber": "+123456789",
  "createdTime": "2022-08-16T22:06:24.024Z"
}