API Reference

The Fleetbase API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

You can use the Fleetbase API in test mode, which does not affect your live data. The API key you use to authenticate the request determines whether the request is live mode or test mode.

Base URL
https://api.fleetbase.io

Authentication

The Fleetbase API uses API keys to authenticate requests. You can view and manage your API keys in the Fleetbase Console.

Test mode secret keys are indistinguishable from live mode secret keys so make sure to double check when using a secret key. For public keys, the test mode keys start with flb_test_ while production mode keys start with flb_live_.

Additionally API Keys can be created from the console with granular permissions over resources and endpoints.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Global API Key
Your API Key

A placeholder API key is included in all the examples here.

To test requests using your account, replace the sample API key with your actual API key or sign in.

Errors

Fleetbase uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a dispatch failed, etc.). Codes in the 5xx range indicate an error with Fleetbase's servers (these are rare).

Metadata

Some Fleetbase resource objects—including Order, Driver, Place, Entity, Vehicle, Vendor, and Contact—have a meta parameter. You can use this parameter to attach additional or internal key-value data to these Fleetbase objects.

Meta is useful for storing additional, structured information on an object. As an example, you could store additional information about a user such as a unique identifier from your system on a Fleetbase Contact object. Metadata is not used by Fleetbase-for example, not used in any internal processes and won't be seen by your users unless you choose to show it to them. The only exception that Fleetbase may use meta fields is if a console extensions makes use of specific order configurations.

Do not store any sensitive information (bank account numbers, card details, etc.) as metadata or in the description parameter.

Place

Place represents a location, places are typically addresses, but can also be objects or landmarks as long as the Place has coordinates.

The place object

Attributes
  • id string

    Unique identifier for the object.

  • name string

    Full name of the place resident, building name, or business name

  • street1 string

    First street line. Usually street number and street name

  • street2 string

    Second street line.

  • city string

    Name of the city.

  • province string

    Name of the province or state.

  • postal_code string

    Postal code or zip.

  • neighborhood string

    Name of the neighborhood.

  • district string

    Name of the district.

  • building string

    Name of the building.

  • security_access_code string

    Security access code, door code, or gate code for entry.

  • country ISO 2 country code

    Country code for the country. All accepted values can be found on the Official ISO Website.

  • location point

    Spatial point representing a coordinate pair.

  • phone string

    Places containing a phone number allow carriers to call the recipient when enroute. This increases the probability of delivery.

  • type string

    Type of place.

  • created_at datetime

    Date and time the place was created.

  • updated_at datetime

    Date and time the place was last updated.

Example Response

Create a place

When you create a place, you must specify a name and latitude and longitude coordinates.

Fleetbase will run a reverse geocode automatically on the provided coordinates to automatically complete the address when the optional fields are not provided.

Arguments
  • name required

    Full name of the place resident, building name, or business name

  • latitude required

    Latitude coordinate of the place.

  • longitude required

    Longitude coordinate of the place.

  • street1 optional

    First street line. Usually street number and street name

  • street2 optional

    Second street line.

  • city optional

    Name of the city.

  • province optional

    Name of the province or state.

  • postal_code optional

    Postal code or zip.

  • neighborhood optional

    Name of the neighborhood.

  • district optional

    Name of the district.

  • building optional

    Name of the building.

  • security_access_code optional

    Security access code, door code, or gate code for entry.

  • country optional

    Country code for the country. All accepted values can be found on the Official ISO Website.

  • phone_number optional

    Places containing a phone number allow carriers to call the recipient when enroute. This increases the probability of delivery.

  • phone_country_code optional

    The international calling code of the phone number.

  • type optional

    Type of place.

POST https://api.fleetbase.io/v1/places
Example Request
POST /v1/places
Example Response

Retrieve a place

This endpoint allows you to retrieve a place object to view it's details.

Arguments
  • id required

    The id of the place you want to retrieve.

GET https://api.fleetbase.io/v1/places/{id}
Example Request
POST /v1/places/{id}
Example Response

Update a place

If necessary, you are able to update a few properties of a place. You can update the name, building, security_access_code, phone_number, and phone_country_code.

You are only able to update fields which do not compromise or change the places geographical state.

Arguments
  • id required

    The id of the place you want to update.

  • name optional

    The name you want to update the place to.

  • building optional

    The building name you want to add, or update on the place.

  • security_access_code optional

    The security access code you want to add, or update on the place.

  • phone_number optional

    The phone number of the place you want to add, or update.

  • phone_country_code optional

    The country code of the phone number provided.

PUT https://api.fleetbase.io/v1/places/{id}
Example Request
PUT /v1/places/{id}
Example Response

Delete a place

Use this endpoint to delete a place, if a place has already been used in a payload then the place cannot be deleted.

Arguments
  • id required

    The id of the place you want to delete.

DELETE https://api.fleetbase.io/v1/places/{id}
Example Request
DELETE /v1/places/{id}
Example Response

List all places

This endpoint allows you to query placess you have created, it also provides paginated results on all the places in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • within optional

    Filter places within a radius of specified coordinates

    within[latitude] required

    The coordinate latitude

    within[longitude] required

    The coordinate longitude

    within[radius] optional

    Limits places within this many kilometers of the specified coordinates. Defaults to 5km.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Place object.

GET https://api.fleetbase.io/v1/places
Example Request
GET /v1/places
Example Response

Query places

Fleetbase provides a useful endpoint that allows you to query places around the world within a radius of provided coordinates.

When querying places using this endpoint, Fleetbase will only return the name, and latitude and longitude coordinates.

This can be useful for providing an autocomplete search field for users if necessary.

Arguments
  • query required

    The name of the address or place to be searched for.

  • ll required

    The latitude and longitude you want to query around. The latitude and longitude should be a comma seperated string (ex "latitude,longitude").

  • radius optional

    The search radius, which is the distance in meter's from the coordinates provided. If no radius is provided the radius will default to 5000 meters (or 5km).

GET https://api.fleetbase.io/v1/places/search
Example Request
GET /v1/places/search
Example Response

Service Areas

Service Area represents a location where your fleet operates, this is typically a city, but can also be a country or a region.

The service area object

Attributes
  • id string

    Unique identifier for the object.

  • name string

    Full name of the service area.

  • type string

    The type of service area, for example: city, country, region

  • latitude decimal

    The latitude coordinate for the center of the service area.

  • longitude decimal

    The longitude coordinate for the center of the service area.

  • status string

    The current status of the service area, can be "active" or "inactive"

  • created_at datetime

    Date and time the service area was created.

  • updated_at datetime

    Date and time the service area was last updated.

Example Response

Create a service area

A service area is created by simply providing a city, province or country in which Fleetbase will reverse geocode into a service area.

If the service area cannot be reverse geocoded, Fleetbase will return an error.

Arguments
  • name required

    The service area name, which would be a city, province, country, or region. (For example: Seattle, WA).

  • type optional

    The type of service area, this can be "city", "province", or "country".

  • status optional

    The status of the service area, which can be "active" or "inactive".

POST https://api.fleetbase.io/v1/service-areas
Example Request
POST /v1/service-areas
Example Response

Retrieve a service area

This endpoint allows you to retrieve a service area object to view it's details.

Arguments
  • id required

    The id of the service area you want to retrieve.

GET https://api.fleetbase.io/v1/service-areas/{id}
Example Request
GET /v1/service-areas/{id}
Example Response

Update a service area

You are only able to update the service area status.

Arguments
  • id required

    The id of the service_area you want to update.

  • status optional

    The status you want to update the service area to.

PUT https://api.fleetbase.io/v1/service-areas/{id}
Example Request
PUT /v1/service-areas/{id}
Example Response

Delete a service area

Use this endpoint to delete a service area, deleting a service area will also delete all of the zones within the service area.

Arguments
  • id required

    The id of the service area you want to delete.

DELETE https://api.fleetbase.io/v1/service-areas/{id}
Example Request
DELETE /v1/service-areas/{id}
Example Response

List all service areas

This endpoint allows you to query service areas you have created, it also provides paginated results on all the service areas in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • status optional

    Filter the service areas by their status.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the ServiceArea object.

GET https://api.fleetbase.io/v1/service-areas
Example Request
QUERY /v1/service-areas/{id}
Example Response

Zones

Zone represents a boundry within a Service Area to limit your fleet operataations to a specific area.

The Zone boundy can also be visually styled and represented to stand out in your service area views.

The zone object

Attributes
  • id string

    Unique identifier for the object.

  • service_area string

    The id of the service area the zone belongs to.

  • name string

    The name of the zone.

  • description string

    A description, usually describing the purpose of the zone.

  • coordinates array

    The boundary coordinates of the zone.

  • color string

    The color of the zone when being displayed on a map. This is typically a hexedecimal color code, but not limited to rgba, hexa, rgb, hsl, hsla, or hsv color codes.

  • stroke_color string

    The outline color of the zone when being displayed on the map. This is typically a hexedecimal color code, but not limited to rgba, hexa, rgb, hsl, hsla, or hsv color codes.

  • status string

    The operational status of the zone. This can be "active" or "inactive".

  • created_at datetime

    Date and time the zone was created.

  • updated_at datetime

    Date and time the zone was last updated.

Example Response

Create a zone

There is two primary ways to create a zone. The first method you can supply the boundary coordinates for the zone. The second method is you cann supply center coordinates and a radius in meters, and Fleetbase will automatically create a zone around the center coordinates.

Arguments
  • name required

    The name of the zone.

  • boundary required

    The boundary can either be an array of coordinates that make up the zone, or a key value array with three elements: "latitude", "longitude", and "radius". Supplying the key value array creates a zone with a radius in meters around the supplied latitude and longitude.

  • service_area required

    The ID of the service area the zone belongs to. The zone boundaries must be within the service area.

  • description optional

    A description, usually describing the purpose of the zone.

  • color optional

    The color of the zone when being displayed on a map. This is typically a hexedecimal color code, but not limited to rgba, hexa, rgb, hsl, hsla, or hsv color codes. If no color is supplied the color will default to black.

  • stroke_color optional

    The outline color of the zone when being displayed on the map. This is typically a hexedecimal color code, but not limited to rgba, hexa, rgb, hsl, hsla, or hsv color codes. If no stroke_color is supplied it will default to black.

  • status optional

    The operational status of the zone. This can be "active" or "inactive".

