# ESB转发类接口--mq转发请求接口
# 品牌方通知
### 电子凭证系统通知到品牌渠道
#### **接口用途**
- 当电子凭证发生变更操作需要通知到品牌渠道时,调用该接口。
#### **接口说明**
- 该接口为异步通知接口,电子凭证系统无需返回值,由ESB负责与外部系统交互。
- messageType字段的值在对接时确定,默认易百标准报文格式,赋值“ebuy”;如果品牌方有规定格式,则值为“third”。
- 队列名称:`whale.core.brandNotify`
**请求参数,[WHALE](https://book.e-buy.com/books/e-buy-40/page/7f100 "易百电子凭证4.0系统的别称")===>ESB**
**通知报文主体**
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
channelId | String | 是 | 品牌id | |
notifyUrl | String | 是 | 通知地址 | |
notifyType | String | 是 | 通知类型 | |
messageType | String | 是 | 报文类型 | ebuy:易百标准报文格式,third:第三方自定义格式 |
whaleMessage | String | 是 | 易百标准报文 |
**易百标准报文:制码通知**
- notifyType:`MakeCode`
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
appId | String | 是 | 电子凭证系统对接方id | |
action | String | 是 | 业务标识 | MakeCodeNotify |
bizContent | JSONString<[makeCodeNotify](https://book.e-buy.com/link/325#bkmrk-json%C2%A0key%E4%B8%BAmakecodenot "makeCodeNotify")> | 否 | 制码通知[json](https://book.e-buy.com/books/e-buy-40/page/7f100#json "网络通信时的一种数据交互格式")字符串 | |
version | String | 是 | 版本号 |
timestamp | String | 是 | 时间戳 | |
sign | String | 是 | 签名 |
**易百标准报文:制码订单作废**
- notifyType:`MakeVoid`
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
appId | String | 是 | 电子凭证系统对接方id | |
action | String | 是 | 业务标识 | MakeVoidNotify |
bizContent | JSONString<[makeVoidNotify](https://book.e-buy.com/link/325#bkmrk-json%C2%A0key%E4%B8%BAmakevoidnot "makeVoidNotify")> | 否 | 制码订单作废通知[json](https://book.e-buy.com/books/e-buy-40/page/7f100#json "网络通信时的一种数据交互格式")字符串 | |
version | String | 是 | 版本号 |
timestamp | String | 是 | 时间戳 | |
sign | String | 是 | 签名 |
**易百标准报文:码状态更新通知**
- notifyType:`UpdateCodeStatus`
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
appId | String | 是 | 电子凭证系统对接方id | |
action | String | 是 | 业务标识 | UpdateCodeStatusNotify |
bizContent | JSONString<[updateCodeStatusNotify](https://book.e-buy.com/link/325#bkmrk-json%C2%A0key%E4%B8%BAupdatecodes "updateCodeStatusNotify")> | 是 | 更新码状态通知[json](https://book.e-buy.com/books/e-buy-40/page/7f100#json "网络通信时的一种数据交互格式")字符串 | |
version | String | 是 | 版本号 |
timestamp | String | 是 | 时间戳 | |
sign | String | 是 | 签名 |
**易百标准报文:码延期通知**
- notifyType:`CodeDelay`
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
appId | String | 是 | 电子凭证系统对接方id | |
action | String | 是 | 业务标识 | CodeDelayNotify |
bizContent | JSONString<[codeDelayNotify](https://book.e-buy.com/link/325#bkmrk-json%C2%A0key%E4%B8%BAcodedelayno "codeDelayNotify")> | 是 | 码延期通知[json](https://book.e-buy.com/books/e-buy-40/page/7f100#json "网络通信时的一种数据交互格式")字符串 | |
version | String | 是 | 版本号 |
timestamp | String | 是 | 时间戳 | |
sign | String | 是 | 签名 |
**易百标准报文:码过期通知**
- notifyType:`CodeExpire`
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
appId | String | 是 | 电子凭证系统对接方id | |
action | String | 是 | 业务标识 | CodeExpireNotify |
bizContent | JSONString<[codeExpireNotify](https://book.e-buy.com/link/325#bkmrk-json%C2%A0key%E4%B8%BAcodeexpiren "codeExpireNotify")> | 是 | 码过期通知[json](https://book.e-buy.com/books/e-buy-40/page/7f100#json "网络通信时的一种数据交互格式")字符串 | |
version | String | 是 | 版本号 |
timestamp | String | 是 | 时间戳 | |
sign | String | 是 | 签名 |
**易百标准报文:串码核销**
- notifyType:`Verify`
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
appId | String | 是 | 电子凭证系统对接方id | |
action | String | 是 | 业务标识 | VerifyNotify |
bizContent | JSONString<[verifyNotify](https://book.e-buy.com/link/325#bkmrk-json%C2%A0key%E4%B8%BAverifynotif "verifyNotify")> | 是 | 核销通知报文[json](https://book.e-buy.com/books/e-buy-40/page/7f100#json "网络通信时的一种数据交互格式")字符串 | |
version | String | 是 | 版本号 |
timestamp | String | 是 | 时间戳 | |
sign | String | 是 | 签名 |
**易百标准报文:串码核销撤销**
- notifyType:`VerifyVoid`
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
appId | String | 是 | 电子凭证系统对接方id | |
action | String | 是 | 业务标识 | VerifyVoidNotify |
bizContent | JSONString<[verifyVoidNotify](https://book.e-buy.com/link/325#bkmrk-json%C2%A0key%E4%B8%BAverifyvoidn "verifyVoidNotify")> | 是 | 核销撤销通知报文[json](https://book.e-buy.com/books/e-buy-40/page/7f100#json "网络通信时的一种数据交互格式")字符串 | |
version | String | 是 | 版本号 |
timestamp | String | 是 | 时间戳 | |
sign | String | 是 | 签名 |
# 取码方通知
### 电子凭证系统通知到取码方
#### **接口用途**
- 当电子凭证发生变更操作需要通知到取码方时,调用该接口。
#### **接口说明**
- 该接口为异步通知接口,电子凭证系统无需返回值,由ESB负责与外部系统交互。
- messageType字段的值在对接时确定,默认易百标准报文格式,赋值“Ebuy”;如果品牌方有规定格式,则值为“Third”。
- 队列名称:`whale.core.saleChannelNotify`
**请求参数,[WHALE](https://book.e-buy.com/books/e-buy-40/page/7f100#whale "易百电子凭证4.0系统的别称")===>ESB**
**通知报文主体**
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
channelId | String | 是 | 品牌id | |
notifyUrl | String | 是 | 通知地址 | |
notifyType | String | 是 | 通知类型 | |
messageType | String | 是 | 报文类型 | Ebuy:易百标准报文格式,Third:第三方自定义格式 |
whaleMessage | String | 是 | 易百标准报文 |
**易百标准报文:串码核销**
- notifyType:`Verify`
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
appId | String | 是 | 电子凭证系统对接方id | |
action | String | 是 | 业务标识 | VerifyNotify |
bizContent | JSONString<[verifyNotify](https://book.e-buy.com/link/325#bkmrk-json%C2%A0key%E4%B8%BAverifynotif "verifyNotify")> | 是 | 核销通知报文[json](https://book.e-buy.com/books/e-buy-40/page/7f100#json "网络通信时的一种数据交互格式")字符串 | |
version | String | 是 | 版本号 |
timestamp | String | 是 | 时间戳 | |
sign | String | 是 | 签名 |
**易百标准报文:串码核销撤销**
- notifyType:`VerifyVoid`
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
appId | String | 是 | 电子凭证系统对接方id | |
action | String | 是 | 业务标识 | VerifyVoidNotify |
bizContent | JSONString<[verifyVoidNotify](https://book.e-buy.com/link/325#bkmrk-json%C2%A0key%E4%B8%BAverifyvoidn "verifyVoidNotify")> | 是 | 核销撤销通知报文[json](https://book.e-buy.com/books/e-buy-40/page/7f100#json "网络通信时的一种数据交互格式")字符串 | |
version | String | 是 | 版本号 |
timestamp | String | 是 | 时间戳 | |
sign | String | 是 | 签名 |
**易百标准报文:码状态更新**
- notifyType:`UpdateCodeStatus`
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
appId | String(10) | 是 | 电子凭证系统对接方id | |
action | String(20) | 是 | 业务标识 | UpdateCodeStatusNotify |
bizContent | JSONString<[updateCodeStatusNotify](https://book.e-buy.com/link/325#bkmrk-json%C2%A0key%E4%B8%BAupdatecodes "updateCodeStatusNotify")> | 是 | 更新码状态通知[json](https://book.e-buy.com/books/e-buy-40/page/7f100#json "网络通信时的一种数据交互格式")字符串 | |
version | String(10) | 是 | 版本号 |
timestamp | String | 是 | 时间戳 | |
sign | String | 是 | 签名 |
# 制码方通知
### 电子凭证系统通知到制码方
#### **接口用途**
- 当电子凭证发生变更操作需要通知到制码方时,调用该接口。
#### **接口说明**
- 该接口为异步通知接口,电子凭证系统无需返回值,由ESB负责与外部系统交互。
- messageType字段的值在对接时确定,默认易百标准报文格式,赋值“Ebuy”;如果品牌方有规定格式,则值为“Third”。
- 队列名称:`whale.core.sendChannelNotify`
**请求参数,[WHALE](https://book.e-buy.com/books/e-buy-40/page/7f100#whale "易百电子凭证4.0系统的别称")===>ESB**
**通知报文主体**
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
channelId | String | 是 | 品牌id | |
notifyUrl | String | 是 | 通知地址 | |
notifyType | String | 是 | 通知类型 | |
messageType | String | 是 | 报文类型 | Ebuy:易百标准报文格式,Third:第三方自定义格式 |
whaleMessage | String | 是 | 易百标准报文 |
**易百标准报文:码状态更新通知**
- notifyType:`UpdateCodeStatus`
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
appId | String | 是 | 电子凭证系统对接方id | |
action | String | 是 | 业务标识 | UpdateCodeStatusNotify |
bizContent | JSONString<[updateCodeStatusNotify](https://book.e-buy.com/link/325#bkmrk-json%C2%A0key%E4%B8%BAupdatecodes "updateCodeStatusNotify")> | 是 | 更新码状态通知[json](https://book.e-buy.com/books/e-buy-40/page/7f100#json "网络通信时的一种数据交互格式")字符串 | |
version | String | 是 | 版本号 |
timestamp | String | 是 | 时间戳 | |
sign | String | 是 | 签名 |
# 代理渠道通知
### 电子凭证系统通知到代理商
#### **接口用途**
- 当电子凭证发生变更操作需要通知到代理商时,调用该接口。
#### **接口说明**
- 代理商:介于取码方与易百电子凭证系统之间,帮助取码方进行取码等操作,比如微信商家券系统系统。
- 该接口为异步通知接口,电子凭证系统无需返回值,由ESB负责与外部系统交互。
- messageType字段的值在对接时确定,默认易百标准报文格式,赋值“Ebuy”;如果品牌方有规定格式,则值为“Third”。
- 队列名称:`whale.core.agentChannelNotify`
**请求参数,[WHALE](https://book.e-buy.com/books/e-buy-40/page/7f100#whale "易百电子凭证4.0系统的别称")===>ESB**
**通知报文主体**
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
channelId | String | 是 | 代理商id | |
notifyUrl | String | 是 | 通知地址 | |
notifyType | String | 是 | 通知类型 | |
messageType | String | 是 | 报文类型 | Ebuy:易百标准报文格式,Third:第三方自定义格式 |
whaleMessage | String | 是 | 易百标准报文 |
**易百标准报文:串码核销**
- notifyType:`Verify`
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
appId | String | 是 | 电子凭证系统对接方id | |
action | String | 是 | 业务标识 | VerifyNotify |
bizContent | JSONString<[verifyNotify](https://book.e-buy.com/link/325#bkmrk-json%C2%A0key%E4%B8%BAverifynotif "verifyNotify")> | 是 | 核销通知报文[json](https://book.e-buy.com/books/e-buy-40/page/7f100#json "网络通信时的一种数据交互格式")字符串 | |
version | String | 是 | 版本号 |
timestamp | String | 是 | 时间戳 | |
sign | String | 是 | 签名 |
**易百标准报文:串码核销撤销**
- notifyType:`VerifyVoid`
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
appId | String | 是 | 电子凭证系统对接方id | |
action | String | 是 | 业务标识 | VerifyVoidNotify |
bizContent | JSONString<[verifyVoidNotify](https://book.e-buy.com/link/325#bkmrk-json%C2%A0key%E4%B8%BAverifyvoidn "verifyVoidNotify")> | 是 | 核销撤销通知报文[json](https://book.e-buy.com/books/e-buy-40/page/7f100#json "网络通信时的一种数据交互格式")字符串 | |
version | String | 是 | 版本号 |
timestamp | String | 是 | 时间戳 | |
sign | String | 是 | 签名 |
# 第三方微信卡包通知
### 调用第三方插入微信卡包接口
#### **接口用途**
- 当取码方需要易百协助调用制码方完成微信卡包通知时,电子凭证平台请求ESB调用此接口。
- 制码方需提供给易百相应URL。
#### **接口说明**
- 该接口为电子凭证平台调用ESB做用户卡包通知操作,ESB再根据不同制码方拼装报文并实时请求。
#### **url**
- `activityInsert`
**请求参数,[WHALE](https://book.e-buy.com/books/e-buy-40/page/7f100#whale "易百电子凭证4.0系统的别称")===>ESB**
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
channelId | String | 是 | 外部制码方id | |
requestId | String | 是 | 请求流水号 | 32个字符,用于标识唯一一笔交易 |
codes | String | 是 | 码号 | |
userUnionId | String | 否 | 微信用户唯一识别号 | |
appId | String | 否 | 公众号id | |
userOpenId | String | 否 | 微信用户唯一识别号 | |
sign | String | 是 | 签名 |
**请求报文举例**
```
{
"channelId":"10002401",
"requestId": "20181019112535100000000000000002",
"codes": "1021242013780905000",
"userUnionId":"2429********************",
"sign":"deid3412dj98s34lix"
}
```
**返回参数,ESB===>[WHALE](https://book.e-buy.com/books/e-buy-40/page/7f100#whale "易百电子凭证4.0系统的别称")**
字段 | 类型 | 是否必填 | 字段意义 | 备注 |
---|
returnCode | String | 是 | 请求返回码 | |
returnMsg | String | 是 | 请求返回信息 |
**返回报文举例**
```
{
"returnCode": "00",
"returnMsg": "操作成功",
}
```