客户关系接口
接口列表
接口名称 | 接口方法 | 说明 |
---|---|---|
1.新增或更新客历信息 | Customer.AddOrUpdateCustomer | 新增或更新客历信息 |
2.新增协议公司 | Contractor.AddContractor | 新增协议公司 |
3.修改协议公司 | Contractor.UpdateContractor | 修改协议公司 |
4.查询协议公司 | Contractor.SearchContractor | 根据条件分页查询协议公司 |
5.根据Id获取协议公司详细信息 | Contractor.GetContractor | 根据Id获取协议公司详细信息 |
6.查询协议公司间夜数 | Contractor.GetContractorRoomPoint | 查询协议公司间夜数 |
1.新增或更新客历信息
Customer.AddOrUpdateCustomer
应用场景
自助机可以在预定是否新增客历,入住时可以自动匹配
请求参数
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
CustomerId | 客历ID | 否 | long | 更新时ID和证件号2选一 | |
Name | 客人信息 | 是 | string | 小明 | |
IdCardNumber | 证件信息 | 是 | string | ||
PersonalCredentialType | 证件类型 | 是 | string | 参考数据字典中的PersonalCredentialType | |
Gender | 性别 | 否 | int | 0:未知、1:女、2:男 | |
Birthday | 生日 | 否 | string | 1990-03-07 00:00:00 | |
Nationality | 国籍 | 否 | string | 中国 | |
Province | 省 | 否 | string | ||
City | 市 | 否 | string | ||
District | 区 | 否 | string | ||
Race | 名族 | 否 | string | ||
Address | 地址 | 否 | string |
示例
{
"BizContent": "{\"CustomerId\":1180829701111809\"\",\"Address\":\"1\",\"Birthday\":\"1990-03-07 00:00:00\",\"District\":\"东城区\",\"Gender\":2,\"IdCardNumber\":\"110101199003072914\",\"MemberCardId\":\"\",\"MemberId\":\"\",\"Name\":\"西问问\",\"Nationality\":\"中国\",\"PersonalCredentialType\":\"C01\",\"Province\":\"北京 [BJ]\",\"City\":\"北京市\",\"Race\":\"R01\"}",
"ChannelKey": "Hotel",
"Charset": "utf-8",
"Domain": "cpmstestteam",
"Format": "json",
"Method": "Customer.AddOrUpdateCustomer",
"Sign": "7ca97505aec38b1e051c6e601c23801131f15b31bda4e67fc1c045059a19956c",
"SignType": "SHA256",
"Timestamp": "2018-09-07 02:01:35",
"Version": "1.0"
}
返回结果
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
CustomerId | 客历ID | 是 | long | ||
Name | 客人信息 | 是 | string | 小明 | |
IdCardNumber | 证件信息 | 是 | string | ||
PersonalCredentialType | 证件类型 | 是 | string | ||
Gender | 性别 | 是 | int | 0:未知、1:女、2:男 | |
Birthday | 生日 | 是 | string | 1990-03-07 00:00:00 | |
Nationality | 国籍 | 是 | string | 中国 | |
Province | 省 | 是 | string | ||
City | 市 | 是 | string | ||
District | 区 | 否 | string | ||
Race | 名族 | 是 | string | ||
Address | 地址 | 是 | string |
示例
{
"Code": 10000,
"Message": null,
"SubCode": null,
"SubMessage": null,
"Data": {
"CustomerId": 1180829701111809,
"PhotoUrl": null,
"BlackListMemo": null,
"Value": 0.0,
"Point": 0.0,
"FromType": 0,
"PhotoStatus": false,
"InvoiceCustomerName": null,
"InvoiceTrxCode": null,
"InvoiceAddressTel": null,
"InvoiceBankInfo": null,
"IsUpdateMember": false,
"MemberIdOnlyForUpdate": null,
"RelatedOccuaptionId": 0,
"ShowEye": false,
"SourceHotelName": null,
"IsMember": false,
"OrderId": 0,
"QueryCrm": true,
"IsBlackList": false,
"Name": "西问问",
"MemberId": null,
"Level": null,
"MemberCardId": null,
"PersonalCredentialType": "C01",
"IdCardNumber": "110101199003072914",
"Memo": null,
"Nationality": "中国",
"City": "北京市",
"Gender": 2,
"Race": "R01",
"Birthday": "1990-03-07T00:00:00",
"Address": "1",
"Province": "北京 [BJ]",
"District": "东城区",
"Phone": null,
"Mobile": null,
"Fax": null,
"Email": null,
"VisaType": null,
"VisaNumber": null,
"PortOfEntry": null,
"StayReason": null,
"VisaExpiryDate": null,
"Profession": null,
"Remark": null,
"ReceptionPerson": null,
"DateOfEntry": null,
"HostOrganization": null,
"IssueAuthority": null,
"LastName": null,
"FirstName": null,
"ArrivedReason": null,
"PassengerVehicles": null,
"GoTo": null,
"ComeFrom": null,
"ValidStart": null,
"ValidEnd": null
}
}
2.新增协议公司
Contractor.AddContractor
应用场景
目前仅供山东沃德调用
请求参数
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
ContractType | 类型 | 是 | string | 协议公司固定传Contractor | |
Channel | 渠道 | 否 | string | ||
Name | 公司名称 | 是 | string | 别样红信息技术有限公司 | |
Abbreviation | 公司简称 | 否 | string | 别样红 | |
Code | 代码 | 否 | string | ||
LegalEntity | 法人 | 否 | string | 张三 | |
Telephone | 电话 | 否 | string | ||
Fax | 传真 | 否 | string | ||
Country | 国家 | 否 | string | ||
ZipCode | 邮编 | 否 | string | ||
Province | 省份 | 否 | string | ||
City | 城市 | 否 | string | ||
District | 区 | 否 | string | ||
Address | 详细地址 | 否 | string | ||
Level | 销售等级 | 是 | string | 公司一级 | 具体值请参考PMS中的相关设置 |
CommissionLevel | 佣金等级 | 否 | string | ||
SalerName | 销售人员 | 否 | string | ||
Sector | 所属行业 | 否 | string | ||
MarketCode | 市场代码 | 否 | string | ||
SourceCode | 客源代码 | 否 | string | ||
Memo | 备注 | 否 | string | ||
IsOpen | 有效标识 | 是 | bool | true | |
ContactName | 联系人姓名 | 否 | string | ||
ContactTelephone | 联系人电话 | 否 | string | ||
ContactFax | 联系人传真 | 否 | string | ||
ContactEmail | 联系人邮箱 | 否 | string | ||
BeginValidDate | 开始时间 | 否 | DateTime | ||
EndValidDate | 结束时间 | 否 | DateTime | ||
ChannelClassification | 渠道分类 | 否 | string | ||
OrgId | 所属酒店 | 否 | long | 2147483644 | 集团共享时可传null |
OnlyHotelUsed | 所属类型:单店使用or集团共享 | 是 | bool | true | 设置为true时,OrgId必须传值 |
HidePrice | 宾客详单中打印登记单时是否显示房价及备注 | 是 | bool | true |
示例
{
Method:"Contractor.AddContractor",
BizContent:"{
\"ContractType\":\"Contractor\",
\"Name\":\"别样红\",
\"Level\":\"公司一级\",
\"IsOpen\":true,
\"OnlyHotelUsed\":false,
\"OrgId\":null,
\"HidePrice\":false,
}",
ChannelKey:"Hotel",
Format:"json",
Charset:"utf-8",
Version:"1.0",
Sign:"7ca97505aec38b1e051c6e601c23801131f15b31bda4e67fc1c045059a19956c",
SignType:"SHA256"
}
返回结果
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
ContractId | 协议公司Id | 是 | long | 1189899554062337 | 操作成功时返回协议公司Id |
示例
{
"Code": 10000,
"Message": null,
"SubCode": null,
"SubMessage": null,
"Data": 1189899554062337
}
3.修改协议公司
Contractor.UpdateContractor
应用场景
目前仅供山东沃德调用
请求参数
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
Id | 协议公司Id | 是 | long | 1189899554062337 | |
ContractType | 类型 | 是 | string | 协议公司固定传Contractor | |
Channel | 渠道 | 否 | string | ||
Abbreviation | 公司简称 | 否 | string | 别样红 | |
Code | 代码 | 否 | string | ||
LegalEntity | 法人 | 否 | string | 张三 | |
Telephone | 电话 | 否 | string | ||
Fax | 传真 | 否 | string | ||
Country | 国家 | 否 | string | ||
ZipCode | 邮编 | 否 | string | ||
Province | 省份 | 否 | string | ||
City | 城市 | 否 | string | ||
District | 区 | 否 | string | ||
Address | 详细地址 | 否 | string | ||
Level | 销售等级 | 是 | string | 公司一级 | 具体值请参考PMS中的相关设置 |
CommissionLevel | 佣金等级 | 否 | string | ||
SalerName | 销售人员 | 否 | string | ||
Sector | 所属行业 | 否 | string | ||
MarketCode | 市场代码 | 否 | string | ||
SourceCode | 客源代码 | 否 | string | ||
Memo | 备注 | 否 | string | ||
IsOpen | 有效标识 | 是 | bool | true | |
ContactName | 联系人姓名 | 否 | string | ||
ContactTelephone | 联系人电话 | 否 | string | ||
ContactFax | 联系人传真 | 否 | string | ||
ContactEmail | 联系人邮箱 | 否 | string | ||
BeginValidDate | 开始时间 | 否 | DateTime | ||
EndValidDate | 结束时间 | 否 | DateTime | ||
ChannelClassification | 渠道分类 | 否 | string | ||
OrgId | 所属酒店 | 否 | long | 2147483644 | 集团共享时可传null |
OnlyHotelUsed | 所属类型:单店使用or集团共享 | 是 | bool | true | 设置为true时,OrgId必须传值 |
HidePrice | 宾客详单中打印登记单时是否显示房价及备注 | 是 | bool | true |
示例
{
Method:"Contractor.UpdateContractor",
BizContent:"{\"Id\":1189899554062337,
\"ContractType\":\"Contractor\",
\"Level\":\"公司一级\",
\"IsOpen\":true,
\"OnlyHotelUsed\":false,
\"OrgId\":null,
\"HidePrice\":false}",
ChannelKey:"Hotel",
Format:"json",
Charset:"utf-8",
Version:"1.0",
Sign:"7ca97505aec38b1e051c6e601c23801131f15b31bda4e67fc1c045059a19956c",
SignType:"SHA256"
}
返回结果
略
示例
{
"Code": 10000,
"Message": null,
"SubCode": null,
"SubMessage": null,
"Data": null
}
4.查询协议公司
Contractor.SearchContractor
应用场景
目前仅供山东沃德调用
请求参数
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
PageSize | 每页显示的记录数 | 否 | int | 默认20 | |
PageIndex | 页码 | 否 | int | 从1开始计算,默认1 | |
OrgId | 酒店Id | 否 | long | 2147483628 | |
Keywords | 关键字 | 否 | string | ||
Status | 状态 | 否 | bool[] | true有效,false无效,不传查所有 | |
SalerName | 销售人员 | 否 | string | 张三 | |
ContractType | 类型 | 否 | string | 协议公司固定传Contractor | |
ContractorLevel | 销售等级 | 否 | string | 公司一级 | 具体值请参考PMS中的相关设置 |
示例
{
Method:"Contractor.SearchContractor",
BizContent:"{\"OrgId\":2147483644,\"Status\":[true]}}",
ChannelKey:"Hotel",
Format:"json",
Charset:"utf-8",
Version:"1.0",
Sign:"7ca97505aec38b1e051c6e601c23801131f15b31bda4e67fc1c045059a19956c",
SignType:"SHA256"
}
返回结果
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
Id | 协议公司Id | 是 | long | 1189899554062337 | |
No | 编码 | 是 | string | 4OW7EX5E001 | |
ContractType | 类型 | 是 | string | Contractor | |
Channel | 渠道 | 否 | string | ||
Name | 公司名称 | 是 | string | 别样红信息技术有限公司 | |
Abbreviation | 公司简称 | 否 | string | 别样红 | |
Code | 代码 | 否 | string | ||
LegalEntity | 法人 | 否 | string | 张三 | |
Telephone | 电话 | 否 | string | ||
Fax | 传真 | 否 | string | ||
Country | 国家 | 否 | string | ||
ZipCode | 邮编 | 否 | string | ||
Province | 省份 | 否 | string | ||
City | 城市 | 否 | string | ||
District | 区 | 否 | string | ||
Address | 详细地址 | 否 | string | ||
Level | 销售等级 | 是 | string | 公司一级 | |
LevelDesc | 销售等级描述 | 是 | string | 公司一级 | |
CommissionLevel | 佣金等级 | 否 | string | ||
SalerName | 销售人员 | 否 | string | ||
Sector | 所属行业 | 否 | string | ||
MarketCode | 市场代码 | 否 | string | ||
SourceCode | 客源代码 | 否 | string | ||
Memo | 备注 | 否 | string | ||
IsOpen | 有效标识 | 是 | bool | true | |
ContactName | 联系人姓名 | 否 | string | ||
ContactTelephone | 联系人电话 | 否 | string | ||
ContactFax | 联系人传真 | 否 | string | ||
ContactEmail | 联系人邮箱 | 否 | string | ||
ChannelClassification | 渠道分类 | 否 | string | ||
OrgInfo | 所属酒店名称 | 否 | string | ||
OrgId | 所属酒店 | 否 | long | 2147483644 | |
OnlyHotelUsed | 所属类型:单店使用or集团共享 | 是 | bool | true | |
AllowDebts | 是否允许挂账 | 是 | bool | true | |
HidePrice | 宾客详单中打印登记单时是否显示房价及备注 | 是 | bool | true |
示例
{
"Code": 10000,
"Message": null,
"SubCode": null,
"SubMessage": null,
"Data": {
"PageSize": 20,
"PageIndex": 1,
"RecordCount": 2,
"PageCount": 1,
"Content": [
{
"Id": 1189794769453057,
"No": "4OW0JE2J001",
"ContractType": "Contractor",
"Channel": null,
"Name": "拿骚船务",
"Abbreviation": null,
"Code": null,
"LegalEntity": null,
"Telephone": null,
"Fax": null,
"Country": null,
"ZipCode": null,
"Province": null,
"City": null,
"District": null,
"Address": null,
"Level": "公司一级",
"LevelDesc": "公司一级",
"CommissionLevel": null,
"SalerName": null,
"Sector": null,
"MarketCode": null,
"SourceCode": null,
"Memo": null,
"IsOpen": true,
"ContactName": null,
"ContactTelephone": null,
"ContactFax": null,
"ContactEmail": null,
"ChannelClassification": null,
"OrgInfo": "测试门店1",
"OnlyHotelUsed": true,
"IsNotOTAChannelOrIsSuperadmin": true,
"OrgId": 2147483644,
"AllowDebts": false,
"HidePrice": false
},
{
"Id": 1189832146583553,
"No": "4OW7EX5E001",
"ContractType": "Contractor",
"Channel": null,
"Name": "大开曼银行",
"Abbreviation": null,
"Code": null,
"LegalEntity": null,
"Telephone": null,
"Fax": null,
"Country": null,
"ZipCode": null,
"Province": null,
"City": null,
"District": null,
"Address": null,
"Level": "公司一级",
"LevelDesc": "公司一级",
"CommissionLevel": null,
"SalerName": null,
"Sector": null,
"MarketCode": null,
"SourceCode": null,
"Memo": null,
"IsOpen": true,
"ContactName": null,
"ContactTelephone": null,
"ContactFax": null,
"ContactEmail": null,
"ChannelClassification": null,
"OrgInfo": "测试门店1",
"OnlyHotelUsed": true,
"IsNotOTAChannelOrIsSuperadmin": true,
"OrgId": 2147483644,
"AllowDebts": false,
"HidePrice": false
}
]
}
}
5.根据Id获取协议公司详细信息
Contractor.GetContractor
应用场景
目前仅供山东沃德调用(由于查询时没有指定门店,所以此接口不会返回AR账信息)
请求参数
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
ContractorId | 协议公司Id | 是 | long | 1189832146583553 |
示例
{
Method:"Contractor.GetContractor",
BizContent:"{\"contractorId\":1189794769453057}}",
ChannelKey:"Hotel",
Format:"json",
Charset:"utf-8",
Version:"1.0",
Sign:"7ca97505aec38b1e051c6e601c23801131f15b31bda4e67fc1c045059a19956c",
SignType:"SHA256"
}
返回结果
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
Id | 协议公司Id | 是 | long | 1189899554062337 | |
ContractType | 类型 | 是 | string | Contractor | |
Channel | 渠道 | 否 | string | ||
Name | 公司名称 | 是 | string | 别样红信息技术有限公司 | |
Abbreviation | 公司简称 | 否 | string | 别样红 | |
Code | 代码 | 否 | string | ||
LegalEntity | 法人 | 否 | string | 张三 | |
Telephone | 电话 | 否 | string | ||
Fax | 传真 | 否 | string | ||
Country | 国家 | 否 | string | ||
ZipCode | 邮编 | 否 | string | ||
Province | 省份 | 否 | string | ||
City | 城市 | 否 | string | ||
District | 区 | 否 | string | ||
Address | 详细地址 | 否 | string | ||
Level | 销售等级 | 是 | string | 公司一级 | |
CommissionLevel | 佣金等级 | 否 | string | ||
SalerName | 销售人员 | 否 | string | ||
Sector | 所属行业 | 否 | string | ||
MarketCode | 市场代码 | 否 | string | ||
SourceCode | 客源代码 | 否 | string | ||
Memo | 备注 | 否 | string | ||
IsOpen | 有效标识 | 是 | bool | true | |
ContactName | 联系人姓名 | 否 | string | ||
ContactTelephone | 联系人电话 | 否 | string | ||
ContactFax | 联系人传真 | 否 | string | ||
ContactEmail | 联系人邮箱 | 否 | string | ||
ChannelClassification | 渠道分类 | 否 | string | ||
OrgId | 所属酒店 | 否 | long | 2147483644 | |
OnlyHotelUsed | 所属类型:单店使用or集团共享 | 是 | bool | true | |
AllowDebts | 是否允许挂账 | 是 | bool | true | |
HidePrice | 宾客详单中打印登记单时是否显示房价及备注 | 是 | bool | true |
示例
{
"Code": 10000,
"Message": null,
"SubCode": null,
"SubMessage": null,
"Data": {
"Id": 1189899554062337,
"ContractType": "Contractor",
"Channel": null,
"Name": "别样红",
"Abbreviation": null,
"Code": null,
"LegalEntity": null,
"Telephone": null,
"Fax": null,
"Country": null,
"ZipCode": null,
"Province": null,
"City": null,
"District": null,
"Address": null,
"Level": "公司一级",
"CommissionLevel": null,
"SalerName": null,
"Sector": null,
"MarketCode": null,
"SourceCode": null,
"Memo": null,
"IsOpen": true,
"ContactName": null,
"ContactTelephone": null,
"ContactFax": null,
"ContactEmail": null,
"OrgName": null,
"BeginValidDate": null,
"EndValidDate": null,
"ChannelClassification": null,
"OnlyHotelUsed": false,
"OrgId": null,
"IsNotOTAChannelOrIsSuperadmin": true,
"AllowDebts": false,
"HidePrice": false
}
}
6.查询协议公司间夜数
Contractor.GetContractorRoomPoint
应用场景
目前仅供山东沃德调用
请求参数
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
ContractorIds | 协议公司Id | 是 | long[] | [1189832146583553] |
示例
{
Method:"Contractor.GetContractorRoomPoint",
BizContent:"{\"ContractorIds\":[1189794769453057]}}",
ChannelKey:"Hotel",
Format:"json",
Charset:"utf-8",
Version:"1.0",
Sign:"7ca97505aec38b1e051c6e601c23801131f15b31bda4e67fc1c045059a19956c",
SignType:"SHA256"
}
返回结果
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
OwnerId | 集团Id | 是 | long | 1 | |
ContractorId | 协议公司Id | 是 | long | 1189899554062337 | |
RoomPoint | 间夜 | 是 | decimal | 3 |
示例
{
"Code": 10000,
"Message": null,
"SubCode": null,
"SubMessage": null,
"Data": [{
"OwnerId": 1,
"ContractId": 1189899554062337,
"RoomPoint": 3,
}]
}