Booking Hotels
  1. Auth
Booking Hotels
  • About API
  • Auth
    • Register
      POST
    • Login by Password
      POST
    • Login by Access Token
      GET
    • Renew Access Token
      GET
    • Update Password
      PATCH
    • Update Profile
      PATCH
    • Request Forgot Password
      POST
    • Verify Forgot Password
      POST
    • Confirm Forgot Password
      PATCH
    • Logout
      DELETE
  • Hotels
    • Get Hotel List
      GET
    • Get Hotel by Id
      GET
    • Create Hotel
      POST
    • Update Hotel by Id
      PATCH
    • Delete Hotel by Id
      DELETE
  • Rooms
    • Get Room List
      GET
    • Get Room by Id
      GET
    • Create Room
      POST
    • Update Room by Id
      PATCH
    • Delete Room by Id
      DELETE
  • Bookings
    • Actions
      • Pay Booking by Id
      • Cancel Booking by Id
      • Check In Booking by Id
    • Get Booking List
      GET
    • Get Booking by Id
      GET
    • Create Booking
      POST
  • Check Service Status
    GET
  1. Auth

Register

POST
/api/v1/auth/register
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/auth/register' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Yusril A. P.",
    "email": "yusriladr.37@gmail.com",
    "phone_number": "08123456789",
    "password": "rahasia123!"
}'
Response Response Example
{
    "status_code": 200,
    "data": {
        "id": "3a09f5fc-0878-4d07-9a97-0feb4ff4c9bb",
        "name": "yusril-adr",
        "email": "yusriladr.37@gmail.com",
        "phone_number": "08123456789",
        "created_at": "2025-02-07T09:16:35.207Z",
        "updated_at": "2025-02-07T02:16:35.290Z",
        "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjNhMDlmNWZjLTA4NzgtNGQwNy05YTk3LTBmZWI0ZmY0YzliYiIsImlhdCI6MTczODkyMDE1MiwiZXhwIjoxNzM5MDA2NTUyfQ.SZv0tnbEDhd8c1wBf2aA6uV2iosWIzFj-Zpm3hcvO5Y",
        "access_token_expired_at": "2025-02-08T09:22:32.270Z",
        "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjNhMDlmNWZjLTA4NzgtNGQwNy05YTk3LTBmZWI0ZmY0YzliYiIsImlhdCI6MTczODkyMDE1MiwiZXhwIjoxNzM5NTI0OTUyfQ.Nl8P_o613YdqDeadIcDwbiKx-jRomebTFawvVcTtTK0",
        "refresh_token_expired_at": "2025-02-14T09:22:32.272Z"
    },
    "message": "Register User successfully"
}

Request

Body Params application/json
name
string 
required
email
string 
required
phone_number
string 
required
password
string 
required
Examples

Responses

🟢200Success
application/json
Body
status_code
number 
required
data
object 
required
id
number 
required
created_at
string 
required
updated_at
string 
required
name
string 
required
email
string 
required
phone_number
string 
required
message
string 
required
Modified at 2025-03-25 08:04:04
Previous
About API
Next
Login by Password
Built with