Special use-cases

Here are more feed examples for the following special use cases:

  1. Feeds update for the incrementals of all your merchants for a new day.
  2. Feeds update for a new merchant that was just onboarded.
  3. Feeds update for an existing merchant who wants to take one day off.
  4. Feeds update for an existing merchant after the booking of a slot.

Examples

Daily Incrementals

{
  "metadata": {
    "generation_timestamp": 1468445258,
    "nonce": 12427072415225169848,
    "processing_instruction": "PROCESS_AS_INCREMENTAL",
    "total_shards": 1
  },
  "service_availability": [
    {
      "availability": [
        {
          "duration_sec": 1800,
          "merchant_id": "1000-0",
          "resources": {
            "room_id": "room_0",
            "room_name": "Room-A",
            "staff_id": "staff_0",
            "staff_name": "Alice"
          },
          "service_id": "2000-0",
          "spots_open": 1,
          "spots_total": 1,
          "start_sec": 1470672000
        },
        {
          "duration_sec": 1800,
          "merchant_id": "1000-0",
          "resources": {
            "room_id": "room_1",
            "room_name": "Room-B",
            "staff_id": "staff_1",
            "staff_name": "Bob"
          },
          "service_id": "2000-0",
          "spots_open": 1,
          "spots_total": 1,
          "start_sec": 1470672000
        },
        {
          "duration_sec": 1800,
          "merchant_id": "1000-1",
          "resources": {
            "room_id": "room_0",
            "room_name": "Room-A",
            "staff_id": "staff_0",
            "staff_name": "Alice"
          },
          "service_id": "2000-0",
          "spots_open": 1,
          "spots_total": 1,
          "start_sec": 1470672000
        }
      ]
    }
  ]
}
The above snippet only lists a few availability entries to save space. The complete example can be downloaded from the following link.
Download daily-incrementals example in JSON format

New Merchant

{
  "metadata": {
    "generation_timestamp": 1468445259,
    "nonce": 4582688808878140181,
    "processing_instruction": "PROCESS_AS_INCREMENTAL",
    "total_shards": 1
  },
  "service_availability": [
    {
      "availability": [
        {
          "duration_sec": 1800,
          "merchant_id": "1000-0",
          "resources": {
            "room_id": "room_0",
            "room_name": "Room-A",
            "staff_id": "staff_0",
            "staff_name": "Alice"
          },
          "service_id": "2000-0",
          "spots_open": 1,
          "spots_total": 1,
          "start_sec": 1470672000
        },
        {
          "duration_sec": 1800,
          "merchant_id": "1000-0",
          "resources": {
            "room_id": "room_1",
            "room_name": "Room-B",
            "staff_id": "staff_1",
            "staff_name": "Bob"
          },
          "service_id": "2000-0",
          "spots_open": 1,
          "spots_total": 1,
          "start_sec": 1470672000
        },
        {
          "duration_sec": 1800,
          "merchant_id": "1000-0",
          "resources": {
            "room_id": "room_0",
            "room_name": "Room-A",
            "staff_id": "staff_0",
            "staff_name": "Alice"
          },
          "service_id": "2000-0",
          "spots_open": 1,
          "spots_total": 1,
          "start_sec": 1470673800
        },
        {
          "duration_sec": 1800,
          "merchant_id": "1000-0",
          "resources": {
            "room_id": "room_1",
            "room_name": "Room-B",
            "staff_id": "staff_1",
            "staff_name": "Bob"
          },
          "service_id": "2000-0",
          "spots_open": 1,
          "spots_total": 1,
          "start_sec": 1470673800
        }
      ]
    }
  ]
}
The above snippet only lists a few availability entries to save space. The complete example can be downloaded from the following link.
Download new-merchant example in JSON format

One Day Off

{
  "metadata": {
    "generation_timestamp": 1468445260,
    "nonce": 1009587253595327501,
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "total_shards": 1
  },
  "service_availability": [
    {
      "availability": [],
      "end_timestamp_restrict": 1468454400,
      "merchant_id_restrict": "1000-0",
      "start_timestamp_restrict": 1468425600,
      "resources_restrict": {
        "room_id": "room_1",
        "staff_id": "staff_1",
      }
    }
  ]
}
Download one-day-off example in JSON format

After Booking

