# 获取酒店图片

获取酒店图片信息,包含图片地址等,建议每周同步。
Dida 的图片来源于其供应商和直接合同。Dida 不拥有这些图片的版权。如果您需要访问并下载 Dida 静态内容中的酒店和客房图片,请签署一份免责声明协议并发送给您的 API 客户经理 。一旦我们收到签署的协议,我们将为您提供图片访问权限。您可以通过点击下面的链接下载免责声明协议。
免责声明下载

当IsGetUrlOnly=true时FileType字段支持Csv和Zip两种文件格式选择(请注意大写)

请注意,由于 Dida 的图片具有防盗链功能,请勿通过提供的地址直接引用 Dida 图片,否则图片可能无法显示。Dida 团队建议您先将映像下载到服务器,然后再从服务器读取映像。

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": "HotelImage",
    "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>HotelImage</StaticType>
  <IsGetUrlOnly>true</IsGetUrlOnly>
  <FileType>Csv</FileType>
</GetStaticInformationRQ>

CSV文件字段说明:

字段 类型 是否必填 说明
HotelID int true 酒店唯一标识ID
ImageCaption string true 图片标题
ImageUrl string true 图片地址
ImageOrder string true 图片顺序
IsDefault bool 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": "HotelImage"
}
Request Sample
<GetStaticInformationRQ>
  <Header>
    <ClientID>DidaApiTestID</ClientID>
    <LicenseKey>TestKey</LicenseKey>
  </Header>
  <StaticType>HotelImage</StaticType>
  <IsGetUrlOnly>true</IsGetUrlOnly>
</GetStaticInformationRQ>
Response Parameters
Url String 静态资源地址。如果IsGetUrlOnly=false, Response 将返回302。客户端需要实现跳转,到新地址下载资源文件。String
Response Sample
{
    "Url": "http://static.didatravel.com/Static/2/HotelImage.csv?Expires=1502938618&OSSAccessKeyId=jr9mtwydMaatBmPp&Signature=FPPlGzq6qMik%2BRW8%2FFjVXlEHHB4%3D"
}
Response Sample
<?xml version="1.0"?>
<GetStaticInformationRS>
  <Url>http://static.didatravel.com/Static/2/HotelImage.csv?Expires=1502938618&OSSAccessKeyId=jr9mtwydMaatBmPp&Signature=FPPlGzq6qMik%2BRW8%2FFjVXlEHHB4%3D</Url>
</GetStaticInformationRS>