184 lines
6.5 KiB
YAML
184 lines
6.5 KiB
YAML
WithholdingTermination:
|
|
post:
|
|
tags:
|
|
- 代扣管理
|
|
summary: 代扣解约
|
|
description: |
|
|
银行代扣业务解约接口,终止客户与银行的代扣协议。
|
|
|
|
## 业务说明
|
|
- 支持客户解除与银行的代扣协议
|
|
- 解约后不能再进行自动代扣
|
|
- 支持XML和JSON两种数据格式
|
|
- 解约后协议状态变更为已解约
|
|
|
|
## 业务规则
|
|
- 只能解约已签约状态的协议
|
|
- 解约成功后协议状态更新为已解约
|
|
- 同一协议只能解约一次
|
|
- 解约不影响已产生的交易记录
|
|
|
|
## 调用频率限制
|
|
- 单个协议号每天最多解约1次
|
|
- 单个机构每分钟最多解约20次
|
|
|
|
operationId: withholdingTermination
|
|
parameters:
|
|
- $ref: '../components/parameters.yaml#/components/parameters/ContentTypeHeader'
|
|
- $ref: '../components/parameters.yaml#/components/parameters/EncryptTypeHeader'
|
|
- $ref: '../components/parameters.yaml#/components/parameters/EncryptModeHeader'
|
|
- $ref: '../components/parameters.yaml#/components/parameters/DataTypeHeader'
|
|
requestBody:
|
|
required: true
|
|
description: 代扣解约请求数据
|
|
content:
|
|
application/xml:
|
|
schema:
|
|
allOf:
|
|
- $ref: '../components/schemas.yaml#/components/schemas/BaseRequest'
|
|
- type: object
|
|
required:
|
|
- BillKey
|
|
- CompanyId
|
|
- AgreementNo
|
|
properties:
|
|
BillKey:
|
|
type: string
|
|
description: 客户编号
|
|
example: "123456"
|
|
maxLength: 35
|
|
CompanyId:
|
|
type: string
|
|
description: 机构编码
|
|
example: "654321"
|
|
maxLength: 30
|
|
AgreementNo:
|
|
type: string
|
|
description: 协议号
|
|
example: "AGR001"
|
|
maxLength: 150
|
|
example: |
|
|
<?xml version="1.0" encoding="GBK"?>
|
|
<in>
|
|
<Version>1.0.1</Version>
|
|
<InstId>00001</InstId>
|
|
<TranCode>Termination</TranCode>
|
|
<TranDate>20240101</TranDate>
|
|
<TranSeq>123456789015</TranSeq>
|
|
<BillKey>123456</BillKey>
|
|
<CompanyId>654321</CompanyId>
|
|
<AgreementNo>AGR001</AgreementNo>
|
|
</in>
|
|
application/json:
|
|
schema:
|
|
allOf:
|
|
- $ref: '../components/schemas.yaml#/components/schemas/BaseRequest'
|
|
- type: object
|
|
required:
|
|
- BillKey
|
|
- CompanyId
|
|
- AgreementNo
|
|
properties:
|
|
BillKey:
|
|
type: string
|
|
description: 客户编号
|
|
example: "123456"
|
|
CompanyId:
|
|
type: string
|
|
description: 机构编码
|
|
example: "654321"
|
|
AgreementNo:
|
|
type: string
|
|
description: 协议号
|
|
example: "AGR001"
|
|
example:
|
|
Version: "1.0.1"
|
|
InstId: "00001"
|
|
TranCode: "Termination"
|
|
TranDate: "20240101"
|
|
TranSeq: "123456789015"
|
|
BillKey: "123456"
|
|
CompanyId: "654321"
|
|
AgreementNo: "AGR001"
|
|
|
|
responses:
|
|
'200':
|
|
description: 解约成功
|
|
headers:
|
|
Content-Type:
|
|
$ref: '../components/headers.yaml#/components/headers/ContentType'
|
|
X-Response-Time:
|
|
$ref: '../components/headers.yaml#/components/headers/ResponseTime'
|
|
X-Request-Id:
|
|
$ref: '../components/headers.yaml#/components/headers/RequestId'
|
|
content:
|
|
application/xml:
|
|
schema:
|
|
allOf:
|
|
- $ref: '../components/schemas.yaml#/components/schemas/BaseResponse'
|
|
- type: object
|
|
properties:
|
|
Data:
|
|
type: object
|
|
properties:
|
|
Agreement:
|
|
$ref: '../components/schemas.yaml#/components/schemas/WithholdingAgreement'
|
|
example: |
|
|
<?xml version="1.0" encoding="GBK"?>
|
|
<out>
|
|
<Version>1.0.1</Version>
|
|
<InstId>00001</InstId>
|
|
<TranCode>TerminationRes</TranCode>
|
|
<TranDate>20240101</TranDate>
|
|
<TranSeq>123456789015</TranSeq>
|
|
<RespCode>AAAAAAA</RespCode>
|
|
<RespMessage>解约成功</RespMessage>
|
|
<Data>
|
|
<Agreement>
|
|
<BillKey>123456</BillKey>
|
|
<CompanyId>654321</CompanyId>
|
|
<AgreementNo>AGR001</AgreementNo>
|
|
<AgreementStatus>2</AgreementStatus>
|
|
<TerminationDate>2024-01-01</TerminationDate>
|
|
</Agreement>
|
|
</Data>
|
|
</out>
|
|
application/json:
|
|
schema:
|
|
allOf:
|
|
- $ref: '../components/schemas.yaml#/components/schemas/BaseResponse'
|
|
- type: object
|
|
properties:
|
|
Data:
|
|
type: object
|
|
properties:
|
|
Agreement:
|
|
$ref: '../components/schemas.yaml#/components/schemas/WithholdingAgreement'
|
|
example:
|
|
Version: "1.0.1"
|
|
InstId: "00001"
|
|
TranCode: "TerminationRes"
|
|
TranDate: "20240101"
|
|
TranSeq: "123456789015"
|
|
RespCode: "AAAAAAA"
|
|
RespMessage: "解约成功"
|
|
Data:
|
|
Agreement:
|
|
BillKey: "123456"
|
|
CompanyId: "654321"
|
|
AgreementNo: "AGR001"
|
|
AgreementStatus: 2
|
|
TerminationDate: "2024-01-01"
|
|
|
|
'400':
|
|
$ref: '../components/responses.yaml#/components/responses/BusinessError'
|
|
'500':
|
|
$ref: '../components/responses.yaml#/components/responses/SystemError'
|
|
'401':
|
|
$ref: '../components/responses.yaml#/components/responses/SecurityError'
|
|
'408':
|
|
$ref: '../components/responses.yaml#/components/responses/NetworkError'
|
|
|
|
security:
|
|
- ApiKeyAuth: []
|
|
- EncryptedData: [] |