# Waitlist

## POST /v1/flow/waitlist

> Creates a new waitlist reservation.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateWaitEntryApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateWaitEntry_Params"}},"required":["params"]},"CreateWaitEntry_Params":{"type":"object","properties":{"branchId":{"type":"string"},"customerId":{"type":"string"},"numberOfGuests":{"type":"number"},"note":{"type":"string"},"areaId":{"type":"string"},"tableIds":{"type":"array","items":{"type":"string"}},"duration":{"type":"number"},"internalNote":{"type":"string","nullable":true}},"required":["branchId","customerId","numberOfGuests"]},"CreateWaitEntryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateWaitEntry_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateWaitEntry_Data":{"type":"object","properties":{"waitEntry":{"$ref":"#/components/schemas/CreateWaitEntry_Data_WaitEntry"}},"required":["waitEntry"]},"CreateWaitEntry_Data_WaitEntry":{"type":"object","properties":{"type":{"type":"string","enum":["queue","request","reservation"]},"businessDate":{"type":"string"},"status":{"type":"string","enum":["admitted","canceled","declined","left","seated","waiting"]},"code":{"type":"string"},"numberOfGuests":{"type":"number"},"areaId":{"type":"string"},"duration":{"type":"number"},"note":{"type":"string"},"admittedAt":{"type":"string"},"declinedAt":{"type":"string"},"canceledAt":{"type":"string"},"seatedAt":{"type":"string"},"leftAt":{"type":"string"},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"tableIds":{"type":"array","items":{"type":"string"}},"customer":{"$ref":"#/components/schemas/CreateWaitEntry_Data_WaitEntry_Customer"},"number":{"type":"number"},"position":{"type":"number"},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/WaitNotificationMap"}},"can":{"type":"array","items":{"type":"string","enum":["admit","cancel","decline","edit","left","notify","resume","seat"]}},"estimatedSeatAt":{"type":"string"},"estimatedLeaveAt":{"type":"string"},"recommendedTableIds":{"type":"array","items":{"type":"string"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelAssignmentM"}},"flowEntryUid":{"type":"string"}},"required":["type","businessDate","status","code","numberOfGuests","duration","uid","id","tableIds","customer","number","position","notifications","can","labels"]},"CreateWaitEntry_Data_WaitEntry_Customer":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountry":{"type":"string"},"phoneCountryCalling":{"type":"string"},"sequence":{"type":"number"},"number":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"gender":{"type":"object"},"passcode":{"type":"string","nullable":true},"unsubscribed":{"type":"boolean","nullable":true},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentMapSummary"}}},"required":["firstName","phone","phoneCountry","phoneCountryCalling","sequence","number","id","roleAssignments"]},"RoleAssignmentMapSummary":{"type":"object","properties":{"endDate":{"type":"string"},"id":{"type":"string"}},"required":["endDate","id"]},"WaitNotificationMap":{"type":"object","properties":{"time":{"type":"string"},"status":{"type":"string","enum":["Failed","Pending","Sent"]},"error":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"text":{"type":"string"}},"required":["time","status","id","text"]},"LabelAssignmentM":{"type":"object","properties":{"uid":{"type":"string"},"labelUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["uid","labelUid"]},"CreateWaitEntryApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CreateWaitEntry_Error"}},"required":["error"]},"CreateWaitEntry_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CreateWaitEntry_ErrorCodes_enum"}]}},"required":["code"]},"CreateWaitEntry_ErrorCodes_enum":{"type":"string","enum":["COMPACT_INACTIVE","CUSTOMER_NOT_FOUND","MISSING_ID","NO_CREATE_ACTION","NO_TABLE_AVAILABLE","NotFound","SELECTED_TABLES_UNAVAILABLE","WAITPERIOD_NOT_FOUND"]}}},"paths":{"/v1/flow/waitlist":{"post":{"operationId":"Waitlist_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWaitEntryApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWaitEntryApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWaitEntryApiError"}}}}},"summary":"Creates a new waitlist reservation.","tags":["Waitlist"]}}}}
```

## PATCH /v1/flow/waitlist/{uid}

> Updates a specific waitlist reservation.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateWaitEntryApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateWaitEntry_Params"}},"required":["params"]},"UpdateWaitEntry_Params":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["admitted","canceled","declined","left","seated","waiting"]},"numberOfGuests":{"type":"number","nullable":true},"duration":{"type":"number"},"areaId":{"type":"string"},"tableIds":{"type":"object"},"note":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true}},"required":["id"]},"UpdateWaitEntryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateWaitEntry_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateWaitEntry_Data":{"type":"object","properties":{"waitEntry":{"$ref":"#/components/schemas/UpdateWaitEntry_Data_WaitEntry"}},"required":["waitEntry"]},"UpdateWaitEntry_Data_WaitEntry":{"type":"object","properties":{"type":{"type":"string","enum":["queue","request","reservation"]},"businessDate":{"type":"string"},"status":{"type":"string","enum":["admitted","canceled","declined","left","seated","waiting"]},"code":{"type":"string"},"numberOfGuests":{"type":"number"},"areaId":{"type":"string"},"duration":{"type":"number"},"note":{"type":"string"},"admittedAt":{"type":"string"},"declinedAt":{"type":"string"},"canceledAt":{"type":"string"},"seatedAt":{"type":"string"},"leftAt":{"type":"string"},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"tableIds":{"type":"array","items":{"type":"string"}},"customer":{"$ref":"#/components/schemas/UpdateWaitEntry_Data_WaitEntry_Customer"},"number":{"type":"number"},"position":{"type":"number"},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/WaitNotificationMap"}},"can":{"type":"array","items":{"type":"string","enum":["admit","cancel","decline","edit","left","notify","resume","seat"]}},"estimatedSeatAt":{"type":"string"},"estimatedLeaveAt":{"type":"string"},"recommendedTableIds":{"type":"array","items":{"type":"string"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelAssignmentM"}},"flowEntryUid":{"type":"string"}},"required":["type","businessDate","status","code","numberOfGuests","duration","uid","id","tableIds","customer","number","position","notifications","can","labels"]},"UpdateWaitEntry_Data_WaitEntry_Customer":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountry":{"type":"string"},"phoneCountryCalling":{"type":"string"},"sequence":{"type":"number"},"number":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"gender":{"type":"object"},"passcode":{"type":"string","nullable":true},"unsubscribed":{"type":"boolean","nullable":true},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentMapSummary"}}},"required":["firstName","phone","phoneCountry","phoneCountryCalling","sequence","number","id","roleAssignments"]},"RoleAssignmentMapSummary":{"type":"object","properties":{"endDate":{"type":"string"},"id":{"type":"string"}},"required":["endDate","id"]},"WaitNotificationMap":{"type":"object","properties":{"time":{"type":"string"},"status":{"type":"string","enum":["Failed","Pending","Sent"]},"error":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"text":{"type":"string"}},"required":["time","status","id","text"]},"LabelAssignmentM":{"type":"object","properties":{"uid":{"type":"string"},"labelUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["uid","labelUid"]},"UpdateWaitEntryApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateWaitEntry_Error"}},"required":["error"]},"UpdateWaitEntry_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateWaitEntry_ErrorCodes_enum"}]}},"required":["code"]},"UpdateWaitEntry_ErrorCodes_enum":{"type":"string","enum":["NoChanges","TABLE_NOT_SELECTED"]}}},"paths":{"/v1/flow/waitlist/{uid}":{"patch":{"operationId":"Waitlist_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWaitEntryApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWaitEntryApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWaitEntryApiError"}}}}},"summary":"Updates a specific waitlist reservation.","tags":["Waitlist"]}}}}
```
