VROMO API Documentation (v2)

Download OpenAPI specification:Download

Introduction

VROMO is setting a new standard for integrating last-mile delivery management software into your technology mix. In addition to our best-in-class software for streamlining restaurant deliveries and improving customer engagement, our API-first approach means we consume our own public API in developing the VROMO interface. This gives your team access to the same API endpoints that we use internally and the ability to utilize the vast majority of VROMO's functionality to build custom add ons, create deep integrations to other products or extend your own platform to add VROMO functionality such as:

  • Create and view jobs
  • Set the dispatch policy for the job created to trigger automatic job dispatch
  • Assign, reassign, recall jobs manually
  • Lookup and edit job details
  • Assign tracking link marketing campaigns
  • Keep track of your restaurant 'sites'
If you cannot find the relevant endpoint in the details below, please email our team at hello@vromo.io and we will happily assist.

If you are integrating an ordering platform or Point of Sales (POS) and want a simple create and dispatch or if you are integrating with an existing delivery partner start with the Core steps for integrating with an ordering app or delivery partner section after the glossary below.

Overview

Graph API Root

https://api.vromo.io/v2/graph

Authentication

VROMO requests are authenticated by including an access_token parameter in the url.

HTTP Request

GET https://api.vromo.io/v2/graph?access_token=API_TOKEN

Note: You will need to replace API_TOKEN with your API key. You will find the API token for a particular group by logging into VROMO with the administrator role, clicking on your avatar in the top right corner of the screen, then selecting 'integrations'. If you want to create and manage jobs in sub-teams in a company structure, it is best practice to set up your team structure first and use separate API keys in your integration.

Terms used in these docs

JOB: An individual delivery. Jobs comprise of one or more tasks.

TASK: Tasks are the individual units of progress in a job, and can be applied in flexible ways depending on your purpose. For a typical restaurant delivery, you might create 4 tasks - Arrive at the restaurant, leave the restaurant, arrive at the customer and leave the customer. Note that in addition to the tasks, every job also has a global 'Start job' and 'Complete job' status that is presented to the driver.

SITE: An individual location from which deliveries will be collected. If you apply a site to a job you will be able to use site to filter the job list and reports in the VROMO interface. You can also use the site record to store default preferences for campaign and policy for a particular restaurant.

BLUEPRINT: A blueprint is used to simplify the job creation process. Jobs can be created on a blueprint and a site(typically with a blueprint attached). The blueprint transforms the most basic data needed to create a job (i.e. pickup location, customer address, customer latitude and longitude, customer contact details) into a more complete job according to how the blueprint is set up.

POLICY: A policy is a collection of rules that determine which drivers are offered unassigned jobs. When you create a job with a policy (optional), the job will automatically be offered to all drivers that adhere to the set of rules in that policy until a driver accepts the job, or the job is cancelled.

CAMPAIGN: A jobs campaign field determines the customer engagement settings for the job. These include the wording of the SMS, and the look and feel of the driver tracking page including any video and promotional content to be included.

JOB ATTRIBUTE: Since there is no universal set of fields that delivery teams like to add to a job, VROMO enables you to add any arbitrary number of additional fields using key:value pairs that we call 'job attributes'.

Core steps for integrating with an ordering app or delivery partner

If you are starting in the same place as most ordering app and website integrations your first step will be using the VROMO API to create and view Jobs. If you are trying to assign the driver from your own system you'll also want to dispatch them at this point.

Creating a Job

To create an order ingestion integration it is first necessary to decide if orders should be created on Sites or Blueprints (a.k.a Job Templates). Sites are optimal for frequent orders for brick and mortar stores such as restaurants. Blueprints are often preferred for infrequent orders (e.g. a once off order for a restaurant) or orders where the pickup location is not a brick and mortar location.

To create a Job on a Site we recommend creating a Site with the `external` field populated. This allows integrations to create Jobs on Sites based on a third party's id for the store/restaurant. Following this, use the Site's external id to create a Job.

An alternative strategy is to always attempt to create the Job on a Site using the Site's External id and if the request returns a 404 error, create the Site, then try recreate the Job again.

Providing the `external` field for Sites and Jobs ensures idempotency therefore if either are created with an external id that already exists the existing item will be returned and not recreated.

To create a Job on a Blueprint you must have a known Blueprint (a.k.a Job Template) id stored.

Subscribing to updates

