MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

This API is not authenticated.

Endpoints

POST api/register

Example request:
curl --request POST \
    "http://localhost/api/register" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=consequatur"\
    --form "email=carolyne.luettgen@example.org"\
    --form "password=ij-e/dl4m"\
    --form "phone=consequatur"\
    --form "address=consequatur"\
    --form "type=consequatur"\
    --form "image=@C:\Users\Phang Viphath\AppData\Local\Temp\php107D.tmp" 
const url = new URL(
    "http://localhost/api/register"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'consequatur');
body.append('email', 'carolyne.luettgen@example.org');
body.append('password', 'ij-e/dl4m');
body.append('phone', 'consequatur');
body.append('address', 'consequatur');
body.append('type', 'consequatur');
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/register

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

name   string     

Example: consequatur

email   string     

Must be a valid email address. Example: carolyne.luettgen@example.org

password   string     

Must be at least 6 characters. Example: ij-e/dl4m

phone   string  optional    

Example: consequatur

address   string  optional    

Example: consequatur

image   file  optional    

Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\Phang Viphath\AppData\Local\Temp\php107D.tmp

type   string  optional    

Example: consequatur

POST api/login

Example request:
curl --request POST \
    "http://localhost/api/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\",
    \"password\": \"Z5ij-e\\/dl4m{o,\"
}"
const url = new URL(
    "http://localhost/api/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qkunze@example.com",
    "password": "Z5ij-e\/dl4m{o,"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: qkunze@example.com

password   string     

Must be at least 6 characters. Example: Z5ij-e/dl4m{o,

POST api/logout

Example request:
curl --request POST \
    "http://localhost/api/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/logout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/public/rooms

Example request:
curl --request GET \
    --get "http://localhost/api/public/rooms" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/public/rooms"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
 

[
    {
        "id": 1,
        "number": "01",
        "type": "Executive",
        "floor": "1st Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "available",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/V0gCLdqzwZJXAllc9pDV7coZYYZGGZaKc4liF0YF.jpg",
        "created_at": "2026-01-08T00:41:56.000000Z",
        "updated_at": "2026-06-23T02:07:27.000000Z"
    },
    {
        "id": 3,
        "number": "02",
        "type": "Deluxe",
        "floor": "2nd Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "occupied",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/JeyLtvi6uUeYBKoWtDhnegFjoDg3WelJyJEYZlw1.jpg",
        "created_at": "2026-01-08T00:44:54.000000Z",
        "updated_at": "2026-06-23T02:07:43.000000Z"
    },
    {
        "id": 4,
        "number": "03",
        "type": "Standard",
        "floor": "3rd Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "occupied",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/naaPOLdg7abov6J44K1azQp7oH40nLfOhojdfZoj.jpg",
        "created_at": "2026-01-08T17:53:41.000000Z",
        "updated_at": "2026-06-23T02:07:52.000000Z"
    },
    {
        "id": 5,
        "number": "04",
        "type": "Suite",
        "floor": "4th Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "occupied",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/GiOyPaVErhUzsPm4TtOAvZMQL1g3QKYob5og2RhR.jpg",
        "created_at": "2026-01-08T18:06:04.000000Z",
        "updated_at": "2026-06-23T02:08:06.000000Z"
    },
    {
        "id": 6,
        "number": "05",
        "type": "Family",
        "floor": "5th Floor",
        "capacity": 4,
        "price": "0.10",
        "status": "occupied",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/ysDduB77kdUbbsBtwOfgF2NBKvbVPapFMc0Z8wfv.jpg",
        "created_at": "2026-01-08T18:09:18.000000Z",
        "updated_at": "2026-06-23T02:08:18.000000Z"
    },
    {
        "id": 8,
        "number": "06",
        "type": "Standard",
        "floor": "1st Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "occupied",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/oxcfzSjoZzzMB9sph4y4mqrBw6lqutNDaSe17GR2.jpg",
        "created_at": "2026-01-15T23:10:39.000000Z",
        "updated_at": "2026-06-23T02:08:28.000000Z"
    },
    {
        "id": 9,
        "number": "07",
        "type": "Deluxe",
        "floor": "2nd Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "available",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/wvvLWk0PN4F0Dd2Xx0QLire6h0bxLUKMIKVyATGl.jpg",
        "created_at": "2026-01-15T23:11:14.000000Z",
        "updated_at": "2026-06-23T02:08:40.000000Z"
    },
    {
        "id": 10,
        "number": "08",
        "type": "Suite",
        "floor": "3rd Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "available",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/7OVqV652jWBXstopAjH03G21mlo7Z4eBtwDJzezy.jpg",
        "created_at": "2026-01-15T23:11:44.000000Z",
        "updated_at": "2026-06-23T02:08:53.000000Z"
    },
    {
        "id": 11,
        "number": "09",
        "type": "Family",
        "floor": "4th Floor",
        "capacity": 4,
        "price": "0.10",
        "status": "available",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/YqXT8gldm3piQ5sH7V9neJNuuozGBQqUuJ5nvfDI.jpg",
        "created_at": "2026-01-15T23:12:14.000000Z",
        "updated_at": "2026-06-23T02:09:04.000000Z"
    },
    {
        "id": 12,
        "number": "10",
        "type": "Executive",
        "floor": "5th Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "available",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/A0nlZ8frtk7pfekZ3vEdxpO1HW1eAqX7ztcfkXQK.jpg",
        "created_at": "2026-01-15T23:12:43.000000Z",
        "updated_at": "2026-06-23T02:09:14.000000Z"
    },
    {
        "id": 13,
        "number": "11",
        "type": "Standard",
        "floor": "1st Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "available",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/NIylMJ74HTBj2Xmf8T4MVAAdCutm2lNAnt1T483m.jpg",
        "created_at": "2026-01-15T23:28:53.000000Z",
        "updated_at": "2026-06-23T02:09:23.000000Z"
    },
    {
        "id": 14,
        "number": "12",
        "type": "Deluxe",
        "floor": "2nd Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "available",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/B4akyLrtVCOOmIv08spP6ElIXo6CJYaz6IJ3gr5S.jpg",
        "created_at": "2026-01-15T23:29:18.000000Z",
        "updated_at": "2026-06-23T02:09:40.000000Z"
    },
    {
        "id": 15,
        "number": "13",
        "type": "Suite",
        "floor": "3rd Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "available",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/ADYIoyFJlzpt3LSj5poiDdy3R7NrlPQ6xNcOdMT1.jpg",
        "created_at": "2026-01-15T23:34:05.000000Z",
        "updated_at": "2026-06-23T02:10:00.000000Z"
    },
    {
        "id": 16,
        "number": "14",
        "type": "Family",
        "floor": "4th Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "available",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/uY2yI2MGWHTGUoD0eOmSUB1GobRCAEcGGctfxnW6.jpg",
        "created_at": "2026-01-15T23:36:47.000000Z",
        "updated_at": "2026-06-23T02:10:11.000000Z"
    },
    {
        "id": 17,
        "number": "15",
        "type": "Family",
        "floor": "4th Floor",
        "capacity": 4,
        "price": "0.10",
        "status": "available",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/foUC8CCLgYLzxr7Pzm6X75NNSJiEub2250U4SC7n.jpg",
        "created_at": "2026-01-15T23:52:11.000000Z",
        "updated_at": "2026-06-23T02:10:21.000000Z"
    },
    {
        "id": 18,
        "number": "16",
        "type": "Executive",
        "floor": "5th Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "available",
        "image": "https://res.cloudinary.com/doe2yx3ao/image/upload/v1772289852/rooms/nwfsst1yglx9fqpl0vpn.jpg",
        "created_at": "2026-01-15T23:52:44.000000Z",
        "updated_at": "2026-02-28T07:44:13.000000Z"
    },
    {
        "id": 19,
        "number": "17",
        "type": "Standard",
        "floor": "2nd Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "available",
        "image": "https://res.cloudinary.com/doe2yx3ao/image/upload/v1772289867/rooms/lccd1vwouiz1z7tb9rd7.jpg",
        "created_at": "2026-01-15T23:56:55.000000Z",
        "updated_at": "2026-02-28T07:44:27.000000Z"
    },
    {
        "id": 20,
        "number": "18",
        "type": "Suite",
        "floor": "3rd Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "available",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/1di2HAvRF4VQuzbaMoJ1KQlc1OQCodZSSBlCLra3.jpg",
        "created_at": "2026-01-15T23:58:56.000000Z",
        "updated_at": "2026-06-23T02:22:49.000000Z"
    },
    {
        "id": 21,
        "number": "19",
        "type": "Family",
        "floor": "4th Floor",
        "capacity": 4,
        "price": "0.10",
        "status": "available",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/ho1jGjKtxnN9a0modQYd1fsvXeKpmykRmPuZ5xk2.jpg",
        "created_at": "2026-01-15T23:59:25.000000Z",
        "updated_at": "2026-06-23T02:23:00.000000Z"
    },
    {
        "id": 22,
        "number": "20",
        "type": "Executive",
        "floor": "5th Floor",
        "capacity": 2,
        "price": "0.10",
        "status": "available",
        "image": "https://phath-image-hotel.s3.amazonaws.com/rooms/8bslMfLfo9Y83ueGVhlPjTMb6B0OnNO6avt4Mdro.jpg",
        "created_at": "2026-01-15T23:59:48.000000Z",
        "updated_at": "2026-06-23T02:23:08.000000Z"
    }
]
 

Request      

GET api/public/rooms

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/public/guests

Example request:
curl --request POST \
    "http://localhost/api/public/guests" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=consequatur"\
    --form "email=carolyne.luettgen@example.org"\
    --form "password=ij-e/dl4m"\
    --form "phone=consequatur"\
    --form "image=@C:\Users\Phang Viphath\AppData\Local\Temp\php112A.tmp" 
const url = new URL(
    "http://localhost/api/public/guests"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'consequatur');
body.append('email', 'carolyne.luettgen@example.org');
body.append('password', 'ij-e/dl4m');
body.append('phone', 'consequatur');
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/public/guests

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

name   string     

Example: consequatur

email   string     

Must be a valid email address. Example: carolyne.luettgen@example.org

password   string     

Must be at least 6 characters. Example: ij-e/dl4m

phone   string  optional    

Example: consequatur

image   file  optional    

Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\Phang Viphath\AppData\Local\Temp\php112A.tmp

POST api/public/guests/login

Example request:
curl --request POST \
    "http://localhost/api/public/guests/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\",
    \"password\": \"O[2UZ5ij-e\\/dl4m{o,\"
}"
const url = new URL(
    "http://localhost/api/public/guests/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qkunze@example.com",
    "password": "O[2UZ5ij-e\/dl4m{o,"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/public/guests/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: qkunze@example.com

password   string     

Example: O[2UZ5ij-e/dl4m{o,

GET api/public/reservations/history

Example request:
curl --request GET \
    --get "http://localhost/api/public/reservations/history" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"guest_id\": 17
}"
const url = new URL(
    "http://localhost/api/public/reservations/history"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "guest_id": 17
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (422):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
 

{
    "message": "The selected guest id is invalid.",
    "errors": {
        "guest_id": [
            "The selected guest id is invalid."
        ]
    }
}
 

Request      

GET api/public/reservations/history

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

guest_id   integer     

Must match an existing stored value. Example: 17

POST api/public/reservations

Example request:
curl --request POST \
    "http://localhost/api/public/reservations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"guest_id\": 17,
    \"room_id\": 17,
    \"check_in\": \"2026-06-25\",
    \"check_out\": \"2107-07-24\"
}"
const url = new URL(
    "http://localhost/api/public/reservations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "guest_id": 17,
    "room_id": 17,
    "check_in": "2026-06-25",
    "check_out": "2107-07-24"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/public/reservations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

guest_id   integer     

Must match an existing stored value. Example: 17

room_id   integer     

Must match an existing stored value. Example: 17

check_in   string     

Must be a valid date. Must be a valid date in the format Y-m-d. Example: 2026-06-25

check_out   string     

Must be a valid date. Must be a valid date in the format Y-m-d. Must be a date after check_in. Example: 2107-07-24

status   string  optional    

POST api/public/reservations/{id}/confirm-payment

Example request:
curl --request POST \
    "http://localhost/api/public/reservations/consequatur/confirm-payment" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
const url = new URL(
    "http://localhost/api/public/reservations/consequatur/confirm-payment"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/public/reservations/{id}/confirm-payment

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the reservation. Example: consequatur

Body Parameters

status   string  optional    

POST api/public/reservations/{id}/cancel

Example request:
curl --request POST \
    "http://localhost/api/public/reservations/consequatur/cancel" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/public/reservations/consequatur/cancel"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/public/reservations/{id}/cancel

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the reservation. Example: consequatur

POST api/public/bakong/khqr

Example request:
curl --request POST \
    "http://localhost/api/public/bakong/khqr" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"amount\": 73,
    \"currency\": \"USD\",
    \"bakong_account_id\": \"consequatur\",
    \"merchant_id\": \"consequatur\",
    \"merchant_name\": \"consequatur\",
    \"receiver_name\": \"consequatur\",
    \"merchant_city\": \"consequatur\",
    \"receiver_city\": \"consequatur\"
}"
const url = new URL(
    "http://localhost/api/public/bakong/khqr"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "amount": 73,
    "currency": "USD",
    "bakong_account_id": "consequatur",
    "merchant_id": "consequatur",
    "merchant_name": "consequatur",
    "receiver_name": "consequatur",
    "merchant_city": "consequatur",
    "receiver_city": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/public/bakong/khqr

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

amount   number     

Must be at least 0.01. Example: 73

currency   string  optional    

Example: USD

Must be one of:
  • KHR
  • USD
bakong_account_id   string  optional    

Example: consequatur

merchant_id   string  optional    

Example: consequatur

merchant_name   string  optional    

Example: consequatur

receiver_name   string  optional    

Example: consequatur

merchant_city   string  optional    

Example: consequatur

receiver_city   string  optional    

Example: consequatur

expiration_timestamp   string  optional    

POST api/public/bakong/verify

Example request:
curl --request POST \
    "http://localhost/api/public/bakong/verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"md5\": \"consequatur\",
    \"full_hash\": \"consequatur\",
    \"short_hash\": \"consequatur\",
    \"amount\": 45,
    \"currency\": \"KHR\",
    \"is_test\": false
}"
const url = new URL(
    "http://localhost/api/public/bakong/verify"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "md5": "consequatur",
    "full_hash": "consequatur",
    "short_hash": "consequatur",
    "amount": 45,
    "currency": "KHR",
    "is_test": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/public/bakong/verify

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

md5   string  optional    

Example: consequatur

full_hash   string  optional    

Example: consequatur

short_hash   string  optional    

Example: consequatur

amount   number  optional    

Must be at least 0.01. Example: 45

currency   string  optional    

Example: KHR

Must be one of:
  • KHR
  • USD
is_test   boolean  optional    

Example: false

POST api/public/bakong/verify-transaction

Example request:
curl --request POST \
    "http://localhost/api/public/bakong/verify-transaction" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/public/bakong/verify-transaction"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/public/bakong/verify-transaction

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Public endpoint: fetch notifications for specific reservation IDs.

Accepts ?reservation_ids=1,2,3

Example request:
curl --request GET \
    --get "http://localhost/api/public/notifications" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/public/notifications"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
access-control-allow-origin: *
 

[]
 

Request      

GET api/public/notifications

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/auth/guest/google

Example request:
curl --request GET \
    --get "http://localhost/api/auth/guest/google" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/auth/guest/google"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (302):

Show headers
cache-control: no-cache, private
location: https://accounts.google.com/o/oauth2/auth?client_id=1055970105234-cqr41qsm5e4jn1esu74sp9gan01muu5k.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fapi%2Fauth%2Fgoogle%2Fcallback&scope=openid+profile+email&response_type=code
content-type: text/html; charset=utf-8
x-ratelimit-limit: 60
x-ratelimit-remaining: 56
access-control-allow-origin: *
 

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="refresh" content="0;url='https://accounts.google.com/o/oauth2/auth?client_id=1055970105234-cqr41qsm5e4jn1esu74sp9gan01muu5k.apps.googleusercontent.com&amp;redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fapi%2Fauth%2Fgoogle%2Fcallback&amp;scope=openid+profile+email&amp;response_type=code'" />

        <title>Redirecting to https://accounts.google.com/o/oauth2/auth?client_id=1055970105234-cqr41qsm5e4jn1esu74sp9gan01muu5k.apps.googleusercontent.com&amp;redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fapi%2Fauth%2Fgoogle%2Fcallback&amp;scope=openid+profile+email&amp;response_type=code</title>
    </head>
    <body>
        Redirecting to <a href="https://accounts.google.com/o/oauth2/auth?client_id=1055970105234-cqr41qsm5e4jn1esu74sp9gan01muu5k.apps.googleusercontent.com&amp;redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fapi%2Fauth%2Fgoogle%2Fcallback&amp;scope=openid+profile+email&amp;response_type=code">https://accounts.google.com/o/oauth2/auth?client_id=1055970105234-cqr41qsm5e4jn1esu74sp9gan01muu5k.apps.googleusercontent.com&amp;redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fapi%2Fauth%2Fgoogle%2Fcallback&amp;scope=openid+profile+email&amp;response_type=code</a>.
    </body>
</html>
 

Request      

GET api/auth/guest/google

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/auth/google/callback

Example request:
curl --request GET \
    --get "http://localhost/api/auth/google/callback" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/auth/google/callback"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (302):

Show headers
cache-control: no-cache, private
location: http://localhost:5173/login?error=google_auth_failed
content-type: text/html; charset=utf-8
x-ratelimit-limit: 60
x-ratelimit-remaining: 55
access-control-allow-origin: *
 

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="refresh" content="0;url='http://localhost:5173/login?error=google_auth_failed'" />

        <title>Redirecting to http://localhost:5173/login?error=google_auth_failed</title>
    </head>
    <body>
        Redirecting to <a href="http://localhost:5173/login?error=google_auth_failed">http://localhost:5173/login?error=google_auth_failed</a>.
    </body>
</html>
 

Request      

GET api/auth/google/callback

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/role

Example request:
curl --request GET \
    --get "http://localhost/api/role" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/role"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/role

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/role

Example request:
curl --request POST \
    "http://localhost/api/role" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/role"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/role

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/role/{id}

Example request:
curl --request GET \
    --get "http://localhost/api/role/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/role/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/role/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the role. Example: consequatur

PUT api/role/{id}

Example request:
curl --request PUT \
    "http://localhost/api/role/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/role/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/role/{id}

PATCH api/role/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the role. Example: consequatur

DELETE api/role/{id}

Example request:
curl --request DELETE \
    "http://localhost/api/role/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/role/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/role/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the role. Example: consequatur

GET api/permissions

Example request:
curl --request GET \
    --get "http://localhost/api/permissions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/permissions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/permissions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/permissions

Example request:
curl --request POST \
    "http://localhost/api/permissions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"group\": \"amniihfqcoynlazghdtqt\",
    \"is_menu_web\": true,
    \"web_route_key\": \"xbajwbpilpmufinllwloa\"
}"
const url = new URL(
    "http://localhost/api/permissions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "group": "amniihfqcoynlazghdtqt",
    "is_menu_web": true,
    "web_route_key": "xbajwbpilpmufinllwloa"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/permissions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

group   string     

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

is_menu_web   boolean  optional    

Example: true

web_route_key   string  optional    

Must not be greater than 255 characters. Example: xbajwbpilpmufinllwloa

GET api/permissions/{id}

Example request:
curl --request GET \
    --get "http://localhost/api/permissions/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/permissions/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/permissions/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the permission. Example: consequatur

PUT api/permissions/{id}

Example request:
curl --request PUT \
    "http://localhost/api/permissions/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"group\": \"amniihfqcoynlazghdtqt\",
    \"is_menu_web\": true,
    \"web_route_key\": \"xbajwbpilpmufinllwloa\"
}"
const url = new URL(
    "http://localhost/api/permissions/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "group": "amniihfqcoynlazghdtqt",
    "is_menu_web": true,
    "web_route_key": "xbajwbpilpmufinllwloa"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/permissions/{id}

PATCH api/permissions/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the permission. Example: consequatur

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

group   string  optional    

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

is_menu_web   boolean  optional    

Example: true

web_route_key   string  optional    

Must not be greater than 255 characters. Example: xbajwbpilpmufinllwloa

DELETE api/permissions/{id}

Example request:
curl --request DELETE \
    "http://localhost/api/permissions/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/permissions/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/permissions/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the permission. Example: consequatur

GET api/users

Example request:
curl --request GET \
    --get "http://localhost/api/users" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/users"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/users

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/users

Example request:
curl --request POST \
    "http://localhost/api/users" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/users"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/users

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/users/{id}

Example request:
curl --request GET \
    --get "http://localhost/api/users/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/users/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/users/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the user. Example: consequatur

PUT api/users/{id}

Example request:
curl --request PUT \
    "http://localhost/api/users/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/users/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/users/{id}

PATCH api/users/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the user. Example: consequatur

DELETE api/users/{id}

Example request:
curl --request DELETE \
    "http://localhost/api/users/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/users/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/users/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the user. Example: consequatur

GET api/rooms

Example request:
curl --request GET \
    --get "http://localhost/api/rooms" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/rooms"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/rooms

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/rooms

Example request:
curl --request POST \
    "http://localhost/api/rooms" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "number=consequatur"\
    --form "type=consequatur"\
    --form "floor=consequatur"\
    --form "capacity=45"\
    --form "price=56"\
    --form "status=occupied"\
    --form "image=@C:\Users\Phang Viphath\AppData\Local\Temp\php1542.tmp" 
const url = new URL(
    "http://localhost/api/rooms"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('number', 'consequatur');
body.append('type', 'consequatur');
body.append('floor', 'consequatur');
body.append('capacity', '45');
body.append('price', '56');
body.append('status', 'occupied');
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/rooms

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

number   string     

Example: consequatur

type   string     

Example: consequatur

floor   string     

Example: consequatur

capacity   integer     

Must be at least 1. Example: 45

price   number     

Must be at least 0. Example: 56

status   string     

Example: occupied

Must be one of:
  • available
  • occupied
  • cleaning
  • maintenance
image   file  optional    

Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\Phang Viphath\AppData\Local\Temp\php1542.tmp

Display the specified resource.

Example request:
curl --request GET \
    --get "http://localhost/api/rooms/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/rooms/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/rooms/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the room. Example: 1

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost/api/rooms/1" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "type=consequatur"\
    --form "floor=consequatur"\
    --form "capacity=45"\
    --form "price=56"\
    --form "status=occupied"\
    --form "image=@C:\Users\Phang Viphath\AppData\Local\Temp\php1581.tmp" 
const url = new URL(
    "http://localhost/api/rooms/1"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('type', 'consequatur');
body.append('floor', 'consequatur');
body.append('capacity', '45');
body.append('price', '56');
body.append('status', 'occupied');
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Request      

PUT api/rooms/{id}

PATCH api/rooms/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the room. Example: 1

Body Parameters

number   string  optional    
type   string     

Example: consequatur

floor   string     

Example: consequatur

capacity   integer     

Must be at least 1. Example: 45

price   number     

Must be at least 0. Example: 56

status   string  optional    

Example: occupied

Must be one of:
  • available
  • occupied
  • cleaning
  • maintenance
image   file  optional    

Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\Phang Viphath\AppData\Local\Temp\php1581.tmp

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/rooms/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/rooms/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/rooms/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the room. Example: 1

GET api/guests

Example request:
curl --request GET \
    --get "http://localhost/api/guests" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/guests"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/guests

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/guests

Example request:
curl --request POST \
    "http://localhost/api/guests" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=consequatur"\
    --form "email=carolyne.luettgen@example.org"\
    --form "password=ij-e/dl4m"\
    --form "phone=consequatur"\
    --form "image=@C:\Users\Phang Viphath\AppData\Local\Temp\php15E0.tmp" 
const url = new URL(
    "http://localhost/api/guests"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'consequatur');
body.append('email', 'carolyne.luettgen@example.org');
body.append('password', 'ij-e/dl4m');
body.append('phone', 'consequatur');
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/guests

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

name   string     

Example: consequatur

email   string     

Must be a valid email address. Example: carolyne.luettgen@example.org

password   string     

Must be at least 6 characters. Example: ij-e/dl4m

phone   string  optional    

Example: consequatur

image   file  optional    

Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\Phang Viphath\AppData\Local\Temp\php15E0.tmp

GET api/guests/{id}

Example request:
curl --request GET \
    --get "http://localhost/api/guests/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/guests/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/guests/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the guest. Example: consequatur

PUT api/guests/{id}

Example request:
curl --request PUT \
    "http://localhost/api/guests/consequatur" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=consequatur"\
    --form "phone=consequatur"\
    --form "image=@C:\Users\Phang Viphath\AppData\Local\Temp\php1620.tmp" 
const url = new URL(
    "http://localhost/api/guests/consequatur"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'consequatur');
body.append('phone', 'consequatur');
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Request      

PUT api/guests/{id}

PATCH api/guests/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the guest. Example: consequatur

Body Parameters

name   string  optional    

Example: consequatur

email   string  optional    
phone   string  optional    

Example: consequatur

image   file  optional    

Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\Phang Viphath\AppData\Local\Temp\php1620.tmp

DELETE api/guests/{id}

Example request:
curl --request DELETE \
    "http://localhost/api/guests/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/guests/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/guests/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the guest. Example: consequatur

GET api/reservations

Example request:
curl --request GET \
    --get "http://localhost/api/reservations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/reservations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/reservations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/reservations

Example request:
curl --request POST \
    "http://localhost/api/reservations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"guest_id\": 17,
    \"room_id\": 17,
    \"check_in\": \"2026-06-25\",
    \"check_out\": \"2107-07-24\"
}"
const url = new URL(
    "http://localhost/api/reservations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "guest_id": 17,
    "room_id": 17,
    "check_in": "2026-06-25",
    "check_out": "2107-07-24"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/reservations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

guest_id   integer     

Must match an existing stored value. Example: 17

room_id   integer     

Must match an existing stored value. Example: 17

check_in   string     

Must be a valid date. Must be a valid date in the format Y-m-d. Example: 2026-06-25

check_out   string     

Must be a valid date. Must be a valid date in the format Y-m-d. Must be a date after check_in. Example: 2107-07-24

status   string  optional    

GET api/reservations/{id}

Example request:
curl --request GET \
    --get "http://localhost/api/reservations/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/reservations/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/reservations/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the reservation. Example: consequatur

PUT api/reservations/{id}

Example request:
curl --request PUT \
    "http://localhost/api/reservations/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/reservations/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/reservations/{id}

PATCH api/reservations/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the reservation. Example: consequatur

DELETE api/reservations/{id}

Example request:
curl --request DELETE \
    "http://localhost/api/reservations/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/reservations/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/reservations/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the reservation. Example: consequatur

GET api/historys

Example request:
curl --request GET \
    --get "http://localhost/api/historys" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/historys"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/historys

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/historys

Example request:
curl --request POST \
    "http://localhost/api/historys" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"guest_id\": 17,
    \"room_id\": 17,
    \"reservation_id\": 17,
    \"total_stays\": 45,
    \"status\": \"consequatur\"
}"
const url = new URL(
    "http://localhost/api/historys"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "guest_id": 17,
    "room_id": 17,
    "reservation_id": 17,
    "total_stays": 45,
    "status": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/historys

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

guest_id   integer     

Must match an existing stored value. Example: 17

room_id   integer     

Must match an existing stored value. Example: 17

reservation_id   integer     

Must match an existing stored value. Example: 17

total_stays   integer  optional    

Must be at least 0. Example: 45

status   string     

Example: consequatur

GET api/historys/{id}

Example request:
curl --request GET \
    --get "http://localhost/api/historys/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/historys/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/historys/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the history. Example: consequatur

PUT api/historys/{id}

Example request:
curl --request PUT \
    "http://localhost/api/historys/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/historys/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/historys/{id}

PATCH api/historys/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the history. Example: consequatur

DELETE api/historys/{id}

Example request:
curl --request DELETE \
    "http://localhost/api/historys/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/historys/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/historys/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the history. Example: consequatur

GET api/permission_roles

Example request:
curl --request GET \
    --get "http://localhost/api/permission_roles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/permission_roles"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/permission_roles

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/permission_roles

Example request:
curl --request POST \
    "http://localhost/api/permission_roles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"role_id\": 17,
    \"permission_id\": 17
}"
const url = new URL(
    "http://localhost/api/permission_roles"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "role_id": 17,
    "permission_id": 17
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/permission_roles

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

role_id   integer     

Must match an existing stored value. Example: 17

permission_id   integer     

Must match an existing stored value. Example: 17

PUT api/permission_roles/{roleId}/{permissionId}

Example request:
curl --request PUT \
    "http://localhost/api/permission_roles/consequatur/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"role_id\": 17,
    \"permission_id\": 17
}"
const url = new URL(
    "http://localhost/api/permission_roles/consequatur/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "role_id": 17,
    "permission_id": 17
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/permission_roles/{roleId}/{permissionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

roleId   string     

Example: consequatur

permissionId   string     

Example: consequatur

Body Parameters

role_id   integer     

Must match an existing stored value. Example: 17

permission_id   integer     

Must match an existing stored value. Example: 17

DELETE api/permission_roles/{roleId}/{permissionId}

Example request:
curl --request DELETE \
    "http://localhost/api/permission_roles/consequatur/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/permission_roles/consequatur/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/permission_roles/{roleId}/{permissionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

roleId   string     

Example: consequatur

permissionId   string     

Example: consequatur

GET api/users_roles

Example request:
curl --request GET \
    --get "http://localhost/api/users_roles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/users_roles"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/users_roles

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/users_roles

Example request:
curl --request POST \
    "http://localhost/api/users_roles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": 17,
    \"role_id\": 17
}"
const url = new URL(
    "http://localhost/api/users_roles"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 17,
    "role_id": 17
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/users_roles

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

user_id   integer     

Must match an existing stored value. Example: 17

role_id   integer     

Must match an existing stored value. Example: 17

PUT api/users_roles/{userId}/{roleId}

Example request:
curl --request PUT \
    "http://localhost/api/users_roles/consequatur/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": 17,
    \"role_id\": 17
}"
const url = new URL(
    "http://localhost/api/users_roles/consequatur/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 17,
    "role_id": 17
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/users_roles/{userId}/{roleId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

userId   string     

Example: consequatur

roleId   string     

Example: consequatur

Body Parameters

user_id   integer     

Must match an existing stored value. Example: 17

role_id   integer     

Must match an existing stored value. Example: 17

DELETE api/users_roles/{userId}/{roleId}

Example request:
curl --request DELETE \
    "http://localhost/api/users_roles/consequatur/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/users_roles/consequatur/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/users_roles/{userId}/{roleId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

userId   string     

Example: consequatur

roleId   string     

Example: consequatur

POST api/users/{id}/profile/image

Example request:
curl --request POST \
    "http://localhost/api/users/consequatur/profile/image" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "image=@C:\Users\Phang Viphath\AppData\Local\Temp\php17F5.tmp" 
const url = new URL(
    "http://localhost/api/users/consequatur/profile/image"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/users/{id}/profile/image

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the user. Example: consequatur

Body Parameters

image   file     

Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\Phang Viphath\AppData\Local\Temp\php17F5.tmp

DELETE api/users/{id}/profile/image

Example request:
curl --request DELETE \
    "http://localhost/api/users/consequatur/profile/image" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/users/consequatur/profile/image"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/users/{id}/profile/image

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the user. Example: consequatur

GET api/reports

Example request:
curl --request GET \
    --get "http://localhost/api/reports" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/reports"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/reports

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/user

Example request:
curl --request GET \
    --get "http://localhost/api/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/user"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/user

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/profile

Example request:
curl --request PUT \
    "http://localhost/api/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"phone\": \"amniihfqcoynlazghdtqt\",
    \"address\": \"qxbajwbpilpmufinllwlo\"
}"
const url = new URL(
    "http://localhost/api/profile"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "phone": "amniihfqcoynlazghdtqt",
    "address": "qxbajwbpilpmufinllwlo"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/profile

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

phone   string  optional    

Must not be greater than 50 characters. Example: amniihfqcoynlazghdtqt

address   string  optional    

Must not be greater than 255 characters. Example: qxbajwbpilpmufinllwlo

POST api/profile/image

Example request:
curl --request POST \
    "http://localhost/api/profile/image" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "image=@C:\Users\Phang Viphath\AppData\Local\Temp\php1884.tmp" 
const url = new URL(
    "http://localhost/api/profile/image"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/profile/image

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

image   file     

Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\Phang Viphath\AppData\Local\Temp\php1884.tmp

DELETE api/profile/image

Example request:
curl --request DELETE \
    "http://localhost/api/profile/image" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/profile/image"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/profile/image

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/profile/password

Example request:
curl --request PUT \
    "http://localhost/api/profile/password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"current_password\": \"consequatur\",
    \"password\": \"[2UZ5ij-e\\/dl4\"
}"
const url = new URL(
    "http://localhost/api/profile/password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "current_password": "consequatur",
    "password": "[2UZ5ij-e\/dl4"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/profile/password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

current_password   string     

Example: consequatur

password   string     

Must be at least 6 characters. Example: [2UZ5ij-e/dl4

GET api/telegram/updates

Example request:
curl --request GET \
    --get "http://localhost/api/telegram/updates" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/telegram/updates"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/telegram/updates

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get paginated notifications, latest first (admin).

Example request:
curl --request GET \
    --get "http://localhost/api/notifications" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/notifications"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/notifications

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Count unread notifications.

Example request:
curl --request GET \
    --get "http://localhost/api/notifications/unread-count" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/notifications/unread-count"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/notifications/unread-count

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Mark all notifications as read.

Example request:
curl --request POST \
    "http://localhost/api/notifications/mark-all-read" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/notifications/mark-all-read"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/notifications/mark-all-read

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Mark a single notification as read.

Example request:
curl --request POST \
    "http://localhost/api/notifications/consequatur/mark-read" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/notifications/consequatur/mark-read"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/notifications/{id}/mark-read

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the notification. Example: consequatur