Export Availability Feed
The availability feed provides Mozrest with daily snapshots of venue availability for venues integrated with Reserve with Google (RwG). By sending Mozrest an updated JSON feed, you ensure our internal availability cache is current, allowing Mozrest to respond accurately to RwG queries.
Note: This feed is required only for venues with the Reserve with Google channel enabled.
Format
The feed must include metadata and availability data, structured as described below.
Metadata
The metadata section provides Mozrest with information on how to interpret the feed.
Key | Value Example | Description |
---|---|---|
total_shards | 2 | Total number of shards for the feed. Shards can be sent in any order, and may not be processed sequentially. |
shard_number | 0 | Current shard number. Shard numbering is zero-based. |
nonce | null | Identifier for this batch of files. If there’s only one file, set to null . |
date | 1649294100 | Timestamp for the date the feed was sent. |
Availability Details
Key | Mandatory | Value Example | Description |
---|---|---|---|
venueId | Yes | 123456 | Unique identifier for the venue in the partner’s system. |
date | Yes | 2022-03-20 | Date for which availability is being provided (format: YYYY-MM-DD). |
partySize | Yes | 4 | Size of the party for this availability data. |
areaId | No | 123456 | Unique identifier for the specific area within the venue, if applicable. |
duration | No | 3600 | Duration of the slot in seconds. |
slotData[startSec] | Yes | 1650033000 | Start time of the slot, using epoch time in seconds (UTC). |
slotData[totalSpots] | Yes | 30 | Total number of spots for this specific slot. Optional if defined at the availability level. |
slotData[openSpots] | Yes | 12 | Number of open spots for this specific slot. Optional if defined at the availability level. |
slotData[deposit] | No | true | Indicates if a deposit is required to book this slot. |
slotData[depositAmount] | No | 10050 | Deposit amount, represented as an integer (e.g., 100.50€ = 10050). |
slotData[requiresCc] | No | true | Indicates if a credit card guarantee is required (not allowed if deposit is set to true ). |
File Sizes and Upload Frequency
To optimize performance and ensure timely data updates, adhere to the following guidelines for file size, sharding, and frequency of delivery:
- Feed Sharding:
- Split the availability feed into fewer than 10 shards for optimal processing.
- File Size and Compression:
- Each shard file should be less than 200 MB after compression. Use multiple shards if necessary.
- Use gzip to compress each shard file. Ensure data is evenly distributed across shards to maintain consistent file sizes.
- Daily Updates:
- Submit a complete feed once daily before 3:00 am UTC, covering the next 30 days of availability.
File Naming
For efficient file management, use unique names for each file by appending a timestamp. This practice helps with troubleshooting and querying feed statuses.
Example: availability_feed_1649294100.01.json.gz
SFTP Access
Mozrest provides secure SFTP credentials for file transfer. Use these credentials to securely upload availability feeds and other relevant data.
Access Information
- Protocol: SFTP
- Host: partners-ftp.mozrest.com
- Port: 22
- Folder: feeds
Note: Please, upload the feeds in the
feeds
folder.
Credentials
- User: Provided by Mozrest
- Password: Provided by Mozrest
JSON Feed Example
{
"metadata": {
"total_shards": 2,
"shard_number": 0,
"nonce": null,
"date": 1649294100
},
"availabilities": [
{
"venueId": "123456",
"date": "2022-04-15",
"partySize": 4,
"duration": 3600,
"slotData": [
{
"startSec": 1639558800, // Slot = 14:30
"totalSpot": 30,
"openSpots": 12,
"deposit": true,
"depositAmount": 10050, //100,50 in your currency
"requiresCc": false
},
{
"startSec": 1650034800, // Slot = 15:00
"totalSpots": 30,
"openSpots": 8,
"deposit": true,
"depositAmount": 10050, //100,50 in your currency
"requiresCc": false
}
]
},
{
"venueId": "123456",
"date": "2022-04-15",
"partySize": 2,
"duration": 3600,
"slotData": [
{
"startSec": 1639558800, // Slot = 14:30
"totalSpots": 15,
"openSpots": 7,
"deposit": true,
"depositAmount": 10050, //100,50 in your currency
"requiresCc": false
},
{
"startSec": 1650034800, // Slot = 15:00
"totalSpots": 15,
"openSpots": 0,
"deposit": true,
"depositAmount": 10050, //100,50 in your currency
"requiresCc": false
}
]
}
]
}