Webhooks receive notifications and status updates as jobs are updated and completed in the system. You can use the webhook endpoints to manage your webhooks. A successful integration should require only a single registered webhook to handle all job updates. The easiest way to implement them is to then treat every update for a particular job ID as a trigger to use the jobs endpoint to fetch the current status of all the fields of interest as the webhook itself contains just the updated information, not the entire state of the job.

Cancellation

If you need to cancel a previously created job (e.g. your customer has cancelled an order) you can use the update job endpoint to post a cancellation.

Dispatching the jobs to drivers

If you are integrating with a third-party delivery team using VROMO or are an ordering app linking to self-delivery teams then you probably won't send the jobs to individual drivers since you aren't responsible for those drivers. You might have an agreement to include a particular dispatch Policy on the job when you create it or to use a Site ID in order to assist the delivery team to automate the dispatch at their end however.

If you are intending to dispatch the jobs from within your system however, you have two options you can either allow your users to manually select a driver and then dispatch the job to them, or you can create the job with dispatch Policy, which will then start offering the job to rules. To dispatch to a specific driver, you just need to issue a Dispatch event for the job to be dispatched with the Vehicle ID of the driver to receive the job and with the type 'dispatched'. You'll see in the dispatches section the full details of issuing 'dispatched' Dispatches along with recalling jobs and manually marking them complete.

Jobs

The Jobs endpoint gives you control over editing and querying Jobs.

Fetch Jobs

Fetch an array of jobs. The limit of jobs returned is 2500. Use the filtering parameters to reduce the amount.

path Parameters
:id
required
integer <int64>

The Job's ID

query Parameters
access_token
required
string

API access token

_all_id__in
string
Example: _all_id__in=242697673588737,120968299200513

filter by Job Ids. A comma separated list (with no spaces) of Job IDs

_all_group__in
string
Example: _all_group__in=13433822412801,163469279117313

filter by Group Ids. A comma separated list (with no spaces) of Group IDs

_all_site__exists_id__in
string
Example: _all_site__exists_id__in=241264736108545,249838391721985

filter by Site Ids. A comma separated list (with no spaces) of Site IDs

_all_created__between
string
Example: _all_created__between=[1571097600000..1571616000000)

millisecond timestamps in interval notation

_all_finished__between
string
Example: _all_finished__between=[1571097600000..1571616000000)

millisecond timestamps in interval notation

_all_dispatches__include
boolean
Example: _all_dispatches__include=false

true or false, should dispatches be included in the returned job(s). true by default

_all_route__include
boolean
Example: _all_route__include=false

true or false, should route be included in the returned job(s). true by default

_all_attr__include
boolean
Example: _all_attr__include=false

true or false, should attr be included in the returned job(s). true by default

_all_issues__include
boolean
Example: _all_issues__include=false

true or false, should issues be included in the returned job(s). true by default

_all_chat__include
boolean
Example: _all_chat__include=false

true or false, should chat be included in the returned job(s). true by default

_size__lte
integer
Example: _size__lte=350

Integer number of Jobs to be returned, max 2500

_all_created__order
string
Enum: "asc" "desc" "any"
Example: _all_created__order=asc

asc, desc, or any. Sort returned Jobs by Job created time

_all_finished__order
string
Enum: "asc" "desc" "any"
Example: _all_finished__order=desc

asc, desc, or any. Sort returned Jobs by Job finished time

_all_status__in
string
Enum: "dispatched" "underway" "cancelled" "completed" "failed" "open"
Example: _all_status__in=dispatched,underday,open

filter by Job status. A comma separated list of Job Statuses

Responses

200

OK

404

Not found

get /role/jobs
https://api.vromo.io/v2/graph/role/jobs

Request samples

Copy
curl -X GET 'https://api.vromo.io/v2/graph/role/jobs?access_token={{AUTH_TOKEN}}'

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ]
}

Fetch Job by ID

Fetch a single Job by Job ID

path Parameters
:id
required
integer <int64>

The Job's ID

query Parameters
access_token
required
string

API access token

group__in
integer <int64>
Example: group__in=13433822412800

test if this Job exists under the Group Id provided. Returns the Job and Status Code 200 if true, or Status Code 404 if false.

created__between
string
Example: created__between=[1578700800000..1579478400000)

test if this Job was created between the two millisecond timestamps provided in interval notion. Returns the Job and Status Code 200 if true, or Status Code 404 if false.