POST https://api.fleetbase.io/v1/zones
Example Request
POST /v1/zones
Example Response

Retrieve a zone

This endpoint allows you to retrieve a zone object to view it's details.

Arguments
  • id required

    The id of the zone you want to retrieve.

GET https://api.fleetbase.io/v1/zones/{id}
Example Request
GET /v1/zones
Example Response

Update a zone

You can update all properties of the Zone.

Arguments
  • id required

    The id of the zone you want to update.

  • name optional

    The name you want to update the zone to.

  • description optional

    The description you want to update the zone to.

  • boundary optional

    The new boundary you want to update the zone to. The boundary can either be an array of coordinates that make up the zone, or a key value array with three elements: "latitude", "longitude", and "radius". Supplying the key value array creates a zone with a radius in meters around the supplied latitude and longitude.

  • color optional

    The color of the zone you want to update. This is typically a hexedecimal color code, but not limited to rgba, hexa, rgb, hsl, hsla, or hsv color codes.

  • stroke_color optional

    The outline color of the zone you want to update to. This is typically a hexedecimal color code, but not limited to rgba, hexa, rgb, hsl, hsla, or hsv color codes.

  • status optional

    The status you want to update the zone to.

PUT https://api.fleetbase.io/v1/zones/{id}
Example Request
PUT /v1/zones
Example Response

Delete a zone

Use this endpoint to delete a zone.

Arguments
  • id required

    The id of the zone you want to delete.

DELETE https://api.fleetbase.io/v1/zones/{id}
Example Request
DELETE /v1/zones
Example Response

List all zones

This endpoint allows you to query zones you have created, it also provides paginated results on all the zones in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • status optional

    Filter the zones by their status.

  • service_area optional

    Only return zones for the service area specified by the service area id.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Zone object.

GET https://api.fleetbase.io/v1/zones
Example Request
GET /v1/zones
Example Response

Contact

Contact objects allow you to manage your business connections. The API allows you to create, delete, and update your contacts programatically. You can retrieve individual contacts as well as a list of all your contacts.

Contacts can be categorized by the type property where you can specify whether they are customers, technicians, business assosciates, or whatever contact necessaary for your business.

Contact objects can also be attached to Payload objects as a passenger using the Entity object.

Contact objects can also be assigned to Order objects.

The contact object

Attributes
  • id string

    Unique identifier for the object.

  • name string

    The full name of the contact.

  • title string

    The title or salutation of the contact. For example: Chief Technology Officer, Mr, Mrs

  • email string

    The email of the contact.

  • phone_number string

    The phone number of the contact.

  • phone_country_code string

    The international calling code of the phone number of the contact.

  • type string

    The type of contact, for example: "customer", "assosciate".

  • slug string

    The URL safe identifier for the contact generated based on the contact name.

  • created_at datetime

    Date and time the contact was created.

  • updated_at datetime

    Date and time the contact was last updated.

Example Response

Create a contact

Arguments
  • name required

    The name of the contact.

  • type required

    The type of contact, for example: "customer", "assosciate", "technician"

  • title optional

    The title or salutation of the contact. For example: Cheif Technology Officer, Mr

  • email optional

    The email of the contact.

  • phone_number optional

    The phone number of the contact.

  • phone_country_code optional

    The international calling code of the phone number of the contact.

POST https://api.fleetbase.io/v1/contacts
Example Request
POST /v1/contacts
Example Response

Retrieve a contact

This endpoint allows you to retrieve a contact object to view it's details.

Arguments
  • id required

    The id of the contact you want to retrieve.

GET https://api.fleetbase.io/v1/contacts/{id}
Example Request
GET /v1/contacts
Example Response

Update a contact

You can update all properties of the Contact.

Arguments
  • id required

    The id of the contact you want to update.

  • name optional

    The name you want to update the contact to.

  • title optional

    The title or salutation you want to update the contact to. For example: Cheif Technology Officer, Mr

  • email optional

    The email to be updated on the contact.

  • phone_number optional

    The phone number to be updated on the contact.

  • phone_country_code optional

    The international calling code to update on the contact.

  • type optional

    The type of contact to update to, for example: "customer", "assosciate".

PUT https://api.fleetbase.io/v1/contacts/{id}
Example Request
PUT /v1/contacts
Example Response

Delete a contact

Use this endpoint to delete a contact.

Arguments
  • id required

    The id of the contact you want to delete.

DELETE https://api.fleetbase.io/v1/contacts/{id}
Example Request
DELETE /v1/contacts
Example Response

List all contacts

This endpoint allows you to query contacts you have created, it also provides paginated results on all the contacts in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • type optional

    Filter contacts by their type.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Contact object.

GET https://api.fleetbase.io/v1/contacts
Example Request
GET /v1/contacts
Example Response

Driver

Driver objects represent members of your fleet that operate vehicles and handle orders. Drivers are special users that can use the Fleetbase Navigator app to handle orders assigned to them.

The driver object

Attributes
  • id string

    Unique identifier for the object.

  • email string

    The drivers email address.

  • phone_number string

    The drivers phone number.

  • phone_country_code string

    The international calling code of the phone number of the driver.

  • drivers_license_number string

    The drivers operating license number, or gooverment issued identification number.

  • signup_token_used string

    The id of the DriverToken object specified when the driver registered.

  • current_job string

    The id of the Order the driver is currently handling.

  • vehicle string

    The id of the Vehicle the driver is currently assigned to.

  • latitude decimal

    The current real-time latitude coordinate of the driver.

  • longitude decimal

    The current real-time longitude coordinate of the driver.

  • heading decimal

    The heading attribute denotes the direction of travel of the driver and is specified in degrees, where 0° ≤ heading < 360°, counting clockwise relative to the true north.

  • altitude decimal

    The altitude attribute denotes the height position of the driver, specified in meters above the [WGS84] ellipsoid.

  • speed decimal

    The speed denotes the magnitude of the horizontal component of the driver's current velocity and is specified in meters per second.

  • city string

    The current city the driver is operating in.

  • country ISO 2 country code

    The country the driver is currently operating in.

  • currency string

    The 3-letter ISO code currency that the driver uses, this is generally used for driver's with electronic balances for "cash on delivery" jobs.

  • online boolean

    A boolean value that denotess whether the driver is operating and able to accept jobs or not.

  • status string

    The status of the driver's account, either "active" or "inactive".

  • created_at datetime

    Date and time the driver was created.

  • updated_at datetime

    Date and time the driver was last updated.

Example Response

Create a driver

Arguments
  • name required

    The name of the driver.

  • email required

    The email of the driver.

  • password required

    The password the driver will use for authenticating Fleetbase Navigator.

  • phone_number required

    The drivers phone number, this can also be used to authenticating Fleetbase Navigator.

  • phone_country_code required

    The country code of the drivers phone number.

  • country required

    The 2 letter country code of the country the driver is operating in. Example: 'US' or 'DE'. All accepted values can be found on the Official ISO Website. Sending a country is always required.

  • city optional

    The city the driver is operating in.

  • vehicle optional

    An Vehicle object id that you want to assign to the driver.

  • status optional

    The drivers standing status. Can either be "active" or "inactive". Defaults to "active".

POST https://api.fleetbase.io/v1/drivers
Example Request
POST /v1/drivers
Example Response

Retrieve a driver

This endpoint allows you to retrieve a driver object to view it's details.

Arguments
  • id required

    The id of the driver you want to retrieve.

GET https://api.fleetbase.io/v1/drivers/{id}
Example Request
GET /v1/drivers
Example Response

Update a driver

You can update all properties of the Driver.

Arguments
  • id required

    The id of the driver you want to update.

  • name optional

    The name you want to update for the driver.

  • email optional

    The email to update for the driver.

  • password optional

    The password to update for the driver

  • phone_number optional

    The drivers phone number to update for the driver

  • phone_country_code optional

    The country code of the driver to update for the driver.

  • country optional

    The 2 letter country code of the country to update for the driver.

  • city optional

    The city to update for the driver

  • vehicle optional

    An Vehicle object id that you want to assign to the driver.

  • status optional

    The drivers standing status. Can either be "active" or "inactive". Defaults to "active".

PUT https://api.fleetbase.io/v1/drivers/{id}
Example Request
PUT /v1/drivers
Example Response

Delete a driver

Use this endpoint to delete a driver.

Arguments
  • id required

    The id of the driver you want to delete.

DELETE https://api.fleetbase.io/v1/drivers/{id}
Example Request
DELETE /v1/drivers
Example Response

List all drivers

This endpoint allows you to query drivers you have created, it also provides paginated results on all the drivers in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • status optional

    Filter the drivers by their status.

  • within optional

    Filter drivers within a radius of specified coordinates

    within[latitude] required

    The coordinate latitude

    within[longitude] required

    The coordinate longitude

    within[radius] optional

    Limits to drivers within this many kilometers of the specified coordinates. Defaults to 5km.

  • country optional

    Filter the drivers by their 2 letter ISO-2 country code.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Driver object.

GET https://api.fleetbase.io/v1/drivers
Example Request
GET /v1/drivers
Example Response

Fleet

Fleet objects represent members of your fleet's that operate vehicles and handle orders.

Fleet's act as groups for your drivers. Fleet's can be assigned to specific service area's. You may also dispatch orders to specific fleets.

The fleet object

Attributes
  • id string

    Unique identifier for the object.

  • service_area string

    The id of the ServiceArea object the fleet is assigned to.

  • name string

    The name of the fleet.

  • task string

    The task or description of the fleet's mission.

  • status string

    The status of the fleet's account, either "active" or "inactive".

  • created_at datetime

    Date and time the fleet was created.

  • updated_at datetime

    Date and time the fleet was last updated.

Example Response

Create a fleet

Arguments
  • name required

    The name of the fleet.

  • service_area optional

    The id of the ServiceArea you want to assign to the fleet.

  • task optional

    Specification of the fleet's misssion.

  • status optional

    The status of the fleet. Valid opetions: "active", "inactive", "disabled"

POST https://api.fleetbase.io/v1/fleets
Example Request
POST /v1/fleets
Example Response

