Wiki source code of 2. GetCountries

Last modified by Giorgi Mdivnishvili on 2024/04/11 15:40

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2
3
4 {{toc/}}
5 {{/box}}
6
7 = Method Description =
8
9
10 This method facilitates the retrieval of a comprehensive list of countries, each annotated with relevant parameters. It is designed to return a list of countries, providing key information for each. The response is structured in JSON format, ensuring ease of integration and data parsing. Each country object within the array contains the following fields:
11
12
13 == Endpoint URL - [GET] ==
14
15 {{info}}
16 [[https:~~/~~/integration.kazunion.com/api/Catalogue/GetCountries>>http://integration.kazunion.com/api/Catalogue/GetCountries]]
17 {{/info}}
18
19
20 == Request Parameters ==
21
22 (% class="box infomessage" %)
23 (((
24
25
26 |**Key**|**Value**|**Request URL**
27 |none|none|[[https:~~/~~/integration.kazunion.com/api/Catalogue/GetCountries>>https://integration.kazunion.com/api/Catalogue/GetCountries]]
28
29
30 )))
31
32
33 == Request Body ==
34
35 {{code language="Json"}}
36 none
37 {{/code}}
38
39
40 == Response Body ==
41
42 {{code language="json"}}
43 {
44 "error": true,
45 "errorCode": "string",
46 "errorDescription": "string",
47 "userErrorDescription": "string",
48 "countries": [
49 {
50 "countryCode": "string",
51 "countryName": "string",
52 "note": "string",
53 "phoneCode": "string",
54 "isO2": "string",
55 "isO3": "string",
56 "status": 0,
57 "sortingOrder": 0,
58 "sellCurrency": "string"
59 }
60 ]
61 }
62 {{/code}}
63
64
65 === Response Body -example ===
66
67 {{code language="Json"}}
68 {
69 "countryCode": "UU",
70 "countryName": "Ukraine.",
71 "phoneCode": "111",
72 "isO2": "UU",
73 "isO3": "UA.",
74 "status": 1,
75 "sortingOrder": 0,
76 "sellCurrency": "USD"
77 },
78 {
79 "countryCode": "AE",
80 "countryName": "United Arab Emirates",
81 "phoneCode": "971",
82 "isO2": "AE",
83 "isO3": "ARE",
84 "status": 1,
85 "sortingOrder": 1000,
86 "sellCurrency": "USD"
87 },
88 {{/code}}
89
90
91 === Schema ===
92
93 {{success}}
94 {
95
96 |error|boolean
97 |errorCode|string
98 nullable: true
99 |errorDescription|string
100 nullable: true
101 |userErrorDescription|string
102 nullable: true
103 |countries|[
104 nullable: trueCountry{(((
105 |countryCode|string
106 nullable: true
107 readOnly: true
108 |countryName|string
109 nullable: true
110 |note|string
111 nullable: true
112 |phoneCode|string
113 nullable: true
114 |isO2|string
115 nullable: true
116 |isO3|string
117 nullable: true
118 |status|integer($int32)
119 |sortingOrder|integer($int32)
120 |sellCurrency|string
121 nullable: true
122
123 }]
124 )))
125
126 }
127 {{/success}}
128
129
130 (% class="table-bordered" %)
131 |=Attribute|=Description|=Example
132 |countryCode|The ISO 3166-1 alpha-2 country code.|"AL" for Albania
133 |countryName|The name of the country.|Albania
134 |phoneCode|The international dialing code for the country.|"355" for Albania
135 |isO2|The ISO 3166-1 alpha-2 code for the country. Typically the same as countryCode.|"AL" for Albania
136 |isO3|The ISO 3166-1 alpha-3 code for the country.|"ALB" for Albania
137 |status|The status of the country (e.g., active or not). Integer where 1 could represent active.|1 for active
138 |sortingOrder|The sorting order for the country. This could be used to sort countries in a list.|Integer value (e.g., 1, 2, 3)
139 |sellCurrency|The currency in which transactions are conducted in the country. ISO 4217 format.|"USD" for United States Dollar
140
141