Pinokeyio API (1.0.0)

Download OpenAPI specification:Download

Serverless booking platform API documentation

Accounts

Send OTP for forgot password

Sends an OTP code to the user's phone number for password reset. No authentication required.

Request Body schema: application/json
phoneNumber
required
string

Phone number (without country code)

Responses

Request samples

Content type
application/json
{
  • "phoneNumber": "555123456"
}

Reset password with OTP

Verifies OTP and resets the user's password. No authentication required.

Request Body schema: application/json
phoneNumber
required
string

Phone number (without country code)

otpCode
required
string

4-digit OTP code

newPassword
required
string

New password (min 8 chars, must contain letter and number)

Responses

Request samples

Content type
application/json
{
  • "phoneNumber": "555123456",
  • "otpCode": "4444",
  • "newPassword": "newPassword123"
}

Verify phone number with OTP

Verifies the user's phone number using the OTP code sent via SMS

Authorizations:
bearerAuth
Request Body schema: application/json
phone
required
string

Phone number (without country code)

otpCode
required
string

4-digit OTP code

Responses

Request samples

Content type
application/json
{
  • "phone": "555123456",
  • "otpCode": "4444"
}

Resend OTP code

Resends the OTP verification code to the user's phone number

Authorizations:
bearerAuth

Responses

Update phone number

Updates the user's phone number and sends a new OTP for verification

Authorizations:
bearerAuth
Request Body schema: application/json
phoneNumber
required
string

New phone number (without country code)

countryCode
required
string

Country code with +

Responses

Request samples

Content type
application/json
{
  • "phoneNumber": "555987654",
  • "countryCode": "+995"
}

Change password

Changes the user's password. Requires current password verification.

Authorizations:
bearerAuth
Request Body schema: application/json
currentPassword
required
string

Current password

newPassword
required
string

New password (min 8 chars, must contain letter and number)

Responses

Request samples

Content type
application/json
{
  • "currentPassword": "oldPassword123",
  • "newPassword": "newPassword123"
}

Bookings

Block property for 10 minutes

Creates a temporary booking lock to prevent double bookings. Automatically deleted after 10 minutes.

path Parameters
propertyId
required
string

Property ID

Request Body schema: application/json
rentalType
required
string
Enum: "DAILY" "HOURLY"
checkIn
required
string

For DAILY - date only (2025-06-01), For HOURLY - full datetime (2025-06-01T14:00:00Z)

checkOut
required
string

For DAILY - date only (2025-06-03), For HOURLY - full datetime (2025-06-01T17:00:00Z)

guests
required
number

Responses

Request samples

Content type
application/json
{
  • "rentalType": "DAILY",
  • "checkIn": "2025-06-01",
  • "checkOut": "2025-06-03",
  • "guests": 2
}

Send OTP for booking verification

Sends an OTP code to the guest's phone number. No authentication required.

path Parameters
id
required
string

Booking ID

Request Body schema: application/json
phoneNumber
required
string

Guest phone number

Responses

Request samples

Content type
application/json
{
  • "phoneNumber": "555123456"
}

Verify booking with OTP

Verifies OTP, creates client record, and changes booking status to PENDING. No authentication required.

path Parameters
id
required
string

Booking ID

Request Body schema: application/json
phoneNumber
required
string

Guest phone number

otpCode
required
string

4-digit OTP code

firstName
required
string

Guest first name

lastName
required
string

Guest last name

Responses

Request samples

Content type
application/json
{
  • "phoneNumber": "555123456",
  • "otpCode": "4444",
  • "firstName": "John",
  • "lastName": "Doe"
}

Host Bookings

Approve a pending booking

Approves a booking with PENDING status (Cash or Bank Transfer payments). Requires authentication. Host must own the property.

Authorizations:
bearerAuth
path Parameters
id
required
string

Booking ID

Responses

Decline a pending booking

Declines a booking with PENDING status. Requires authentication. Host must own the property.

Authorizations:
bearerAuth
path Parameters
id
required
string

Booking ID

Request Body schema: application/json
reason
string

Optional reason for declining

Responses

Request samples

Content type
application/json
{
  • "reason": "Property is not available for this date"
}

Reschedule an approved booking

Changes booking dates. Uses same validation as block endpoint. Requires authentication. Host must own the property.

Authorizations:
bearerAuth
path Parameters
id
required
string

Booking ID

Request Body schema: application/json
rentalType
required
string
Enum: "DAILY" "HOURLY"
checkIn
required
string

New check-in date/datetime

checkOut
required
string

New check-out date/datetime

guests
number

Updated guest count (optional)

Responses

Request samples

Content type
application/json
{
  • "rentalType": "DAILY",
  • "checkIn": "2025-06-05",
  • "checkOut": "2025-06-08",
  • "guests": 3
}

Extend an approved booking

Extends booking end date/time. Requires authentication. Host must own the property.

Authorizations:
bearerAuth
path Parameters
id
required
string

Booking ID

Request Body schema: application/json
newCheckOut
string

New check-out date/datetime

additionalHours
number

Additional hours to extend (for hourly rentals)

Responses

Request samples

Content type
application/json
{
  • "newCheckOut": "2025-06-10",
  • "additionalHours": 2
}

Cancel an approved booking

Cancels a confirmed booking. Requires authentication. Host must own the property.

Authorizations:
bearerAuth
path Parameters
id
required
string

Booking ID

Request Body schema: application/json
reason
string

Optional cancellation reason

Responses

Request samples

Content type
application/json
{
  • "reason": "Property maintenance required"
}

Refund a completed/cancelled booking

Refunds a booking (automatic payment only). Requires authentication. Host must own the property.

Authorizations:
bearerAuth
path Parameters
id
required
string

Booking ID

Request Body schema: application/json
amount
number

Partial refund amount (optional, full refund if not specified)

Responses

Request samples

Content type
application/json
{
  • "amount": 50
}