MENU navbar-image

Introduction

REST API for the Living Home website: guest search, booking, user auth, and reviews.

This documentation provides details for the public and guest-facing Website API endpoints.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right.</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Sign in via GET /auth/google/redirect or register/login endpoints.

Authentication

Register Account

Create a user account and send a 6-digit OTP code to the provided email address for verification. If an unverified account already exists for the email, its credentials are updated and a fresh OTP is sent.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Jane Doe\",
    \"email\": \"jane@example.com\",
    \"password\": \"password123\",
    \"password_confirmation\": \"password123\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/register"
);

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

let body = {
    "name": "Jane Doe",
    "email": "jane@example.com",
    "password": "password123",
    "password_confirmation": "password123"
};

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

Example response (201, Account created successfully):


{
    "message": "Registration successful. Please check your email for the verification code.",
    "email": "jane@example.com"
}
 

Example response (422, Validation error):


{
    "message": "The email has already been taken.",
    "errors": {
        "email": [
            "The email has already been taken."
        ]
    }
}
 

Request      

POST api/v1/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Full name. Example: Jane Doe

email   string     

Unique email address. Example: jane@example.com

password   string     

Minimum 8 characters. Example: password123

password_confirmation   string     

Must match password. Example: password123

Verify OTP

Submit the 6-digit OTP received via email to verify the account and obtain an API access token.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/register/verify-otp" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"jane@example.com\",
    \"otp\": \"123456\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/register/verify-otp"
);

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

let body = {
    "email": "jane@example.com",
    "otp": "123456"
};

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

Example response (200, Account verified):


{
    "user": {
        "id": 199,
        "name": "Jermaine Tillman",
        "email": "mya96@example.com",
        "phone": null,
        "role": "guest",
        "status": "active",
        "avatar_url": "",
        "email_verified_at": "2026-11-13T09:24:52.000000Z",
        "created_at": "2026-11-13T09:24:53.000000Z",
        "updated_at": "2026-11-13T09:24:53.000000Z"
    },
    "token": "1|abcdef1234567890"
}
 

Example response (422, Invalid OTP code):


{
    "message": "Invalid verification code."
}
 

Example response (422, Expired OTP code):


{
    "message": "Verification code has expired or is invalid."
}
 

Example response (422, Max attempts exceeded):


{
    "message": "Too many invalid attempts. Please request a new verification code."
}
 

Request      

POST api/v1/register/verify-otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The registered email address. Example: jane@example.com

otp   string     

6-digit OTP verification code. Example: 123456

Resend OTP

Request a new 6-digit OTP code to be sent to the email address.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/register/resend-otp" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"jane@example.com\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/register/resend-otp"
);

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

let body = {
    "email": "jane@example.com"
};

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

Example response (200, OTP resent successfully):


{
    "message": "A new verification code has been sent to your email address."
}
 

Example response (404, Account not found):


{
    "message": "No account found with this email address."
}
 

Example response (422, Already verified):


{
    "message": "This email address is already verified."
}
 

Request      

POST api/v1/register/resend-otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The registered email address. Example: jane@example.com

Login

Authenticate with email and password, returning a Sanctum bearer token. Accounts created via Google OAuth have no password and cannot log in here.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"guest@example.com\",
    \"password\": \"password\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/login"
);

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

let body = {
    "email": "guest@example.com",
    "password": "password"
};

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

Example response (200, Authenticated):


{
    "user": {
        "id": 200,
        "name": "Mrs. Justina Gaylord",
        "email": "lafayette.considine@example.com",
        "phone": null,
        "role": "guest",
        "status": "active",
        "avatar_url": "",
        "email_verified_at": "2026-11-13T09:24:53.000000Z",
        "created_at": "2026-11-13T09:24:53.000000Z",
        "updated_at": "2026-11-13T09:24:53.000000Z"
    },
    "token": "1|abcdef1234567890"
}
 

Request      

POST api/v1/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Example: guest@example.com

password   string     

Example: password

Customer Forgot Password

Request a password reset link for a customer account. Returns a generic success message to prevent user enumeration.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/forgot-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"guest@example.com\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/forgot-password"
);

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

let body = {
    "email": "guest@example.com"
};

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

Example response (200, Success):


{
    "message": "If your email is registered, a password reset link has been sent."
}
 

Request      

POST api/v1/forgot-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Customer email address. Example: guest@example.com

Customer Reset Password

Reset the customer password using a valid token sent via email.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/reset-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"638294a2b97c02...\",
    \"email\": \"guest@example.com\",
    \"password\": \"new-password-123\",
    \"password_confirmation\": \"new-password-123\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/reset-password"
);

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

let body = {
    "token": "638294a2b97c02...",
    "email": "guest@example.com",
    "password": "new-password-123",
    "password_confirmation": "new-password-123"
};

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

Example response (200, Password reset successfully):


{
    "message": "Your password has been reset."
}
 

Example response (422, Invalid token or payload):


{
    "message": "This password reset token is invalid."
}
 

Request      

POST api/v1/reset-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

token   string     

Password reset token. Example: 638294a2b97c02...

email   string     

Customer email address. Example: guest@example.com

password   string     

New password (min 8 characters). Example: new-password-123

password_confirmation   string     

Must match password. Example: new-password-123

Redirect to Google

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/auth/google/redirect" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/auth/google/redirect"
);

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


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

Example response (302, Redirects to Google's OAuth consent screen):


{}
 

Example response (302):

Show headers
cache-control: no-cache, private
location: https://accounts.google.com/o/oauth2/auth?client_id=867840699808-0b1jon471ot04eo8cd9utnjeg4npj88n.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback%2Fgoogle&scope=openid+profile+email&response_type=code
content-type: text/html; charset=utf-8
x-ratelimit-limit: 10
x-ratelimit-remaining: 9
vary: 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=867840699808-0b1jon471ot04eo8cd9utnjeg4npj88n.apps.googleusercontent.com&amp;redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback%2Fgoogle&amp;scope=openid+profile+email&amp;response_type=code'" />

        <title>Redirecting to https://accounts.google.com/o/oauth2/auth?client_id=867840699808-0b1jon471ot04eo8cd9utnjeg4npj88n.apps.googleusercontent.com&amp;redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback%2Fgoogle&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=867840699808-0b1jon471ot04eo8cd9utnjeg4npj88n.apps.googleusercontent.com&amp;redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback%2Fgoogle&amp;scope=openid+profile+email&amp;response_type=code">https://accounts.google.com/o/oauth2/auth?client_id=867840699808-0b1jon471ot04eo8cd9utnjeg4npj88n.apps.googleusercontent.com&amp;redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fcallback%2Fgoogle&amp;scope=openid+profile+email&amp;response_type=code</a>.
    </body>
</html>
 

Request      

GET api/v1/auth/google/redirect

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Google callback

Exchanges the Google OAuth code for a user session and Sanctum bearer token.

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

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


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

Example response (200, Signed in via Google):


{
    "user": {
        "id": 201,
        "name": "Mr. Adriel Romaguera",
        "email": "antonio24@example.net",
        "phone": null,
        "role": "guest",
        "status": "active",
        "avatar_url": "",
        "email_verified_at": "2026-11-13T09:24:53.000000Z",
        "created_at": "2026-11-13T09:24:53.000000Z",
        "updated_at": "2026-11-13T09:24:53.000000Z"
    },
    "token": "1|abcdef1234567890"
}
 

Request      

GET api/v1/auth/google/callback

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Current user

requires authentication

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/auth/me" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/auth/me"
);

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


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