{
  "metadata": {
    "generation_timestamp": 1468445261,
    "nonce": 12114538219804078865,
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "total_shards": 1
  },
  "service_availability": [
    {
      "availability": [
        {
          "duration_sec": 1800,
          "merchant_id": "1000-0",
          "service_id": "2000-1",
          "spots_total": 1,
          "start_sec": 1468425600,
          "resources": {
            "room_id": "room_1",
            "room_name": "Room-B",
            "staff_id": "staff_1",
            "staff_name": "Bob"
          },
        }
      ],
      "end_timestamp_restrict": 1468426500,
      "merchant_id_restrict": "1000-0",
      "service_id_restrict": "2000-1",
      "start_timestamp_restrict": 1468425600,
      "resources_restrict": {
        "room_id": "room_1",
        "staff_id": "staff_1",
      }
    }
  ]
}
Download after-booking example in JSON format

Using Recurrence

{
  "metadata": {
    "generation_timestamp": 1467993600,
    "processing_instruction": "PROCESS_AS_INCREMENTAL",
    "total_shards": 1
  },
  "service_availability": [
    {
      "availability": [
        {
          "duration_sec": 1800,
          "schedule_exception": [
            {
              "time_range": {
                "begin_sec": 1493901000,
                "end_sec": 1493902800
              }
            }
          ],
          "merchant_id": "3001-0",
          "recurrence": {
            "repeat_every_sec": 1800,
            "repeat_until_sec": 1493915400
          },
          "service_id": "2000-0",
          "spots_open": 1,
          "spots_total": 1,
          "start_sec": 1493888400
        },
        {
          "duration_sec": 1800,
          "schedule_exception": [
            {
              "time_range": {
                "begin_sec": 1493987400,
                "end_sec": 1493989200
              }
            },
            {
              "time_range": {
                "begin_sec": 1493991000,
                "end_sec": 1493992800
              }
            }
          ],
          "merchant_id": "3001-0",
          "recurrence": {
            "repeat_every_sec": 1800,
            "repeat_until_sec": 1494001800
          },
          "service_id": "2000-0",
          "spots_open": 1,
          "spots_total": 1,
          "start_sec": 1493974800
        },
        {
          "duration_sec": 1800,
          "schedule_exception": [
            {
              "time_range": {
                "begin_sec": 1494073800,
                "end_sec": 1494075600
              }
            },
            {
              "time_range": {
                "begin_sec": 1494077400,
                "end_sec": 1494079200
              }
            },
            {
              "time_range": {
                "begin_sec": 1494081000,
                "end_sec": 1494082800
              }
            }
          ],
          "merchant_id": "3001-0",
          "recurrence": {
            "repeat_every_sec": 1800,
            "repeat_until_sec": 1494088200
          },
          "service_id": "2000-0",
          "spots_open": 1,
          "spots_total": 1,
          "start_sec": 1494061200
        },
        {
          "duration_sec": 1800,
          "schedule_exception": [
            {
              "time_range": {
                "begin_sec": 1494160200,
                "end_sec": 1494162000
              }
            },
            {
              "time_range": {
                "begin_sec": 1494163800,
                "end_sec": 1494165600
              }
            },
            {
              "time_range": {
                "begin_sec": 1494167400,
                "end_sec": 1494169200
              }
            },
            {
              "time_range": {
                "begin_sec": 1494171000,
                "end_sec": 1494172800
              }
            }
          ],
          "merchant_id": "3001-0",
          "recurrence": {
            "repeat_every_sec": 1800,
            "repeat_until_sec": 1494174600
          },
          "service_id": "2000-0",
          "spots_open": 1,
          "spots_total": 1,
          "start_sec": 1494147600
        },
        {
          "duration_sec": 1800,
          "schedule_exception": [
            {
              "time_range": {
                "begin_sec": 1494246600,
                "end_sec": 1494248400
              }
            },
            {
              "time_range": {
                "begin_sec": 1494250200,
                "end_sec": 1494252000
              }
            },
            {
              "time_range": {
                "begin_sec": 1494253800,
                "end_sec": 1494255600
              }
            },
            {
              "time_range": {
                "begin_sec": 1494257400,
                "end_sec": 1494259200
              }
            },
            {
              "time_range": {
                "begin_sec": 1494261000,
                "end_sec": 1494262800
              }
            }
          ],
          "merchant_id": "3001-0",
          "recurrence": {
            "repeat_every_sec": 1800,
            "repeat_until_sec": 1494261000
          },
          "service_id": "2000-0",
          "spots_open": 1,
          "spots_total": 1,
          "start_sec": 1494234000
        }
      ]
    }
  ]
}
Download using recurrence example in JSON format

Download all the samples for special cases in JSON format