TABLE OF CONTENTS

概述

我们提供了 10 个接口静态信息接口(包括房价计划、房型、税费)。您可以通过这些 接口实现创建、修改、查询房价计划、房型、税费。 

  1. 更新房型:通过接口创建房型。如果房型代码已经存在则更新此房型信息。 
  2. 查询房型:查询酒店所有房型。 
  3. 更新房型等级:通过接口创建房型等级。如果房型等级代码已经存在则更新此房 型等级信息。房型等级是房型的集合。 
  4. 查询房型等级:查询酒店所有房型等级。 
  5. 更新房价计划:通过接口创建房价计划。如果房价计划代码已经存在则更新此房 价计划信息。 
  6. 查询房价计划:查询酒店所有房价计划。 
  7. 更新税费:通过接口创建税费。如果房价计划代码已经存在则更新此税费信息。 
  8. 查询税费:查询酒店所有税费。 
  9. 更新产品:通过接口将房型和房价计划关联生成产品。 
  10. 查询产品:查询酒店所有产品。



1. 更新房型

此 API 用于在 Property Connector 中创建新的房型。 当房型创建后 PropertyConnector 将会收到 PMS 推送的房型信息。 房型信息可以通过接口或 PropertyConnector 页面创建。 如果房型 ID 已经存在,则更新指定房型的信息。


POST /pcapigateway/profile/{accountId}/hotels/{hotelId}/roomTypes/{roomId} HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc 
Accept-Encoding: gzip 
Content-Encoding: gzip 
Content-Type: application/json;charset=utf-8
JavaScript

请求


Element

Type

Occurrence

Description

Comment

occupancy/maxAdult

String

Mandatory

 

0~20、maxAdult<=maxOccupancy

occupancy/maxChild

String

Mandatory

 

0~20、maxChild<=maxOccupancy

occupancy/maxOccupancy

String

Mandatory

 

0~20

roomClassId

String

Optional

 

 

roomDescription

String

Optional

 

 

roomId

String

Mandatory

 

 

roomName

String

Mandatory

 

 

status

Enum

  • Actived

  • Deactived

Mandatory

 

 


示例:创建或更新房型


请求

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "roomId": "DR",
  "roomClassId": "DRCS",
  "status": "Actived",
  "roomName": "Double Room",
  "roomDescription": "Double Room Description",
  "occupancy": {
    "maxAdult": "2",
    "maxChild": "1",
    "maxOccupancy": "3"
  }
}
JavaScript


成功响应


{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "roomId": "DR",
  "roomClassId": "DRCS",
  "status": "Actived",
  "roomName": "Double Room",
  "roomDescription": "Double Room Description",
  "occupancy": {
    "maxAdult": "2",
    "maxChild": "1",
    "maxOccupancy": "3"
  }
}
HTML



2. 查询房型

查询指定房型

此 API 查询酒店在 PropertyConnector 中指定的房型信息。


GET /pcapigateway/profile/{accountId}/hotels/{hotelId}/roomTypes/{roomId} HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc 
Accept-Encoding: gzip 
Content-Encoding: gzip 
Content-Type: application/json;charset=utf-8
JavaScript


响应

{
	"header": {
		"echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
		"timeStamp": "2018-06-27T17:09:04.674Z",
		"version": "0.1"
	},
	"roomId": "KINGR",
	"roomClassId": "DRCS",
	"status": "Actived",
	"roomName": "King Room",
	"roomDescription": "King Room Description",
	"occupancy": {
		"maxAdult": "3",
		"maxChild": "1",
		"maxOccupancy": "4"
	}
}
JavaScript



查询全部房型

此 API 查询酒店在 PropertyConnector 中全部存在的房型信息。

GET /pcapigateway/profile/{accountId}/hotels/{hotelId}/roomTypes HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc 
Accept-Encoding: gzip 
Content-Encoding: gzip 
Content-Type: application/json;charset=utf-8
JavaScript

示例

响应

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "roomList": [
    {
      "roomId": "KINGR",
      "roomClassId": "DRCS",
      "status": "Actived",
      "roomName": "King Room",
      "roomDescription": "King Room Description",
      "occupancy": {
        "maxAdult": "3",
        "maxChild": "1",
        "maxOccupancy": "4"
      }
    },
    {
      "roomId": "DR",
      "roomClassId": "DRCS",
      "status": "Actived",
      "roomName": "Double Room",
      "roomDescription": "Double Room Description",
      "occupancy": {
        "maxAdult": "2",
        "maxChild": "1",
        "maxOccupancy": "3"
      }
    }
  ]
}
JavaScript



