电商对接API参考文档
- API version: 2.2.2
- Build date: 2020-08-11T11:40:26.060Z[GMT]
电商对接API参考文档
Automatically generated by the Swagger Codegen
Building the API client library requires:
- Java 1.7+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>cn.acey.integrate</groupId>
<artifactId>sdk-usmartbod</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "cn.acey.integrate:sdk-usmartbod:1.0.0"
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/sdk-usmartbod-1.0.0.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import cn.acey.integrate.usmartbox.client.*;
import cn.acey.integrate.usmartbox.client.auth.*;
import cn.acey.integrate.usmartbox.client.model.*;
import cn.acey.integrate.usmartbox.client.api.BoxApi;
import java.io.File;
import java.util.*;
public class BoxApiExample {
public static void main(String[] args) {
BoxApi apiInstance = new BoxApi();
String apikey = "apikey_example"; // String | key
String nonce = "nonce_example"; // String | 32位随机数
String sign = "sign_example"; // String | 用于校验
String boxno = "boxno_example"; // String | 柜子编号
String butype = "butype_example"; // String | 业务类型
String func = "func_example"; // String | 格子功能 目前1常温2冷藏
String kphone = "kphone_example"; // String | 配送员手机号
String orderid = "orderid_example"; // String | 订单号
String phone = "phone_example"; // String | 收货人手机号
String size = "size_example"; // String | 格子大小
try {
RemotePutInResponse result = apiInstance.remotePutInBox(apikey, nonce, sign, boxno, butype, func, kphone, orderid, phone, size);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BoxApi#remotePutInBox");
e.printStackTrace();
}
}
}
import cn.acey.integrate.usmartbox.client.*;
import cn.acey.integrate.usmartbox.client.auth.*;
import cn.acey.integrate.usmartbox.client.model.*;
import cn.acey.integrate.usmartbox.client.api.BoxApi;
import java.io.File;
import java.util.*;
public class BoxApiExample {
public static void main(String[] args) {
BoxApi apiInstance = new BoxApi();
String apikey = "apikey_example"; // String | key
String nonce = "nonce_example"; // String | 32位随机数
String sign = "sign_example"; // String | 用于校验
String orderid = "orderid_example"; // String | 订单号
try {
RemotePutInHistoryResponse result = apiInstance.remotePutInBoxHistory(apikey, nonce, sign, orderid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BoxApi#remotePutInBoxHistory");
e.printStackTrace();
}
}
}
import cn.acey.integrate.usmartbox.client.*;
import cn.acey.integrate.usmartbox.client.auth.*;
import cn.acey.integrate.usmartbox.client.model.*;
import cn.acey.integrate.usmartbox.client.api.BoxApi;
import java.io.File;
import java.util.*;
public class BoxApiExample {
public static void main(String[] args) {
BoxApi apiInstance = new BoxApi();
String apikey = "apikey_example"; // String | key
String nonce = "nonce_example"; // String | 32位随机数
String sign = "sign_example"; // String | 用于校验
String gridno = "gridno_example"; // String | 完整格号
String opencode = "opencode_example"; // String | 取货密码
String seqid = "seqid_example"; // String | 流水号
try {
RemoteTakeOutResponse result = apiInstance.remoteTakeOutBox(apikey, nonce, sign, gridno, opencode, seqid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BoxApi#remoteTakeOutBox");
e.printStackTrace();
}
}
}
import cn.acey.integrate.usmartbox.client.*;
import cn.acey.integrate.usmartbox.client.auth.*;
import cn.acey.integrate.usmartbox.client.model.*;
import cn.acey.integrate.usmartbox.client.api.BoxApi;
import java.io.File;
import java.util.*;
public class BoxApiExample {
public static void main(String[] args) {
BoxApi apiInstance = new BoxApi();
String apikey = "apikey_example"; // String | key
String nonce = "nonce_example"; // String | 32位随机数
String sign = "sign_example"; // String | 用于校验
String gridno = "gridno_example"; // String | 完整格号
String seqid = "seqid_example"; // String | 流水号
try {
RemoteTakeOutResponse result = apiInstance.remoteTakeOutHistory(apikey, nonce, sign, gridno, seqid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BoxApi#remoteTakeOutHistory");
e.printStackTrace();
}
}
}
import cn.acey.integrate.usmartbox.client.*;
import cn.acey.integrate.usmartbox.client.auth.*;
import cn.acey.integrate.usmartbox.client.model.*;
import cn.acey.integrate.usmartbox.client.api.BoxApi;
import java.io.File;
import java.util.*;
public class BoxApiExample {
public static void main(String[] args) {
BoxApi apiInstance = new BoxApi();
String apikey = "apikey_example"; // String | key
String nonce = "nonce_example"; // String | 32位随机数
String sign = "sign_example"; // String | 用于校验
String city = "city_example"; // String | 城市编号
String district = "district_example"; // String | 区号编号
String branchno = "branchno_example"; // String | 网点编号
try {
BoxSearchResponse result = apiInstance.searchBox(apikey, nonce, sign, city, district, branchno);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BoxApi#searchBox");
e.printStackTrace();
}
}
}
import cn.acey.integrate.usmartbox.client.*;
import cn.acey.integrate.usmartbox.client.auth.*;
import cn.acey.integrate.usmartbox.client.model.*;
import cn.acey.integrate.usmartbox.client.api.BoxApi;
import java.io.File;
import java.util.*;
public class BoxApiExample {
public static void main(String[] args) {
BoxApi apiInstance = new BoxApi();
String apikey = "apikey_example"; // String | key
String nonce = "nonce_example"; // String | 32位随机数
String sign = "sign_example"; // String | 用于校验
String city = "city_example"; // String | 城市编号
String district = "district_example"; // String | 区号编号
try {
BranchBoxSearchResponse result = apiInstance.searchBranchBox(apikey, nonce, sign, city, district);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BoxApi#searchBranchBox");
e.printStackTrace();
}
}
}
All URIs are relative to https://api.usmartbox.com
Class | Method | HTTP request | Description |
---|---|---|---|
BoxApi | remotePutInBox | POST /ec/cun.json | 远程存 |
BoxApi | remotePutInBoxHistory | POST /ec/cunr.json | 远程存 |
BoxApi | remoteTakeOutBox | POST /ec/qu.json | 远程取 |
BoxApi | remoteTakeOutHistory | POST /ec/qur.json | 查询取件状态 |
BoxApi | searchBox | POST /ec/box.json | 根据城市及区号及网点编号查询下属柜子 |
BoxApi | searchBranchBox | POST /ec/branchbox.json | 根据城市及区号查询下属网点及柜子 |
BranchApi | searchBranch | POST /ec/branch.json | 根据城市及区号查询下属网点 |
OrderApi | ordercreate | POST /ec/ordercreate.json | 电商端生成订单后通知智能柜服务器端 |
- BasicApiResponse
- Box
- BoxSearchResponse
- Branch
- BranchBox
- BranchBoxSearchResponse
- BranchSearchResponse
- RemotePutInHistoryResponse
- RemotePutInResponse
- RemoteTakeOutHistoryResponse
- RemoteTakeOutResponse
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: apikey
- Location: URL query string
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.