Retrieve a fleet

This endpoint allows you to retrieve a fleet object to view it's details.

Arguments
  • id required

    The id of the fleet you want to retrieve.

GET https://api.fleetbase.io/v1/fleets/{id}
Example Request
GET /v1/fleets
Example Response

Update a fleet

You can update all properties of the Fleet.

Arguments
  • id required

    The id of the fleet you want to update.

  • name optional

    The name of the fleet.

  • service_area optional

    The id of the ServiceArea you want to assign to the fleet.

  • task optional

    Specification of the fleet's misssion.

  • status optional

    The status of the fleet. Valid opetions: "active", "inactive", "disabled"

PUT https://api.fleetbase.io/v1/fleets/{id}
Example Request
PUT /v1/fleets
Example Response

Delete a fleet

Use this endpoint to delete a fleet.

Arguments
  • id required

    The id of the fleet you want to delete.

DELETE https://api.fleetbase.io/v1/fleets/{id}
Example Request
DELETE /v1/fleets
Example Response

List all fleets

This endpoint allows you to query fleets you have created, it also provides paginated results on all the fleets in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • status optional

    Filter the fleets by their status.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Fleet object.

GET https://api.fleetbase.io/v1/fleets
Example Request
GET /v1/fleets
Example Response

Vehicle

Vehicle objects are vehicles that can be assigned to drivers.

The vehicle object

Attributes
  • id string

    Unique identifier for the object.

  • driver string

    The id of the Driver assigned to the vehicle.

  • name string

    The name of the vehicle, typically composed of the year, make and model.

  • make string

    The make of the vehicle.

  • model string

    The model of the vehicle.

  • year string

    The year the vehicle was manufactured.

  • trim string

    The trim of the vehicle.

  • type string

    The type of vehicle.

  • plate_number string

    The plate number of the vehicle.

  • vin string

    The VIN (Vehicle Identification Number) of the vehicle.

  • vin_data json

    The VIN data returned from the VIN decoding.

  • photo_url string

    The URL to the photo of the vehicle.

  • model_data json

    Information about the vehicle model provided by Fleetbase.

  • status string

    The status of the vehicle. valid options: "operational", "maintenance" or "decommissioned".

  • created_at datetime

    Date and time the vehicle was created.

  • updated_at datetime

    Date and time the vehicle was last updated.

Example Response

Create a vehicle

In order to create a vehicle you must provide the VIN number, Fleetbase will automatically decode the VIN and pull the information on the vehicle.

Arguments
  • vin required

    The VIN (Vehicle Identification Number) of the vehicle.

  • driver optional

    The id of the Driver to be assigned to the vehicle.

  • year optional

    The year the vehicle was produced.

  • make optional

    The vehicle make.

  • model optional

    The vehicle model.

  • trim optional

    The trim of the vehicle.

  • plate_number optional

    The vehicle's plate number.

  • status optional

    The status of the vehicle. valid options: "operational", "maintenance" or "decommissioned". By default the status will be set to "operational".

POST https://api.fleetbase.io/v1/vehicles
Example Request
POST /v1/vehicles
Example Response

Retrieve a vehicle

This endpoint allows you to retrieve a vehicle object to view it's details.

Arguments
  • id required

    The id of the vehicle you want to retrieve.

GET https://api.fleetbase.io/v1/vehicles/{id}
Example Request
GET /v1/vehicles
Example Response

Update a vehicle

You can update the driver assigned, plate number, and status of the Vehicle.

Vehicle's can only be assigned to one driver at a time, if a vehicle is re-assigned to another driver then the last driver will no longer be assigned to the vehicle.

Arguments
  • id required

    The id of the vehicle you want to update.

  • driver optional

    The id of the Driver to be assigned to the vehicle.

  • plate_number optional

    The vehicle's plate number.

  • status optional

    The status of the vehicle. valid options: "operational", "maintenance" or "decommissioned". By default the status will be set to "operational".

PUT https://api.fleetbase.io/v1/vehicles/{id}
Example Request
PUT /v1/vehicles
Example Response

Delete a vehicle

Use this endpoint to delete a vehicle.

Arguments
  • id required

    The id of the vehicle you want to delete.

DELETE https://api.fleetbase.io/v1/vehicles/{id}
Example Request
DELETE /v1/vehicles
Example Response

List all vehicles

This endpoint allows you to query vehicles you have created, it also provides paginated results on all the vehicles in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • status optional

    Filter the vehicles by their status.

  • type optional

    Filter vehicles by their type.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Vehicle object.

GET https://api.fleetbase.io/v1/vehicles
Example Request
GET /v1/vehicles
Example Response

Payload

Payload objects represent a payload to be attached to an order.

Payload consist of all the information for an order. The pickup point, dropoff point, as well as the entities of a payload, and additional information necessary for an order.

The payload object

Attributes
  • id string

    Unique identifier for the object.

  • pickup string

    The id of the Place object where the payload should be picked up.

  • dropoff string

    The id of the Place object where the payload should be dropped off.

  • return string

    The id of the Place object where the payload should be returned to if the drop off cannot be completed.

  • customer string

    The id of the Vendor or Contact object the payload is for.

  • meta hash

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • cod_amount integer

    The cash on delivery amount that should be collected when the payload is dropped off.

  • cod_currency string

    The 3-letter ISO code currency of the cash on delivery amount.

  • cod_payment_method string

    The cash on delivery payment method, defaults to cash, but not limited to card, check, or bank_transfer upon delivery.

  • type string

    The type of payload. This is typically aligned with the service type such as "passenger", "parcel", or "task".

  • created_at datetime

    Date and time the payload was created.

  • updated_at datetime

    Date and time the payload was last updated.

Example Response

Create a payload

Arguments
  • pickup required

    The id of the Place object where the payload should be picked up.

  • dropoff required

    The id of the Place object where the payload should be dropped off.

  • type required

    The type of payload. This is typically aligned with the service type such as "passenger", "parcel", or "task".

    This should match the service rate type if payload must be delivered through PurchaseRate creation.

  • return optional

    The id of the Place object where the payload should be returned to if the drop off cannot be completed.

  • customer optional

    The id of the Vendor or Contact object the payload is for.

  • meta optional

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • cod_amount optional

    The cash on delivery amount that should be collected when the payload is dropped off.

  • cod_currency optional

    The 3-letter ISO code currency of the cash on delivery amount. Required if "cod_amount" is set.

  • cod_payment_method optional

    The cash on delivery payment method, defaults to cash. Can either be cash, card, check, or bank_transfer

POST https://api.fleetbase.io/v1/payloads
Example Request
POST /v1/payloads
Example Response

Retrieve a payload

This endpoint allows you to retrieve a payload object to view it's details.

Arguments
  • id required

    The id of the payload you want to retrieve.

GET https://api.fleetbase.io/v1/payloads/{id}
Example Request
GET /v1/payloads
Example Response

Update a payload

You can update all properties of the Payload.

Arguments
  • id required

    The id of the payload you want to update.

  • pickup optional

    The id of the Place object where the payload should be picked up.

  • dropoff optional

    The id of the Place object where the payload should be dropped off.

  • type optional

    The type of payload. This is typically aligned with the service type such as "passenger", "parcel", or "task".

  • return optional

    The id of the Place object where the payload should be returned to if the drop off cannot be completed.

  • customer optional

    The id of the Vendor or Contact object the payload is for.

  • meta optional

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • cod_amount optional

    The cash on delivery amount that should be collected when the payload is dropped off.

  • cod_currency optional

    The 3-letter ISO code currency of the cash on delivery amount. Required if "cod_amount" is set.

  • cod_payment_method optional

    The cash on delivery payment method, defaults to cash. Can either be cash, card, check, or bank_transfer

PUT https://api.fleetbase.io/v1/payloads/{id}
Example Request
PUT /v1/payloads
Example Response

Delete a payload

Use this endpoint to delete a payload.

Arguments
  • id required

    The id of the payload you want to delete.

DELETE https://api.fleetbase.io/v1/payloads/{id}
Example Request
DELETE /v1/payloads
Example Response

List all payloads

This endpoint allows you to query payloads you have created, it also provides paginated results on all the payloads in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • status optional

    Filter the payloads by their status.

  • type optional

    Filter payloads by their type.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Payload object.

GET https://api.fleetbase.io/v1/payloads
Example Request
GET /v1/payloads
Example Response

Entity

Entity objects represent an item or task to be carried out. Entities are attached to Payload objects.

The entity object

Attributes
  • id string

    Unique identifier for the object.

  • payload string

    The id of Payload object the entity is attached to.

  • tracking_number string

    The id of the TrackingNumber assigned to this entity. This object also contains the unique QR Code and Barcode for the entity.

  • customer string

    The id of the Vendor or Contact object the enntity belongs to or represents.

  • internal_id string

    The internal unique identifier for the entity.

  • name string

    The name of the entity.

  • type string

    The type of entity.

  • description string

    Additional information and details on the entity.

  • meta hash

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • weight integer

    The weight of the entity.

  • weight_unit string

    The unit of measurement of the weight. The weight unit can either be g, oz, lb, kg.

  • length integer

    The length of the entity.

  • width integer

    The wifth of the entity.

  • height integer

    The height of the entity.

  • dimensions_unit string

    The unit of measurement to use for the entity dimensions. The dimensions unit can either be cm, in, ft, mm, m, yd.

  • declared_value integer

    The value of the entity defined by the sender.

  • price integer

    The price of the entity if applicable.

  • sale_price string

    The sale price of the entity if applicable.

  • sku string

    The SKU of the entity if applicable.

  • currency string

    The 3-letter ISO code currency that the entity uses for it's declared_value, price, or sale_price.

  • created_at datetime

    Date and time the entity was created.

  • updated_at datetime

    Date and time the entity was last updated.

Example Response

Create a entity

