# bookingResource.createOrModify

## Description
- Create or modify a booking
- Don't specify user. Those will be added server side.

## When to use
- Create a new booking
- Example payload will look like this:

```json
{
  "args": {
    "requestBody": {
      "from": <milliseconds>,
      "to": <milliseconds>,
      "floorId": "<floorId>",
      "siteId": "<siteId>",
      "infospotId": "<infospotId>",
      "meta": {},
      "schedule": { "frequency": "norepeat", "tz": "America/Los_Angeles" },
      "virtual": false
    }
  },
  "headers": { "X-Impersonate-User": "<email>" }
}
```

## What this returns
<!-- Describe the shape / purpose of the response -->

## Notes
- Ensure from < to
- from/to must be in the future (or allow today)
- schedule.frequency defaults to "norepeat" if not specified
- tz must be a valid timezone string like "America/Los_Angeles"

##Recommendation
1) Use siteHierarchy_getMiniHierarchy (to get siteId)
2) Look up the floorId from the site's children
3) Look up the infospot id for the name provided by user using the tool siteHierarchy_getLocation
4) Use bookingResource.createOrModify
