薪福通API接口SDK
Project description
xftOpenApi
用于调用薪福通API接口
安装
pip install xftOpenApi
需要用到的依赖库:gmssl
pip install gmssl -i https://pypi.tuna.tsinghua.edu.cn/simple
用法
from xftOpenApi import XFT
# 查询组织结构
api = "/ORG/orgqry/xft-service-organization/org/v1/get/page"
querystr = {
"codes": [
"0000"
]
}
# 添加配置信息
config = {
"appid": "",
"privateKey": "",
"publicKey": "",
"host": "https://api.cmbchina.com",
"CSCPRJCOD": "",
}
xft = XFT(**config)
orgqry = xft.post(api, querystr)
print(orgqry)
配置项 config 说明:
| 参数名称 | 参数说明 | 是否必填 | 备注说明 |
|---|---|---|---|
| appid | 应用程序的唯一标识符。 | 是 | 自定义应用的凭证 |
| privateKey | 应用程序的私钥,用于签名验证。 | 是 | 自定义应用的私钥 |
| publicKey | 应用程序的公钥,用于加密通信。 | 是 | 需要找招行薪福通技术支持人员申请 |
| host | 薪福通API服务器的地址。 | 是 | 沙盒环境地址:https://api.cmburl.cn:8065 ;生产环境地址:https://api.cmbchina.com |
| CSCPRJCOD | 企业号 | 否 | 登录开放平台,点击右上角登录用户名称,可以查看到企业ID;如果不传,接口处理时默认取CSCAPPUID应用所属企业 |
| CSCUSRNBR | 薪福通企业用户号 | 否 | 在企业内唯一编号。如果是网页应用,建议从用户登录信息中取出;如果API不是用户操作行为(如定时拉取或推送等)允许为空,但部分接口可能会使用该字段,请在联调时注意,可输入A0001 |
| CSCUSRUID | 薪福通平台用户号 | 否 | 在薪福通内用户的唯一编号。如果是网页应用,建议从用户登录信息中取出;如果API不是用户操作行为(如定时拉取或推送等)允许为空,但部分接口可能会使用该字段,请在联调时注意,可输入AUTO0001 |
注意:
在调用API之前,需要先登录开放平台,申请应用,获取appid、privateKey、publicKey等信息。
注意:沙盒环境的企业号与生产环境不同,请注意在不同环境中使用对应的企业号,以防调用失败。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xftopenapi-1.0.0.tar.gz
(10.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xftopenapi-1.0.0.tar.gz.
File metadata
- Download URL: xftopenapi-1.0.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6a65d348c15599fb5f147116ff6ec0559c430996b99b0c1c1b70861b0b7c1d6
|
|
| MD5 |
1fdf0dc7bee058c004068d908e060777
|
|
| BLAKE2b-256 |
00f8930d14689e7d6a2546bf5083955607f803766dd4b0b2da55a13075b94961
|
File details
Details for the file xftOpenApi-1.0.0-py3-none-any.whl.
File metadata
- Download URL: xftOpenApi-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9a54234cfbc2908147fc198e1ee8548b8b2c9c6f800548be259fa646e19271c
|
|
| MD5 |
3ca2002c302aa8d0ec9137126f2f296e
|
|
| BLAKE2b-256 |
9bc80c508a10e8d769c0aed0d8e3467be0e45c3c7c0715165dc75dd5f93d2659
|