API - Appointment v2 REST

Representational State Transfer (REST) is a software architecture style consisting of guidelines and best practices for creating scalable web services. REST is a coordinated set of constraints applied to the design of components in a distributed hypermedia system that can lead to a more performant and maintainable architecture.

Thanks to this API – if you embed it – your system is going to be able to handle Appointment feature from any mobile device and other desktop application (OS independent). This documentation will guide you through the APIs structure and will help you understand the background info.

You can read more about the Appointment feature here.

API test with Postman

To test our Appointment API we recommend to use the application called Postman.
You can download it from here:
https://www.postman.com/downloads/

After successful installation, start the application. Create a New GET request:

Paste your request into the blank field and click on Send. Here you will see the results.

Response header codes

Code Name Description
200 SC_OK The request succeeded normally
400 SC_BAD_REQUEST The value of the variable is missing and / or incorrect.
401 SC_UNAUTHORIZED User not identified, not logged in.
403 SC_FORBIDDEN The server understood the request but refused to fulfill it.
404 SC_NOT_FOUND The specified entity could not be found.
500 SC_INTERNAL_SERVER_ERROR There was an error, the returned message will describe exactly what (unexpected but handled error)

Profile

Profile or tasks structure.

Request

GET /qnet6/rest/v2/appointment/profile

Request example

http://localhost:3000/qnet6/rest/v2/appointment/profile

Parameters
No any parameter.

Request body
No request body.

Fields

Name Type Description
prfID Number Profile ID
dpID Number DispenserProfile ID(always -1)
captchaSiteKey String Captcha site key
standby Number Standby time
langID Number Profile language ID
lang String Profile language code
content[].langID Number Language ID
content[].id String Language code
content[].description String Language name
content[].content[].id Number Service ID
content[].content[].groupID Number Group ID (When this is a group)
content[].content[].number String Service number / Group number
content[].content[].title String Service name / Group name
content[].content[].description String Service description / Group description

Respone example

With profile

{
"prfID": 1,
"dpID": -1,
"captchaSiteKey": null,
"standby": 30,
"langID": 1,
"lang": "en-gb",
"content": [
{
"langID": 17,
"id": "hu",
"description": "Magyar",
"content": [
{
"groupID": 1,
"number": "1",
"description": "Leírás 1",
"id": "29",
"title": "Szolgáltatás csoport 1",
"content": [
{
"number": "3",
"groupID": 3,
"description": "Leírás 3",
"id": "30",
"title": "Szolgáltatás csoport 3",
"content": [
{
"number": "4",
"description": "Leírás 4",
"id": 4,
"title": "Szolgáltatás 4"
}
]
},
{
"number": "3",
"description": "Leírás 3",
"id": 3,
"title": "Szolgáltatás 3"
}
]
},
{
"number": "1",
"description": "Leírás 1",
"id": 1,
"title": "Szolgáltatás 1"
}
]
},
{
"description": "English",
"id": "en-gb",
"langID": 1,
"content": [
{
"number": "1",
"description": "Explanation 1",
"id": 1,
"title": "Service 1"
},
{
"number": "2",
"description": "Explanation 2",
"id": 2,
"title": "Service 2"
}
]
}
]
}

Without profile

{
"captchaSiteKey": null,
"langID": 1,
"lang": "en-gb",
"content": [
{
"description": "English",
"id": "en-gb",
"langID": 1,
"content": [
{
"number": "1",
"description": "Explanation 1",
"id": 1,
"title": "Service 1"
},
{
"number": "2",
"description": "Explanation 2",
"id": 2,
"title": "Service 2"
}
]
},
{
"description": "Magyar",
"id": "hu",
"langID": 17,
"content": [
{
"number": "1",
"description": "Leírás 1",
"id": 1,
"title": "Szolgáltatás 1"
},
{
"number": "2",
"description": "Leírás 2",
"id": 2,
"title": "Szolgáltatás 2"
}
]
}
]
}

Branches

Request

GET /qnet6/rest/v2/appointment/branches?taskID={taskID}&langID={languageID}&longitude={longitude}&latitude={latitude}&search={search}&sort={sort}

Request example

