Skip to navigation

Create customer

View as Markdown

Scope: customers:write

  • first_name, last_name (required)
  • email and/or phone — at least one. Must not match another of your customers (422 names the field).
  • dob (YYYY-MM-DD), address_1, address_2, city, state, postal_code, country (optional)

Returns 201 with the customer. Fires customer.created.

Authentication

AuthorizationBearer

An API token from Settings → API tokens in Fleetwire, sent as Authorization: Bearer …. Each token carries scopes: read for every GET, plus write scopes such as bookings:write.

Request

This endpoint expects an object.
first_namestringRequired<=255 characters
last_namestringRequired<=255 characters
emailstring or nullOptionalformat: "email"<=255 characters

Required when there is no phone (on create).

phonestring or nullOptional10-20 characters

Required when there is no email (on create).

dobdate or nullOptional
Date of birth, before today.
address_1string or nullOptional<=255 characters
address_2string or nullOptional<=255 characters
citystring or nullOptional<=100 characters
statestring or nullOptional<=100 characters
postal_codestring or nullOptional<=20 characters
countrystring or nullOptional<=100 characters

Response

Created
idstringOptional
first_namestringOptional
last_namestringOptional
emailstringOptional
phonestringOptional
dobstringOptional
addressobjectOptional
sourcestringOptional
email_verified_atstringOptional
identity_verified_atstring or nullOptional
bookings_countintegerOptional
total_spent_in_centsintegerOptional
last_trip_endstring or nullOptional
created_atstringOptional
updated_atstringOptional

Errors

401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error
429
Too Many Requests Error