Arguments
  • name required

    The name of the entity.

  • type required

    The type of entity. The type can be anything to accomadate all types of operations. Standard entity types used in most operations would be parcel, passenger, fcl, or food.

  • payload string

    The id of Payload object the entity should be attached to.

  • customer optional

    The id of the Vendor or Contact object you want to assign to the entity.

  • internal_id optional

    The internal unique identifier for the entity.

  • description optional

    Additional information and details on the entity.

  • meta optional

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • weight optional

    The weight of the entity.

  • weight_unit optional

    The unit of measurement of the weight. The weight unit can either be g, oz, lb, kg.

    This property will be required if the weight is set.

  • length optional

    The length of the entity.

  • width optional

    The wifth of the entity.

  • height optional

    The height of the entity.

  • dimensions_unit optional

    The unit of measurement to use for the entity dimensions. The dimensions unit can either be cm, in, ft, mm, m, yd.

    This property will be required if any of the dimensions (length, width, height) is set.

  • declared_value optional

    The value of the entity defined by the sender.

  • price optional

    The price of the entity if applicable.

  • sale_price optional

    The sale price of the entity if applicable.

  • sku optional

    The SKU of the entity if applicable.

  • currency optional

    The 3-letter ISO code currency that the entity uses for it's declared_value, price, or sale_price.

    This property will be required if declared_value, price, or sale_price is set.

POST https://api.fleetbase.io/v1/entities
Example Request
POST /v1/entities
Example Response

Retrieve a entity

This endpoint allows you to retrieve a entity object to view it's details.

Arguments
  • id required

    The id of the entity you want to retrieve.

GET https://api.fleetbase.io/v1/entities/{id}
Example Request
GET /v1/entities
Example Response

Update a entity

You can update all properties of the Entity.

Arguments
  • id required

    The id of the entity you want to update.

  • name optional

    The name of the entity.

  • type optional

    The type of entity. The type can be anything to accomadate all types of operations. Standard entity types used in most operations would be parcel, passenger, fcl, or food.

  • payload string

    The id of Payload object the entity should be attached to.

  • customer optional

    The id of the Vendor or Contact object you want to assign to the entity.

  • internal_id optional

    The internal unique identifier for the entity.

  • description optional

    Additional information and details on the entity.

  • meta optional

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • weight optional

    The weight of the entity.

  • weight_unit optional

    The unit of measurement of the weight. The weight unit can either be g, oz, lb, kg.

    This property will be required if the weight is set.

  • length optional

    The length of the entity.

  • width optional

    The wifth of the entity.

  • height optional

    The height of the entity.

  • dimensions_unit optional

    The unit of measurement to use for the entity dimensions. The dimensions unit can either be cm, in, ft, mm, m, yd.

    This property will be required if any of the dimensions (length, width, height) is set.

  • declared_value optional

    The value of the entity defined by the sender.

  • price optional

    The price of the entity if applicable.

  • sale_price optional

    The sale price of the entity if applicable.

  • sku optional

    The SKU of the entity if applicable.

  • currency optional

    The 3-letter ISO code currency that the entity uses for it's declared_value, price, or sale_price.

    This property will be required if declared_value, price, or sale_price is set.

PUT https://api.fleetbase.io/v1/entities/{id}
Example Request
PUT /v1/entities
Example Response

Delete a entity

Use this endpoint to delete a entity.

Arguments
  • id required

    The id of the entity you want to delete.

DELETE https://api.fleetbase.io/v1/entities/{id}
Example Request
DELETE /v1/entities
Example Response

List all entities

This endpoint allows you to query entities you have created, it also provides paginated results on all the entities in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • type optional

    Filter entities by their type.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Entity object.

GET https://api.fleetbase.io/v1/entities
Example Request
GET /v1/entities
Example Response

Service Rate

ServiceRate are objects that represent how Fleetbase should calculate quotes for fleet services.

Service rate's are highly dynamic to fit all different types of services a fleet can provide.

The service rate object

Attributes
  • id string

    Unique identifier for the object.

  • service_area string

    The id of the ServiceArea object that this rate is limited to.

  • zone string

    The id of the Zone object that this rate is limited to (within the service area).

  • service_name string

    The name of the service the rate is for. Example: "Parcel Delivery"

  • service_type string

    The type of service this rate is for.
    Default possible options:

    • parcel - Parcel delivery
    • passenger - Passenger pickup and dropoff
    • task - Any type of task
    • food - Food delivery
    • shop - Shop or grocery pickup and dropoff

  • base_fee optional

    The base fee is a base or minimum fee included to the start of the rate calculation.

  • rate_calculation_method string

    The calculation method the Service Rate should use to calculate the rate total. Valid rate calculation methods:

    • per_km - this calculation method uses a fixed flat fee which is multiplied by the distance in kilometer.
    • fixed_meter - this calculation method uses a specific flat rate defined for each distance in meters.
    • algo - this method relies on an algorithm defined based on distance and time.

  • per_km_flat_rate_fee integer

    When the rate_calculation_method is set to per_km, the flat rate to be charged on a per kilometer basis.

  • meter_fees array

    If the rate_calculation_method is set to fixed_meter, the Service Rate will return with an array of line item fee's with specific rare amount for each meter distance.

  • algorithm string

    When the rate_calculation_method is set to algo, the algorithm must be supplied an mathematical algorithm which can be defined and used to calculate your rate using the variables {distance} and {time}.

  • has_cod_fee boolean

    Explicitly set property that determines if the rate should calculate a cash on delivery fee. Should be either "true" or "false".

  • cod_calculation_method string

    The calculation method used for cash on delivery, if has_cod_fee is set to true. Valid cash on delivery calculation methods:

    • percentage - An additional line fee to the rate based on a percentage calculated from the rate total.
    • flat - An additional flat fee for "cod" calculated into the rate total.

  • cod_flat_fee integer

    The flat cash on delivery fee amount for when the cod_calculation_method is set to "flat".

  • cod_percent integer

    The percentage to calculate from the service rate total for the cash on delivery fee, used when cod_calculation_method is set to "percentage".

  • has_peak_hours_fee boolean

    Explicitly set property that determines if the rate should calculate a peak hours fee. Should be either "true" or "false".

  • peak_hours_calculation_method string

    The calculation method used for peak hours, if has_peak_hours_fee is set to true. Valid peak hours calculation methods:

    • percentage - An additional line fee to the rate based on a percentage calculated from the rate total.
    • flat - An additional flat fee for "peak hours" calculated into the rate total.

  • peak_hours_flat_fee integer

    The flat peak hours fee amount for when the peak_hours_calculation_method is set to "flat".

  • peak_hours_percent integer

    The percentage to calculate from the service rate total for the peak hours fee, used when peak_hours_calculation_method is set to "percentage".

  • peak_hours_start string

    The 24 hour time format (HH:mm) for when peak hours start for the rate. Ex: "16:30".

  • peak_hours_end integer

    The 24 hour time format (HH:mm) for when peak hours end for the rate. Ex: "18:30"

  • currency string

    The 3-letter ISO code currency the rate will use for calculations.

  • duration_terms string

    Additional terms or notices about the service rate.

  • estimated_days integer

    The estimated number of days the service takes to complete, for same-day this will be 0.

  • created_at datetime

    Date and time the service-rate was created.

  • updated_at datetime

    Date and time the service-rate was last updated.

Example Response

Create a service rate

Arguments
  • service_name required

    The name of the service rate to be created.

  • service_type required

    The type of service the rate being created is for. Default possible options:

    • parcel - Parcel delivery
    • passenger - Passenger pickup and dropoff
    • task - Any type of task
    • food - Food delivery
    • shop - Shop or grocery pickup and dropoff

  • rate_calculation_method required

    The calculation method the Service Rate should use to calculate the rate total. Valid rate calculation methods:

    • per_km - this calculation method uses a fixed flat fee which is multiplied by the distance in kilometer.
    • fixed_meter - this calculation method uses a specific flat rate defined for each distance in meters.
    • algo - this method relies on an algorithm defined based on distance and time.

  • currency required

    The 3-letter ISO code currency the rate will use for calculations.

  • base_fee optional

    Property that allows the rate to include a base or minimum fee to the start of the calculation. The value should be in cents, for example if the flat fee is $2.00 USD per kilometer, then the value should be "200".

  • per_km_flat_rate_fee optional

    This property is required when the rate_calculation_method is set to "per_km".
    The flat rate should be the amount in cents, for example if the flat fee is $2.00 USD per kilometer, then the value should be "200".
    The same is true no matter the currency, for example if the flat fee is 1300 MNT (Mongolian Tugrik), then the value will be "1300".

  • meter_fees optional

    This property is required when the rate_calculation_method is set to "fixed_meter".
    Supply a key value array consisting of the distance, and fee for the corresponding distance. Distances must increment in linear order. Toggle example

  • algorithm optional

    When the rate_calculation_method is set to algo, the algorithm must be supplied an mathematical algorithm which can be defined and used to calculate your rate using the variables {distance} and {time}.

    • {distance} - is the distance between the pickup and dropoff in meters.
    • {time} - is the estimated time between the pickup and dropoff in seconds.

    Example
    (({distance}/1000)*55)+(({time}/60)*33)

  • has_cod_fee boolean

    Explicitly set property that determines if the rate should calculate a cash on delivery fee. Should be either "true" or "false". Defaults to false.

  • cod_calculation_method string

    The calculation method used for cash on delivery, required if has_cod_fee is set to true. Valid cash on delivery calculation methods:

    • percentage - An additional line fee to the rate based on a percentage calculated from the rate total.
    • flat - An additional flat fee for "cod" calculated into the rate total.

  • cod_flat_fee integer

    The flat cash on delivery fee amount, required when the cod_calculation_method is set to "flat".

  • cod_percent integer

    The percentage to calculate from the service rate total for the cash on delivery fee, required when cod_calculation_method is set to "percentage".

  • has_peak_hours_fee boolean

    Explicitly set property that determines if the rate should calculate a peak hours fee. Should be either "true" or "false". Defaults to false.

  • peak_hours_calculation_method string

    The calculation method used for peak hours, required when has_peak_hours_fee is set to true. Valid peak hours calculation methods:

    • percentage - An additional line fee to the rate based on a percentage calculated from the rate total.
    • flat - An additional flat fee for "peak hours" calculated into the rate total.

  • peak_hours_flat_fee integer

    The flat peak hours fee amount, required when the peak_hours_calculation_method is set to "flat".

  • peak_hours_percent integer

    The percentage to calculate from the service rate total for the peak hours fee, required when peak_hours_calculation_method is set to "percentage".

  • peak_hours_start string

    The 24 hour time format (HH:mm), required for peak hours. Ex: "16:30".

  • peak_hours_end integer

    The 24 hour time format (HH:mm), required for peak hours. Ex: "18:30"

  • duration_terms string

    Additional terms or notices about the service rate.

  • estimated_days integer

    The estimated number of days the service takes to complete, for same-day this will be 0. This will default to 0, if nothing is set.