finished__between
string
Example: finished__between=[1578700800000..1579478400000)

test if this Job was completed between the two millisecond timestamps provided in interval notion. Returns the Job and Status Code 200 if true, or Status Code 404 if false.

dispatches__include
boolean
Example: dispatches__include=false

true or false, should the returned Job include dispatches. true by default.

route__include
boolean
Example: route__include=false

true or false, should the returned Job include route. true by default.

attr__include
boolean
Example: attr__include=false

true or false, should the returned Job include attr. true by default.

issues__include
boolean
Example: issues__include=false

true or false, should the returned Job include issues. true by default.

chat__include
boolean
Example: chat__include=false

true or false, should the returned Job include attr. true by default.

status__in
string
Enum: "dispatched" "underway" "cancelled" "completed" "failed" "open"
Example: status__in=dispatched,underday,open

comma separated list of Job Statuses to filter by. Test if this Job has a status in the list provided. Returns the Job and Status Code 200 if true, or Status Code 404 if false.

Responses

200

OK

404

Not found

get /role/jobs/:id
https://api.vromo.io/v2/graph/role/jobs/:id

Request samples

Copy
curl -X GET 'https://api.vromo.io/v2/graph/role/jobs/:id?access_token={{AUTH_TOKEN}}'

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 5788549471,
  • "name": "My job name",
  • "status": "open",
  • "created": 153173990000,
  • "finished": 153174000000,
  • "group": 6417500000,
  • "site":
    {
    },
  • "progress": 0,
  • "ratings":
    {
    },
  • "offered":
    {
    },
  • "route":
    {
    },
  • "stages": { },
  • "cancelled":
    {
    },
  • "campaign":
    {
    },
  • "policy":
    {
    },
  • "dispatches":
    {
    },
  • "instructions": "Contactless delivery - leave at the door please",
  • "lines":
    {
    },
  • "contact":
    {
    },
  • "attr":
    {
    },
  • "tasks":
    {
    },
  • "uploads":
    {
    },
  • "notes":
    {
    },
  • "issues":
    {
    },
  • "chat":
    {
    },
  • "consignment":
    {
    },
  • "payable":
    {
    }
}

Update a Job

This request updates a Job. For example, you may wish to cancel a Job or record an issue with a Job.

path Parameters
:id
required
integer <int64>

the Job's ID

query Parameters
access_token
required
string

API access token

Request Body schema: application/json

Updating a Job's details

name
string

user defined Job name

status
string
Value: "cancelled"

cancel Job

group
integer <int64>

Group Id of Group the Job should be moved to

site
object Nullable
cancelled
object Nullable

cancellation information

campaign
object Nullable
policy
object Nullable
dispatches
object

This set of objects determines what driver the Job is assigned to and the status of the job's progress.

contact
object
attr
Array of objects

key/value pairs of extra details to provide dispatch operators and/or delivery drivers

tasks
Array of objects

details of each task drivers must completed

notes
object
lines
Array of objects

List of job line items to be delivered.

instructions
string

Delivery instructions from end customer for the driver.

issues
object
chat
Array of objects
consignment
object
payable
object

Responses

200

job updated

400

bad request

patch /role/jobs/:id
https://api.vromo.io/v2/graph/role/jobs/:id

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "tasks":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 200558002405377,
  • "merge": "update",
  • "name": "My job name",
  • "status": "cancelled",
  • "group": 6417500000,
  • "site":
    {
    },
  • "cancelled":
    {
    },
  • "campaign":
    {
    },
  • "policy":
    {
    },
  • "dispatches":
    {
    },
  • "contact":
    {
    },
  • "attr":
    {
    },
  • "tasks":
    {
    },
  • "notes":
    {
    },
  • "issues":
    {
    },
  • "chat":
    [
    ],
  • "consignment":
    {
    },
  • "payable":
    {
    },
  • "instructions": "Contactless delivery - leave at the door please",
  • "lines":
    {
    }
}

Create Jobs on a Site

Create Jobs on a Site

path Parameters
:id
required
string
Example: external:a1b2c3d4e5f6g7h

Use your system's store id as an external id to create Jobs in VROMO. This external id must be prefixed with external:. Alternatively use VROMO's Site Id if the external id is not applicable. The VROMO Site ID has no prefix.

query Parameters
access_token
required
string

API access token

Request Body schema: application/json