Example response (200, Authenticated):


{
    "user": {
        "id": 202,
        "name": "Morgan Hirthe",
        "email": "dare.emelie@example.com",
        "phone": null,
        "role": "guest",
        "status": "active",
        "avatar_url": "",
        "email_verified_at": "2026-11-13T09:24:53.000000Z",
        "created_at": "2026-11-13T09:24:53.000000Z",
        "updated_at": "2026-11-13T09:24:53.000000Z"
    }
}
 

Request      

GET api/v1/auth/me

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Update Profile

requires authentication

Update the authenticated user's profile information. If avatar_temp_path is provided as a string, the avatar will be updated. Set it to null to delete/clear the current avatar. Omit this field to keep the current avatar.

Example request:
curl --request PUT \
    "http://living-home-api.test/api/v1/auth/me" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"John Doe\",
    \"phone\": \"+1234567890\",
    \"avatar_temp_path\": \"tmp\\/1234-uuid.jpg\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/auth/me"
);

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

let body = {
    "name": "John Doe",
    "phone": "+1234567890",
    "avatar_temp_path": "tmp\/1234-uuid.jpg"
};

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

Request      

PUT api/v1/auth/me

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string  optional    

The updated name of the user. Example: John Doe

phone   string  optional    

The updated phone number. Example: +1234567890

avatar_temp_path   string|null  optional    

The temporary path of the uploaded avatar file. Set to null to clear the existing avatar. Example: tmp/1234-uuid.jpg

Update Password

requires authentication

Change the authenticated user's password. Requires the current password, and revokes all other active tokens.

Example request:
curl --request PUT \
    "http://living-home-api.test/api/v1/auth/me/password" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"current_password\": \"oldPassword123\",
    \"password\": \"newPassword123\",
    \"password_confirmation\": \"newPassword123\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/auth/me/password"
);

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

let body = {
    "current_password": "oldPassword123",
    "password": "newPassword123",
    "password_confirmation": "newPassword123"
};

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

Example response (200, Password updated):


{
    "message": "Password updated successfully."
}
 

Example response (422, Incorrect current password):


{
    "message": "The provided current password does not match our records.",
    "errors": {
        "current_password": [
            "The provided current password does not match our records."
        ]
    }
}
 

Request      

PUT api/v1/auth/me/password

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

current_password   string  optional    

The user's current password. Required when the account already has a password. Example: oldPassword123

password   string     

The new password (minimum 8 characters). Example: newPassword123

password_confirmation   string     

Must match the new password. Example: newPassword123

Logout

requires authentication

Revokes the current Sanctum token.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/auth/logout" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/auth/logout"
);

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


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

Example response (200, Logged out):


{
    "message": "Logged out"
}
 

Request      

POST api/v1/auth/logout

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Bookings

List user bookings

requires authentication

Returns a cursor-paginated list of bookings for the authenticated user ("My Bookings").

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/bookings?status=confirmed&limit=10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/bookings"
);

const params = {
    "status": "confirmed",
    "limit": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": 1,
            "code": "BK-20260901-ABCD",
            "status": "confirmed",
            "booked_on": "2026-09-01",
            "apartment": {
                "id": 10,
                "code": "APT-101",
                "name": "Deluxe Sea View Apartment",
                "image_url": "http://localhost/storage/1/living.jpg",
                "rating": 5,
                "reviews_count": 12
            },
            "stay_details": {
                "check_in": {
                    "date": "2026-09-15",
                    "day": "Tue",
                    "time": "14:00"
                },
                "check_out": {
                    "date": "2026-09-18",
                    "day": "Fri",
                    "time": "12:00"
                },
                "nights": 3,
                "adults": 2,
                "children": 0
            },
            "payment": {
                "status": "paid",
                "paid_amount": 1360,
                "total": 1360,
                "currency": "AED",
                "receipt_url": "http://localhost/receipts/BK-20260901-ABCD.pdf"
            },
            "cancellation_policy": {
                "refundable": true,
                "refund_percentage": 100,
                "cancellation_deadline": {
                    "date": "2026-09-14",
                    "time": "14:00"
                }
            }
        }
    ],
    "pagination": {
        "limit": 10,
        "next_cursor": null,
        "has_more": false
    }
}
 

Request      

GET api/v1/bookings

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

status   string  optional    

Filter bookings by status (e.g. confirmed, cancelled, checked_in, checked_out, held). Example: confirmed

Must be one of:
  • held
  • confirmed
  • checked_in
  • checked_out
  • no_show
  • cancelled
  • expired
  • non_refundable_forfeit
limit   integer  optional    

Number of bookings to return per page (1 to 50). Default is 10. Must be at least 1. Must not be greater than 50. Example: 10

cursor   string  optional    

Cursor string for pagination to fetch the next set of items.

Create a booking

requires authentication

Creates a held booking for the authenticated guest, holding inventory for 15 minutes.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/bookings" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"apartment_id\": 16,
    \"plan_id\": 16,
    \"check_in\": \"2052-12-06\",
    \"check_out\": \"2052-12-06\",
    \"adults\": 22,
    \"children\": 84,
    \"promotion_code\": \"z\",
    \"extra_bed\": true,
    \"special_requests\": \"m\",
    \"services\": [
        {
            \"service_id\": 16,
            \"qty\": 22
        }
    ]
}"
const url = new URL(
    "http://living-home-api.test/api/v1/bookings"
);

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

let body = {
    "apartment_id": 16,
    "plan_id": 16,
    "check_in": "2052-12-06",
    "check_out": "2052-12-06",
    "adults": 22,
    "children": 84,
    "promotion_code": "z",
    "extra_bed": true,
    "special_requests": "m",
    "services": [
        {
            "service_id": 16,
            "qty": 22
        }
    ]
};

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

Example response (201, Booking held):


