> ## Documentation Index
> Fetch the complete documentation index at: https://www.retailnexus.work.gd/llms.txt
> Use this file to discover all available pages before exploring further.

# Reservation System API

On this page, you can see API functions for the Reservation System.

ㅤㅤㅤㅤㅤ

<Note>
  This is a technical page, and assumes that you are familiar with the Lua coding language.
</Note>

#### Door API

Door API can used with any doors that has API. Door API configuration can be found in `Reservation Screen > Configuration`

Door API can be used to lock or unlock doors. Example of Door API:<br />

```luau theme={null}
API = {
		
		DoorLock = function()
			workspace.Door.API:Fire("Lock") -- Will fire a Lock command to a door
		end,
		
		DoorUnlock = function()
			workspace.Door.API:Fire("Unlock") -- Will fire an Unlock command to a door
		end,
		
	},
```

If you don't want to use Door API, you can leave the functions as they are, having `return false` as the function.

ㅤㅤㅤㅤㅤ

#### Receiving API

Receiving API can be used to make a new reservation, cancel a reservation or start a reservation.

ㅤㅤㅤㅤㅤ

##### New Reservation

```luau theme={null}
["Reservation Screen"].API:Fire({ -- For making a new reservation
	Function = "NewRes",
	Name = "New Reservation",
	Start = "09:00",
	End = "10:00",
	Passcode = nil,
	WaitingRoom = false
})
```

<Card title="What do these mean?" color="#3B82F6" icon="question-circle">
  `Function` defines what function to fire. In this case, it is set to `"NewRes"` meaning New Reservation.

  `Name` Name of the reservation to create.

  `Start` Start time of the reservation.

  `End` End time of the reservation.

  `Passcode` can be set to a passcode, use `nil` for no passcode.

  `WaitingRoom` set to true if the room is marked as a waiting room for the duration of the reservation.
</Card>

ㅤㅤㅤㅤㅤ

##### Cancel reservation

```luau theme={null}
["Reservation Screen"].API:Fire({ -- For cancelling a reservation
	Function = "CancelRes",
	Name = "New Reservation"
})
```

<Card title="What do these mean?" color="#3B82F6" icon="question-circle">
  `Function` defines what function to fire. In this case it is set to `"CancelRes"` meaning Cancel Reservation.

  `Name` Name of the reservation to cancel.
</Card>

ㅤㅤㅤㅤㅤ

##### Start Reservation

```luau theme={null}
["Reservation Screen"].API:Fire({ -- For starting a reservation
	Function = "StartRes",
	Name = "New Reservation",
})
```

<Card title="What do these mean?" color="#3B82F6" icon="question-circle">
  `Function` defines what function to fire. In this case it is set to `"StartRes"` meaning Start Reservation.

  `Name` Name of the reservation to start.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.