Create Jobs on a Site

Array
name
string

user defined job name

contact
object
instructions
string

Extra details for job delivery

lines
Array of objects

List of job line items to be delivered.

external
string

external id for the Job. i.e. the id from a 3rd party that can be used to fetch/patch the Job.

May also be used for reporting and payroll purposes.

Note that external ensures idempotency. Creating a Job with the same external id will return the Job with that external id instead of creating a new Vehicle.

group
integer <int64>

group id of sub-group job should be created on

payable
object

currency, tip, order value in lowest denomination for the purpose of transfering between APIs

attr
Array of objects

key/value pairs of extra details to provide dispatch operators and/or delivery drivers

tasks
Array of objects

details of each task drivers must completed

Responses

200
post /role/sites/:id/jobs
https://api.vromo.io/v2/graph/role/sites/:id/jobs

Request samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ]
}

Create Jobs on a Blueprint

Create Jobs on a Blueprint

path Parameters
:id
required
integer <int64>

The Blueprint's ID

query Parameters
access_token
required
string

API access token

Request Body schema: application/json

Create Jobs on a Blueprint

Array
name
string

user defined job name

contact
object
instructions
string

Extra details for job delivery

lines
Array of objects

List of job line items to be delivered.

external
string

external id for the Job. i.e. the id from a 3rd party that can be used to fetch/patch the Job.

May also be used for reporting and payroll purposes.

Note that external ensures idempotency. Creating a Job with the same external id will return the Job with that external id instead of creating a new Vehicle.

group
integer <int64>

group id of sub-group job should be created on

payable
object

currency, tip, order value in lowest denomination for the purpose of transfering between APIs

attr
Array of objects

key/value pairs of extra details to provide dispatch operators and/or delivery drivers

tasks
Array of objects

details of each task drivers must completed

Responses

200
post /role/blueprints/:id/jobs
https://api.vromo.io/v2/graph/role/blueprints/:id/jobs

Request samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ]
}

Dispatches

Dispatch Jobs to drivers. Update the dispatch status of a Job, setting it to underway, started, or completed. Change assigned driver by reassigning, or recall the Job back into the unassigned queue.

Job Dispatches

Update the dispatch status of a Job. Change assigned driver by assigning or recalling and update progress by starting or completing the Job as a whole

path Parameters
:id
required
integer <int64>

The Job's Id

query Parameters
access_token
required
string

API access token

Request Body schema: application/json
Array
vehicle
object (Vehicle)
type
required
string
Enum: "returned" "dispatched" "underway" "closed" "cancelled"

Job's dispatch status. returned recalls the Job back to the unassigned queue. closed completes the Job

Responses

200
post /role/jobs/:id/dispatches
https://api.vromo.io/v2/graph/role/jobs/:id/dispatches

Request samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "create",
  • "items":
    [
    ]
}

Sites

Fetch, create, delete, and edit Sites, which can be considered as store/pickup locations.

Fetch Sites

Fetch all available sites. This may be needed if creating Jobs on Sites.

query Parameters
access_token
required
string

API access token

Responses

200
get /role/sites
https://api.vromo.io/v2/graph/role/sites

Request samples

Copy
curl -X GET 'https://api.vromo.io/v2/graph/role/sites?access_token={{AUTH_TOKEN}}'

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ]
}

Create Sites

Create Sites.

query Parameters
access_token
required
string

API access token

Request Body schema: application/json

Creating Sites

Array
policy
object
blueprint
object
campaign
object
contact
object
coords
object (Coords)
radius
number <double> Nullable

radius around the Site used for geo-fencing and auto swiping

group
integer <int64>

specify a subteam the Site should be created under

external
string

specify an external id which may be used to fetch this site and create jobs on it

Responses

200
post /role/sites
https://api.vromo.io/v2/graph/role/sites

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
[
  • {
    }
]

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ]
}

Fetch a Site

Fetch a Site.

path Parameters
:id
required
integer <int64>

The Site's ID

query Parameters
access_token
required
string

API access token

Responses

200
get /role/sites/:id
https://api.vromo.io/v2/graph/role/sites/:id

Request samples

Copy
curl -X GET 'https://api.vromo.io/v2/graph/role/sites/:id?access_token={{AUTH_TOKEN}}'

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "blueprint":
    {
    },
  • "calculator": null,
  • "campaign": null,
  • "contact":
    {
    },
  • "coords":
    {
    },
  • "group": 13433822412801,
  • "id": 123716323753985,
  • "ingest": "t3d9p2wus8udbh82r6gp@integrate.spatula.io",
  • "policy": null,
  • "radius": null,
  • "external": "andysRestaurant1"
}

