Skip to main content

Complete Reservation


This API allows your application to complete a specific reservation. By providing the reservation's unique ID and a note for the completing reservation.

Endpoint

POST 

Request

the request a

Endpoint

:

https://demo-api.frontpayment.no/api/v1/connect/reservations/reservations/complete/{{RESERVATION_UUID}}

Method

:

POST

Authorization

:

Bearer

Payload Validation

:

 

'note' => 'required|string',

Authorization

To access this endpoint, include a Bearer Token in the Authorization header of your request. You can obtain this token from Frontpayment.

Example PayloadAuthorization Header: Authorization: Bearer YOUR_FRONTPAID_BEARER_TOKEN

Payload

:

Send
following

parameters as a JSON object in the request body:

{
    "note": "Test Complete Note, Real by Real One"Note"
}

Validation Rules

Make sure your request meets the following requirements:

FieldTypeDescription
notestringRequired Reservation completing note.

Response

ResponseA Structure

successful
will

:

return
202

status with the following JSON payload:

// Success
{
    "status_code": 202,
    "status_message": "OK",
    "message": "reservationCompletedSuccessfully",
    "is_data": false,
    "data": null
}
//
Errors

API returns a 404 error, it means requested order with RESERVATION_UUID could not be found in our system.

{
    "status_code": 404,
    "status_message": "Not Found",
    "message": "reservationNotFound",
    "is_data": false,
    "data": null
}

API returns a 417 error, it means requested payload is not valid.

{
    "status_code": 417,
    "status_message": "Client Error",
    "message": "payloadValidationErrors",
    "is_error": true,
    "errors": "Array"
}
{
"status_code":

API 404,return "status_message":a "Not400 Found"error, it means your requested reservation status is in SENT, "message":RESERVED "reservationNotFound",NOT "is_data":PAID false,or "data":EXPIRED.

null } { "status_code": 400, "status_message": "Conflict of Business Logic", "message": "reservationStatusAlreadyParamCompleted", "is_data": false, "data": null } { "status_code": 400, "status_message": "Conflict of Business Logic", "message": "reservationStatusAlreadyParamCancelled", "is_data": false, "data": null }
{
    "status_code": 400,
    "status_message": "Conflict of Business Logic",
    "message": "prerequisiteFailedToCompleteReservation",
    "is_data": false,
    "data": null
}

API returns a 510 error, it means something failed on the server side

{
    "status_code": 510,
    "status_message": "Execution Exception Occurred",
    "message": "somethingWentWrong"Something Went Wrong",
    "is_error": true,
    "errors": "Array"
}

 

Example Response

:

 

 

{
    "status_code": 202,
    "status_message": "OK",
    "message": "reservationCompletedSuccessfully",
    "is_data": false,
    "data": null
}