# Create a new restaurant delivery via 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.&#x20;

You will need:

1. A valid API key for a user in VROMO. You will find the API token for a particular group by logging into VROMO with an administrator role, clicking on your avatar in the top right corner of the screen, then selecting 'integrations'.\
   ![I](https://cdn2.hubspot.net/hubfs/5979392/Integrations%20link.png)
2. 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.

![](https://cdn2.hubspot.net/hubfs/5979392/image-3.png)

To create the job, POST to&#x20;

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

&#x20;**QUERY PARAMETERS**

| access\_token (required) | string |
| ------------------------ | ------ |

**REQUEST BODY SCHEMA:**&#x20;

| Field   | Field type                                                                                                 |
| ------- | ---------------------------------------------------------------------------------------------------------- |
| name    | <p>string</p><p>user defined job name</p>                                                                  |
| contact | object (Contact)                                                                                           |
| attr    | <p>object</p><p>key/value pairs of extra details to provide dispatch operators and/or delivery drivers</p> |
| tasks   | <p>object</p><p>pickup and dropoff details</p>                                                             |

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**&#x20;

job created

**400**&#x20;

invalid input, object invalid