3. 更新房型等级

此 API 用于创建房型等级,房间等级是房型的集合。 如果房型等级 ID 已经存在,则更新指定房型等级的信息。


POST /pcapigateway/profile/{accountId}/hotels/{hotelId}/roomClasses/{roomClassId} HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc 
Accept-Encoding: gzip 
Content-Encoding: gzip 
Content-Type: application/json;charset=utf-8
JavaScript

请求


Element

TypeOccurrenceDescriptionComment
roomClassId

String

Mandatory



roomClassName

String

Mandatory



status

Enum
  • Actived
  • Deactived

Mandatory





示例

请求

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "roomClassId": "DRCS",
  "roomClassName": "Deluxe King Room",
  "status": "Actived"
}
JavaScript

响应

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "roomClassId": "DRCS",
  "roomClassName": "Deluxe King Room",
  "status": "Actived"
}
JavaScript



4. 查询房型等级

查询指定房型等级

此 API 查询酒店在 PropertyConnector 中指定的房型等级信息。

GET /pcapigateway/profile/{accountId}/hotels/{hotelId}/roomClasses/{roomClassId} HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc 
Accept-Encoding: gzip 
Content-Encoding: gzip 
Content-Type: application/json;charset=utf-8
JavaScript

响应

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "roomClassId": "DRCS",
  "roomClassName": "Deluxe King Room",
  "status": "Deactived"
}
JavaScript


JavaScript

查询全部房型等级

此 API 查询酒店在 PropertyConnector 中全部存在的房型等级信息。

GET /pcapigateway/profile/{accountId}/hotels/{hotelId}/roomClasses HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
JavaScript

响应

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "roomClassList": [
    {
      "roomClassId": "DRCS",
      "roomClassName": "Deluxe Room",
      "status": "Actived",
      
    },
    {
      "roomClassId": "DKCS",
      "roomClassName": "King Room",
      "status": "Actived"
    }
  ]
}
JavaScript



5. 更新房价计划

此 API 用于在 Property Connector 中创建新的房价计划。 当房价计划创建后 PropertyConnector 将会收到 PMS 推送的房价计划信息。 房价计划信息可以通过接口或 PropertyConnector 页面创建。 如果房价计划 ID 已经存在,则更新指定房型计划的信息。

POST /pcapigateway/profile/{accountId}/hotels/{hotelId}/ratePlans/{rateId} HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
JavaScript

请求

Element

Type

Occurrence

Description

Comment

rateId

String

Mandatory

 

 

status

Enum

  • Actived

  • Deactived

  • Presale

Mandatory

 

 

rateName

String

Mandatory

 

 

rateDescription

String

Optional

 

 

rateType

Enum

  • AmountBeforeTax
  • AmountAfterTax
  • Both

Mandatory

paymentType

Enum

  • PayNow

  • PayLater

Mandatory

 

PayNow: prepay online
PayLater: pay at hotel

priceType

Enum


  • NetPrice
  • SellPrice

Optional


guaranteeType

Enum

  • CCG

  • GTTA

  • GTC

  • GTP

  • NG

Optional

 

Credit Card Guarantee
GTTA: Guarantee to Travel Agent
GTC: Guarantee to Company
GTP: Guarantee to Property
NG: No Guarantee/Direct Bill

defaultMealPlan

String

Mandatory

 

Appendix - Meal Plan

currencyString

Mandatory


Currency code with ISO 4217 standard

defaultCancelPolicy

Object[CancelPolicy]

Mandatory

 

 

defaultCancelPolicy/code

 

Mandatory

 

Appendix - Cancel Policy

defaultCancelPolicy/description

 

Optional

 

 

cancelPolicies

List[CancelPolicyWithDateRange]

Optional

 

 

cancelPolicies/dateRangeObject[DateRange]Mandatory

dateRange/startDate

Date:yyyy-MM-dd

Mandatory

 

 

dateRange/endDate

Date:yyyy-MM-dd

Mandatory

 

 

cancelPolicies/cancelPolicyObject[CancelPolicy]Mandatory

cancelPolicy/code

Mandatory

 

Appendix - Cancel Policy

cancelPolicy/description

 

Optional

 

 


示例

