fujian_water_biz_doc/docs/api/openapi/main/paths/withholding-signing.yaml

243 lines
8.8 KiB
YAML

WithholdingSigning:
post:
tags:
- 代扣管理
summary: 代扣签约
description: |
银行代扣业务签约接口,建立客户与银行的代扣协议。
## 业务说明
- 支持客户与银行签署代扣协议
- 包含客户基本信息和银行账户信息
- 支持本行和他行账户签约
- 签约成功后可进行自动代扣
- 支持XML和JSON两种数据格式
## 业务规则
- 客户编号必须在系统中存在
- 银行账户信息必须真实有效
- 同一客户同一银行账户只能签约一次
- 签约成功后协议状态为已签约
## 调用频率限制
- 单个客户编号每天最多签约5次
- 单个机构每分钟最多签约50次
operationId: withholdingSigning
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
- AccountName
- AccountNo
- BankName
properties:
BillKey:
type: string
description: 客户编号
example: "123456"
maxLength: 35
CompanyId:
type: string
description: 机构编码
example: "654321"
maxLength: 30
AccountName:
type: string
description: 开户名
example: "张三"
maxLength: 150
AccountNo:
type: string
description: 开户账号
example: "6222001234567890"
maxLength: 30
BankName:
type: string
description: 银行名称
example: "中国工商银行"
maxLength: 150
ContractNo:
type: string
description: 合同号
example: "CONTRACT001"
maxLength: 150
BankType:
type: integer
description: 银行类型
enum: [0, 1] # 0:本行 1:他行
example: 0
example: |
<?xml version="1.0" encoding="GBK"?>
<in>
<Version>1.0.1</Version>
<InstId>00001</InstId>
<TranCode>Signing</TranCode>
<TranDate>20240101</TranDate>
<TranSeq>123456789014</TranSeq>
<BillKey>123456</BillKey>
<CompanyId>654321</CompanyId>
<AccountName>张三</AccountName>
<AccountNo>6222001234567890</AccountNo>
<BankName>中国工商银行</BankName>
<ContractNo>CONTRACT001</ContractNo>
<BankType>0</BankType>
</in>
application/json:
schema:
allOf:
- $ref: '../components/schemas.yaml#/components/schemas/BaseRequest'
- type: object
required:
- BillKey
- CompanyId
- AccountName
- AccountNo
- BankName
properties:
BillKey:
type: string
description: 客户编号
example: "123456"
CompanyId:
type: string
description: 机构编码
example: "654321"
AccountName:
type: string
description: 开户名
example: "张三"
AccountNo:
type: string
description: 开户账号
example: "6222001234567890"
BankName:
type: string
description: 银行名称
example: "中国工商银行"
ContractNo:
type: string
description: 合同号
example: "CONTRACT001"
BankType:
type: integer
description: 银行类型
example: 0
example:
Version: "1.0.1"
InstId: "00001"
TranCode: "Signing"
TranDate: "20240101"
TranSeq: "123456789014"
BillKey: "123456"
CompanyId: "654321"
AccountName: "张三"
AccountNo: "6222001234567890"
BankName: "中国工商银行"
ContractNo: "CONTRACT001"
BankType: 0
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>SigningRes</TranCode>
<TranDate>20240101</TranDate>
<TranSeq>123456789014</TranSeq>
<RespCode>AAAAAAA</RespCode>
<RespMessage>签约成功</RespMessage>
<Data>
<Agreement>
<BillKey>123456</BillKey>
<CompanyId>654321</CompanyId>
<AccountName>张三</AccountName>
<AccountNo>6222001234567890</AccountNo>
<BankName>中国工商银行</BankName>
<ContractNo>CONTRACT001</ContractNo>
<AgreementNo>AGR001</AgreementNo>
<BankType>0</BankType>
<AgreementStatus>1</AgreementStatus>
<SigningDate>2024-01-01</SigningDate>
</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: "SigningRes"
TranDate: "20240101"
TranSeq: "123456789014"
RespCode: "AAAAAAA"
RespMessage: "签约成功"
Data:
Agreement:
BillKey: "123456"
CompanyId: "654321"
AccountName: "张三"
AccountNo: "6222001234567890"
BankName: "中国工商银行"
ContractNo: "CONTRACT001"
AgreementNo: "AGR001"
BankType: 0
AgreementStatus: 1
SigningDate: "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: []