# 获取酒店静态

获取酒店静态信息。包含酒店名,星级,地址,电话等。建议每周同步。
如果需要房型匹配,请提前与 Dida API团队联系以完成设置,设置完成后,您可以将关键字从 “HotelSummary” 更改为 “Roomtype” 以获取 Dida 房型信息。
当IsGetUrlOnly=true时FileType字段支持Csv和Zip两种文件格式选择(请注意大写)

POST
https://api.didatravel.com/api/staticdata/GetStaticInformation?$format=json
In the following example, the code parameters inside are modifiable.
Use the following method to test API:
{
    "IsGetUrlOnly": true,
    "Header": {
        "LicenseKey": "TestKey",
        "ClientID": "DidaApiTestID"
    },
    "StaticType": "HotelSummary",
    "FileType":"Csv"
}
In the following example, the code parameters inside are modifiable.
Use the following method to test API:
<GetStaticInformationRQ>
  <Header>
    <ClientID>DidaApiTestID</ClientID>
    <LicenseKey>TestKey</LicenseKey>
  </Header>
  <StaticType>HotelSummary</StaticType>
  <IsGetUrlOnly>true</IsGetUrlOnly>
  <FileType>Csv</FileType>
</GetStaticInformationRQ>

CSV文件字段说明:

字段 类型 是否必填 说明
HotelID int true 酒店唯一标识ID
Name string true 酒店名称
Name_CN string false 酒店中文名称
Address string false 酒店详细地址
CityCode long true 城市代码
CityName string true 城市名称
CityName_CN string false 城市中文名称
StateCode string true 省份或者州代码
CountryCode string true 国家代码
CountryName string true 国家名称
CountryName_CN string false 国家中文名称
ZipCode string false 邮编
Longitude string false 地理坐标
Latitude string false 地理坐标
StarRating double false 星级
Telephone string false 电话号码
AirportCode string false 机场代码
PropertyCategory int false 酒店类别 (Dida 不保证准确性,只供参考)
DestinationID long false 目的地ID
DestinationName string false 目的地名称
DestinationName_CN string false 目的地中文名称
Address_CN string false 酒店中文详细地址
UpdateDate string true 修改日期

PropertyCategory说明:

ID Description_EN Description_CN
0 Hotel-unknown 不知名的酒店
1 Hotel 酒店
2 Motel 汽车旅馆
3 Hotel resort 度假酒店
4 Inn 旅馆
5 Bed & breakfast 家庭客栈
6 Guest house 客房旅馆
7 Condo 公寓
8 All-Inclusive 包括所有
9 Cabin 小木屋
10 Chalet 牧人小屋
11 Cottage 小别墅
12 Hostel/Backpacker accommodation 招待所
13 Ranch 场主房屋
14 Villa 别墅
15 Lodge 山间小屋
16 Apartment 公寓
17 Private vacation home 私人度假住宅
18 House boat 船屋
20 Ryokan 日式旅店
21 Tree house 树屋
22 Apart-hotel 公寓酒店
23 Condominium resort 度假村
24 Campsite 房车露营地
25 Riad 摩洛哥特色旅馆
26 Hostal (Budget Hotel) Hostal (廉价旅馆)
29 Country House 乡间别墅
30 Pension 民宿
31 Pousada (Portugal) Pousada (葡萄牙)
32 Pousada (Brazil) Pousada (巴西)
33 Residence 公寓式住宅
34 TownHouse 排屋
36 Castle 城堡
37 Safari / Tentalow Safari / 帐篷屋
39 Palace 宫殿
40 Agritourism 观光农业旅游
41 Cruise 游轮
42 Holiday Park
   [
    {
        "name": "Header",
        "description": "请求机构的相关验证信息",
        "children": [
            {
                "name": "ClientID",
                "description": "机构账号"
            },
            {
                "name": "LicenseKey",
                "description": "机构账号密码"
            }
        ]
    },
    {
        "name": "StaticType",
        "description": "静态信息的类别。可以为:HotelSummary,Policy等"
    },
    {
        "name": "IsGetUrlOnly",
        "description": "Ture: 返回下载地址; False:会返回 HTTP 302 跳转,客户端需要额外处理这个跳转动作"
    },
     {
        "name": "FileType",
        "description": "非必填项,目前支持Csv和Zip两种文件类型"
    }
]
Request Parameters
Header HeaderType
请求机构的相关验证信息HeaderType
StaticType GetStaticInformationRQStaticType 静态信息的类别。可以为:HotelSummary,Policy等GetStaticInformationRQStaticType
IsGetUrlOnly Boolean Required Ture: 返回下载地址; False:会返回 HTTP 302 跳转,客户端需要额外处理这个跳转动作BooleanRequired
FileType String 非必填项,目前支持Csv和Zip两种文件类型String
Request Sample
{
    "Header": {
        "LicenseKey": "TestKey",
        "ClientID": "DidaApiTestID"
    },
    "IsGetUrlOnly": true,
    "StaticType": "HotelSummary"
}
Request Sample
<GetStaticInformationRQ>
  <Header>
    <ClientID>DidaApiTestID</ClientID>
    <LicenseKey>TestKey</LicenseKey>
  </Header>
  <StaticType>HotelSummary</StaticType>
  <IsGetUrlOnly>true</IsGetUrlOnly>
</GetStaticInformationRQ>
Response Parameters
Url String 静态资源地址。如果IsGetUrlOnly=false, Response 将返回302。客户端需要实现跳转,到新地址下载资源文件。String
Response Sample
{
    "Url": "http://static.didatravel.com/Static/2/HotelSummary.csv?Expires=1502938618&OSSAccessKeyId=jr9mtwydMaatBmPp&Signature=FPPlGzq6qMik%2BRW8%2FFjVXlEHHB4%3D"
}
Response Sample
<?xml version="1.0"?>
<GetStaticInformationRS>
  <Url>http://static.didatravel.com/Static/2/HotelSummary.csv?Expires=1502938618&OSSAccessKeyId=jr9mtwydMaatBmPp&Signature=FPPlGzq6qMik%2BRW8%2FFjVXlEHHB4%3D</Url>
</GetStaticInformationRS>