{
    "booking": {
        "id": 127,
        "code": "BK-20261113-5S7J",
        "status": "confirmed",
        "booked_on": "2026-11-13",
        "apartment": {
            "id": 95,
            "code": "APT-442",
            "name": "quo omnis Apartment",
            "image_url": null,
            "rating": null,
            "reviews_count": 0
        },
        "stay_details": {
            "check_in": {
                "date": "2026-11-23",
                "day": "Mon",
                "time": "14:00"
            },
            "check_out": {
                "date": "2026-11-25",
                "day": "Wed",
                "time": "12:00"
            },
            "nights": 2,
            "adults": 2,
            "children": 0
        },
        "payment": {
            "status": "pending",
            "paid_amount": 0,
            "security_deposit": 0,
            "total": 1000,
            "currency": "AED",
            "receipt_url": null
        },
        "cancellation_policy": {
            "refundable": true,
            "refund_percentage": 100,
            "cancellation_deadline": {
                "date": "2026-11-22",
                "time": "09:24"
            }
        }
    },
    "hold_expires_at": "2026-08-01T12:15:00.000000Z"
}
 

Request      

POST api/v1/bookings

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

apartment_id   integer     

Must match an existing stored value. Example: 16

plan_id   integer     

Must match an existing stored value. Example: 16

check_in   string     

Must be a valid date. Must be a date after or equal to today. Example: 2052-12-06

check_out   string     

Must be a valid date. Must be a date after check_in. Example: 2052-12-06

adults   integer     

Must be at least 1. Example: 22

children   integer  optional    

Must be at least 0. Example: 84

promotion_code   string  optional    

Must not be greater than 30 characters. Example: z

extra_bed   boolean  optional    

Example: true

special_requests   string  optional    

Must not be greater than 1000 characters. Example: m

services   object[]  optional    
service_id   integer     

Must match an existing stored value. Example: 16

qty   integer  optional    

Must be at least 1. Example: 22

Get booking receipt

requires authentication

Returns structured receipt data for the specified booking to show on the customer website. pricing.subtotal is the amount before VAT and tourism tax (the refundable security deposit is excluded), while pricing.grandTotal is the final amount including both taxes and the security deposit. pricing.extraBedFee is itemized when an extra bed was booked. Paymob card details (cardBrand, cardLast4) and the transaction reference are included when the payment callback payload is available.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/bookings/1/receipt" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/bookings/1/receipt"
);

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


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

Example response (200):


{
    "booking": {
        "date": "2026-10-01",
        "reference": "BK-20260930-8842"
    },
    "apartment_name": "Sunset Luxury Loft - Unit 4B",
    "phone": "+971500000000",
    "stay": {
        "checkIn": {
            "date": "2026-10-15",
            "time": "15:00"
        },
        "checkOut": {
            "date": "2026-10-18",
            "time": "11:00"
        },
        "duration": "3 nights",
        "adult": 2,
        "children": 1
    },
    "guest_name": "Alex Johnson",
    "cancellation_date": "2026-10-10",
    "pricing": {
        "roomSubtotal": 450,
        "services": [
            {
                "name": "Airport Shuttle Transfer",
                "quantity": 1,
                "amount": 50
            },
            {
                "name": "Late Check-out Fee",
                "quantity": 1,
                "amount": 30
            }
        ],
        "extraBedFee": 100,
        "cleaningFee": 75,
        "securityDeposit": 200,
        "paymentProcessingFee": 15.5,
        "tax": 48,
        "cityTourismTax": 12,
        "promotions": [
            {
                "name": "Early Bird Discount",
                "amount": -45
            },
            {
                "name": "Promo Code: FALL2026",
                "amount": -20
            }
        ],
        "subtotal": 655.5,
        "grandTotal": 915.5
    },
    "payment": {
        "amount": "915.50",
        "status": "paid",
        "provider": "paymob",
        "method": "card",
        "cardBrand": "Visa",
        "cardLast4": "4242",
        "transactionReference": 987654321,
        "currency": "AED",
        "paidAt": "2026-10-01T10:05:00+00:00",
        "remainingAmount": 0
    },
    "footerText": "Thank you for booking with us!"
}
 

Request      

GET api/v1/bookings/{booking_id}/receipt

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

booking_id   integer     

The ID of the booking. Example: 1

Cancel a booking

requires authentication

Cancels the authenticated guest's own booking by code. Refundable plans with a captured payment are refunded; non-refundable plans are forfeited. Rejected once the cancellation deadline has passed.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/bookings/1/cancel" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"b\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/bookings/1/cancel"
);

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

let body = {
    "reason": "b"
};

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

Example response (200, Booking cancelled):


{
    "booking": {
        "id": 128,
        "code": "BK-20261113-JMTK",
        "status": "confirmed",
        "booked_on": "2026-11-13",
        "apartment": {
            "id": 96,
            "code": "APT-724",
            "name": "quidem nostrum Apartment",
            "image_url": null,
            "rating": null,
            "reviews_count": 0
        },
        "stay_details": {
            "check_in": {
                "date": "2026-11-23",
                "day": "Mon",
                "time": "14:00"
            },
            "check_out": {
                "date": "2026-11-25",
                "day": "Wed",
                "time": "12:00"
            },
            "nights": 2,
            "adults": 2,
            "children": 0
        },
        "payment": {
            "status": "pending",
            "paid_amount": 0,
            "security_deposit": 0,
            "total": 1000,
            "currency": "AED",
            "receipt_url": null
        },
        "cancellation_policy": {
            "refundable": true,
            "refund_percentage": 100,
            "cancellation_deadline": {
                "date": "2026-11-22",
                "time": "09:24"
            }
        }
    },
    "success": true,
    "refund_issued": true
}
 

Request      

POST api/v1/bookings/{code}/cancel

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

code   integer     

Example: 1

Body Parameters

reason   string  optional    

Must not be greater than 255 characters. Example: b

Get a price quote

Calculates the authoritative price for a stay without holding inventory or creating a booking. Call it again whenever dates, guests, plan or services change.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/apartments/1/quote" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"plan_id\": 16,
    \"check_in\": \"2052-12-06\",
    \"check_out\": \"2052-12-06\",
    \"adults\": 22,
    \"children\": 84,
    \"extra_bed\": true,
    \"promotion_code\": \"z\",
    \"services\": [
        {
            \"service_id\": 16,
            \"qty\": 22
        }
    ]
}"
const url = new URL(
    "http://living-home-api.test/api/v1/apartments/1/quote"
);

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

