Skip to content
Last updated

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.

KeyValue ExampleDescription
total_shards2Total number of shards for the feed. Shards can be sent in any order, and may not be processed sequentially.
shard_number0Current shard number. Shard numbering is zero-based.
noncenullIdentifier for this batch of files. If there’s only one file, set to null.
date1649294100Timestamp for the date the feed was sent.

Availability Details

KeyMandatoryValue ExampleDescription
venueIdYes123456Unique identifier for the venue in the partner’s system.
dateYes2022-03-20Date for which availability is being provided (format: YYYY-MM-DD).
partySizeYes4Size of the party for this availability data.
areaIdNo123456Unique identifier for the specific area within the venue, if applicable.
durationNo3600Duration of the slot in seconds.
slotData[startSec]Yes1650033000Start time of the slot, using epoch time in seconds (UTC).
slotData[totalSpots]Yes30Total number of spots for this specific slot. Optional if defined at the availability level.
slotData[openSpots]Yes12Number of open spots for this specific slot. Optional if defined at the availability level.
slotData[deposit]NotrueIndicates if a deposit is required to book this slot.
slotData[depositAmount]No10050Deposit amount, represented as an integer (e.g., 100.50€ = 10050).
slotData[requiresCc]NotrueIndicates 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
        }
      ]
    }
  ]
}