# 获取酒店政策

获取酒店政策信息,包含酒店入住须知,公告等信息,建议每周同步。
当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": "Policy",
    "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>Policy</StaticType>
  <IsGetUrlOnly>true</IsGetUrlOnly>
  <FileType>Csv</FileType>
</GetStaticInformationRQ>

CSV文件字段说明:

字段 类型 是否必填 说明
HotelID int true 酒店唯一标识ID
Type string true 类型(General或Important Notice)
Description string true 政策说明
Description_CN string true 政策中文说明
   [
    {
        "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 Ture: 返回下载地址; False:会返回 HTTP 302 跳转,客户端需要额外处理这个跳转动作Boolean
FileType String 非必填项,目前支持Csv和Zip两种文件类型String
Request Sample
{
    "Header": {
        "LicenseKey": "TestKey",
        "ClientID": "DidaApiTestID"
    },
    "IsGetUrlOnly": true,
    "StaticType": "Policy"
}
Request Sample
<GetStaticInformationRQ>
  <Header>
    <ClientID>DidaApiTestID</ClientID>
    <LicenseKey>TestKey</LicenseKey>
  </Header>
  <StaticType>Policy</StaticType>
  <IsGetUrlOnly>true</IsGetUrlOnly>
</GetStaticInformationRQ>
Response Parameters
Url String 静态资源地址。如果IsGetUrlOnly=false, Response 将返回302。客户端需要实现跳转,到新地址下载资源文件。String
Response Sample
{
    "Url": "http://static.didatravel.com/Static/2/Policy.csv?Expires=1502938618&OSSAccessKeyId=jr9mtwydMaatBmPp&Signature=FPPlGzq6qMik%2BRW8%2FFjVXlEHHB4%3D"
}
Response Sample
<?xml version="1.0"?>
<GetStaticInformationRS>
  <Url>http://static.didatravel.com/Static/2/Policy.csv?Expires=1502938618&OSSAccessKeyId=jr9mtwydMaatBmPp&Signature=FPPlGzq6qMik%2BRW8%2FFjVXlEHHB4%3D</Url>
</GetStaticInformationRS>