Update a Site

Update a Site.

path Parameters
:id
required
integer <int64>

The Site's ID

query Parameters
access_token
required
string

API access token

Request Body schema: application/json

Updating Sites

policy
object
blueprint
object
campaign
object
contact
object
coords
object (Coords)
radius
number <double> Nullable

radius around the Site used for geo-fencing and auto swiping

group
integer <int64>

specify a subteam the Site should be created under

Responses

200
patch /role/sites/:id
https://api.vromo.io/v2/graph/role/sites/:id

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "contact":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "blueprint":
    {
    },
  • "contact":
    {
    },
  • "coords":
    {
    },
  • "group": 13433822412801,
  • "id": 123716323753985
}

Delete a Site

Delete a Site.

path Parameters
:id
required
integer <int64>

The Site's ID

query Parameters
access_token
required
string

API access token

Responses

200
delete /role/sites/:id
https://api.vromo.io/v2/graph/role/sites/:id

Request samples

Copy
curl -X DELETE 'https://api.vromo.io/v2/graph/role/sites/:id?access_token={{AUTH_TOKEN}}'

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "blueprint":
    {
    },
  • "calculator": null,
  • "campaign": null,
  • "contact":
    {
    },
  • "coords":
    {
    },
  • "group": 13433822412801,
  • "id": 123716323753985,
  • "ingest": "t3d9p2wus8udbh82r6gp@integrate.spatula.io",
  • "policy": null,
  • "radius": null,
  • "external": "123716323753985"
}

Groups

Teams. Create and fetch teams and subteams. This allows users to create a hierarchy of teams.

Fetch Groups

Fetch all Groups.

query Parameters
access_token
required
string

API access token

_all_id__in
string
Example: _all_id__in=242697673588737,120968299200513

A comma separated list (with no spaces) of Group IDs

Responses

200
get /role/groups
https://api.vromo.io/v2/graph/role/groups

Request samples

Copy
curl -X GET 'https://api.vromo.io/v2/graph/role/groups?access_token={{AUTH_TOKEN}}'

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ]
}

Webhooks

VROMO, and deliveries in general, are event driven. There are many occasions where you want to receive live updates as a Job progresses. You are able to register and manage webhooks in VROMO using the Webhooks endpoint.

Once you have registered a webhook, all updates are parsed in an efficient format that includes the type of update and the actual updates.

Diffing changes and updating your data directly can be a bit fiddly in practice, so typically the simplest way to implement webhooks is to treat any update for a particular Job as a notification that something has changed and use it trigger a fetch of the info of interest to your system from the Jobs endpoint.

Example Webhook Payloads

Below are examples of webhook events received from VROMO. Keep in mind that these are for example purposes only:

the recommended method for implementing webhooks is to use every update for a particular Job as a trigger to refresh all your fields of interest for that Job using the Jobs endpoint

Job Created

{
  "type": "create",
  "items": [
    {
      "created": 1540363746530,
      "tracking": "https://vrom.io/M8_Sp27zG",
      "contact": {
        "phone": "+61466601706",
        "name": "Andrew Walker",
        "email": ""
      },
      "name": "Job name",
      "campaign": {
        "id": 0
      },
      "id": 6059855129,
      "attr": {
        "items": [
          {
            "created": 1540363746530,
            "id": 6059855120,
            "value": "500",
            "key": "Some info:"
          },
          {
            "created": 1540363746530,
            "id": 6059855121,
            "value": "Phone",
            "key": "More Info"
          },
          {
            "created": 1540363746530,
            "id": 6059855122,
            "value": "1",
            "key": "Something else"
          }
        ]
      },
      "tasks": {
        "items": [
          {
            "zone": {
              "address": "High Wycombe WA, Australia",
              "created": 1540363746530,
              "name": "@Andrew Walker",
              "id": 6059855130,
              "radius": 50,
              "coords": {
                "lon": 116.00299999999993,
                "lat": -31.942
              }
            },
            "created": 1540363746530,
            "id": 6059855119,
            "ix": 0
          }
        ]
      },
      "group": 6059562777
    }
  ]
}

Job Assigned

