|
1 | 1 | # Seller API Client for Java |
2 | 2 |
|
| 3 | +<hr> |
| 4 | + |
3 | 5 | It's an initial Java project to connect to Blibli Seller API. |
4 | 6 | Please feel free to relay your comments, suggestions or corrections through pull request. |
5 | 7 |
|
6 | | -Installation step: |
7 | | -1. Download/clone the initial project |
8 | | -2. Look at 'App.java' as a main class. It show you to use the client's code |
9 | | -3. Or download the final .jar here https://github.com/bliblidotcom/seller-api-client-java/releases/tag/1.0.0-1 |
| 8 | +### Setup |
| 9 | + |
| 10 | +<hr> |
| 11 | + |
| 12 | +##### Maven |
| 13 | + |
| 14 | +```xml |
| 15 | +<!-- Add seller api client dependency --> |
| 16 | +<dependency> |
| 17 | + <groupId>com.blibli.oss.sellerapi.client</groupId> |
| 18 | + <artifactId>seller-api-client</artifactId> |
| 19 | + <version>${seller-api-client.version}</version> |
| 20 | +</dependency> |
| 21 | + |
| 22 | +<!-- Set seller api client version --> |
| 23 | +<properties> |
| 24 | + <seller-api-client.version>...</seller-api-client.version> |
| 25 | +</properties> |
| 26 | + |
| 27 | +<!-- add blibli bintray repository --> |
| 28 | +<repositories> |
| 29 | + <repository> |
| 30 | + <snapshots> |
| 31 | + <enabled>false</enabled> |
| 32 | + </snapshots> |
| 33 | + <id>bintray-bliblidotcom-maven</id> |
| 34 | + <name>bintray</name> |
| 35 | + <url>https://dl.bintray.com/bliblidotcom/maven</url> |
| 36 | + </repository> |
| 37 | +</repositories> |
| 38 | +``` |
| 39 | + |
| 40 | +##### JAR |
| 41 | + |
| 42 | +> [Release note](https://github.com/bliblidotcom/seller-api-client-java/releases) |
| 43 | +
|
| 44 | +- v1.2.0-1 : https://github.com/bliblidotcom/seller-api-client-java/releases/tag/1.2.0-1 |
| 45 | +- v1.1.0-1 : https://github.com/bliblidotcom/seller-api-client-java/releases/tag/1.1.0-1 |
| 46 | + |
| 47 | +### Code Sample |
| 48 | + |
| 49 | +<hr> |
| 50 | + |
| 51 | +##### OAuth Flow |
| 52 | + |
| 53 | +> Run App.java |
| 54 | +
|
| 55 | +1. Send token request to `https://api-uata.gdn-app.com/v2/oauth/token` |
| 56 | +2. Send refresh token request with `[1]` response to `https://api-uata.gdn-app.com/v2/oauth/token` |
| 57 | +3. Send order detail request with access token from `[2]` to `https://api-uata.gdn-app.com/v2/proxy/mta/api/businesspartner/v1/order/orderDetail` |
| 58 | +4. Send fulfill order request with package id from `[3]` to `https://api-uata.gdn-app.com/v2/proxy/seller/v1/orders/regular/{packageId}/fulfill` |
| 59 | + |
| 60 | +##### Basic Auth Flow |
| 61 | + |
| 62 | +> Run AppBasicAuth.java |
| 63 | +
|
| 64 | +1. Send order detail request to `https://api-uata.gdn-app.com/v2/proxy/mta/api/businesspartner/v1/order/orderDetail` |
| 65 | +2. Send fulfill order request with package id from `[1]` to `https://api-uata.gdn-app.com/v2/proxy/seller/v1/orders/regular/{packageId}/fulfill` |
0 commit comments