Changes for page SearchTourPackages - Basic Version
Last modified by Giorgi Mdivnishvili on 2024/07/11 12:45
From version 6.1
edited by Giorgi Mdivnishvili
on 2024/04/11 10:33
on 2024/04/11 10:33
Change comment:
There is no comment for this version
To version 11.1
edited by Giorgi Mdivnishvili
on 2024/04/11 16:44
on 2024/04/11 16:44
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -46,7 +46,35 @@ 46 46 } 47 47 {{/code}} 48 48 49 +== Request example for 2Adults 2Child == 49 49 51 +{{code language="Json"}} 52 +{ 53 + "departureCountryCode": "KZ", 54 + "departureCityUID": "f0ba6324-f337-405c-8cc7-23d62cf664e8", 55 + "arrivalCountryCode": "AE", 56 + "adults": 2, 57 + "children": 2, 58 + "childrenAges": [ 59 + 4, 60 + 8 61 + ], 62 + "departureDate": "2024-05-26T00:00:00", 63 + "returnDate": "2024-06-02T00:00:00", 64 + "departureAndReturnDaysCount": 7, 65 + "checkInDate": "2024-05-26T00:00:00", 66 + "checkOutDate": "2024-06-02T00:00:00", 67 + "checkInAndCheckOutDaysCount": 7, 68 + "directFlightsOnly": true, 69 + "searchCurrency": "USD", 70 + 71 + "pagingId": "", 72 + "pageNumber": 1, 73 + "pageRowCount":5 74 +} 75 +{{/code}} 76 + 77 + 50 50 == Response Body == 51 51 52 52 {{code language="json"}} ... ... @@ -713,6 +713,7 @@ 713 713 714 714 === **Request Parameters ** === 715 715 744 +(% class="table-bordered" %) 716 716 |=Key|=Type|=Nullable|=Description 717 717 |departureCountryCode|String|No|The ISO 3166-1 alpha-2 code of the departure country. For example, "KZ" for Kazakhstan. 718 718 |departureCityUID|String (UUID)|No|The unique identifier of the departure city. This is a UUID, such as "f0ba6324-f337-405c-8cc7-23d62cf664e8". ... ... @@ -733,6 +733,7 @@ 733 733 734 734 === **Response Parameters** === 735 735 765 +(% class="table-bordered" %) 736 736 |=Key|=Type|=Description 737 737 |packages|Array|An array of travel packages. Each package includes various details about the package. 738 738 |packages[].id|String|A unique identifier for the package. This is used to uniquely identify each package. ... ... @@ -810,6 +810,7 @@ 810 810 |totalCount|Number|The total count of packages. This is the total number of packages in all pages of results. 811 811 |error|Boolean|A boolean indicating whether there was an error. If true, it means that there was an error in retrieving the packages. 812 812 843 +==== ==== 813 813 814 814 ==== first request ==== 815 815 ... ... @@ -821,10 +821,12 @@ 821 821 } 822 822 {{/code}} 823 823 855 +While making first search request, paging id should be empty, "pageNumber": and "pageRowCount":10 means that, in response there will be returned maximum 10 packages per page. 824 824 857 + 825 825 ==== Request with caching ==== 826 826 827 -a s we receiveresponse, in the end we can see pagingId- number, chich we can use for caching, andthenjust switch pagenumbers.for cleaning cache, it's important to make new request without pagingID860 +after receiving response from first search request, in the end we can see pagingId- number, wchich we can use for caching, and (pageinatoin) for switch pagenumbers, and displaying results as we whant. For cleaning cache, it's important to make new request without cllear pagingID, like this "pagingId": "", 828 828 829 829 {{code language="Json"}} 830 830 { ... ... @@ -877,18 +877,18 @@ 877 877 == Important == 878 878 879 879 {{error}} 880 - It'sImportant to in every otherrequestheader, put Auth token913 +=== Implementing Authorization in Subsequent Requests === 881 881 882 - **Key**-Authorization915 +For every API request after the initial authentication, it's crucial to include the authorization token in the request header. This ensures your requests are authorized and can access the necessary resources. Here's how to properly include your token: 883 883 884 -**Value **- Bearer Token what is given in this response. 917 +* **Header Key:** Authorization 918 +* **Header Value:** Bearer [Your Token Here] - Use the bearer token provided in the initial authentication response. The authorization type should be specified as Bearer Token. 885 885 920 +Additionally, to ensure your requests are properly formatted and recognized, include the following headers: 886 886 887 -**also note in headers that:** 922 +* **Content-Type:** Specify this header as application/json to indicate the format of the request body. 923 +* **Header Key:** X-nugios-timezone 924 +* **Header Value:** 240 - Adjust this value to match your local timezone offset in minutes. 888 888 889 -Content-Type - application/json 890 - 891 -**Key - **X-nugios-timezone 892 - 893 -**Value **- 240 926 +Incorporating these headers with their respective values is essential for the successful processing of your API requests. 894 894 {{/error}}