{
  "type": "update",
  "items": [
    {
      "dispatches": {
        "items": [
          {
            "created": 1540363831864,
            "id": 6059861396,
            "job": {
              "id": 6059855129
            },
            "type": "dispatched",
            "vehicle": {
              "id": 6059834126
            }
          }
        ]
      },
      "id": 6059855129,
      "status": "dispatched"
    }
  ]
}

Job Started

{
  "type": "update",
  "items": [
    {
      "dispatches": {
        "items": [
          {
            "created": 1540363852872,
            "id": 6059861757,
            "job": {
              "id": 6059855129
            },
            "type": "underway",
            "vehicle": {
              "id": 6059834126
            }
          }
        ]
      },
      "id": 6059855129,
      "status": "underway"
    }
  ]
}

Task Complete

{
  "type": "update",
  "items": [
    {
      "progress": 1,
      "id": 6059855129,
      "tasks": {
        "type": "update",
        "items": [
          {
            "id": 6059855119,
            "completed": {
              "time": 1540363899240
            }
          }
        ]
      }
    }
  ]
}

Job Cancelled

{
"type":"update","items":[{"audit":{"user":{"id":13433822413057}},"cancelled":{"audit":{"type":"dispatcher","user":{"id":13433822413057}},"created":1628094452633,"note":"","reason":{"created":1530282928000,"id":25100,"name":"Delivery outside radius","type":"cancelled"}},"finished":1628094452634,"id":1062653843521540,"merge":"update","status":"cancelled"}]
}

Job Complete

{
  "type": "update",
  "items": [
    {
      "dispatches": {
        "items": [
          {
            "created": 1540363929224,
            "id": 6059863172,
            "job": {
              "id": 6059855129
            },
            "type": "closed",
            "vehicle": {
              "id": 6059834126
            }
          }
        ]
      },
      "id": 6059855129,
      "status": "completed"
    }
  ]
}

List Webhooks

This request lists webhooks associated with your account.

query Parameters
access_token
required
string

API access token

_all_id__in
string
Example: _all_id__in=242697673588737,120968299200513

A comma separated list (with no spaces) of Webhook IDs

Responses

200

OK

400

invalid input, object invalid

get /role/webhooks
https://api.vromo.io/v2/graph/role/webhooks

Request samples

Copy
curl -X GET 'https://api.vromo.io/v2/graph/role/webhooks?access_token={{AUTH_TOKEN}}'

Response samples

Content type
application/json
Copy
Expand all Collapse all
[]

Create Webhook

This request allows you to set up a webhook on your server or create a temporary webhook URL using a third party service. Note that one webhook is enough to receive all necessary job updates. Do not register new webhooks every time you create a new job. If your webhook URL and API token are valid, the request will be successful and return a 200 series response. You will subsequently be able to view your newly created webhook using the 'List Webhooks' endpoint.

query Parameters
access_token
required
string

API access token

Request Body schema: application/json

Create webhook payload

Array
event
string
Value: "role/jobs"

role/jobs is currently the only valid event type

target
string <url>

url of webhook to send events

Responses

200
400

invalid input, object invalid

post /role/webhooks
https://api.vromo.io/v2/graph/role/webhooks

Request samples

Content type
application/json
Copy
Expand all Collapse all
[]

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

Fetch Webhook

Fetch a webhook

path Parameters
:id
required
integer <int64>

the id of webhook to be fetched

query Parameters
access_token
required
string

API access token

Responses

200
get /role/webhooks/:id
https://api.vromo.io/v2/graph/role/webhooks/:id

Request samples

Copy
curl -X GET 'https://api.vromo.io/v2/graph/role/webhooks/:id?access_token={{AUTH_TOKEN}}'

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

Delete Webhook

This request deletes a webhook and will unsubscribe it from future job events.

path Parameters
:id
required
integer <int64>

the id of webhook to be deleted

query Parameters
access_token
required
string

API access token

Responses

200
400

invalid input, object invalid

delete /role/webhooks/:id
https://api.vromo.io/v2/graph/role/webhooks/:id

Request samples

Copy
curl -X DELETE 'https://api.vromo.io/v2/graph/role/webhooks/:id?access_token={{AUTH_TOKEN}}'

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

Vehicles