http://localhost:3000/qnet6/rest/v2/appointment/branches?taskID=1&langID=1&longitude=0&latitude=0&search=-1&sort=0

Parameters

Name Type Description
taskID Number Service ID.
langID Number Language ID.
longitude Double Branch addres: longitude
latitude Double Branch addres: latitude
search String Search value
sort Number Sort value: Default-alphabetical; 1-GPS position; 2-Ticket count; 3-Waiting time

Request body

No request body.

Fields

Name Type Description
id Number Branch ID
name String Branch name
short String Branch short name
zip String Address: Zip code
address1 String Address: Country
address2 String Address: City
address3 String Address: Street and number
latitude String Address: Latitude
longitude String Address: Longitude
timeZone String Branch timezone
distance String Branch-customer distance
seconds Number Branch waiting time
tickets Number Branch waiting tickets

Respone example

[
{
"id": 1,
"name": "Default branch",
"short": "DEFAULT",
"zip": "1112",
"address1": "Magyarország",
"address2": "Budapest",
"address3": "Péterhegyi út 51/a",
"latitude": 47.4511041,
"longitude": 19.0059915,
"timeZone": "Europe/Prague",
"seconds": 3600,
"tickets": 0
},
{
"zip": "",
"seconds": 0,
"tickets": 0,
"address3": "",
"address2": "",
"address1": "",
"name": "Teszt01",
"short": "T01",
"timeZone": "Europe/Prague",
"id": 2
}
]

Branches in groups

Request

GET /qnet6/rest/v2/appointment/branchGroups?taskID={taskID}&langID={languageID}

Request example

http://localhost:3000/qnet6/rest/v2/appointment/branchGroups?taskID=1&langID=1

Parameters

Name Type Description
taskID Number Service ID
langID Number Language ID

Request body

No request body.

Fields

Name Type Description
bgId Number Branch group ID / 0 branches without group
branches Array Branch array
branches[].brnId Number Branch ID
branches[].brnName String Branch name

Respone example

[
{
"branches": [
{
"brnId": 4,
"brnName": "Teszt03"
}
],
"bgId": 0
},
{
"bgName": "First BG",
"branches": [
{
"brnId": 1,
"brnName": "Default branch"
},
{
"brnId": 2,
"brnName": "Teszt01"
}
],
"bgId": 1
},
{
"bgName": "Second BG",
"branches": [
{
"brnId": 3,
"brnName": "Teszt02"
}
],
"bgId": 2
}
]

Available times

Request

GET /qnet6/rest/v2/appointment/emptyTimes?begin={begin}&end={end}&branchID={branchID}&taskID={taskID}

Request example

http://localhost:3000/qnet6/rest/v2/appointment/emptyTimes?begin=20200904000000&end=20200904235959&branchID=1&taskID=1

Parameters

Name Type Description
taskID Number Service ID
begin Number Date in numeric(YYYYMMDDhhmmss)
end Number Date in numeric(YYYYMMDDhhmmss)

Request body

No request body.

Fields

Name Type Description
available Number Available reservation interval
begin Number Date in numeric(YYYYMMDDhhmmss)
end Number Date in numeric(YYYYMMDDhhmmss)

Respone example

[
{
"available": 1,
"end": "20200901000500",
"begin": "20200901000000"
},
{
"available": 5,
"end": "20200901001000",
"begin": "20200901000500"
},
{
"available": 7,
"end": "20200901001500",
"begin": "20200901001000"
}
]

Reservation

Request

POST /qnet6/rest/v2/appointment/reservation

Request example

http://localhost:3000/qnet6/rest/v2/appointment/reservation

Parameters

No any parameters.  

Request body

Key Type Description
begin String Date in numeric(YYYYMMDDhhmmss)
end String Date in numeric(YYYYMMDDhhmmss)
branchID Number Branch ID
taskID Number Service ID
langID Number Language ID
customerID Number Customer ID
noConfirm Number Need confirm?!

Fields

Key Type Description
bookingCode String Booking code

Respone example

{
"bookingCode" : "4596"
}

Save customer data

Request

POST /qnet6/rest/v2/appointment/customerData

Request example