let body = {
    "plan_id": 16,
    "check_in": "2052-12-06",
    "check_out": "2052-12-06",
    "adults": 22,
    "children": 84,
    "extra_bed": true,
    "promotion_code": "z",
    "services": [
        {
            "service_id": 16,
            "qty": 22
        }
    ]
};

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

Example response (200, Quote):


{
    "quote": {
        "apartment_id": 1,
        "rate_plan": "Refundable",
        "check_in": "2026-08-20",
        "check_out": "2026-08-22",
        "nights": 2,
        "room_subtotal": 2000,
        "extra_bed": false,
        "extra_bed_fee": 0,
        "services": [],
        "services_total": 0,
        "cleaning_fee": 0,
        "security_deposit": 200,
        "payment_processing_fee": 20,
        "tax": 100,
        "city_tourism_tax": 0,
        "promotions": [],
        "total": 2320,
        "currency": "AED"
    }
}
 

Example response (409, Dates unavailable):


{
    "error": {
        "code": "apartment_unavailable",
        "message": "Apartment is no longer available for the selected dates."
    }
}
 

Request      

POST api/v1/apartments/{id}/quote

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The apartment ID. Example: 1

Body Parameters

plan_id   integer     

Must match an existing stored value. Example: 16

check_in   string     

Must be a valid date. Must be a date after or equal to today. Example: 2052-12-06

check_out   string     

Must be a valid date. Must be a date after check_in. Example: 2052-12-06

adults   integer     

Must be at least 1. Example: 22

children   integer  optional    

Must be at least 0. Example: 84

extra_bed   boolean  optional    

Example: true

promotion_code   string  optional    

Must not be greater than 30 characters. Example: z

services   object[]  optional    
service_id   integer     

Must match an existing stored value. Example: 16

qty   integer  optional    

Must be at least 1. Example: 22

CMS (Public)

Get homepage content

Returns optimized homepage section copy, dynamic Spatie Media URLs, and recent guest avatars for the commitment section.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/home" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/home"
);

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


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

Example response (200):


{
    "hero_section": {
        "eyebrow": "Downtown Dubai · Luxury Apartments",
        "banner_image": {
            "url": "https://cdn.example.com/images/home/banner.webp",
            "alt": "Downtown Dubai skyline at sunset"
        },
        "booking_form": {
            "note": "By booking, you agree to our terms."
        }
    },
    "about": {
        "title": "Dubai's Most Trusted Holiday Home Experience",
        "description": "Living Home, officially registered as Living Home Short Vacation Rental LLC, is a newly established company specializing in holiday home businesses.",
        "image": {
            "url": "https://cdn.example.com/images/home/about.jpg",
            "alt": "Burj Khalifa in Dubai"
        },
        "features": [
            {
                "title": "Prime Locations",
                "description": "Every residence is handpicked in Dubai's most sought-after neighborhoods.",
                "icon_name": "pin"
            }
        ]
    },
    "promotions_section": {
        "eyebrow": "Seasonal Promotions",
        "title": "Check the Promotions",
        "description": "Every season at our property brings a unique charm, carefully designed to match your travel mood.",
        "banner_image": {
            "url": "https://cdn.example.com/images/promotions/banner.webp",
            "alt": "Seasonal Promotions in Dubai"
        },
        "items": [
            {
                "id": 1,
                "title": "High season",
                "time_range": "October to March",
                "price": "AED 750 ~ 1200",
                "image": {
                    "url": "https://cdn.example.com/images/promotions/high-season.webp",
                    "alt": "High season stay"
                }
            },
            {
                "id": 2,
                "title": "Summer Escape",
                "time_range": "April to September",
                "price": "AED 450 ~ 800",
                "image": {
                    "url": "https://cdn.example.com/images/promotions/summer.webp",
                    "alt": "Summer Escape"
                }
            },
            {
                "id": 3,
                "title": "Festive Holidays",
                "time_range": "December to January",
                "price": "AED 1200 ~ 2500",
                "image": {
                    "url": "https://cdn.example.com/images/promotions/festive.webp",
                    "alt": "Festive Holidays"
                }
            }
        ]
    },
    "amenities_section": {
        "quote": "Luxury living with infinity pool views, Burj Khalifa at your doorstep, and all the comforts you deserve.",
        "items": [
            {
                "id": 1,
                "icon": "pool",
                "title": "Infinity Pool",
                "text": "Endless pool, skyline views."
            },
            {
                "id": 2,
                "icon": "wifi",
                "title": "High-Speed Wi-Fi",
                "text": "Seamless connectivity throughout the stay."
            },
            {
                "id": 3,
                "icon": "gym",
                "title": "Fitness Center",
                "text": "State-of-the-art gym equipment."
            },
            {
                "id": 4,
                "icon": "kitchen",
                "title": "Fully Equipped Kitchen",
                "text": "Modern appliances for home cooking."
            },
            {
                "id": 5,
                "icon": "air-con",
                "title": "Climate Control",
                "text": "Central air conditioning in every suite."
            },
            {
                "id": 6,
                "icon": "services",
                "title": "24/7 Concierge",
                "text": "Personalized assistance whenever needed."
            }
        ]
    },
    "commitment": {
        "title": "Discover The Heart Of Destination",
        "happy_customer_count": "30k",
        "items": [
            "Simple & Safe Reservations"
        ],
        "images": [
            {
                "url": "https://cdn.example.com/images/home/commitment-1.jpg",
                "alt": "Living Home apartment"
            }
        ],
        "pfp": [
            {
                "url": "https://cdn.example.com/images/home/commitment-1.jpg",
                "alt": "Guest Avatar"
            }
        ]
    },
    "cta": {
        "title": "Book your dream stay in Downtown Dubai today",
        "description": "Reserve your stay with instant confirmation."
    }
}
 

Request      

GET api/v1/home

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get homepage featured apartments

Returns 5 random active apartments formatted for the homepage showcase cards.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/home/apartments" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/home/apartments"
);

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


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

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Luxury Penthouse Skyline View",
            "image": {
                "url": "http://localhost:8000/storage/media/penthouse.jpg",
                "alt": "Luxury Penthouse Skyline View"
            },
            "price": "125,000",
            "discounted_price": "118,750",
            "promotions": [
                "Early Bird 5%"
            ],
            "specs": {
                "bedroom": "5 BR",
                "bathroom": "3 BA",
                "guest": "10 GS"
            },
            "description": "A spacious penthouse in Downtown Dubai.",
            "rating": 4.8
        }
    ]
}
 

Request      

GET api/v1/home/apartments

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get homepage reviews / testimonials

