Skip to main content

Check appointment code

GET{{server}}/api/v1/smart/booking?branch={{branch}}&bookingCode=118762

This request checks the booking code. If it exists, it returns the details of reservation. If it's not, it returns status 400.

Request​

Authorization​

HeaderValue
AuthorizationSmartToken {{smartToken}}

Headers​

KeyValue
Acceptapplication/json

Query parameters​

KeyValue
branch{{branch}}
bookingCode118762

Code snippets​

curl -X GET '{{server}}/api/v1/smart/booking?branch={{branch}}&bookingCode=118762' \
-H 'Accept: application/json' \
-H 'Authorization: SmartToken {{smartToken}}'

Examples (2)​

Example request
GET{{server}}/api/v1/smart/booking?branch={{branch}}&bookingCode=123456
Query parameters (2)
KeyValue
branch{{branch}}
bookingCode123456
Headers (1)
KeyValue
Acceptapplication/json
Example response 400 Bad Request
Response headers (9)
KeyValue
Access-Control-Expose-Headers*
Cache-Controlno-store, no-cache, must-revalidate
Access-Control-Allow-Origin*
Access-Control-Allow-MethodsPOST, PUT, GET, OPTIONS, DELETE
Access-Control-Allow-Credentialstrue
Content-Length2695
Access-Control-Max-Age86400
Access-Control-Allow-HeadersContent-Type, Authorization, X-Requested-With
Content-Typeapplication/json;charset=utf-8
Body
{
"name": "BookingInvalid",
"message": "The specified booking code is not valid!",
"nodeID": "norbi-pc3-28340",
"code": 400,
"type": "BOOKING_CODE_INVALID",
"retryable": false,
"stack": "services.moleculer.error.MoleculerClientError: The specified booking code is not valid!\r\n\tat com.qnet7.core.ErrorFactory.bookingCodeInvalid(ErrorFactory.java:257)\r\n\tat com.qnet7.appointment.impl.internal.InternalBookingQuery.lambda$getAppointment$3(InternalBookingQuery.java:189)\r\n\tat io.datatree.Promise.lambda$1(Promise.java:433)\r\n\tat java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:836)\r\n\tat java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:848)\r\n\tat java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2168)\r\n\tat io.datatree.Promise.then(Promise.java:428)\r\n\tat com.qnet7.appointment.impl.internal.InternalBookingQuery.getAppointment(InternalBookingQuery.java:185)\r\n\tat com.qnet7.appointment.AppointmentFactory.getAppointment(AppointmentFactory.java:609)\r\n\tat com.qnet7.published.v1.PublishedServiceV1.getAppointment(PublishedServiceV1.java:223)\r\n\tat com.qnet7.published.v1.SmartTicket.lambda$2(SmartTicket.java:154)\r\n\tat services.moleculer.service.LocalActionEndpoint.lambda$0(LocalActionEndpoint.java:90)\r\n\tat com.qnet7.acl.ActionPermissionController.lambda$null$2(ActionPermissionController.java:262)\r\n\tat io.datatree.Promise.lambda$0(Promise.java:403)\r\n\tat java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:836)\r\n\tat java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:848)\r\n\tat java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2168)\r\n\tat io.datatree.Promise.then(Promise.java:398)\r\n\tat com.qnet7.acl.ActionPermissionController.lambda$install$3(ActionPermissionController.java:246)\r\n\tat services.moleculer.metrics.MetricMiddleware$1.lambda$0(MetricMiddleware.java:74)\r\n\tat io.datatree.Promise.<init>(Promise.java:261)\r\n\tat services.moleculer.metrics.MetricMiddleware$1.handler(MetricMiddleware.java:59)\r\n\tat services.moleculer.service.ActionEndpoint.handler(ActionEndpoint.java:85)\r\n\tat services.moleculer.service.DefaultServiceInvoker.call(DefaultServiceInvoker.java:132)\r\n\tat services.moleculer.service.DefaultServiceInvoker.call(DefaultServiceInvoker.java:123)\r\n\tat services.moleculer.web.router.ActionInvoker.lambda$1(ActionInvoker.java:236)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n\tat java.lang.Thread.run(Thread.java:748)",
"data": {
"bookingCode": "123456"
}
}