Skip to main content
Version: V3.0

Booking Management API


Get Booking List

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
booking_idStringBodyBooking ID
amenity_idStringBodyAmenity ID
amenity_nameStringBodyAmenity name
amenity_picture_urlStringBodyAmenity picture URL
amenity_descriptionStringBodyAmenity description
building_nameStringBodyBuilding name
family_nameStringBodyFamily name
start_timeStringBodyStart time, UTC
finish_timeStringBodyFinish time, UTC
stateStringBodyState, pending or rejected or canceled or success
is_expiredBooleanBodyWhether the booking is expired or not?
true: yes
false: no
pin_codeStringBodyPIN code
qr_code_urlStringBodyQR code URL
created_timeStringBodyCreated time, UTC

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_booking_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"booking_id": "bfa332e258aae1badbb27d31128f442d1",
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"amenity_name": "Gym",
"amenity_picture_url": "https://test.akubela.com/g",
"amenity_description": "test",
"building_name": "001",
"family_name": "home",
"start_time": "2024-05-02 13:14:15",
"finish_time": "2024-05-02 15:14:15",
"state": "pending",
"is_expired": true,
"pin_code": "123456",
"qr_code_url": "https://test.akubela.com/h.png",
"created_time": "2024-05-01 13:32:45"
}
]
}

Failure Return Example

See Failure Return Example



Get Booking Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
booking_idStringBodyYesBooking ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
amenity_idStringBodyAmenity ID
amenity_nameStringBodyAmenity name
amenity_picture_urlStringBodyAmenity picture URL
amenity_descriptionStringBodyAmenity description
building_nameStringBodyBuilding name
family_nameStringBodyFamily name
start_timeStringBodyStart time, UTC
finish_timeStringBodyFinish time, UTC
stateStringBodyState, pending or rejected or canceled or success
is_expiredBooleanBodyWhether the booking is expired or not?
true: yes
false: no
pin_codeStringBodyPIN code
qr_code_urlStringBodyQR code URL
created_timeStringBodyCreated time, UTC

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"booking_id": "b31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"amenity_name": "Gym",
"amenity_picture_url": "https://test.akubela.com/g",
"amenity_description": "test",
"building_name": "001",
"family_name": "home",
"start_time": "2024-05-02 13:14:15",
"finish_time": "2024-05-02 15:14:15",
"state": "pending",
"is_expired": true,
"pin_code": "123456",
"qr_code_url": "https://test.akubela.com/h.png",
"created_time": "2024-05-01 13:32:45"
}
}

Failure Return Example

See Failure Return Example



Get Booking Amenity List

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
amenity_idStringBodyAmenity ID
amenity_nameStringBodyAmenity name
amenity_picture_urlStringBodyAmenity picture URL
amenity_descriptionStringBodyAmenity description

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_booking_amenity_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"amenity_name": "Gym",
"amenity_description": "test",
"amenity_picture_url": "https://test.akubela.com/g"
}
]
}

Failure Return Example

See Failure Return Example



Get Booking Time List

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
dateStringBodyYesDate
amenity_idStringBodyYesAmenity ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
allowed_booking_timeObject<booking_time>BodyAllowed booking time
disallowed_booking_time[]Object<booking_time>BodyDisallowed booking time

booking_time description

Parameter NameTypeLocationDescription
start_timeStringBodyStart time, UTC
finish_timeStringBodyFinish time, UTC

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_booking_time_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"date": "2024-01-02"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"allowed_booking_time": {
"start_time": "08:00",
"finish_time": "23:00"
},
"disallowed_booking_time": [
{
"start_time": "08:30",
"finish_time": "11:30"
},
{
"start_time": "21:30",
"finish_time": "23:00"
}
]
}
}

Failure Return Example

See Failure Return Example



Create Booking Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
amenity_idStringBodyYesAmenity ID
start_timeStringBodyYesStart time, UTC
durationIntegerBodyYesBooking duration time (min)

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
booking_idStringBodyBooking ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "create_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"amenity_id": "afa332e258aae1badbb27d31128f442dc",
"start_time": "2024-01-02 13:14:15",
"duration": 80
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"booking_id": "b8b5a73f8dd84abaa94dcs248be49b0d1"
}
}

Failure Return Example

See Failure Return Example



Create Code Booking Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
booking_codeStringBodyYesBooking code

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
booking_idStringBodyBooking ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "create_code_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"booking_code": "bfa332e258aae1badbb27d31128f442dc"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"booking_id": "b8b5a73f8dd84abaa94dcs248be49b0d1"
}
}

Failure Return Example

See Failure Return Example



Delete Booking Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
booking_idStringBodyYesBooking ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "delete_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"booking_id": "b8b5a73f8dd84abaa94dcs248be49b0d1"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Delete Booking Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
bookings[]Object<booking>BodyYesBooking information

booking description

Parameter NameTypeLocationRequiredDescription
booking_idStringBodyYesBooking ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_delete_booking_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"bookings": [
{
"booking_id": "b8b5a73f8dd84abaa94dcs248be49b0d1"
}
]
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example