Returns published guest reviews formatted for the homepage testimonials showcase.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/home/reviews" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/home/reviews"
);

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


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

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Hurri",
            "avatar": {
                "url": "https://cdn.example.com/images/avatars/hurri.webp",
                "alt": "Hurri"
            },
            "rating": 5,
            "comment": "The most breathtaking view of the Burj Khalifa we've ever seen. The apartment was pristine and the check-in seamless."
        },
        {
            "id": 2,
            "name": "Alexandre Dupont",
            "avatar": null,
            "rating": 5,
            "comment": "Everything exceeded our expectations. Clean, modern, central location, and exceptional 24/7 concierge assistance."
        }
    ]
}
 

Request      

GET api/v1/home/reviews

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get about us page content

Returns company overview, core values, mission/vision with images, services blocks, process steps, and trusted partner logos.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/about-page" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/about-page"
);

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


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

Example response (200):


{
    "hero_section": {
        "overview_description": "Living Home, officially registered as Living Home Short Vacation Rental L.L.C...",
        "banner_image": {
            "url": "http://localhost:8000/storage/media/about-banner.jpg",
            "alt": "Living Home team in Downtown Dubai"
        }
    },
    "core_values": {
        "trust": "Your trust, our foundation.",
        "luxury": "Premium stays, stunning views.",
        "comfort": "Rest well, wake refreshed.",
        "hospitality": "Warm smiles, genuine care."
    },
    "mission_vision": {
        "subtitle": "About Us",
        "title": "Mission & Vision",
        "mission": "To provide exceptional holiday home experiences...",
        "vision": "To become one of Dubai's most trusted...",
        "image_primary": {
            "url": "http://localhost:8000/storage/media/living-room.jpg",
            "alt": "Luxury living room"
        },
        "image_secondary": {
            "url": "http://localhost:8000/storage/media/apartment-view.jpg",
            "alt": "Apartment view"
        }
    },
    "services_section": {
        "subtitle": "Our services",
        "title": "Everything, taken care of",
        "blocks": [
            {
                "paragraphs": [
                    "At Living Home Short Vacation Rental L.L.C..."
                ],
                "features": [
                    "Prime Locations in Downtown Dubai"
                ],
                "image_main": {
                    "url": "/images/dummy.jpg",
                    "alt": "Service overview"
                },
                "image_badge": {
                    "url": "/images/dummy.jpg",
                    "alt": "Detail badge"
                }
            }
        ]
    },
    "process_section": {
        "step_1": "Browse our curated list and pick the perfect apartment for your stay.",
        "step_2": "Quickly verify if your preferred apartment is open for your desired dates.",
        "step_3": "Choose your check-in and check-out dates with our easy-to-use calendar.",
        "step_4": "Confirm your booking, complete payment securely, and get instant confirmation."
    },
    "trusted_globally": {
        "subtitle": "WHY CHOOSE US",
        "title": "Trusted Globally",
        "logos": [
            {
                "name": "Partner 1",
                "logo_url": "/images/logo-dummy.png"
            }
        ]
    }
}
 

Request      

GET api/v1/about-page

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get apartments page content

Returns the hero title and banner image for the apartments listing page.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/apartment-page" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/apartment-page"
);

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


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

Example response (200):


{
    "hero": {
        "title": "Find Your Perfect Stay in Dubai",
        "banner_image": {
            "url": "http://localhost:8000/storage/media/apartment-banner.jpg",
            "alt": "Luxury apartments in Downtown Dubai"
        }
    }
}
 

Request      

GET api/v1/apartment-page

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get contact page content

Returns contact information, concierge hero description, partnership info, map coordinates, and social links.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/contact-page" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/contact-page"
);

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


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

Example response (200):


{
    "hero": {
        "description": "Our concierge team is here around the clock to help you plan a comfortable stay, answer your questions, and make every moment in Dubai feel effortless.",
        "banner_image": {
            "url": "http://localhost:8000/storage/media/contact-banner.jpg",
            "alt": "Concierge desk"
        }
    },
    "contact_info": {
        "address": "Room 1004, B2B Tower, Business Bay, Dubai, United Arab Emirates",
        "phone_numbers": [
            "+971 528199289",
            "+971 588438715"
        ],
        "email": "holidayhome@happylivinghome.com",
        "working_hours": "24/7 concierge & guest support",
        "social_links": {
            "facebook": "https://facebook.com/livinghome",
            "instagram": "https://instagram.com/livinghome",
            "tiktok": "https://tiktok.com/@livinghome",
            "linkedin": "https://linkedin.com/company/livinghome"
        }
    },
    "partnership": {
        "image": "http://localhost:8000/storage/media/partner.jpg",
        "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry...",
        "phone_numbers": [
            "+971 123456789",
            "+971 987654321"
        ],
        "email": "mypartnership@gmail.com"
    },
    "map": {
        "latitude": 25.2355,
        "longitude": 55.3003
    }
}
 

Request      

GET api/v1/contact-page

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get privacy policy content

Returns rich text content for privacy policy, information sharing, and cookies & tracking.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/privacy-policy" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/privacy-policy"
);

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


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

Example response (200):


{
    "data": {
        "privacy_policy": "<h2>Privacy Policy</h2><p>Our commitment to privacy...</p>",
        "share_information": "<h3>Information Sharing</h3><p>We do not sell personal data...</p>",
        "cookies_tracking": "<h3>Cookies and Tracking</h3><p>We use essential cookies...</p>"
    }
}
 

Request      

GET api/v1/privacy-policy

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get cancellation policy list

Returns public cancellation policy rules and details for guests.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/cancellation-policy" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/cancellation-policy"
);

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


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

Example response (200):


{
    "data": [
        {
            "title": "Refundable booking policy",
            "details": [
                "The guests can cancel free of charge until 1 day before arrival. The guest will be charged the total price of the reservation if they cancel within 1 day before arrival."
            ]
        },
        {
            "title": "Non-refundable booking policy",
            "details": [
                "The guest will be charged the total price of the reservation if they cancel at any time."
            ]
        },
        {
            "title": "Applicable refund amounts or cancellation charges",
            "details": [
                "A full refund for the guest book with a refundable option",
                "No cancellation charges"
            ]
        }
    ]
}
 

Request      

GET api/v1/cancellation-policy

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Contact (Public)

Submit Contact Form

Store a guest inquiry submitted from the website contact page.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/contact" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"full_name\": \"John Doe\",
    \"email\": \"john.doe@example.com\",
    \"phone\": \"+971 50 123 4567\",
    \"message\": \"Hi, I would like to inquire about monthly stay rates for 2-bedroom apartments.\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/contact"
);

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

let body = {
    "full_name": "John Doe",
    "email": "john.doe@example.com",
    "phone": "+971 50 123 4567",
    "message": "Hi, I would like to inquire about monthly stay rates for 2-bedroom apartments."
};

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

