查询【客户厂商资料】接口
概述
该接口主要用于第三方平台或自主研发者,通过调用【客户厂商资料】的查询接口,将Sunlike ERP或Online ERP系统中的【客户厂商资料】信息调出至第三方平台中显示,可查询全部或查询单个或查询差异资料。
参数说明
1.请求方式
请求方式 | POST | |||||
接口地址 | http://ERPAPI站点/CUST/GETDATA | |||||
格式 | JSON | |||||
编码类型 | UTF-8 |
2.header参数
Content-Type | application/json | |||||
Authorization | token | 授权接口所获取的值 |
3.请求参数
字段名称 | 字段代号 | 类型 | 长度 | 必填 | 固定值 | 备注 |
程序代号 | PGM | string | 是 | CUST | ||
每页查询记录数 | PAGE_ROWS | integer | 是 | 基础资料较多,故支持分页查询,此项代表每页查询的记录数 | ||
查询第几页 | PAGE_NUM | integer | 是 | 此项代表查询第几页的数据;1则代表查询第1页的数据;2则代表查询第2页的数据 | ||
客户或厂商代号 | CUS_NO | string | 查单个资料时要上传该参数,否则不用传 | |||
上次更新时间 | UP_DD | string | 查询差异资料时要上传该参数,来源于最近一次查询资料的时间戳,不查差异则不用传 |
请求JSON示例
查全部客户或厂商资料:
{ "PGM":"CUST", //程序代号 "PAGE_ROWS":1000, //每页显示笔数 "PAGE_NUM":1 //查询第几页 }
查单个客户或厂商资料:
{ "PGM":"CUST", //程序代号 "PAGE_ROWS":1000, //查每页的笔数 "PAGE_NUM":1, //查第几页资料 "CUS_NO":"C0001" //查单个客户或厂商资料 }
查差异的客户或厂商资料:
{ "PGM":"CUST", //程序代号 "PAGE_ROWS":1000, //每页显示笔数 "PAGE_NUM":1, //查询第几页 "UP_DD":"0x0000000000003525" //最近一次查询时间戳 }
返回结果示例
{ "code": 0, //为0表示执行成功,其他表示错误 "message": "查询成功", //提示信息 "data": { "UP_DD": "0x000000000000353E", "TOTAL_ROWS": 1, "TOTAL_PAGES": 1, "PAGE_ROWS": 1000, "PAGE_NUM": 1, "CUST": [ //查询客户厂商资料 { "CUS_NO": "C0001", "SUP_LEVEL": "1", "OBJ_ID": "3", "NAME": "广东省珠海集团C0001", "SNM": "珠海集团C0001", "CLS_MTH": "1", "CLS_DD": 1, "MM_END": 30, "CHK_DD": 30, "BOS_NM": "王董事", "CNT_MAN1": "李四", "SAL": "0002", "TEL1": "12345678901", "ADR1": "广东珠海市吉大", "ADR2": "广东珠海市吉大", "CHK_FULL_PAY": "F", "CRD_ID": "3", "ID1_TAX": "2", "ID2_TAX": "F", "CLS1": "票据到期日:97-02-15结帐期:97-03-18", "CLS2": "3", "STR_DD": "2020-09-15 00:00:00", "CUS_LEVEL": "5", "CHK_CRD": "F", "CHK_MAN": "ADMIN", "NAME_PY": "ZHJTC0001(ZHJTC0001)", "SO_CRD": "F", "FP_NAME": "珠海集团C0001", "CHK_FAX": "F", "CHK_CUS_IDX": "1", "CY_ID": "F", "DEP": "103", "USR": "ADMIN", "CHK_INCLUDE": "F", "CHK_IRP": "F", "CHK_TRP": "F", "CLS_DATE": "2020-09-05 00:00:00", "USR1": "ADMIN", "SYS_DATE": "2020-09-05 11:49:25", "LAST_CNT_DD": "2020-09-05 11:49:25", "CHK_ZHANG_ID2": "T", "CHK_CK": "T", "FX_LEVEL": "1", "PAY_FLAG": "0", "TI_FROM": "1", "MODIFY_DD": "2020-09-05 13:56:29", "MODIFY_MAN": "ADMIN", "COUN_ID": 440402, "CITY_ID": "440400", "PROV_ID": "440000" } ] } }