Create Contact
Creates a new contact
- application/json
Request Body
- first_name string required
Possible values:
<= 255 characters
The Contact's first name.
- last_name string
Possible values:
<= 255 characters
The Contact's last name.
- birth_date date
The Contact's birth date. We recommend using ISO-8601 formatted dates to avoid ambiguity.
- group_name string
Possible values:
<= 255 characters
The name of the
Group
this Contact belongs to. - group_hierarchy string
A pipe delimited string representing the
Group
hierarchy. EachGroup
in the list is the parent of theGroups
which follow. - middle_name string
Possible values:
<= 255 characters
The Contact's middle name.
- email string
Possible values:
<= 255 characters
The Contact's email address.
- mobile_phone_number string
Possible values:
<= 255 characters
The Contact's mobile phone number.
- home_phone_number string
Possible values:
<= 255 characters
The Contact's home phone number.
- work_phone_number string
Possible values:
<= 255 characters
The Contact's work phone number.
- other_phone_number string
Possible values:
<= 255 characters
Any other phone number for this Contact.
- street_address string
Possible values:
<= 255 characters
The Contact's street address.
- street_address_line_2 string
Possible values:
<= 255 characters
The Contact's street address line 2.
- city string
Possible values:
<= 255 characters
The Contact's city.
- region string
Possible values:
<= 255 characters
The Contact's region, state, or province.
- postal_code string
Possible values:
<= 255 characters
The Contact's postal code, zip code, or equivalent.
- country string
Possible values:
<= 255 characters
The Contact's country.
- employee_number string
Possible values:
<= 255 characters
*Must be unique
- job_title string
Possible values:
<= 255 characters
The Contact's job title.
- start_date date
When the Contact started working for the company, if applicable. We recommend using ISO-8601 formatted dates to avoid ambiguity.
- leave_date date
When the Contact left or will leave the company, if applicable. We recommend using ISO-8601 formatted dates to avoid ambiguity.
- vehicle_operator boolean
Whether or not the Contact is a Vehicle Operator.
- license_number string
Possible values:
<= 255 characters
The Contact's driver's license number.
- license_class string
Possible values:
<= 255 characters
The Contact's driver's license class.
- license_state string
Possible values:
<= 255 characters
The locality which issued the Contact's license.
- hourly_labor_rate float
The Contact's hourly labor rate.
- custom_fields object
*Full details on working with Custom Fields here.
- group_id integer required
Possible values:
>= 1
- license_expiration date-time
The Contact's driver's license expiration date. We recommend using ISO-8601 formatted dates to avoid ambiguity.
- employee boolean
Whether or not the Contact is an Employee.
- technician boolean
Whether or not the Contact is a Technician.
account_membership_attributes object
This set of attributes will update 'Regular User' only. Other
User
types cannot be modified this way. Each attribute can be updated individually, or up to all at once.role_name stringThe name of the
Role
to be assigned to the Contact. Must be an exact match of an existingRole
.vehicles_record_set_name stringThe name of the
Vehicles
record set the Contact has access to. Must be an exact match of an existing record set.contacts_record_set_name stringThe name of the
Contacts
record set the Contact has access to. Must be an exact match of an existing record set.equipments_record_set_name stringThe name of the
Equipment
record set the Contact has access to. Must be an exact match of an existing record set.inspection_forms_record_set_name stringThe name of the
Inspection Forms
record set the Contact has access to. Must be an exact match of an existing record set.parts_record_set_name stringThe name of the
Parts
record set the Contact has access to. Must be an exact match of an existing record set.images_attributes object[]
Please see Attaching Documents and Images for more information.
name stringPossible values:
<= 255 characters
file_url stringPossible values:
<= 255 characters
file_mime_type stringPossible values:
<= 255 characters
file_name stringPossible values:
<= 255 characters
file_size number
- 201
- 401
- 403
- 422
- 500
OK
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
- id integer
Possible values:
>= 1
- created_at date-time
The date and time at which this record was created.
- updated_at date-time
The date and time at which this record was most recently updated.
- archived_at date-time
The date and time at which this Contact was archived.
- email string
The Contact's email address.
- name string
The Contact's full name.
- first_name string
The Contact's first name.
- middle_name string
The Contact's middle name.
- last_name string
The Contact's last name.
- group_id integer
If this Contact belongs to a Group, this will be the Fleetio ID of that
Group
. - group_name string
If this Contact belongs to a Group, this will be the
Group
's name. - group_hierarchy string
If this Contact belongs to a Group, this will be a pipe delimited string representing the
Group
hierarchy. EachGroup
in the list is the parent of theGroups
which follow. - technician boolean
Whether or not the Contact is a Technician.
- vehicle_operator boolean
Whether or not the Contact is a Vehicle Operator.
- employee boolean
Whether or not the Contact is an Employee.
- birth_date date
The Contact's birth date.
- street_address string
The Contact's street address.
- street_address_line_2 string
The Contact's street address line 2.
- city string
The Contact's city.
- region string
The Contact's region, state, or province.
- postal_code string
The Contact's postal code, zip code, or equivalent.
- country string
The Contact's country.
- employee_number string
The Contact's employee number.
- job_title string
Possible values:
<= 255 characters
The Contact's job title.
- license_class string
The Contact's driver's license class.
- license_number string
The Contact's driver's license number.
- license_state string
The locality which issued the Contact's license.
- home_phone_number string
The Contact's home phone number.
- mobile_phone_number string
The Contact's mobile phone number.
- work_phone_number string
The Contact's work phone number.
- other_phone_number string
Any other phone number for this Contact.
- start_date date
When the Contact started working for the company, if applicable.
- leave_date date
When the Contact left or will leave the company, if applicable.
- hourly_labor_rate float
The Contact's hourly rate.
- custom_fields object
*Full details on working with Custom Fields here.
attachment_permissions object
read_photos booleanIndicates whether the user has read permission for photos.
manage_photos booleanIndicates whether the user has permission to manage (eg. upload, delete) photos.
read_documents booleanIndicates whether the user has read permission for documents.
manage_documents booleanIndicates whether the user has permission to manage (eg. upload, delete) documents.
- default_image_url string
The URL of the Contact's default image/profile photo, if any.
- user object
If the Contact is a Fleetio
User
, those details will be included here. - account_membership_id NullableId
Possible values:
>= 1
comments object[]
A list of the comments made on this record.
id integerPossible values:
>= 1
created_at date-timeThe date and time at which this record was created.
updated_at date-timeThe date and time at which this record was most recently updated.
commentable_type CommentableTypePossible values: [
Contact
,FleetcorCard
,FuelEntry
,InventoryJournalEntry
,Issue
,Part
,PurchaseOrder
,ServiceEntry
,ServiceReminder
,SubmittedInspectionItem
,Vehicle
,VehicleAssignment
,Vendor
,WexCard
,WorkOrder
]The type of record that the Comment will be left on. Must be associated with a matching
commentable_id
.commentable_id integerPossible values:
>= 1
user_id integerPossible values:
>= 1
title string deprecatedThe title of the Comment.
comment stringThe content of the Comment message body.
user_full_name stringThe full name of the
User
who created the Comment.user_image_url stringThe image url for the
User
who created the Comment.rich_content objecthtml_content stringThe comment message body rendered as HTML.
with_mentions booleanIndicates if the message body contains @mentions.
- comments_count integer
The number of comments made on this record.
documents object[]
A list of the documents attached to this record.
id integerPossible values:
>= 1
created_at date-timeThe date and time at which this record was created.
updated_at date-timeThe date and time at which this record was most recently updated.
documentable_id integerPossible values:
>= 1
documentable_type DocumentableTypePossible values: [
ServiceEntry
,FuelEntry
,Issue
,WorkOrder
,ExpenseEntry
]file_name stringThe name of the file.
file_mime_type stringThe MIME type of the file.
file_size numberThe size of the file in bytes.
file_url stringThe URL to access the file.
full_file_url stringThe full URL to access the file, including any necessary authentication or parameters.
- documents_count integer
The number of documents attached to this record.
images object[]
A list of the images attached to this record.
id integerPossible values:
>= 1
created_at date-timeThe date and time at which this record was created.
updated_at date-timeThe date and time at which this record was most recently updated.
imageable_id integerPossible values:
>= 1
imageable_type ImageableTypePossible values: [
ExpenseEntry
,WorkOrder
,Equipment
,IssueResolution
,ServiceEntry
,Vendor
,ServiceProgram
,Issue
,Contact
,Part
,Vehicle
,FuelEntry
,SubmittedInspectionItem
]file_name stringThe name of the image file.
file_mime_type Image MIME TypePossible values: [
image/jpeg
,image/gif
,image/jif
,image/jfif
,image/jfi
,image/tiff
,image/png
,image/jpg
,image/jpe
,image/pdf
,image/webp
,image/tif
,image/psd
,image/raw
,image/arw
,image/cr2
,image/nrw
,image/k25
,image/bmp
,image/dip
,image/ai
,image/eps
,image/heif
,image/heic
,image/ind
,image/indd
,image/indt
,image/jp2
,image/j2k
,image/jpf
,image/jpx
,image/jpm
,image/mj2
,image/x-png
]file_size numberThe size of the image file in bytes.
file_url stringThe URL to access the image file.
full_url stringThe full URL to access the image file, including any necessary authentication or parameters.
- images_count integer
The number of images attached to this record.
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"archived_at": "2023-03-14T13:46:27-06:00",
"email": "string",
"name": "string",
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"group_id": 0,
"group_name": "string",
"group_hierarchy": "Group 1|Group 2|Group 3",
"technician": true,
"vehicle_operator": true,
"employee": true,
"birth_date": "2023-03-14",
"street_address": "123 Main St",
"street_address_line_2": "Apt 1",
"city": "string",
"region": "string",
"postal_code": "string",
"country": "string",
"employee_number": "string",
"job_title": "string",
"license_class": "string",
"license_number": "string",
"license_state": "string",
"home_phone_number": "string",
"mobile_phone_number": "string",
"work_phone_number": "string",
"other_phone_number": "string",
"start_date": "2023-12-07",
"leave_date": "2023-12-07",
"hourly_labor_rate": 0,
"custom_fields": {},
"attachment_permissions": {
"read_photos": true,
"manage_photos": true,
"read_documents": true,
"manage_documents": true
},
"default_image_url": "string",
"user": {},
"account_membership_id": 0,
"comments": [
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"commentable_type": "Contact",
"commentable_id": 0,
"user_id": 0,
"comment": "string",
"user_full_name": "string",
"user_image_url": "string",
"rich_content": {},
"html_content": "string",
"with_mentions": true
}
],
"comments_count": 0,
"documents": [
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"documentable_id": 0,
"documentable_type": "ServiceEntry",
"file_name": "string",
"file_mime_type": "string",
"file_size": 0,
"file_url": "string",
"full_file_url": "string"
}
],
"documents_count": 0,
"images": [
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"imageable_id": 0,
"imageable_type": "ExpenseEntry",
"file_name": "string",
"file_mime_type": "image/jpeg",
"file_size": 0,
"file_url": "string",
"full_url": "string"
}
],
"images_count": 0
}
Request could not be authenticated
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}
Insufficient permission to perform this operation
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}
Unprocessable Entity
- application/json
- Schema
- Example (from schema)
- Example
Schema
errors object
typeitems string
{
"errors": {}
}
{
"errors": {
"field1": [
"error1",
"error2"
],
"field2": [
"error3"
]
}
}
Something unexpected happened
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}