Example response (201):


{
    "message": "Thank you for reaching out! Your message has been received.",
    "id": 1
}
 

Example response (422):


{
    "message": "The full name field is required.",
    "errors": {
        "full_name": [
            "The full name field is required."
        ]
    }
}
 

Request      

POST api/v1/contact

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

full_name   string     

The full name of the person submitting the inquiry. Must not be greater than 100 characters. Example: John Doe

email   string     

Valid email address for reply. Must be a valid email address. Must not be greater than 150 characters. Example: john.doe@example.com

phone   string  optional    

Optional contact phone number. Must not be greater than 30 characters. Example: +971 50 123 4567

message   string     

The inquiry or feedback message text. Must not be greater than 5000 characters. Example: Hi, I would like to inquire about monthly stay rates for 2-bedroom apartments.

Customer Profile

APIs for customer profile management in the customer dashboard.

Get Customer Profile

requires authentication

Retrieve the authenticated customer's profile details.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/customer/profile" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/customer/profile"
);

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


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

Example response (200):


{
    "user": {
        "id": 203,
        "name": "Dr. Darrel DuBuque",
        "email": "cody01@example.org",
        "phone": null,
        "role": "guest",
        "status": "active",
        "avatar_url": "",
        "email_verified_at": "2026-11-13T09:24:53.000000Z",
        "created_at": "2026-11-13T09:24:53.000000Z",
        "updated_at": "2026-11-13T09:24:53.000000Z"
    }
}
 

Request      

GET api/v1/customer/profile

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Update Customer Profile

requires authentication

Update the customer's name, email, phone number, and/or password.

Example request:
curl --request PUT \
    "http://living-home-api.test/api/v1/customer/profile" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"John Doe\",
    \"email\": \"john.doe@example.com\",
    \"phone\": \"+1234567890\",
    \"current_password\": \"oldPassword123\",
    \"password\": \"newSecretPassword123\",
    \"password_confirmation\": \"newSecretPassword123\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/customer/profile"
);

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

let body = {
    "name": "John Doe",
    "email": "john.doe@example.com",
    "phone": "+1234567890",
    "current_password": "oldPassword123",
    "password": "newSecretPassword123",
    "password_confirmation": "newSecretPassword123"
};

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

Example response (200):


{
    "user": {
        "id": 204,
        "name": "Ms. Audra Crooks II",
        "email": "gulgowski.asia@example.com",
        "phone": null,
        "role": "guest",
        "status": "active",
        "avatar_url": "",
        "email_verified_at": "2026-11-13T09:24:53.000000Z",
        "created_at": "2026-11-13T09:24:53.000000Z",
        "updated_at": "2026-11-13T09:24:53.000000Z"
    }
}
 

Request      

PUT api/v1/customer/profile

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string  optional    

Customer full name. Must not be greater than 255 characters. Example: John Doe

email   string  optional    

Customer unique email address. Must be a valid email address. Must not be greater than 255 characters. Example: john.doe@example.com

phone   string  optional    

Customer contact phone number. Must not be greater than 20 characters. Example: +1234567890

current_password   string  optional    

Current password of the customer (required if setting a new password). Example: oldPassword123

password   string  optional    

New password (minimum 8 characters, requires password_confirmation). Must be at least 8 characters. Example: newSecretPassword123

password_confirmation   string  optional    

Confirmation of the new password. This field is required when password is present. Example: newSecretPassword123

Upload Customer Avatar

requires authentication

Upload or update the customer's avatar directly via multipart/form-data.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/customer/profile/avatar" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "avatar=@C:\Users\User\AppData\Local\Temp\phpF3FA.tmp" 
const url = new URL(
    "http://living-home-api.test/api/v1/customer/profile/avatar"
);

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

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

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

Example response (200):


{
    "user": {
        "id": 205,
        "name": "Ms. Audra Crooks II",
        "email": "idickens@example.org",
        "phone": null,
        "role": "guest",
        "status": "active",
        "avatar_url": "",
        "email_verified_at": "2026-11-13T09:24:53.000000Z",
        "created_at": "2026-11-13T09:24:53.000000Z",
        "updated_at": "2026-11-13T09:24:53.000000Z"
    }
}
 

Request      

POST api/v1/customer/profile/avatar

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

avatar   file     

The image file for the avatar (max 5MB, format: jpeg, png, jpg, webp, avif). Must be a file. Must be an image. Must not be greater than 5120 kilobytes. Example: C:\Users\User\AppData\Local\Temp\phpF3FA.tmp

Delete Customer Avatar

requires authentication

Delete the authenticated customer's current avatar.

Example request:
curl --request DELETE \
    "http://living-home-api.test/api/v1/customer/profile/avatar" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/customer/profile/avatar"
);

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


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

Example response (200):


{
    "user": {
        "id": 206,
        "name": "Morgan Hirthe",
        "email": "imclaughlin@example.org",
        "phone": null,
        "role": "guest",
        "status": "active",
        "avatar_url": "",
        "email_verified_at": "2026-11-13T09:24:53.000000Z",
        "created_at": "2026-11-13T09:24:53.000000Z",
        "updated_at": "2026-11-13T09:24:53.000000Z"
    }
}
 

Request      

DELETE api/v1/customer/profile/avatar

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Endpoints

Authenticate the request for channel access.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/broadcasting/auth" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/broadcasting/auth"
);

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
vary: Origin
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/broadcasting/auth

POST api/broadcasting/auth

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Inventory

Search apartments

Returns apartments using the home apartment card format. When dates are provided, only apartments with open inventory for each requested night are returned, with the lowest nightly rate summed across the stay.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/apartments?check_in=2026-11-13T09%3A24%3A53&check_out=2052-12-06&adults=22&children=84&min_price=12&max_price=77&bedrooms=8&bathrooms=76&extra_bed_allowed=1&amenities[]=16&limit=22&cursor=architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/apartments"
);

const params = {
    "check_in": "2026-11-13T09:24:53",
    "check_out": "2052-12-06",
    "adults": "22",
    "children": "84",
    "min_price": "12",
    "max_price": "77",
    "bedrooms": "8",
    "bathrooms": "76",
    "extra_bed_allowed": "1",
    "amenities[0]": "16",
    "limit": "22",
    "cursor": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200, Apartments found):


{
    "data": [
        {
            "id": 1,
            "name": "Standard Apartment",
            "image": {
                "url": null,
                "alt": "Standard Apartment"
            },
            "price": "45,000",
            "discounted_price": null,
            "promotions": [],
            "specs": {
                "bedroom": "2 BR",
                "bathroom": "1 BA",
                "guest": "2 GS"
            },
            "description": "",
            "rating": null
        }
    ],
    "pagination": {
        "limit": 12,
        "next_cursor": null,
        "has_more": false
    }
}
 

