Create a new restaurant delivery via API

How to integrate an ordering app or POS to create a delivery job for a specific restaurant using the VROMO API

Creating a job in VROMO is the most common integration task. This allows you to create a job in VROMO for a specific restaurant using its Site ID.

You will need:

  1. The Site ID for the restaurant for which you want to create deliveries in VROMO. You can look this up via API as well, but I suggest you log into VROMO and go to Sites to ensure that the Site has been set up correctly with a Group, Campaign, Auto-dispatch Policy and Template assigned. You can also grab the Site ID directly from the Site list to use in the API call to create the new job.

To create the job, POST to

https://prod-api.spatula.io/v2/graph/role/sites/<siteID>/jobs?access_token=<access_token>

QUERY PARAMETERS

access_token (required)

string

REQUEST BODY SCHEMA:

Field

Field type

name

string

user defined job name

contact

object (Contact)

attr

object

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

tasks

object

pickup and dropoff details

For example:

[
  {
    "name": "My New Job",
    "contact": {
      "name": "Joe Bloggs",
      "phone": "+10123456789",
      "email": "joebloggs@gmail.com"
    },
    "tasks": [
      {
        "zone": {
          "name": "Deliver to Customer",
          "address": "123 Fake St",
          "coords": {
            "lat": -32.977559,
            "lon": 114.816393
          }
        },
        "timeframe": {
          "by": 1559838800000
        }
      }
    ],
    "attr": [
      {
        "key": "ORDER_ID",
        "value": "order12345"
      },
      {
        "key": "ASAP",
        "value": "true"
      }
    ]
  }
]

Responses

200

job created

400

invalid input, object invalid

Last updated