1. 简介
2. 客户与仓库模块API
2.1. 客户域编码查询接口
2.1.1. SERVICE_TYPE
GLINK_QUERY_OWNER_NOTIFY
2.1.2. 请求参数
客户域编码查询请求
| 参数名 |
类型 |
列表 |
必填 |
备注 |
| customerCode |
string |
N |
Y |
客户编码 |
| partnerId |
string |
N |
N |
合作伙伴ID |
2.1.3. 请求样例
JSON
{
"customerCode": "CUSTOMER001",
"partnerId": "GLINK"
}
2.1.4. 响应参数
| 参数名 |
类型 |
列表 |
必填 |
备注 |
| success |
boolean |
N |
Y |
操作的处理结果,true表示处理成功,false表示处理失败 |
| errorMessageList |
object |
Y |
N |
错误信息列表;成功时为默认空数组,参数校验或查询失败时返回错误明细 |
| └ code |
string |
N |
N |
错误码 |
| └ message |
string |
N |
N |
错误提示 |
| customerDTOList |
object |
Y |
N |
客户信息列表;查询成功时由 CustomerVO 转换并补充 domainCode |
| └ id |
long |
N |
N |
主键ID,继承自 BaseDTO |
| └ creatorId |
long |
N |
N |
创建人ID,继承自 BaseDTO |
| └ creator |
string |
N |
N |
创建人用户名,继承自 BaseDTO |
| └ createTime |
date |
N |
N |
创建时间,继承自 BaseDTO |
| └ updaterId |
long |
N |
N |
最后更新人ID,继承自 BaseDTO |
| └ updater |
string |
N |
N |
最后更新人用户名,继承自 BaseDTO |
| └ updateTime |
date |
N |
N |
最后更新时间,继承自 BaseDTO |
| └ version |
long |
N |
N |
乐观锁版本,继承自 BaseDTO |
| └ remark |
string |
N |
N |
备注,继承自 BaseDTO |
| └ operateType |
string |
N |
N |
操作类型,默认 NONE;枚举:NONE、CREATE、UPDATE、DELETE、DISABLE、INCREASE、DECREASE、EDIT、SYNC |
| └ customerCode |
string |
N |
N |
客户编码 |
| └ saConfig |
string |
N |
N |
服务协议配置 |
| └ domainCode |
string |
N |
N |
客户所属域编码;由 DomainDao#getDomainCodeByCustomerCode 查询后组装 |
| └ warehouseCodes |
string |
N |
N |
客户绑定仓库编码 |
| └ carriers |
string |
N |
N |
承运商配置 |
| └ inventoryReportRecipients |
string |
N |
N |
库存报告收件人;由 CustomerVO#getInventoryReportRecipients 返回,未开启库存报告时可能为空 |
| └ orderMonitorRecipients |
string |
N |
N |
订单监控报告收件人 |
| └ serviceLevels |
string |
N |
N |
服务等级配置 |
| └ subAccounts |
string |
N |
N |
子账号配置 |
| └ allowOverAllocated |
boolean |
N |
N |
是否允许超分配 |
| └ allowSplitOrder |
boolean |
N |
N |
是否允许拆单 |
| └ showZeroInventory |
boolean |
N |
N |
是否展示零库存 |
| └ trackingReportRecipients |
string |
N |
N |
物流跟踪报告收件人 |
| └ enable |
boolean |
N |
N |
客户是否启用 |
| └ receiveInventoryReport |
boolean |
N |
N |
是否接收库存报告 |
| └ receiveTrackingReport |
boolean |
N |
N |
是否接收物流跟踪报告 |
| └ receiveOrderMonitorReport |
boolean |
N |
N |
是否接收订单监控报告 |
| └ needSignatureService |
boolean |
N |
N |
是否需要签名服务 |
| └ workOrderRecipients |
string |
N |
N |
工单收件人 |
| └ managerEmail |
string |
N |
N |
客户经理邮箱 |
| └ base |
string |
N |
N |
客户所属基地 |
| └ allowExternalData |
boolean |
N |
N |
是否允许外部数据 |
| └ shipToPhoneRequired |
boolean |
N |
N |
收件电话是否必填 |
| └ shipToPhoneDefault |
string |
N |
N |
默认收件电话 |
| └ needFillServiceLevel |
boolean |
N |
N |
是否需要填写服务等级 |
| └ requireItemCOO |
boolean |
N |
N |
商品原产国是否必填 |
| └ osDReportRecipients |
string |
N |
N |
ASN反馈货物超量、短缺或损坏报告收件人 |
| └ enableLargeSize |
boolean |
N |
N |
是否允许大尺寸 |
| └ partnerId |
string |
N |
N |
合作伙伴ID |
| └ zipCodeRequired |
boolean |
N |
N |
邮编是否必填 |
| └ returnNotificationRecipients |
string |
N |
N |
退货通知收件人 |
| └ billingInAdvance |
boolean |
N |
N |
是否前置计费 |
| └ simpleBillingInAdvance |
boolean |
N |
N |
是否简易前置计费 |
| └ billCustomer |
string |
N |
N |
结算客户 |
| └ needMarkNumber |
boolean |
N |
N |
是否需要箱唛 |
2.1.5. 响应样例
JSON
{
"success": true,
"errorMessageList": [],
"customerDTOList": [
{
"id": 10001,
"creatorId": 20001,
"creator": "admin",
"createTime": 1771391400000,
"updaterId": 20002,
"updater": "ops",
"updateTime": 1771480800000,
"version": 3,
"remark": "测试客户",
"operateType": "NONE",
"customerCode": "CUSTOMER001",
"saConfig": "STANDARD",
"domainCode": "US",
"warehouseCodes": "USLA01:BEST,USNY01:BEST",
"carriers": "UPS,FEDEX",
"inventoryReportRecipients": "inventory@example.com",
"orderMonitorRecipients": "order@example.com",
"serviceLevels": "GROUND,EXPRESS",
"subAccounts": "SUB001,SUB002",
"allowOverAllocated": false,
"allowSplitOrder": true,
"showZeroInventory": false,
"trackingReportRecipients": "tracking@example.com",
"enable": true,
"receiveInventoryReport": true,
"receiveTrackingReport": true,
"receiveOrderMonitorReport": false,
"needSignatureService": false,
"workOrderRecipients": "workorder@example.com",
"managerEmail": "manager@example.com",
"base": "US",
"allowExternalData": true,
"shipToPhoneRequired": false,
"shipToPhoneDefault": "13800138000",
"needFillServiceLevel": false,
"requireItemCOO": true,
"osDReportRecipients": "osd@example.com",
"enableLargeSize": false,
"partnerId": "GLINK",
"zipCodeRequired": true,
"returnNotificationRecipients": "return@example.com",
"billingInAdvance": false,
"simpleBillingInAdvance": false,
"billCustomer": "BILL_CUSTOMER001",
"needMarkNumber": true
}
]
}
失败响应 JSON
{
"success": false,
"errorMessageList": [
{
"code": "INVALID_DATA",
"message": "Customer is required"
}
]
}
2.2. 仓库查询接口
2.2.1. SERVICE_TYPE
GLINK_QUERY_WAREHOUSE_NOTIFY
2.2.2. 请求参数
仓库查询请求
| 参数名 |
类型 |
列表 |
必填 |
备注 |
| customerCode |
string |
N |
Y |
客户编码;代码会按该字段查询客户所属域,未传或查不到域时返回客户不存在错误 |
| partnerId |
string |
N |
N |
合作伙伴ID |
2.2.3. 请求样例
JSON
{
"customerCode": "CUSTOMER001"
}
2.2.4. 响应参数
| 参数名 |
类型 |
列表 |
必填 |
备注 |
| success |
boolean |
N |
Y |
操作的处理结果;成功查询时为true |
| code |
string |
N |
N |
错误状态码;成功查询时不赋值,失败时由异常拦截统一设置为 INVALID_OPERATION |
| message |
string |
N |
N |
错误提示;成功查询时不赋值,失败时由异常拦截转换后返回 |
| resultList |
object |
Y |
N |
仓库信息列表;无数据时返回空数组 |
| └ warehouseCode |
string |
N |
N |
仓库编码 |
| └ warehouseDescription |
string |
N |
N |
仓库描述 |
| └ timeZone |
string |
N |
N |
时区 |
| └ country |
string |
N |
N |
国家 |
| └ state |
string |
N |
N |
州/省 |
| └ city |
string |
N |
N |
城市 |
| └ address1 |
string |
N |
N |
地址1 |
| └ address2 |
string |
N |
N |
地址2 |
| └ zipcode |
string |
N |
N |
邮编 |
| └ contact |
string |
N |
N |
联系人 |
| └ email |
string |
N |
N |
邮件 |
| └ phone |
string |
N |
N |
电话 |
2.2.5. 响应样例
JSON
{
"success": true,
"resultList": [
{
"warehouseCode": "WH001",
"warehouseDescription": "示例仓库",
"timeZone": "Asia/Shanghai",
"country": "CN",
"state": "Zhejiang",
"city": "Hangzhou",
"address1": "No.1 Warehouse Road",
"address2": "Building A",
"zipcode": "310000",
"contact": "Zhang San",
"email": "warehouse@example.com",
"phone": "0571-12345678"
}
]
}
失败响应 JSON
{
"code": "INVALID_OPERATION",
"message": "客户编码不存在",
"success": false
}