1"use strict";(globalThis.webpackChunktimetime_web=globalThis.webpackChunktimetime_web||[]).push([[1453],{28453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var i=n(96540);const o={},s=i.createContext(o);function r(e){const t=i.useContext(s);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),i.createElement(s.Provider,{value:t},e.children)}},95137:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"dev/getting_started/bookings","title":"Bookings","description":"Usint the createBooking method of the Rest API you can create a booking in a certain slot for a certain event-type.","source":"@site/docs/dev/00_getting_started/05_bookings.md","sourceDirName":"dev/00_getting_started","slug":"/dev/getting_started/bookings","permalink":"/docs/dev/getting_started/bookings","draft":false,"unlisted":false,"editUrl":"https://github.com/timetime-app/docs/docs/dev/00_getting_started/05_bookings.md","tags":[],"version":"current","sidebarPosition":5,"frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"Availability","permalink":"/docs/dev/getting_started/availability"},"next":{"title":"Guides","permalink":"/docs/dev/guides/"}}');var o=n(74848),s=n(28453);const r={},a="Bookings",c={},d=[];function l(e){const t={a:"a",code:"code",h1:"h1",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"bookings",children:"Bookings"})}),"\n",(0,o.jsxs)(t.p,{children:["Usint ",(0,o.jsx)(t.a,{href:"https://docs.timetime.in/api/#tag/booking/operation/createBooking",children:"the createBooking method of the Rest API"})," you can create a booking in a certain slot for a certain ",(0,o.jsx)(t.code,{children:"event-type"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"In order to create a booking, the following information is required:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:["The ",(0,o.jsx)(t.code,{children:"event-type"})," identifier"]}),"\n",(0,o.jsx)(t.li,{children:"The start time of the booking"}),"\n",(0,o.jsx)(t.li,{children:"The email of the person associated with the booking"}),"\n"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-ts",children:'fetch("https://api.timetime.in/v1/bookings", {\n method: "POST",\n headers: {\n "Content-Type": "application/json",\n },\n body: JSON.stringify({\n // This is the eventy type/service where we can create the booking\n eventTypeId: "f899218d-6f2c-4300-8a70-a6910536041b",\n // The start time of the booking\n start: "2019-08-24T14:00:00Z",\n // The email of the person associated with the booking\n bookerEmail: "[email protected]",\n }),\n});\n'})}),"\n",(0,o.jsxs)(t.p,{children:["The server will respond with the ",(0,o.jsx)(t.a,{href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201",children:"201"})," code if the booking has been created successfully."]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.