# GetPolicy

This API retrieves information regarding hotel policies. This includes details such as check-in instructions, announcements, and other relevant information. For the most accurate and up-to-date details, it is recommended to synchronize this data weekly.
When "IsGetUrlOnly=true", the "FileType" field supports two file formats for selection: Csv and Zip. (Please note capitalization)

POST
https://apiint.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 file field description:

Field Type Mandatory Remarks
HotelID int true Unique hotel identification
Type string true Policy type(General or Important Notice)
Description string true Policy description
Description_CN string true Policy description in chinese
   [
    {
        "name": "Header",
        "description": "Client authentication info",
        "children": [
            {
                "name": "ClientID",
                "description": "Client ID"
            },
            {
                "name": "LicenseKey",
                "description": "Client password"
            }
        ]
    },
    {
        "name": "StaticType",
        "description": "Static information type. For instance: HotelSummary."
    },
    {
        "name": "IsGetUrlOnly",
        "description": "Return download url if true. Need extra code to handle HTTP 302 if it is false."
    },
    {
        "name": "FileType",
        "description": "Optional fields, currently supports two file types: Csv and Zip. (Please note capitalization)"
    }
]
Request Parameters
Header HeaderType
Client authentication infoHeaderType
StaticType GetStaticInformationRQStaticType Static information type. For instance: HotelSummary.GetStaticInformationRQStaticType
IsGetUrlOnly Boolean Return download url if true. Need extra code to handle HTTP 302 if it is false.Boolean
FileType String Optional fields, currently supports two file types: Csv and Zip. (Please note capitalization)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 Static resource URL. If IsGetUrlOnly = false, response will redirect to the resource URL. Redirection needs to be supported by client.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>