POST https://api.fleetbase.io/v1/service-rates
Example Request
POST /v1/service-rates
Example Response

Retrieve a service rate

This endpoint allows you to retrieve a service-rate object to view it's details.

Arguments
  • id required

    The id of the service-rate you want to retrieve.

GET https://api.fleetbase.io/v1/service-rates/{id}
Example Request
GET /v1/service-rates
Example Response

Update a service rate

You can update your service rate, with the exception you cannot change the service_type or change the method of how the rate is calculated.

Arguments
  • id required

    The id of the service rate you want to update.

  • service_name optional

    The name of the service rate to be created.

  • base_fee optional

    Property that allows the rate to include a base or minimum fee to the start of the calculation. The value should be in cents, for example if the flat fee is $2.00 USD per kilometer, then the value should be "200".

  • per_km_flat_rate_fee optional

    This property is required when the rate_calculation_method is set to "by_km".
    The flat rate should be the amount in cents, for example if the flat fee is $2.00 USD per kilometer, then the value should be "200".
    The same is true no matter the currency, for example if the flat fee is 1300 MNT (Mongolian Tugrik), then the value will be "1300".

  • km_fees optional

    This property is required when the rate_calculation_method is set to "by_km".
    Supply a key value array consisting of the distance, and fee for the corresponding distance. Distances must increment in linear order. Toggle example

  • algorithm optional

    When the rate_calculation_method is set to algo, the algorithm must be supplied an mathematical algorithm which can be defined and used to calculate your rate using the variables {distance} and {time}.

    • {distance} - is the distance between the pickup and dropoff in meters.
    • {time} - is the estimated time between the pickup and dropoff in seconds.

    Example
    (({distance}/1000)*55)+(({time}/60)*33)

  • has_cod_fee boolean

    Explicitly set property that determines if the rate should calculate a cash on delivery fee. Should be either "true" or "false". Defaults to false.

  • cod_calculation_method string

    The calculation method used for cash on delivery, required if has_cod_fee is set to true. Valid cash on delivery calculation methods:

    • percentage - An additional line fee to the rate based on a percentage calculated from the rate total.
    • flat - An additional flat fee for "cod" calculated into the rate total.

  • cod_flat_fee integer

    The flat cash on delivery fee amount, required when the cod_calculation_method is set to "flat".

  • cod_percent integer

    The percentage to calculate from the service rate total for the cash on delivery fee, required when cod_calculation_method is set to "percentage".

  • has_peak_hours_fee boolean

    Explicitly set property that determines if the rate should calculate a peak hours fee. Should be either "true" or "false". Defaults to false.

  • peak_hours_calculation_method string

    The calculation method used for peak hours, required when has_peak_hours_fee is set to true. Valid peak hours calculation methods:

    • percentage - An additional line fee to the rate based on a percentage calculated from the rate total.
    • flat - An additional flat fee for "peak hours" calculated into the rate total.

  • peak_hours_flat_fee integer

    The flat peak hours fee amount, required when the peak_hours_calculation_method is set to "flat".

  • peak_hours_percent integer

    The percentage to calculate from the service rate total for the peak hours fee, required when peak_hours_calculation_method is set to "percentage".

  • peak_hours_start string

    The 24 hour time format (HH:mm), required for peak hours. Ex: "16:30".

  • peak_hours_end integer

    The 24 hour time format (HH:mm), required for peak hours. Ex: "18:30"

  • duration_terms string

    Additional terms or notices about the service rate.

  • estimated_days integer

    The estimated number of days the service takes to complete, for same-day this will be 0. This will default to 0, if nothing is set.

PUT https://api.fleetbase.io/v1/service-rates/{id}
Example Request
PUT /v1/service-rates
Example Response

Delete a service rate

Use this endpoint to delete a service-rate.

Arguments
  • id required

    The id of the service-rate you want to delete.

DELETE https://api.fleetbase.io/v1/service-rates/{id}
Example Request
DELETE /v1/service-rates
Example Response

List all service rates

This endpoint allows you to query service-rates you have created, it also provides paginated results on all the service rates in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by name.

  • service_type optional

    Filter service rates by type.

  • currency optional

    Filter service rates by currency.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Service Rate object.

GET https://api.fleetbase.io/v1/service-rates
Example Request
GET /v1/service-rates
Example Response

Service Quote

ServiceQuote are objects that represent calculated ServiceRate objects based on the payload or pickup or dropoff points.

The service quote object

Attributes
  • id string

    Unique identifier for the object.

  • service_rate string

    The id of the ServiceRate object the quotation is for.

  • request_id string

    The unique identifier for the request used to get quote.

  • amount integer

    The amount of the service quote calculated using the service rate.

  • currency string

    The ISO-3 currency the rate amount is in.

  • created_at datetime

    Date and time the service-rate was created.

  • updated_at datetime

    Date and time the service-rate was last updated.

Example Response

Retrieve service quotes

This endpoint is used to get the ServiceRate quotes based on pickup point location and drop off point location, or payload.

For some quotes such as parcel based, the payload must be included for calculation of the payload cost.

Arguments
  • payload optional

    The id of a Payload object, the payload type should match the service_type of the rates being retrieved.

    When the payload is supplied the other parameters are not required.

  • service_type optional

    The service_type to calculate the rates for. This required field is defined in all ServiceRate objects.

    Required when payload is not supplied.

  • pickup optional

    The pickup location for the order. The pickup can either be the id of a Place object, or latitude and longitude coordinates.

    Acceptable coordinate formats can either be comma seperated latitude and longitude.
    Example latitude,longitude

    Coordinates can also be supplied in an array format.
    Example pickup[latitude]=latitude
    pickup[longitude]=longitude

    Required when payload is not supplied.

  • dropoff optional

    The dropoff location for the order. The dropoff can either be the id of a Place object, or latitude and longitude coordinates.

    Acceptable coordinate formats can either be comma seperated latitude and longitude.
    Example latitude,longitude

    Coordinates can also be supplied in an array format.
    Example pickup[latitude]=latitude
    pickup[longitude]=longitude

    Required when payload is not supplied.

GET https://api.fleetbase.io/v1/service-quotes
Example Request
GET /v1/service-quotes
Example Response

Purchase Rate

PurchaseRate objects represents a purchased rate using a ServiceQuote.

The purchase rate object

Attributes
  • id string

    Unique identifier for the object.

  • customer string

    The id of the customer the purchase was for, this can either be a Contact, or a Vendor

  • service_quote string

    The id of the ServiceQuote object the rate was used to purchase.

  • order string

    The id of the Order object created for the purchase.

  • created_at datetime

    Date and time the purchase rate was created.

  • updated_at datetime

    Date and time the purchase rate was last updated.

Example Response

Create a purchase rate

Only ServiceQuote objects genneratedd using a Payload object may be used to create PurchaseRate objects.

Arguments
  • service_quote required

    The id of the ServiceQuote to be purchased.

  • customer optional

    Optionally purchase the service for a customer which can either be a Contact or Vendor.

POST https://api.fleetbase.io/v1/purchase-rates
Example Request
POST /v1/purchase-rates
Example Response

Retrieve a purchase rate

This endpoint allows you to retrieve a purchase-rate object to view it's details.

Arguments
  • id required

    The id of the purchase-rate you want to retrieve.

GET https://api.fleetbase.io/v1/purchase-rates/{id}
Example Request
GET /v1/purchase-rates
Example Response

List all purchase rates

This endpoint allows you to query purchase-rates you have created, it also provides paginated results on all the purchase-rates in your Fleetbase.

Arguments
  • customer optional

    The id of the customer the rate was purchased for.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Purchase Rate object.

GET https://api.fleetbase.io/v1/purchase-rates
Example Request
GET /v1/purchase-rates
Example Response

Order

Orders can be assigned to drivers, or can be assigned to 3rd party facilitators to be completed.

The order object

Attributes
  • id string

    Unique identifier for the object.

  • customer string

    The id of the Contact or Vendor object that represents the customer if applicable.

  • facilitator string

    The id of the Contact or Vendor object that represents the facilitator assigned if the order is to be handled by a 3rd party.

  • driver string

    The id of the Driver assigned to complete the order.

  • tracking_number string

    The id of the TrackingNumber object for the order.

  • purchase_rate string

    The id of the PurchaseRate object used to create the order, if applicable.

  • payload string

    The id of the Payload object for the order.

  • meta hash

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • notes string

    Text of notes to be attached to the order.

  • type string

    The type of order.

  • status string

    The status of the order.

  • scheduled_at dateime

    Date and time for when the order is scheduled for, if scheduled in the future.

  • created_at datetime

    Date and time the order was created.

  • updated_at datetime

    Date and time the order was last updated.

Example Response

Create a order

Arguments
  • payload required

    The id of the Payload object to be sent by the order.

  • dispatch optional

    Boolean value that should determine whether or not the order should be dispatched on creation or not. By default dispatch is true.

  • scheduled_at optional

    The date and time the order should optionally be dispatched at, otherwise upon order creation the order will be dispatched unless dispatch is explicitly set to false.

  • driver optional

    The id of the Driver to be assigned to the order, if no driver is set the dispatch will send a "ping" to all drivers within an expanding radius around the pickup point coordinates.

  • facilitator optional

    The id of the Vendor or Contact object assigned to facilitate the completion of the order. This is for orders that will be assigned to third parties.

  • customer optional

    The id of the Vendor or Contact object the payload is for.

  • meta optional

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • notes optional

    Text containing additional information for the order, which can be used to assist the driver or facilitator.

POST https://api.fleetbase.io/v1/orders
Example Request
POST /v1/orders
Example Response

Retrieve a order

This endpoint allows you to retrieve a order object to view it's details.

