Skip to content
Danh sách APIs

Api Khu vực

Api lấy danh sách Khu vực

Trả về danh sách Khu vực có eSim được cung cấp bởi SimplifyTrip

Query Parameters
querystring

Từ khoá tìm kiếm theo tên, id,…

takenumber

Số lượng kết quả trả về cho một trang

skipnumber

Chỉ mục ban đầu để trả về kết quả.

Responses
200 OK
application/json
Success
total - requirednumber
take - requirednumber
skip - requirednumber
items - required
4xx/5xx Error
application/json
Error
timestamptimestamp
statusCodenumber
errorCodestring
messagestring
GET
/api/v1/regions
Sample Request
Try it on Swagger
Nodejs
PHP
C#
Java
Go
Curl

_35
// Using axios
_35
import axios from 'axios';
_35
_35
const options = {
_35
method: 'GET',
_35
url: 'https://merchant.simplifytrip.com/api/v1/regions?take=10&skip=0',
_35
headers: {
_35
accept: 'application/json',
_35
'content-type': 'application/json',
_35
authorization: 'Bearer sk_live_xxxxxxxxxxxxxxxxxx',
_35
'x-api-key': 'pk_live_xxxxxxxxxxxxxxxxxx',
_35
}
_35
};
_35
_35
axios
_35
.request(options)
_35
.then(res => console.log(res.data))
_35
.catch(err => console.error(err));
_35
_35
// Using fetch api
_35
const url = 'https://merchant.simplifytrip.com/api/v1/regions?take=10&skip=0';
_35
const options = {
_35
method: 'GET',
_35
headers: {
_35
accept: 'application/json',
_35
'content-type': 'application/json',
_35
authorization: 'Bearer sk_live_xxxxxxxxxxxxxxxxxx',
_35
'x-api-key': 'pk_live_xxxxxxxxxxxxxxxxxx',
_35
}
_35
};
_35
_35
fetch(url, options)
_35
.then(res => res.json())
_35
.then(json => console.log(json))
_35
.catch(err => console.error(err));

Sample Response

_18
{
_18
"total": 100,
_18
"skip": 0,
_18
"take": 10,
_18
"items": [
_18
{
_18
"name": {
_18
"vi": "Singapore - Malaysia - Indonesia",
_18
"en": "Singapore - Malaysia - Indonesia"
_18
},
_18
"id": "SIN-MYS-IDN",
_18
"thumbnail": "https://awssimplifytrip.s3.ap-southeast-1.amazonaws.com/flag/Sing-ma-ind-thai.jpg",
_18
"createdAt": "2024-10-21T02:53:46.527Z",
_18
"updatedAt": "2024-10-21T02:53:46.527Z"
_18
},
_18
...
_18
]
_18
}