请求

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "rateId": "IDDRNWED",
  "status": "Actived",
  "rateName": "Weekend Rate Room Only",
  "rateDescription": "Weekend Rate Room Only",
  "rateType": "AmountBeforeTax",
  "priceType": "SellPrice",
  "paymentType": "PayLater",
  "guaranteeType": "GCC",
  "defaultMealPlan": "RO",
  "currency": "USD",
  "defaultCancelPolicy": {
    "code": "AD100P_100P"
  },
  "cancelPolicies": [
    {
      "dateRange": {
        "startDate": "2000-01-01",
        "endDate": "2099-12-31"
      },
      "cancelPolicy": {
        "code": "AD100P_100P"
      }
    }
  ]
}
JavaScript

响应

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "rateId": "IDDRNWED",
  "status": "Actived",
  "rateName": "Weekend Rate Room Only",
  "rateDescription": "Weekend Rate Room Only",
  "rateType": "AmountBeforeTax",
  "priceType": "SellPrice",
  "paymentType": "PayLater",
  "guaranteeType": "GCC",
  "defaultMealPlan": "RO",
  "currency": "USD",
  "defaultCancelPolicy": {
    "code": "AD100P_100P"
  },
  "cancelPolicies": [
    {
      "dateRange": {
        "startDate": "2000-01-01",
        "endDate": "2099-12-31"
      },
      "cancelPolicy": {
        "code": "AD100P_100P"
      }
    }
  ]
}
JavaScript



6. 查询房价计划

此 API 查询酒店在 PropertyConnector 中指定的房价计划信息。

GET /pcapigateway/profile/{accountId}/hotels/{hotelId}/ratePlans/{rateId} HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
JavaScript

示例:查询指定房价计划

响应

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "rateId": "IDDRNWED",
  "status": "Actived",
  "rateName": "Weekend Rate Room Only",
  "rateDescription": "Weekend Rate Room Only",
  "rateType": "AmountBeforeTax",
  "priceType": "SellPrice",
  "paymentType": "PayLater",
  "guaranteeType": "GCC",
  "defaultMealPlan": "RO",
  "currency": "USD",
  "defaultCancelPolicy": {
    "code": "AD100P_100P"
  },
  "cancelPolicies": [
    {
      "dateRange": {
        "startDate": "2000-01-01",
        "endDate": "2099-12-31"
      },
      "cancelPolicy": {
        "code": "AD100P_100P"
      }
    }
  ]
}
JavaScript



查询全部房价计划

此 API 查询酒店在 PropertyConnector 中全部存在的房价计划信息。

GET /pcapigateway/profile/{accountId}/hotels/{hotelId}/ratePlans HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
JavaScript

示例

响应

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "rateList": [
    {
      "rateId": "BARRATE",
      "status": "Actived",
      "rateName": "Weekend Rate Room Only",
      "rateDescription": "Weekend Rate Room Only",
      "rateType": "AmountBeforeTax",
      "priceType": "SellPrice",
      "paymentType": "PayLater",
      "guaranteeType": "GCC",
      "defaultMealPlan": "RO",
      "currency": "USD",
      "defaultCancelPolicy": {
        "code": "AD100P_100P"
      },
      "cancelPolicies": [
        {
          "dateRange": {
            "startDate": "2000-01-01",
            "endDate": "2099-12-31"
          },
          "cancelPolicy": {
            "code": "AD100P_100P"
          }
        }
      ]
    },
    {
      "rateId": "IDDRNWED",
      "status": "Actived",
      "rateName": "Weekend Rate Room Only",
      "rateDescription": "Weekend Rate Room Only",
      "rateType": "AmountBeforeTax",
      "priceType": "SellPrice",
      "paymentType": "PayLater",
      "guaranteeType": "GCC",
      "defaultMealPlan": "RO",
      "currency": "USD",
      "defaultCancelPolicy": {
        "code": "AD100P_100P"
      },
      "cancelPolicies": [
        {
          "dateRange": {
            "startDate": "2000-01-01",
            "endDate": "2099-12-31"
          },
          "cancelPolicy": {
            "code": "AD100P_100P"
          }
        }
      ]
    }
  ]
}
JavaScript



7. 更新税费

此 API 用于在 Property Connector 中创建新的税费。 当税费建后 PropertyConnector 将会收到 PMS 推送的税费信息。 税费信息可以通过接口或 PropertyConnector 页面创建。 如果税费 ID 已经存在,则更新指定税费的信息。

POST /pcapigateway/profile/{accountId}/hotels/{hotelId}/fees/{feeId} HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
JavaScript

请求

ElementTypeOccurrenceDescriptionComment

feeId

StringMandatory

dateRangeObject[DateRange]Mandatory

DateRange/startDateDate:yyyy-MM-ddMandatory

DateRange/endDateDate:yyyy-MM-ddMandatory

feeObject[Fee]Mandatory

Fee/nameStringMandatory