Request      

GET api/v1/apartments

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

check_in   string  optional    

This field is required when check_out is present. Must be a valid date. Example: 2026-11-13T09:24:53

check_out   string  optional    

This field is required when check_in is present. Must be a valid date. Must be a date after check_in. Example: 2052-12-06

adults   integer  optional    

Must be at least 1. Example: 22

children   integer  optional    

Must be at least 0. Example: 84

min_price   integer  optional    

Must be at least 0. Example: 12

max_price   integer  optional    

Must be at least 0. Example: 77

bedrooms   integer  optional    

Must be at least 0. Example: 8

bathrooms   integer  optional    

Must be at least 0. Example: 76

extra_bed_allowed   boolean  optional    

Example: true

amenities   integer[]  optional    

Must match an existing stored value.

limit   integer  optional    

Must be at least 1. Must not be greater than 50. Example: 22

cursor   string  optional    

Example: architecto

Get apartment details

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/apartments/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/apartments/1"
);

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


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

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 100
x-ratelimit-remaining: 99
vary: Origin
 

{
    "message": "No query results for model [App\\Models\\Apartment] 1"
}
 

Request      

GET api/v1/apartments/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The apartment ID. Example: 1

Get apartment availability

Returns per-day availability and lowest available price for the next 90 days by default. available is true when at least one rate plan has open inventory that date; price is the cheapest open plan's price. is_held is true when the date is unavailable due to an active hold. hold_expires_at is the ISO 8601 timestamp when the hold expires, or null.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/apartments/1/availability?from=2026-11-13T09%3A24%3A53&to=2052-12-06" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/apartments/1/availability"
);

const params = {
    "from": "2026-11-13T09:24:53",
    "to": "2052-12-06",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200, Availability (truncated to one day)):


{
    "dates": [
        {
            "date": "2026-08-10",
            "available": true,
            "is_held": false,
            "hold_expires_at": null,
            "price": 42000
        }
    ]
}
 

Request      

GET api/v1/apartments/{id}/availability

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The apartment ID. Example: 1

Query Parameters

from   string  optional    

Must be a valid date. Example: 2026-11-13T09:24:53

to   string  optional    

Must be a valid date. Must be a date after or equal to from. Example: 2052-12-06

Returns the gallery images for the specified apartment with cursor pagination.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/apartments/1/gallery" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"limit\": 1,
    \"cursor\": \"architecto\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/apartments/1/gallery"
);

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

let body = {
    "limit": 1,
    "cursor": "architecto"
};

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

Example response (200):


{
    "data": [
        {
            "id": 1,
            "url": "http://localhost/storage/1/living.jpg",
            "alt_text": "Living Room",
            "sort_order": 1
        }
    ],
    "pagination": {
        "limit": 12,
        "next_cursor": null,
        "has_more": false
    }
}
 

Get apartment reviews

Returns approved guest reviews for the specified apartment with cursor pagination.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/apartments/1/reviews" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"limit\": 1,
    \"cursor\": \"architecto\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/apartments/1/reviews"
);

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

let body = {
    "limit": 1,
    "cursor": "architecto"
};

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

Example response (200):


{
    "data": [
        {
            "id": 1,
            "rating": 5,
            "text": "Very clean and comfortable.",
            "guest_name": "Jane Doe",
            "avatar": {
                "url": "https://cdn.example.com/images/avatars/jane.webp",
                "alt": "Jane Doe"
            },
            "admin_reply": null,
            "replied_at": null,
            "created_at": "2026-08-20T10:00:00.000000Z"
        }
    ],
    "pagination": {
        "limit": 10,
        "next_cursor": null,
        "has_more": false
    }
}
 

Request      

GET api/v1/apartments/{id}/reviews

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The apartment ID. Example: 1

Body Parameters

limit   integer  optional    

Must be at least 1. Must not be greater than 50. Example: 1

cursor   string  optional    

Example: architecto

List amenities

Returns the global catalog of amenities available for filtering apartments.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/amenities" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/amenities"
);

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


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

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Wi-Fi",
            "icon": "wifi"
        },
        {
            "id": 2,
            "name": "Swimming Pool",
            "icon": "pool"
        }
    ]
}
 

Request      

GET api/v1/amenities

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Media

APIs for handling file uploads.

Request Upload Intent

requires authentication

Request a URL to upload a file to. Depending on the server configuration, this will return either a local server URL or a direct-to-cloud presigned URL (e.g., AWS S3).

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/media/intent" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"filename\": \"avatar.jpg\",
    \"content_type\": \"image\\/jpeg\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/media/intent"
);

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

let body = {
    "filename": "avatar.jpg",
    "content_type": "image\/jpeg"
};

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

Example response (200):


{
    "strategy": "local",
    "upload_url": "http://api.example.com/api/v1/media/local-upload?path=tmp/1234-uuid.jpg",
    "method": "POST",
    "temp_path": "tmp/1234-uuid.jpg",
    "headers": {}
}
 

Request      

POST api/v1/media/intent

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

filename   string     

The original filename of the upload. Example: avatar.jpg

content_type   string     

The MIME type of the file. Example: image/jpeg

Upload File (Local Strategy)

requires authentication

This endpoint is only used when the server's upload strategy is set to "local". The frontend should send the multipart file here using the exact URL returned by the Intent endpoint.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/media/local-upload?path=tmp%2F1234-uuid.jpg" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "path=tmp/bngz"\
    --form "file=@C:\Users\User\AppData\Local\Temp\phpF43A.tmp" 
const url = new URL(
    "http://living-home-api.test/api/v1/media/local-upload"
);

const params = {
    "path": "tmp/1234-uuid.jpg",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

const body = new FormData();
body.append('path', 'tmp/bngz');
body.append('file', document.querySelector('input[name="file"]').files[0]);

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

Example response (200):


{
    "message": "File uploaded successfully",
    "path": "tmp/1234-uuid.jpg"
}
 

Request      

POST api/v1/media/local-upload

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Query Parameters

path   string     

The temporary path generated by the intent endpoint. Example: tmp/1234-uuid.jpg

Body Parameters

path   string     

Must start with one of tmp/. Example: tmp/bngz

file   file     

The raw file to upload. Example: C:\Users\User\AppData\Local\Temp\phpF43A.tmp

Payments

Create a payment intention (G5)

requires authentication

Returns the hosted Unified Checkout URL to redirect the guest to. Idempotent: while the booking is still held and unpaid the same intention (and therefore the same URL) is returned, so a guest who abandons the Paymob tab and retries is never handed a second payment link. When already_paid is true the guest already completed payment — do not redirect, go to the receipt instead.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/payments/intention" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"booking_code\": \"BK-20260815-AB12\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/payments/intention"
);

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

