{
    "componentChunkName": "component---src-templates-article-page-template-js",
    "path": "/references/availability/",
    "result": {"data":{"markdownRemark":{"frontmatter":{"title":"Listing availability management","slug":"availability","updated":"2020-10-05T00:00:00.000Z","category":"references","ingress":"Reference documentation for listing availability management.","skills":null},"htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The listing availability management features of Flex allow providers to\ndefine when (and when not) their listings are available for booking.\nThere are three different concepts related to availability management\nthat together define whether a certain time or day is available on not:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"An "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"availability plan"}]},{"type":"text","value":" can be defined for each listing. It comprises\nof general availability rules for each day of the week. For instance\n\"available on Mondays and Thursdays\", or \"available on Tuesday,\nWednesday and Friday from 9 AM to 6 PM\"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"An "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"availability exception"}]},{"type":"text","value":" overrides the availability plan for a\nconcrete period of time. For instance \"Available on 2018-11-25 and\n2018-11-26\", \"not available on 2018-11-30\"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"A "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"booking"}]},{"type":"text","value":" represents a reservation (or an intention to make a\nreservation) for a concrete period of time."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The availability plan and exceptions, together with booking information\ncan be combined to determine if a particular time range is available for\nbooking or not. For instance, the\n"},{"type":"element","tagName":"a","properties":{"href":"https://www.sharetribe.com/api-reference/marketplace.html#query-time-slots","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"/timeslots/query"}]},{"type":"text","value":"\nAPI endpoint returns availability information for future dates, taking\ninto account the listing's availability plan, exceptions and bookings."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"All bookings are created through transactions, governed by your\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/concepts/transaction-process/"},"children":[{"type":"text","value":"transaction process"}]},{"type":"text","value":". The transaction\nprocess ensures that bookings are only created for available time\nranges."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"seats","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#seats","ariaLabel":"seats permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Seats"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Both availability plans and availability exceptions use the concept of\n"},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"seats"}]},{"type":"text","value":" to define whether a particular time is available or not. How\nmany seats a booking consumes depends on the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"seats"}]},{"type":"text","value":" attribute of a\nbooking. Having 0 seats in availability means that the listing is\nunavailable for bookings during that time."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"day-based-availability-management","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#day-based-availability-management","ariaLabel":"day based availability management permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Day-based availability management"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Day-based availability works with both daily and nightly bookings. For\ninstance, an availability plan can define that Mondays and Tuesdays are\navailable for booking. For daily bookings this means that dates that are\na Monday or a Tuesday can be booked. For nightly bookings, this means\nthat nights Monday-Tuesday and Tuesday-Wednesday can be booked."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"interpretation-of-availability-exceptions-and-bookings","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#interpretation-of-availability-exceptions-and-bookings","ariaLabel":"interpretation of availability exceptions and bookings permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Interpretation of availability exceptions and bookings"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For day-based availability plans, it is recommended to create\navailability exceptions with timestamps having 00:00:00 time in UTC."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Creating availability exceptions with arbitrary time is allowed, but\nsuch exceptions are subject to the following interpretation rules in the\ncontext of a listing with day-based availability plan:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"if the availability exception covers only partially a given date in\nUTC time zone, the availability exception is interpreted as "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"covering\nthe entire date"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"if multiple availability exceptions cover partially a given UTC date,\nthe "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"minimum number of seats"}]},{"type":"text","value":" of all these availability exceptions\nis taken as the resulting number of available seats for that date,\nprior to taking any existing bookings into account."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If your transaction process uses time-based bookings, the bookings are\nalso subject to the same interpretation rules."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h6","properties":{"id":"example-1","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#example-1","ariaLabel":"example 1 permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Example 1:"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"An exception with start "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-26T12:30:00.000+01"}]},{"type":"text","value":" and end\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-27T10:25:00.000+01"}]},{"type":"text","value":" is interpreted as if it were from\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-26T00:00:00.000Z"}]},{"type":"text","value":" to "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-28T00:00:00.000Z"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h6","properties":{"id":"example-2","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#example-2","ariaLabel":"example 2 permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Example 2:"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"An exception with start "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-26T00:30:00.000+01:00"}]},{"type":"text","value":" and end\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-27T00:15:00.000+01:00"}]},{"type":"text","value":" is interpreted as if it were from\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-25T00:00:00.000Z"}]},{"type":"text","value":" to "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-27T00:00:00.000Z"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h6","properties":{"id":"example-3","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#example-3","ariaLabel":"example 3 permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Example 3:"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"An exception with start "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-26T00:30:00.000+01:00"}]},{"type":"text","value":" and end\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-27T15:15:00.000+01:00"}]},{"type":"text","value":" is interpreted as if it were from\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-25T00:00:00.000Z"}]},{"type":"text","value":" to "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-28T00:00:00.000Z"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h6","properties":{"id":"example-4","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#example-4","ariaLabel":"example 4 permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Example 4:"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Given exception 1 from "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-26T10:00:00.000Z"}]},{"type":"text","value":" to\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-26T12:00:00.000Z"}]},{"type":"text","value":" with 1 seat and exception 2 from\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-26T10:00:00.000Z"}]},{"type":"text","value":" to "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-26T12:00:00.000Z"}]},{"type":"text","value":" with 0 seats,\nthis is interpreted as if single exception existed from\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-26T00:00:00.000Z"}]},{"type":"text","value":" to "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2018-11-27T00:00:00.000Z"}]},{"type":"text","value":" with 0 seats."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"time-based-availability-management","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#time-based-availability-management","ariaLabel":"time based availability management permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Time-based availability management"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Time-based availability can be used with time-based bookings. Time-based\navailability plans can specify one or more time intervals for each day\nof the week, and specify the time zone in which these times should be\ninterpreted. For instance, with time-based availability it is possible\nto define that the listing is available on weekdays from 9 AM to 11AM\nand from 1 PM to 6 PM. More information on how to set a time-based\navailability plan for a listing can be found in the\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/how-to/enable-time-based-bookings-into-use/"},"children":[{"type":"text","value":"time-based bookings how-to guide"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Note:"}]},{"type":"text","value":" By default,\n"},{"type":"element","tagName":"a","properties":{"href":"https://github.com/sharetribe/ftw-daily/","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"FTW-daily"}]},{"type":"text","value":" uses day-based\navailability. If you want to use time-based availability in your\nmarketplace instead, it's recommended that you start with\n"},{"type":"element","tagName":"a","properties":{"href":"https://github.com/sharetribe/ftw-hourly","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"FTW-hourly"}]},{"type":"text","value":", the Flex\nTemplate for Web that supports time-based availability out of the box."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"timeslots-availability-plans-and-exceptions","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#timeslots-availability-plans-and-exceptions","ariaLabel":"timeslots availability plans and exceptions permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Timeslots, availability plans and exceptions"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Timeslots are periods of time, which are available to be booked. E.g. if\nyou have set a plan with 1 available seat from 7-22 on Mondays, that\nmeans that one person can book 5 minutes 07:00 - 07:05. Then the next\ncustomer can only book times within the range of 07:05 - 22:00 on the\nsame day. So, the plan creates a weekly schedule, against which\navailability exceptions and bookings are making reservations."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Exceptions can be used for restricting availability on a specific day.\nE.g. if you have set availability to 07 - 22 on Mondays and you add an\nexception 21-22 with seat 0 on Monday 28.10.2019, the timeslots query\nreturns timeslot 07-21 on that day if there are no bookings."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Exceptions can also be used for expanding the availability on a specific\nday. E.g. if you have set availability to 07 - 22 on Mondays and you add\nan exception 22-23 with seat 1 on Monday 28.10.2019, the timeslots query\nreturns timeslot 07-23 on that day if there are no bookings."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For time-based plans, both availability exceptions and bookings are\ninterpreted literally, i.e. covering the exact time intervals determined\nby their start and end times."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"booking-states","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#booking-states","ariaLabel":"booking states permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Booking states"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A booking can be in one of several possible states: "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"pending"}]},{"type":"text","value":",\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"proposed"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"accepted"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"canceled"}]},{"type":"text","value":" or "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"declined"}]},{"type":"text","value":". Bookings change state\nonly through a corresponding transaction transition, using one of the\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/references/transaction-process-actions/#bookings"},"children":[{"type":"text","value":"booking-specific actions"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"All bookings in "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"pending"}]},{"type":"text","value":" or "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"accepted"}]},{"type":"text","value":" states count as reservation\nagainst the listing's availability. On the other hand, bookings in the\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"proposed"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"canceled"}]},{"type":"text","value":" or "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"declined"}]},{"type":"text","value":" states do not affect the\navailability of the listing."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The figure below illustrates the possible booking states, transitions\nbetween the states and the corresponding actions that you can use in\nyour transaction process."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-wrapper"],"style":"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 635px; "},"children":[{"type":"text","value":"\n      "},{"type":"element","tagName":"a","properties":{"className":["gatsby-resp-image-link"],"href":"/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/7c24e/booking-states.png","style":"display: block","target":"_blank","rel":["noopener"]},"children":[{"type":"text","value":"\n    "},{"type":"element","tagName":"span","properties":{"className":["gatsby-resp-image-background-image"],"style":"padding-bottom: 100.62893081761007%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAADF0lEQVQ4y31UW0tUYRQ9v6CX/kJ/IYiilx6DfkD0ED1UEPhQUFpSImImpKaUoXahJIsCseiOlAZeS8cJtWx0ppzLmXO/zznOqCv2njnjOJkHFvs87G99e6+99ieYro9qGE6Oo51bg257DPq3vACq6UC13G15YSQI/yOjg6JiYFVU8CcjI6Po0CwXsmFDMR2+oJpsV0LFsJk0q5oQFZ3xK5HEymqGkUiJfEl1pTsShgkTkUW8+TyBtyOT+DId5Qol3WKEeSQDITwjVJJUo6nrIWquteFCUydqW+4gkZaQzKosQ1JU8DstIZ4UWZKQVKgsmW/j6HOciCzg3egUY3R6DqoZVmjzGRoW6ZmStHIRwtYQSoIbNkfCWn4Dgb+OQmET9Dm5Ncg65TglFwTwggKf9fPrPCghJEvLOieHGhHGfy7hYzSKkcUFTMZikGnyqsmXuX6eBzYf+43I4jIWlv9wpYLtBdCodMPh28qtewEOtlzBnpoT2Hv+JPZdPoe5WBzxVRErSRGKYWF47BvO1Lbgcms3ztbdwKvhMQikQTJb9Br5jnQJdW18+RynHtzG6Ud3celFP1KqDsP2uBPK+b6UQM+TITwefI/egZeYiv4oEZYmFhKGuua8NZiGC0N34LrBPxtFmgWFTfikdWEDjp/falk2HNal8kAiK2NuOY5ILI5YWiyTkBzhWpL2Iag4obgVDjJUnZNj81KiZnk43tuB/c2XcKi1Hkc7m5k0qxgskWraGJuZx9WbvWjrG0BDex+Gx2a2fChpFk+wEid6OnCguQ6HW+txrOs6VkQJsmYhLWvQLZc3qaH9Htr7nqLx1n18Gp/d8uFOyOoWkorGyOhmseWSA4ot55DVTLYPRequTMjt0lPleNv21C4hXK1KVFqMsG2Xc34B6wVwtCpIqlHZ0U77L9AA/GAdr6OzuDjYj6HI17JO9DylsirSksbWou2pJq2GQG3mC8C99x9w5Eodul+/garb/KoQKRHSVFdFGRlZ5zey+pnbRkjCukEeM9ElPBv8iOnID0iayWQEMntKKpJTlRR3I/wLGOC7MhAsnTUAAAAASUVORK5CYII='); background-size: cover; display: block;"},"children":[]},{"type":"text","value":"\n  "},{"type":"element","tagName":"picture","properties":{},"children":[{"type":"text","value":"\n          "},{"type":"element","tagName":"source","properties":{"srcSet":["/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/82e29/booking-states.webp 159w","/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/ef33f/booking-states.webp 318w","/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/f1837/booking-states.webp 635w","/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/29549/booking-states.webp 953w","/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/c5420/booking-states.webp 1270w","/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/14023/booking-states.webp 2034w"],"sizes":"(max-width: 635px) 100vw, 635px","type":"image/webp"},"children":[]},{"type":"text","value":"\n          "},{"type":"element","tagName":"source","properties":{"srcSet":["/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/8b9b5/booking-states.png 159w","/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/fa108/booking-states.png 318w","/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/53fb6/booking-states.png 635w","/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/5a426/booking-states.png 953w","/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/91155/booking-states.png 1270w","/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/7c24e/booking-states.png 2034w"],"sizes":"(max-width: 635px) 100vw, 635px","type":"image/png"},"children":[]},{"type":"text","value":"\n          "},{"type":"element","tagName":"img","properties":{"className":["gatsby-resp-image-image"],"src":"/docs/legacy/static/f1d15b5078e94255c5a4fce5eb1f6664/53fb6/booking-states.png","alt":"Booking states","title":"Booking states","loading":"lazy","decoding":"async","style":"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;"},"children":[]},{"type":"text","value":"\n        "}]},{"type":"text","value":"\n  "}]},{"type":"text","value":"\n    "}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In addition, the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":":action/update-booking"}]},{"type":"text","value":" action can be used to update a\nbooking's details (start or end times, seats) when the booking state is\neither "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"proposed"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"pending"}]},{"type":"text","value":" or "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"accepted"}]},{"type":"text","value":". The booking remains in the\nsame state as it was before the update."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"New bookings are always created in either "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"pending"}]},{"type":"text","value":" or "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"proposed"}]},{"type":"text","value":" state.\nAs "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"pending"}]},{"type":"text","value":" bookings reserve availability, they are useful when your\ntransaction process allows customers to immediately reserve their spot\n(often combined with a preauthorization of a payment)."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Using "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"proposed"}]},{"type":"text","value":" bookings is useful in situations where multiple\ncustomers should be allowed to request to book certain time range\nindependently of one another. The provider would be able to choose which\nrequest(s) to accept (it may be possible to accept more than one\nrequest, if there are enough available seats), as long as the listing\nhas sufficient remaining availability."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"booking-display-times","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#booking-display-times","ariaLabel":"booking display times permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Booking display times"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Booking display times are a handy tool for managing listing\navailability. You can use them by passing "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"bookingDisplayStart"}]},{"type":"text","value":" and\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"bookingDisplayEnd"}]},{"type":"text","value":" attributes when creating or updating a booking. This\nwill set "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"displayStart"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"displayEnd"}]},{"type":"text","value":" attributes correspondingly to\nthe booking that is related to the initiated transaction. The display\ntimes can be used alongside with the regular "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"start"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"end"}]},{"type":"text","value":"\nattributes (defined by "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"bookingStart"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"bookingEnd"}]},{"type":"text","value":" params) of a\nbooking and they can be used to present different start and end times to\nthe customer than actully is booked. See\n"},{"type":"element","tagName":"a","properties":{"href":"https://www.sharetribe.com/api-reference/marketplace.html#booking-resource-format","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"the booking resource format"}]},{"type":"text","value":"\nfor a full list of booking attributes."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h6","properties":{"id":"example","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#example","ariaLabel":"example permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Example:"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A provider needs 10 minutes of preparation time before each booking.\nThey can pass the following params regarding booking start when\ninitiating a transaction:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"div","properties":{"className":["gatsby-highlight"],"dataLanguage":"json"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-json"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-json"]},"children":[{"type":"text","value":"bookingStart"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"2018-04-20T12:20:00.000Z\""}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":"\nbookingDisplayStart"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":":"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"2018-04-20T12:30:00.000Z\""}]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"displayStart"}]},{"type":"text","value":" attribute will now indicate that the booking starts\nat "},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"12:30"}]},{"type":"text","value":" and this can be presented to the customer. However, the\nlisting is booked already from "},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"12:20"}]},{"type":"text","value":", denoted by booking's "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"start"}]},{"type":"text","value":"\nattribute. Now the listing is not available for other bookings 10\nminutes before this booking starts. If another customer wishes to book\nthis listing earlier, their booking will end at latest 10 minutes before\nthis booking."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"related-api-endpoints","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#related-api-endpoints","ariaLabel":"related api endpoints permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Related API endpoints"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"See the reference documentation for the following API endpoints for\ndetails:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://www.sharetribe.com/api-reference/marketplace.html#create-listing","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"/own_listings/create"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://www.sharetribe.com/api-reference/marketplace.html#update-listing","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"/own_listings/update"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://www.sharetribe.com/api-reference/marketplace.html#availability-exceptions","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"/availability_exceptions/*"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://www.sharetribe.com/api-reference/marketplace.html#query-time-slots","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"/timeslots/query"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://www.sharetribe.com/api-reference/marketplace.html#initiate-transaction","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"/transactions/initiate"}]}]},{"type":"text","value":"\n"}]}],"data":{"quirksMode":false}},"headings":[{"value":"Seats","depth":2},{"value":"Day-based availability management","depth":2},{"value":"Interpretation of availability exceptions and bookings","depth":3},{"value":"Example 1:","depth":6},{"value":"Example 2:","depth":6},{"value":"Example 3:","depth":6},{"value":"Example 4:","depth":6},{"value":"Time-based availability management","depth":2},{"value":"Timeslots, availability plans and exceptions","depth":3},{"value":"Booking states","depth":2},{"value":"Booking display times","depth":2},{"value":"Example:","depth":6},{"value":"Related API endpoints","depth":2}]}},"pageContext":{"slug":"availability","category":"references"}},
    "staticQueryHashes": ["3794076007","439097193","717698143"]}