Arguments
  • id required

    The id of the order you want to retrieve.

GET https://api.fleetbase.io/v1/orders/{id}
Example Request
POST /v1/orders
Example Response

Update a order

You can update all properties of the Order.

Arguments
  • id required

    The id of the order you want to update.

  • name optional

    The name you want to update the order to.

  • title optional

    The title or salutation you want to update the order to. For example: Cheif Technology Officer, Mr

  • email optional

    The email to be updated on the order.

  • phone_number optional

    The phone number to be updated on the order.

  • phone_country_code optional

    The international calling code to update on the order.

  • type optional

    The type of order to update to, for example: "customer", "assosciate".

PUT https://api.fleetbase.io/v1/orders/{id}
Example Request
POST /v1/orders
Example Response

Dispatch an order

Use this endpoint to dispatch a order.

Arguments
  • id required

    The id of the order you want to dispatch.

POST https://api.fleetbase.io/v1/orders/dispatch/{id}
Example Request
POST /v1/orders
Example Response

Cancel an order

Use this endpoint to delete a order.

Arguments
  • id required

    The id of the order you want to delete.

DELETE https://api.fleetbase.io/v1/orders/{id}
Example Request
DELETE /v1/orders
Example Response

List all orders

This endpoint allows you to query orders you have created, it also provides paginated results on all the orders in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • status optional

    Filter the orders by their status.

  • type optional

    Filter orders by their type.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Order object.

GET https://api.fleetbase.io/v1/orders
Example Request
GET /v1/orders
Example Response

Tracking Number

Tracking Number objects represent members of your fleet's that operate vehicles and handle orders.

The tracking-number object

Attributes
  • id string

    Unique identifier for the object.

  • tracking-numbers_license_number string

    The tracking-numbers operating license number, or gooverment issued identification number.

  • signup_token_used string

    The id of the Tracking Number Token object specified when the tracking-number registered.

  • latitude decimal

    The current real-time latitude coordinate of the tracking-number.

  • longitude decimal

    The current real-time longitude coordinate of the tracking-number.

  • heading decimal

    The heading attribute denotes the direction of travel of the tracking-number and is specified in degrees, where 0° ≤ heading < 360°, counting clockwise relative to the true north.

  • altitude decimal

    The altitude attribute denotes the height position of the tracking-number, specified in meters above the [WGS84] ellipsoid.

  • speed decimal

    The speed denotes the magnitude of the horizontal component of the tracking-number's current velocity and is specified in meters per second.

  • city string

    The current city the tracking-number is operating in.

  • country string

    The country the tracking-number is currently operating in.

  • currency string

    The 3-letter ISO code currency that the tracking-number uses, this is generally used for tracking-number's with electronic balances for "cash on delivery" jobs.

  • online boolean

    A boolean value that denotess whether the tracking-number is operating and able to accept jobs or not.

  • status string

    The status of the tracking-number's account, either "active" or "inactive".

  • created_at datetime

    Date and time the tracking-number was created.

  • updated_at datetime

    Date and time the tracking-number was last updated.

Example Response

Create a tracking-number

Arguments
  • name required

    The name of the tracking-number.

  • title optional

    The title or salutation of the tracking-number. For example: Cheif Technology Officer, Mr

  • email optional

    The email of the tracking-number.

  • phone_number optional

    The phone number of the tracking-number.

  • phone_country_code optional

    The international calling code of the phone number of the tracking-number.

  • type optional

    The type of tracking-number, for example: "customer", "assosciate"

POST https://api.fleetbase.io/v1/tracking-numbers
Example Request
POST /v1/tracking-numbers
Example Response

Retrieve a tracking-number

This endpoint allows you to retrieve a tracking-number object to view it's details.

Arguments
  • id required

    The id of the tracking-number you want to retrieve.

GET https://api.fleetbase.io/v1/tracking-numbers/{id}
Example Request
GET /v1/tracking-numbers/{id}
Example Response

Update a tracking-number

You can update all properties of the Tracking Number.

Arguments
  • id required

    The id of the tracking-number you want to update.

  • name optional

    The name you want to update the tracking-number to.

  • title optional

    The title or salutation you want to update the tracking-number to. For example: Cheif Technology Officer, Mr

  • email optional

    The email to be updated on the tracking-number.

  • phone_number optional

    The phone number to be updated on the tracking-number.

  • phone_country_code optional

    The international calling code to update on the tracking-number.

  • type optional

    The type of tracking-number to update to, for example: "customer", "assosciate".

PUT https://api.fleetbase.io/v1/tracking-numbers/{id}
Example Request
PUT /v1/tracking-numbers/{id}
Example Response

Delete a tracking-number

Use this endpoint to delete a tracking-number.

Arguments
  • id required

    The id of the tracking-number you want to delete.

DELETE https://api.fleetbase.io/v1/tracking-numbers/{id}
Example Request
DELETE /v1/tracking-numbers/{id}
Example Response

List all tracking-numbers

This endpoint allows you to query tracking-numbers you have created, it also provides paginated results on all the tracking-numbers in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • status optional

    Filter the tracking-numbers by their status.

  • type optional

    Filter tracking-numbers by their type.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Tracking Number object.

GET https://api.fleetbase.io/v1/tracking-numbers
Example Request
GET /v1/tracking-numbers
Example Response

Tracking Status

Tracking Status objects represent members of your fleet's that operate vehicles and handle orders.

The tracking-status object

Attributes
  • id string

    Unique identifier for the object.

  • tracking-statuss_license_status string

    The tracking-statuss operating license status, or gooverment issued identification status.

  • signup_token_used string

    The id of the Tracking Status Token object specified when the tracking-status registered.

  • latitude decimal

    The current real-time latitude coordinate of the tracking-status.

  • longitude decimal

    The current real-time longitude coordinate of the tracking-status.

  • heading decimal

    The heading attribute denotes the direction of travel of the tracking-status and is specified in degrees, where 0° ≤ heading < 360°, counting clockwise relative to the true north.

  • altitude decimal

    The altitude attribute denotes the height position of the tracking-status, specified in meters above the [WGS84] ellipsoid.

  • speed decimal

    The speed denotes the magnitude of the horizontal component of the tracking-status's current velocity and is specified in meters per second.

  • city string

    The current city the tracking-status is operating in.

  • country string

    The country the tracking-status is currently operating in.

  • currency string

    The 3-letter ISO code currency that the tracking-status uses, this is generally used for tracking-status's with electronic balances for "cash on delivery" jobs.

  • online boolean

    A boolean value that denotess whether the tracking-status is operating and able to accept jobs or not.

  • status string

    The status of the tracking-status's account, either "active" or "inactive".

  • created_at datetime

    Date and time the tracking-status was created.

  • updated_at datetime

    Date and time the tracking-status was last updated.

Example Response

Create a tracking-status

Arguments
  • name required

    The name of the tracking-status.

  • title optional

    The title or salutation of the tracking-status. For example: Cheif Technology Officer, Mr

  • email optional

    The email of the tracking-status.

  • phone_status optional

    The phone status of the tracking-status.

  • phone_country_code optional

    The international calling code of the phone status of the tracking-status.

  • type optional

    The type of tracking-status, for example: "customer", "assosciate"

POST https://api.fleetbase.io/v1/tracking-status
Example Request
POST /v1/tracking-statuses
Example Response

Retrieve a tracking-status

This endpoint allows you to retrieve a tracking-status object to view it's details.

Arguments
  • id required

    The id of the tracking-status you want to retrieve.

GET https://api.fleetbase.io/v1/tracking-statuss/{id}
Example Request
GET /v1/tracking-statuses
Example Response

Update a tracking-status

You can update all properties of the Tracking Status.

Arguments
  • id required

    The id of the tracking-status you want to update.

  • name optional

    The name you want to update the tracking-status to.

  • title optional

    The title or salutation you want to update the tracking-status to. For example: Cheif Technology Officer, Mr

  • email optional

    The email to be updated on the tracking-status.

  • phone_status optional

    The phone status to be updated on the tracking-status.

  • phone_country_code optional

    The international calling code to update on the tracking-status.

  • type optional

    The type of tracking-status to update to, for example: "customer", "assosciate".

PUT https://api.fleetbase.io/v1/tracking-statuss/{id}
Example Request
PUT /v1/tracking-statuses
Example Response

Delete a tracking-status

Use this endpoint to delete a tracking-status.

Arguments
  • id required

    The id of the tracking-status you want to delete.

DELETE https://api.fleetbase.io/v1/tracking-statuss/{id}
Example Request
DELETE /v1/tracking-statuses
Example Response

List all tracking-statuss

This endpoint allows you to query tracking-statuss you have created, it also provides paginated results on all the tracking-statuss in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • status optional

    Filter the tracking-statuss by their status.

  • type optional

    Filter tracking-statuss by their type.

  • limit optional

    A cursor for use in pagination. A limit on the status of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Tracking Status object.

GET https://api.fleetbase.io/v1/tracking-statuss
Example Request
GET /v1/tracking-statuses
Example Response

Cart

Cart represents a session or customers current cart state.

The cart object

Attributes
  • id string

    Unique identifier for the object.

  • name string

    Full name of the place resident, building name, or business name

  • street1 string

    First street line. Usually street number and street name

  • street2 string

    Second street line.

  • city string

    Name of the city.

  • province string

    Name of the province or state.

  • postal_code string

    Postal code or zip.

  • neighborhood string

    Name of the neighborhood.

  • district string

    Name of the district.

  • building string

    Name of the building.

  • security_access_code string

    Security access code, door code, or gate code for entry.

  • country ISO 2 country code

    Country code for the country. All accepted values can be found on the Official ISO Website.

  • location point

    Spatial point representing a coordinate pair.

  • phone string

    Places containing a phone number allow carriers to call the recipient when enroute. This increases the probability of delivery.

  • type string

    Type of place.

  • created_at datetime

    Date and time the place was created.

  • updated_at datetime

    Date and time the place was last updated.

Example Response

Retrieve

This endpoint allows you to query placess you have created, it also provides paginated results on all the places in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • within optional

    Filter places within a radius of specified coordinates

    within[latitude] required

    The coordinate latitude

    within[longitude] required

    The coordinate longitude

    within[radius] optional

    Limits places within this many kilometers of the specified coordinates. Defaults to 5km.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Place object.