http://localhost:3000/qnet6/rest/v2/appointment/customerData

Parameters

No any parameters.  

Request body

Key Type Description
name String Customer name
email String Customer e-mail
phone String Customer phone number

Fields

Key Type Description
customerID String Customer ID

Response example

{
"customerID" : 6
}

Reservation confirmation

Request

POST /qnet6/rest/v2/appointment/reservation/{bookingCode}

Request example

http://localhost:3000/qnet6/rest/v2/appointment/reservation/4596

Parameters

Key Type Description
bookingCode String Booking code

Request body

Key Type Description
confirmation String Confirmation code

Fields

No any fields.

Response example

{}

Reservation delete

Request

DELETE /qnet6/rest/v2/appointment/reservation/{bookingCode}

Request example

http://localhost:3000/qnet6/rest/v2/appointment/reservation/4596

Parameters

Key Type Description
bookingCode String Booking code

Request body

Key Type Description
confirmation String Confirmation code

Fields

No any fields.

Response example

{}

Confirmation code

Request

GET /qnet6/rest/v2/appointment/reservation/{bookingCode}/confirmationCode

Request example

http://localhost:3000/qnet6/rest/v2/appointment/reservation/4596/confirmationCode

Parameters

Key Type Description
bookingCode String Booking code

Request body

No request body.

Fields

Key Type Description
confirmation String Confirmation code

Response example

{
"confirmation": "thisisconfirmcodehash"
}

Get task item interval

Request

GET /qnet6/rest/v2/appointment/taskTimeInterval/{taskID}.

Request example

http://localhost:3000/qnet6/rest/v2/appointment/taskTimeInterval/1

Parameters

Key Type Description
taskID Number Service ID

Request body

No request body.

Fields

Key Type Description
taskTimeInterval Number Interval size

Response example

{
"taskTimeInterval": 5
}

Reservations

Request

GET /qnet6/rest/v2/appointment/reservedTimes?begin={begin}&end={end}&branchID={branchID}&taskID={taskID}.

Request example

http://localhost:3000/qnet6/rest/v2/appointment/reservedTimes?begin=20200904000000&end=20200904235959&branchID=1&taskID=1

Parameters

Key Type Description
begin String Date in numeric(YYYYMMDDhhmmss)
end String Date in numeric(YYYYMMDDhhmmss)
branchID Number Branch ID
taskID Number Service ID

Request body

No request body.

Fields

Key Type Description
count Number Count
begin String Date in numeric(YYYYMMDDhhmmss)
end String Date in numeric(YYYYMMDDhhmmss)

Response example

[
{
"count": 1,
"beginTime": 20200904163500,
"endTime": 20200904164000
},
{
"count": 2,
"beginTime": 20200904164000,
"endTime": 20200904164500
}
]

Languages

Request

GET /qnet6/rest/v2/appointment/languages

Request example

http://localhost:3000/qnet6/rest/v2/appointment/languages
Parameters

No any parameters.

Request body

No request body.

Fields

Key Type Description
code String Language code
name String Language name
id Number Language ID

Response example

[
{
"code": "en-gb",
"name": "English",
"id": 1
},
{
"code": "hu",
"name": "Magyar",
"id": 17
}
]

Languages

Request

GET /qnet6/rest/v2/appointment/locales/{lngID}

Request example

http://localhost:3000/qnet6/rest/v2/appointment/locales/1

Parameters

Key Type Description
lngID Number Language ID

Request body

No request body.

Fields

Key Type Description
msgCodes String Msg code for messages

Response example

{
"6571": "Summary",
"7022": "User data",
"7021": "There is no available time period on this day!",
...
}

Services

Request

GET /qnet6/rest/v2/appointment/tasks?langID={languageID}

Request example

http://localhost:3000/qnet6/rest/v2/appointment/tasks?langID=1

Parameters

Key Type Description
langID Number Language ID

Request body

No request body.

Fields

Key Type Description
name String Service name
id Number Service ID

Response example

[
{
"name": "Service 1",
"id": "1"
},
{
"name": "Service 2",
"id": "2"
}
]

Enums

Confirmation

Value Description
-1 Central Configuration
0 No confirmation
1 Need confirmation