Skip to main content

Using Custom Fields

Once we've created Custom Fields, we can then utilize those custom fields to push or pull custom information in and out of Fleetio.

For example, let's say we have a Contact with the ID of 1234, and we want to give them a shirt_size of Medium, we could do this using cURL like so:

curl \
--request PATCH \
--header "Authorization: Token abcdefghijklmnopqrstuvwxyz" \
--header "Account-Token: 9876543210" \
--header "Content-Type: application/json" \
--data '{"custom_fields": { "shirt_size": "Medium"}}' \
"https://secure.fleetio.com/api/v1/contacts/1234"
Important

Spaces get converted into _, and all uppercase letters become lowercase. So Shirt Size as the Label in the UI will become shirt_size in API requests/responses.

Now, you can see this value in the Fleetio web UI for this user:

An updated Custom Field