let body = {
    "booking_code": "BK-20260815-AB12"
};

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

Example response (200, Intention created):


{
    "data": {
        "payment_id": 1,
        "client_secret": "cs_test",
        "checkout_url": "https://uae.paymob.com/unifiedcheckout/?publicKey=pk&clientSecret=cs_test",
        "amount": 200000,
        "currency": "AED",
        "already_paid": false,
        "booking_status": "held"
    }
}
 

Example response (200, Already paid):


{
    "data": {
        "payment_id": 1,
        "client_secret": "",
        "checkout_url": "",
        "amount": 200000,
        "currency": "AED",
        "already_paid": true,
        "booking_status": "confirmed"
    }
}
 

Request      

POST api/v1/payments/intention

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

booking_code   string     

The held booking's code. Example: BK-20260815-AB12

Paymob transaction callback

Webhook target (Processed POST). HMAC-verified, idempotent by Paymob transaction id; confirms the booking on success. Source of truth for payment state.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/payments/callback" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/payments/callback"
);

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


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

Example response (200, Acknowledged):


{
    "data": {
        "received": true
    }
}
 

Example response (403, Bad HMAC):


{
    "error": {
        "code": "invalid_hmac",
        "message": "HMAC verification failed."
    }
}
 

Request      

POST api/v1/payments/callback

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get payment and booking status (Polling / Verification)

Returns the current confirmation and payment status for a booking. Used by the frontend checkout screen for polling when WebSockets are unavailable or stale. Optionally queries Paymob gateway to reconcile if still pending.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/payments/1/status?booking_code=BK-20260815-AB12&verify=" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/payments/1/status"
);

const params = {
    "booking_code": "BK-20260815-AB12",
    "verify": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": {
        "booking_code": "BK-20260815-AB12",
        "status": "confirmed",
        "payment_status": "paid",
        "is_confirmed": true,
        "is_paid": true,
        "hold_expires_at": null,
        "paid_amount": 2000,
        "total": 2000,
        "currency": "AED",
        "receipt_url": "http://localhost/receipts/BK-20260815-AB12.pdf"
    }
}
 

Request      

GET api/v1/payments/{code}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

code   integer     

Example: 1

Query Parameters

booking_code   string  optional    

The booking code to check. Example: BK-20260815-AB12

verify   boolean  optional    

Optional. Set true to actively verify status with Paymob gateway. Example: false

Reviews

Validate a review token

Returns the booking summary for a valid, unexpired, unconsumed token.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/reviews/token/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/reviews/token/architecto"
);

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


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

Example response (200, Valid token):


{
    "booking": {
        "code": "BK-A1B2C3",
        "check_in": "2026-09-01",
        "check_out": "2026-09-05",
        "room_name": "Standard Room"
    },
    "expires_at": "2026-09-12T00:00:00.000000Z"
}
 

Request      

GET api/v1/reviews/token/{token}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

token   string     

The token. Example: architecto

Submit a review

Consumes the token so it cannot be reused.

Example request:
curl --request POST \
    "http://living-home-api.test/api/v1/reviews" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"architecto\",
    \"rating\": 2,
    \"title\": \"g\",
    \"text\": \"z\"
}"
const url = new URL(
    "http://living-home-api.test/api/v1/reviews"
);

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

let body = {
    "token": "architecto",
    "rating": 2,
    "title": "g",
    "text": "z"
};

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

Example response (201, Review submitted):


{
    "review": {
        "id": 13,
        "booking_id": 129,
        "guest_id": 210,
        "rating": 2,
        "title": null,
        "text": "Fugiat sunt nihil accusantium harum mollitia. Deserunt aut ab provident perspiciatis quo omnis nostrum. Adipisci quidem nostrum qui commodi incidunt iure.",
        "status": "pending",
        "created_at": "2026-11-13T09:24:53.000000Z"
    }
}
 

Request      

POST api/v1/reviews

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

token   string     

Example: architecto

rating   integer     

Must be at least 1. Must not be greater than 5. Example: 2

title   string  optional    

Must not be greater than 100 characters. Example: g

text   string  optional    

Must not be greater than 2000 characters. Example: z

Services

List services

Returns active additional services (e.g. airport pickup) available at checkout.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/services" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/services"
);

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


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

Example response (200):


{
    "services": [
        {
            "id": 51,
            "code": "SVC-706",
            "name": "animi quos",
            "description": "Et fugiat sunt nihil accusantium.",
            "price": 50,
            "per_night": false,
            "sort_order": 0
        },
        {
            "id": 52,
            "code": "SVC-641",
            "name": "mollitia modi",
            "description": "Aut ab provident perspiciatis quo omnis nostrum aut.",
            "price": 50,
            "per_night": false,
            "sort_order": 0
        }
    ]
}
 

Request      

GET api/v1/services

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Settings (Public)

Get public settings

Returns public policies, timings, and configuration needed by frontend booking and checkout flows.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/settings"
);

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


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

Example response (200):


{
    "check_in_time": "14:00",
    "check_out_time": "12:00",
    "cancellation_threshold_hours": 24,
    "booking_hold_minutes": 15,
    "vat_rate": 500,
    "payment_processing_fee": 20,
    "default_currency": "AED",
    "min_stay_nights_default": 1,
    "max_advance_booking_days": 365,
    "hotel_categories": [
        {
            "code": "four_star",
            "name": "4-Star / Superior",
            "fee_per_bedroom": 15
        },
        {
            "code": "five_star",
            "name": "5-Star / Deluxe",
            "fee_per_bedroom": 20
        },
        {
            "code": "standard",
            "name": "Standard / 3-Star",
            "fee_per_bedroom": 10
        }
    ],
    "security_deposit_rates": [
        {
            "bedrooms": 1,
            "amount": 100
        },
        {
            "bedrooms": 2,
            "amount": 200
        },
        {
            "bedrooms": 3,
            "amount": 400
        }
    ]
}
 

Request      

GET api/v1/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get a specific public setting

Returns the value of an allowlisted public setting by its key.

Example request:
curl --request GET \
    --get "http://living-home-api.test/api/v1/settings/cancellation_threshold_hours" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://living-home-api.test/api/v1/settings/cancellation_threshold_hours"
);

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


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

Example response (200):


{
    "key": "cancellation_threshold_hours",
    "value": 24
}
 

Example response (404):


{
    "message": "Setting not found or not public."
}
 

Request      

GET api/v1/settings/{key}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

key   string     

The setting key. Example: cancellation_threshold_hours