All actions related to drivers and vehicles are done through the vehicles endpoints. You can think of the driver as a user in the system and the vehicle as the driver's role in a team that gives them the ability to receive jobs. Through this endpoint you can fetch and create vehicles with a driver. There exists a many to one relationship between vehicles and drivers i.e. a driver can be thought of as an individual user who may belong to multiple vehicles.

Fetch Vehicles

This request fetches the vehicle's information and the corresponding driver's details.

query Parameters
access_token
required
string

API access token

_all_id__in
string
Example: _all_id__in=242697673588737,120968299200513

A comma separated list (with no spaces) of Vehicle IDs

_all_offers__include
string
Example: _all_offers__include=true

true or false, should 'offers' be included in the returned Vehicle(s)

Responses

200
get /role/vehicles
https://api.vromo.io/v2/graph/role/vehicles

Request samples

Copy
curl -X GET 'https://api.vromo.io/v2/graph/role/vehicles?access_token={{AUTH_TOKEN}}'

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ]
}

Create Vehicles

Create Vehicles with drivers.

query Parameters
access_token
required
string

API access token

Request Body schema: application/json

Vehicle to create

name
string

user defined vehicle name

group
integer <int64>

group id the Vehicle should exists under

external
string

external id for the Vehicle. i.e. the id from a 3rd party that can be used to fetch/patch the Vehicle.

May also be used for reporting and payroll purposes.

Note that external ensures idempotency. Creating a Vehicle with the same external id will return the Vehicle with that external id instead of creating a new Vehicle.

driver
object

Responses

200
400

invalid input, object invalid

post /role/vehicles
https://api.vromo.io/v2/graph/role/vehicles

Request samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ]
}

Fetch a Vehicle

This request fetches the vehicle's information and the corresponding driver's details.

path Parameters
:id
required
integer <int64>

the id of vehicle to be queried

query Parameters
access_token
required
string

API access token

Responses

200
get /role/vehicles/:id
https://api.vromo.io/v2/graph/role/vehicles/:id

Request samples

Copy
curl -X GET 'https://api.vromo.io/v2/graph/role/vehicles/:id?access_token={{AUTH_TOKEN}}'

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "availability":
    {
    },
  • "points":
    {
    },
  • "driver":
    {
    },
  • "external": "company_1234567890",
  • "name": "Joe Bloggs' Vehicle",
  • "id": 200878775402497,
  • "group": 163469279117313,
  • "offers":
    {
    }
}

Delete a Vehicle

Delete a Vehicle.

path Parameters
:id
required
integer <int64>

The Vehicle's ID

query Parameters
access_token
required
string

API access token

Responses

200
delete /role/vehicles/:id
https://api.vromo.io/v2/graph/role/vehicles/:id

Request samples

Copy
curl -X DELETE 'https://api.vromo.io/v2/graph/role/vehicles/:id?access_token={{AUTH_TOKEN}}'

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "driver":
    {
    },
  • "group": 13433822412801,
  • "id": 200253569695745,
  • "name": "Vehicle Name"
}

Update a Vehicle

Update a Vehicle.

path Parameters
:id
required
integer <int64>

The Vehicle's ID

query Parameters
access_token
required
string

API access token

Request Body schema: application/json

Updating a Vehicle

name
string

user defined Vehicle name

group
integer <int64>

group id the Vehicle should exist under

external
string

external id for the Vehicle. i.e. the id from a 3rd party that can be used to fetch/patch the Vehicle.

May also be used for reporting and payroll purposes.

Note that external ensures idempotency. Creating a Vehicle with the same external id will return the Vehicle with that external id instead of creating a new Vehicle.

Responses

200
patch /role/vehicles/:id
https://api.vromo.io/v2/graph/role/vehicles/:id

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "name": "Demo Vehicle"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 200878775402497,
  • "name": "John's Vehicle",
  • "group": 163469279117313
}

Update a Vehicle's Location

Update a Vehicle's location for a given time if provided, or now if not. This may be needed for unconventional Vehicles such as drones.

path Parameters
:id
required
integer <int64>

The Vehicle's ID

query Parameters
access_token
required
string

API access token

Request Body schema: application/json

Updating a Vehicle's location

Array
location
object (Coords)
reported
integer <int64>

millisecond timestamp of when the Vehicle was at this coordinates. Omit reported to default to the current time.

Responses

200
post /role/vehicles/:id/points
https://api.vromo.io/v2/graph/role/vehicles/:id/points

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
[
  • {
    }
]

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "items":
    [
    ]
}