GET https://api.fleetbase.io/v1/places
Example Request
GET /v1/places
Example Response

Add item to cart

When you create a place, you must specify a name and latitude and longitude coordinates.

Fleetbase will run a reverse geocode automatically on the provided coordinates to automatically complete the address when the optional fields are not provided.

Arguments
  • name required

    Full name of the place resident, building name, or business name

  • latitude required

    Latitude coordinate of the place.

  • longitude required

    Longitude coordinate of the place.

  • street1 optional

    First street line. Usually street number and street name

  • street2 optional

    Second street line.

  • city optional

    Name of the city.

  • province optional

    Name of the province or state.

  • postal_code optional

    Postal code or zip.

  • neighborhood optional

    Name of the neighborhood.

  • district optional

    Name of the district.

  • building optional

    Name of the building.

  • security_access_code optional

    Security access code, door code, or gate code for entry.

  • country optional

    Country code for the country. All accepted values can be found on the Official ISO Website.

  • phone_number optional

    Places containing a phone number allow carriers to call the recipient when enroute. This increases the probability of delivery.

  • phone_country_code optional

    The international calling code of the phone number.

  • type optional

    Type of place.

POST https://api.fleetbase.io/v1/places
Example Request
POST /v1/places
Example Response

Update item in cart

This endpoint allows you to retrieve a place object to view it's details.

Arguments
  • id required

    The id of the place you want to retrieve.

GET https://api.fleetbase.io/v1/places/{id}
Example Request
POST /v1/places/{id}
Example Response

Remove item from cart

If necessary, you are able to update a few properties of a place. You can update the name, building, security_access_code, phone_number, and phone_country_code.

You are only able to update fields which do not compromise or change the places geographical state.

Arguments
  • id required

    The id of the place you want to update.

  • name optional

    The name you want to update the place to.

  • building optional

    The building name you want to add, or update on the place.

  • security_access_code optional

    The security access code you want to add, or update on the place.

  • phone_number optional

    The phone number of the place you want to add, or update.

  • phone_country_code optional

    The country code of the phone number provided.

PUT https://api.fleetbase.io/v1/places/{id}
Example Request
PUT /v1/places/{id}
Example Response

Empty cart

Use this endpoint to delete a place, if a place has already been used in a payload then the place cannot be deleted.

Arguments
  • id required

    The id of the place you want to delete.

DELETE https://api.fleetbase.io/v1/places/{id}
Example Request
DELETE /v1/places/{id}
Example Response

Product

Product represents a location, places are typically addresses, but can also be objects or landmarks as long as the Product has coordinates.

The product object

Attributes
  • id string

    Unique identifier for the object.

  • name string

    Full name of the product resident, building name, or business name

  • street1 string

    First street line. Usually street number and street name

  • street2 string

    Second street line.

  • city string

    Name of the city.

  • province string

    Name of the province or state.

  • postal_code string

    Postal code or zip.

  • neighborhood string

    Name of the neighborhood.

  • district string

    Name of the district.

  • building string

    Name of the building.

  • security_access_code string

    Security access code, door code, or gate code for entry.

  • country ISO 2 country code

    Country code for the country. All accepted values can be found on the Official ISO Website.

  • location point

    Spatial point representing a coordinate pair.

  • phone string

    Places containing a phone number allow carriers to call the recipient when enroute. This increases the probability of delivery.

  • type string

    Type of product.

  • created_at datetime

    Date and time the product was created.

  • updated_at datetime

    Date and time the product was last updated.

Example Response

Create a product

When you create a product, you must specify a name and latitude and longitude coordinates.

Fleetbase will run a reverse geocode automatically on the provided coordinates to automatically complete the address when the optional fields are not provided.

Arguments
  • name required

    Full name of the product resident, building name, or business name

  • latitude required

    Latitude coordinate of the product.

  • longitude required

    Longitude coordinate of the product.

  • street1 optional

    First street line. Usually street number and street name

  • street2 optional

    Second street line.

  • city optional

    Name of the city.

  • province optional

    Name of the province or state.

  • postal_code optional

    Postal code or zip.

  • neighborhood optional

    Name of the neighborhood.

  • district optional

    Name of the district.

  • building optional

    Name of the building.

  • security_access_code optional

    Security access code, door code, or gate code for entry.

  • country optional

    Country code for the country. All accepted values can be found on the Official ISO Website.

  • phone_number optional

    Places containing a phone number allow carriers to call the recipient when enroute. This increases the probability of delivery.

  • phone_country_code optional

    The international calling code of the phone number.

  • type optional

    Type of product.

POST https://api.fleetbase.io/v1/places
Example Request
POST /v1/places
Example Response

Retrieve a product

This endpoint allows you to retrieve a product object to view it's details.

Arguments
  • id required

    The id of the product you want to retrieve.

GET https://api.fleetbase.io/v1/places/{id}
Example Request
POST /v1/places/{id}
Example Response

Update a product

If necessary, you are able to update a few properties of a product. You can update the name, building, security_access_code, phone_number, and phone_country_code.

You are only able to update fields which do not compromise or change the places geographical state.

Arguments
  • id required

    The id of the product you want to update.

  • name optional

    The name you want to update the product to.

  • building optional

    The building name you want to add, or update on the product.

  • security_access_code optional

    The security access code you want to add, or update on the product.

  • phone_number optional

    The phone number of the product you want to add, or update.

  • phone_country_code optional

    The country code of the phone number provided.

PUT https://api.fleetbase.io/v1/places/{id}
Example Request
PUT /v1/places/{id}
Example Response

Delete a product

Use this endpoint to delete a product, if a product has already been used in a payload then the product cannot be deleted.

Arguments
  • id required

    The id of the product you want to delete.

DELETE https://api.fleetbase.io/v1/places/{id}
Example Request
DELETE /v1/places/{id}
Example Response

List all places

This endpoint allows you to query placess you have created, it also provides paginated results on all the places in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • within optional

    Filter places within a radius of specified coordinates

    within[latitude] required

    The coordinate latitude

    within[longitude] required

    The coordinate longitude

    within[radius] optional

    Limits places within this many kilometers of the specified coordinates. Defaults to 5km.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Product object.

GET https://api.fleetbase.io/v1/places
Example Request
GET /v1/places
Example Response

Query places

Fleetbase provides a useful endpoint that allows you to query places around the world within a radius of provided coordinates.

When querying places using this endpoint, Fleetbase will only return the name, and latitude and longitude coordinates.

This can be useful for providing an autocomplete search field for users if necessary.

Arguments
  • query required

    The name of the address or product to be searched for.

  • ll required

    The latitude and longitude you want to query around. The latitude and longitude should be a comma seperated string (ex "latitude,longitude").

  • radius optional

    The search radius, which is the distance in meter's from the coordinates provided. If no radius is provided the radius will default to 5000 meters (or 5km).

GET https://api.fleetbase.io/v1/places/search
Example Request
GET /v1/places/search
Example Response

Category

Category represents a location, places are typically addresses, but can also be objects or landmarks as long as the Category has coordinates.

The category object

Attributes
  • id string

    Unique identifier for the object.

  • name string

    Full name of the category resident, building name, or business name

  • street1 string

    First street line. Usually street number and street name

  • street2 string

    Second street line.

  • city string

    Name of the city.

  • province string

    Name of the province or state.

  • postal_code string

    Postal code or zip.

  • neighborhood string

    Name of the neighborhood.

  • district string

    Name of the district.

  • building string

    Name of the building.

  • security_access_code string

    Security access code, door code, or gate code for entry.

  • country ISO 2 country code

    Country code for the country. All accepted values can be found on the Official ISO Website.

  • location point

    Spatial point representing a coordinate pair.

  • phone string

    Places containing a phone number allow carriers to call the recipient when enroute. This increases the probability of delivery.

  • type string

    Type of category.

  • created_at datetime

    Date and time the category was created.

  • updated_at datetime

    Date and time the category was last updated.

Example Response

Create a category

When you create a category, you must specify a name and latitude and longitude coordinates.

Fleetbase will run a reverse geocode automatically on the provided coordinates to automatically complete the address when the optional fields are not provided.

Arguments
  • name required

    Full name of the category resident, building name, or business name

  • latitude required

    Latitude coordinate of the category.

  • longitude required

    Longitude coordinate of the category.

  • street1 optional

    First street line. Usually street number and street name

  • street2 optional

    Second street line.

  • city optional

    Name of the city.

  • province optional

    Name of the province or state.

  • postal_code optional

    Postal code or zip.

  • neighborhood optional

    Name of the neighborhood.

  • district optional

    Name of the district.

  • building optional

    Name of the building.

  • security_access_code optional

    Security access code, door code, or gate code for entry.

  • country optional

    Country code for the country. All accepted values can be found on the Official ISO Website.

  • phone_number optional

    Places containing a phone number allow carriers to call the recipient when enroute. This increases the probability of delivery.

  • phone_country_code optional

    The international calling code of the phone number.

  • type optional

    Type of category.

POST https://api.fleetbase.io/v1/places
Example Request
POST /v1/places
Example Response

Retrieve a category

This endpoint allows you to retrieve a category object to view it's details.

Arguments
  • id required

    The id of the category you want to retrieve.

GET https://api.fleetbase.io/v1/places/{id}
Example Request
POST /v1/places/{id}
Example Response

Update a category

If necessary, you are able to update a few properties of a category. You can update the name, building, security_access_code, phone_number, and phone_country_code.

You are only able to update fields which do not compromise or change the places geographical state.

Arguments
  • id required

    The id of the category you want to update.

  • name optional

    The name you want to update the category to.

  • building optional

    The building name you want to add, or update on the category.

  • security_access_code optional

    The security access code you want to add, or update on the category.

  • phone_number optional

    The phone number of the category you want to add, or update.

  • phone_country_code optional

    The country code of the phone number provided.

PUT https://api.fleetbase.io/v1/places/{id}
Example Request
PUT /v1/places/{id}
Example Response

Delete a category

Use this endpoint to delete a category, if a category has already been used in a payload then the category cannot be deleted.