Fee/amountStringMandatory

Fee/amountTypeEnum:
  • Fix
  • Percent

Mandatory
Fix,
Percent

Fee/chargeTypeEnum:
  • PerRoomPerNight

  • PerPersonPerNight

  • PerRoomPerStay

  • PerPersonPerStay

Mandatory

PerRoomPerNight,

PerPersonPerNight,

PerRoomPerStay

PerPersonPerStay




示例

请求

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "feeId": "FEE01001",
  "dateRange": {
    "startDate": "2000-01-01",
    "endDate": "2022-12-31"
  },
  "fee": {
    "name": "Service Charge",
    "amount": "10",
    "amountType": "Percent",
    "chargeType": "PerRoomPerNight"
  }
}
JavaScript

响应

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "feeId": "FEE01001",
  "dateRange": {
    "startDate": "2000-01-01",
    "endDate": "2022-12-31"
  },
  "fee": {
    "name": "Service Charge",
    "amount": "10",
    "amountType": "Percent",
    "chargeType": "PerRoomPerNight"
  }
}
JavaScript


8 查询税费

查询指定税费

此 API 查询酒店在 PropertyConnector 中指定的税费信息。

GET /pcapigateway/profile/{accountId}/hotels/{hotelId}/fees/{feeId} HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
JavaScript

示例

响应

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "feeId": "FEE01001",
  "dateRange": {
    "startDate": "2000-01-01",
    "endDate": "2022-12-31"
  },
  "fee": {
    "name": "Service Charge",
    "amount": "10",
    "amountType": "Percent",
    "chargeType": "PerRoomPerNight"
  }
}
JavaScript

查询全部税费

此 API 查询酒店在 PropertyConnector 中全部存在的税费信息。

GET /pcapigateway/profile/{accountId}/hotels/{hotelId}/fees HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
JavaScript

示例

响应

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "feeList": [
    {
      "feeId": "FEE01001",
      "dateRange": {
        "startDate": "2000-01-01",
        "endDate": "2022-12-31"
      },
      "fee": {
        "name": "Service Charge",
        "amount": "10",
        "amountType": "Percent",
        "chargeType": "PerRoomPerNight"
      }
    },
    {
      "feeId": "FEE01002",
      "dateRange": {
        "startDate": "2000-01-01",
        "endDate": "2022-12-31"
      },
      "fee": {
        "name": "TAX",
        "amount": "16.6",
        "amountType": "Percent",
        "chargeType": "PerRoomPerNight"
      }
    }
  ]
}
JavaScript



9. 更新产品

此 API 用于创建产品。 当 PropertyConnector 中房型与价格计划已经存在时才能建立关联生成产品。 产品信息可以通过接口或 PropertyConnector 页面创建。 如果产品的关联关系存在时执行更新操作。

POST /pcapigateway/profile/{accountId}/hotels/{hotelId}/products HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
JavaScript

请求

ElementTypeOccurrenceDescriptionComment

productList

List[product]Optional

Product/roomId

StringMandatory

Product/rateIdStringMandatory

Product/statusEnum
  • Actived
  • Deactived
MandatoryStopSell
PreSale
Bookable



示例

请求

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "productList": [
    {
      "roomId": "DK",
      "rateId": "IDDRNDAR",
      "status": "Actived"
    },
    {
      "roomId": "DK",
      "rateId": "BARRATE",
      "status": "Actived"
    }
  ]
}

响应

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "productList": [
    {
      "roomId": "DK",
      "rateId": "IDDRNDAR",
      "status": "Actived"
    },
    {
      "roomId": "DK",
      "rateId": "BARRATE",
      "status": "Actived"
    }
  ]
}
JavaScript
响应:
JavaScript



10. 查询产品

此 API 查询酒店在 PropertyConnector 中全部存在的产品信息。

GET /pcapigateway/profile/{accountId}/hotels/{hotelId}/products HTTP/1.1
Authorization: Bearer 53ac07777cdffac2d53000002d698728ce964432d7167596bc005c5fc
Accept-Encoding: gzip
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
JavaScript

示例

响应

{
  "header": {
    "echoToken": "25c8cb40-52a0-449f-8fc9-0187c6f3f19e",
    "timeStamp": "2018-06-27T17:09:04.674Z",
    "version": "0.1"
  },
  "productList": [
    {
      "roomId": "DK",
      "rateId": "IDDRNDAR",
      "status": "Actived"
    },
    {
      "roomId": "DK",
      "rateId": "BARRATE",
      "status": "Actived"
    }
  ]
}
JavaScript