Arguments
  • id required

    The id of the category you want to delete.

DELETE https://api.fleetbase.io/v1/places/{id}
Example Request
DELETE /v1/places/{id}
Example Response

List all places

This endpoint allows you to query placess you have created, it also provides paginated results on all the places in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • within optional

    Filter places within a radius of specified coordinates

    within[latitude] required

    The coordinate latitude

    within[longitude] required

    The coordinate longitude

    within[radius] optional

    Limits places within this many kilometers of the specified coordinates. Defaults to 5km.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Category object.

GET https://api.fleetbase.io/v1/places
Example Request
GET /v1/places
Example Response

Store

Store represents a location, stores are typically addresses, but can also be objects or landmarks as long as the Store has coordinates.

The store object

Attributes
  • id string

    Unique identifier for the object.

  • name string

    Full name of the store resident, building name, or business name

  • street1 string

    First street line. Usually street number and street name

  • street2 string

    Second street line.

  • city string

    Name of the city.

  • province string

    Name of the province or state.

  • postal_code string

    Postal code or zip.

  • neighborhood string

    Name of the neighborhood.

  • district string

    Name of the district.

  • building string

    Name of the building.

  • security_access_code string

    Security access code, door code, or gate code for entry.

  • country ISO 2 country code

    Country code for the country. All accepted values can be found on the Official ISO Website.

  • location point

    Spatial point representing a coordinate pair.

  • phone string

    Places containing a phone number allow carriers to call the recipient when enroute. This increases the probability of delivery.

  • type string

    Type of store.

  • created_at datetime

    Date and time the store was created.

  • updated_at datetime

    Date and time the store was last updated.

Example Response

Create a store

When you create a store, you must specify a name and latitude and longitude coordinates.

Fleetbase will run a reverse geocode automatically on the provided coordinates to automatically complete the address when the optional fields are not provided.

Arguments
  • name required

    Full name of the store resident, building name, or business name

  • latitude required

    Latitude coordinate of the store.

  • longitude required

    Longitude coordinate of the store.

  • street1 optional

    First street line. Usually street number and street name

  • street2 optional

    Second street line.

  • city optional

    Name of the city.

  • province optional

    Name of the province or state.

  • postal_code optional

    Postal code or zip.

  • neighborhood optional

    Name of the neighborhood.

  • district optional

    Name of the district.

  • building optional

    Name of the building.

  • security_access_code optional

    Security access code, door code, or gate code for entry.

  • country optional

    Country code for the country. All accepted values can be found on the Official ISO Website.

  • phone_number optional

    Places containing a phone number allow carriers to call the recipient when enroute. This increases the probability of delivery.

  • phone_country_code optional

    The international calling code of the phone number.

  • type optional

    Type of store.

POST https://api.fleetbase.io/v1/stores
Example Request
POST /v1/stores
Example Response

Retrieve a store

This endpoint allows you to retrieve a store object to view it's details.

Arguments
  • id required

    The id of the store you want to retrieve.

GET https://api.fleetbase.io/v1/stores/{id}
Example Request
POST /v1/stores/{id}
Example Response

Update a store

If necessary, you are able to update a few properties of a store. You can update the name, building, security_access_code, phone_number, and phone_country_code.

You are only able to update fields which do not compromise or change the stores geographical state.

Arguments
  • id required

    The id of the store you want to update.

  • name optional

    The name you want to update the store to.

  • building optional

    The building name you want to add, or update on the store.

  • security_access_code optional

    The security access code you want to add, or update on the store.

  • phone_number optional

    The phone number of the store you want to add, or update.

  • phone_country_code optional

    The country code of the phone number provided.

PUT https://api.fleetbase.io/v1/stores/{id}
Example Request
PUT /v1/stores/{id}
Example Response

Delete a store

Use this endpoint to delete a store, if a store has already been used in a payload then the store cannot be deleted.

Arguments
  • id required

    The id of the store you want to delete.

DELETE https://api.fleetbase.io/v1/stores/{id}
Example Request
DELETE /v1/stores/{id}
Example Response

List all stores

This endpoint allows you to query placess you have created, it also provides paginated results on all the stores in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • within optional

    Filter stores within a radius of specified coordinates

    within[latitude] required

    The coordinate latitude

    within[longitude] required

    The coordinate longitude

    within[radius] optional

    Limits stores within this many kilometers of the specified coordinates. Defaults to 5km.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Store object.

GET https://api.fleetbase.io/v1/stores
Example Request
GET /v1/stores
Example Response

Query stores

Fleetbase provides a useful endpoint that allows you to query stores around the world within a radius of provided coordinates.

When querying stores using this endpoint, Fleetbase will only return the name, and latitude and longitude coordinates.

This can be useful for providing an autocomplete search field for users if necessary.

Arguments
  • query required

    The name of the address or store to be searched for.

  • ll required

    The latitude and longitude you want to query around. The latitude and longitude should be a comma seperated string (ex "latitude,longitude").

  • radius optional

    The search radius, which is the distance in meter's from the coordinates provided. If no radius is provided the radius will default to 5000 meters (or 5km).

GET https://api.fleetbase.io/v1/stores/search
Example Request
GET /v1/stores/search
Example Response

Place

Place represents a location, store-locations are typically addresses, but can also be objects or landmarks as long as the Place has coordinates.

The store-location object

Attributes
  • id string

    Unique identifier for the object.

  • name string

    Full name of the store-location resident, building name, or business name

  • street1 string

    First street line. Usually street number and street name

  • street2 string

    Second street line.

  • city string

    Name of the city.

  • province string

    Name of the province or state.

  • postal_code string

    Postal code or zip.

  • neighborhood string

    Name of the neighborhood.

  • district string

    Name of the district.

  • building string

    Name of the building.

  • security_access_code string

    Security access code, door code, or gate code for entry.

  • country ISO 2 country code

    Country code for the country. All accepted values can be found on the Official ISO Website.

  • location point

    Spatial point representing a coordinate pair.

  • phone string

    Store Locations containing a phone number allow carriers to call the recipient when enroute. This increases the probability of delivery.

  • type string

    Type of store-location.

  • created_at datetime

    Date and time the store-location was created.

  • updated_at datetime

    Date and time the store-location was last updated.

Example Response

Create a store-location

When you create a store-location, you must specify a name and latitude and longitude coordinates.

Fleetbase will run a reverse geocode automatically on the provided coordinates to automatically complete the address when the optional fields are not provided.

Arguments
  • name required

    Full name of the store-location resident, building name, or business name

  • latitude required

    Latitude coordinate of the store-location.

  • longitude required

    Longitude coordinate of the store-location.

  • street1 optional

    First street line. Usually street number and street name

  • street2 optional

    Second street line.

  • city optional

    Name of the city.

  • province optional

    Name of the province or state.

  • postal_code optional

    Postal code or zip.

  • neighborhood optional

    Name of the neighborhood.

  • district optional

    Name of the district.

  • building optional

    Name of the building.

  • security_access_code optional

    Security access code, door code, or gate code for entry.

  • country optional

    Country code for the country. All accepted values can be found on the Official ISO Website.

  • phone_number optional

    Store Locations containing a phone number allow carriers to call the recipient when enroute. This increases the probability of delivery.

  • phone_country_code optional

    The international calling code of the phone number.

  • type optional

    Type of store-location.

POST https://api.fleetbase.io/v1/store-locations
Example Request
POST /v1/store-locations
Example Response

Retrieve a store-location

This endpoint allows you to retrieve a store-location object to view it's details.

Arguments
  • id required

    The id of the store-location you want to retrieve.

GET https://api.fleetbase.io/v1/store-locations/{id}
Example Request
POST /v1/store-locations/{id}
Example Response

Update a store-location

If necessary, you are able to update a few properties of a store-location. You can update the name, building, security_access_code, phone_number, and phone_country_code.

You are only able to update fields which do not compromise or change the store-locations geographical state.

Arguments
  • id required

    The id of the store-location you want to update.

  • name optional

    The name you want to update the store-location to.

  • building optional

    The building name you want to add, or update on the store-location.

  • security_access_code optional

    The security access code you want to add, or update on the store-location.

  • phone_number optional

    The phone number of the store-location you want to add, or update.

  • phone_country_code optional

    The country code of the phone number provided.

PUT https://api.fleetbase.io/v1/store-locations/{id}
Example Request
PUT /v1/store-locations/{id}
Example Response

Delete a store-location

Use this endpoint to delete a store-location, if a store-location has already been used in a payload then the store-location cannot be deleted.

Arguments
  • id required

    The id of the store-location you want to delete.

DELETE https://api.fleetbase.io/v1/store-locations/{id}
Example Request
DELETE /v1/store-locations/{id}
Example Response

List all store-locations

This endpoint allows you to query placess you have created, it also provides paginated results on all the store-locations in your Fleetbase.

Arguments
  • query optional

    This parameter allows you to filter the results by their name.

  • within optional

    Filter store-locations within a radius of specified coordinates

    within[latitude] required

    The coordinate latitude

    within[longitude] required

    The coordinate longitude

    within[radius] optional

    Limits store-locations within this many kilometers of the specified coordinates. Defaults to 5km.

  • limit optional

    A cursor for use in pagination. A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • offset optional

    A cursor for use in pagination. A offset for the results, when the offset is supplied the results will start from the offset.

  • order_by optional

    You can order the results by any property of the Place object.

GET https://api.fleetbase.io/v1/store-locations
Example Request
GET /v1/store-locations
Example Response

Query store-locations

Fleetbase provides a useful endpoint that allows you to query store-locations around the world within a radius of provided coordinates.

When querying store-locations using this endpoint, Fleetbase will only return the name, and latitude and longitude coordinates.

This can be useful for providing an autocomplete search field for users if necessary.

Arguments
  • query required

    The name of the address or store-location to be searched for.

  • ll required

    The latitude and longitude you want to query around. The latitude and longitude should be a comma seperated string (ex "latitude,longitude").

  • radius optional

    The search radius, which is the distance in meter's from the coordinates provided. If no radius is provided the radius will default to 5000 meters (or 5km).

GET https://api.fleetbase.io/v1/store-locations/search
Example Request
GET /v1/store-locations/search
Example Response