You are on page 1of 28

22 April 2019

Blibli Merchant API


Documentation
Version 5.2.0

Page: 0 | Go to table of contents


Created by agie.falah@gdn-commerce.com
Table of Contents
Table of Contents .................................................................................................................................................................................................. 1
Document History ................................................................................................................................................................................................. 3
1. Overview ........................................................................................................................................................................................................... 4
2. Environment ...................................................................................................................................................................................................... 4
3. Sample Codes .................................................................................................................................................................................................... 5
4. API Authentication............................................................................................................................................................................................. 5
4.1 API Token .................................................................................................................................................................................................... 5
4.2 API Signature ............................................................................................................................................................................................... 7
4.2.1 Build the raw signature based on request meta data ............................................................................................................................ 8
4.2.2 Get the API client secret ........................................................................................................................................................................ 8
4.2.3 Hash using HMAC SHA-256...................................................................................................................................................................10
5. API Contract .....................................................................................................................................................................................................10
5.1 Document Version & Important News .........................................................................................................................................................11
5.2 Document Release Note .............................................................................................................................................................................12
5.3 Document Term & Terminology ..................................................................................................................................................................13
5.4 Oops Its Obsolete........................................................................................................................................................................................14
5.5 Self Service Using SAS API ...........................................................................................................................................................................15
5.6 API Term & Condition .................................................................................................................................................................................16
5.7 Various API Responses ................................................................................................................................................................................16
6. API Usage Flows................................................................................................................................................................................................17
6.1 Create Product Flow ...................................................................................................................................................................................17
6.2 Update Product Summary ...........................................................................................................................................................................17
6.3 Update Product Detail Flow ........................................................................................................................................................................18
6.4 Order Partial Fulfillment Flow .....................................................................................................................................................................19

Page: 1 | Go to table of contents


Created by agie.falah@gdn-commerce.com
6.5 Fulfill Regular Order Flow ............................................................................................................................................................................20
6.6 Fulfill Big Product Order Flow ......................................................................................................................................................................21
6.7 Fulfill BOPIS Order Flow ..............................................................................................................................................................................22
6.8 Regular Order Status Movement .................................................................................................................................................................23
6.9 Big Product & BOPIS Order Status Movement .............................................................................................................................................24
6.10 Order Status Movement for Partial Fulfillment ..........................................................................................................................................25
6.11 Order Status Movement for Blibli Internal Decision Flow ..........................................................................................................................26

Page: 2 | Go to table of contents


Created by agie.falah@gdn-commerce.com
Document History
Document What’s new
Version
Version 3.6 • 5.1 [GET] Get Product List, wrong field name expanation and removed unused field
• 5.8 [GET] Get Rejected Product List, add new API field
• 6.3 [POST] Create Product API, remove unused field
• 6.6.1 [POST] Upload Product Image, will be deprecated, we suggest to use version 2
• 6.6.2 [POST] Upload Product Image Version 2, new API
• 7.1 [GET] Get Order List, add new API field
• 7.2 [GET] Get Order Detail, add new API fields
• 7.5 [GET] Combine Shipping List, add new API fields
Version 4.1 • Remove API contract from this document and move to postman online documentation
• Add step by step to connect to staging environment
• Add API flow diagram
• Add order status movement
Version 5.1 • Add new section - ‘Sample Codes’
Version 5.2 • Update Fulfill Regular Order Flow
• Update Fulfill Big Product Order Flow

Page: 3 | Go to table of contents


Created by agie.falah@gdn-commerce.com
1. Overview
Blibli Merchant API is a tool that allows merchant to manage their product and order via Application Programming Interface (API).

Blibli Merchant API supports 5 main features:

1. Product listing and detail


2. Create new master product (flow 1)
3. Update product
4. Order listing and detail
5. Order fulfillment

The detailed flow for each feature can be be seen in 5. API Usage Flows. Please implement the APIs as per the guidelines.

For transaction API like: create and update product will be excuted asynchronously and you’re able to see the async process status with “Get Feed
Status API”. Async process have limitation, each merchant only able to make 50 concurrent async request in 2 minutes. Single async request can
contains 100 elements of products in the body request.

2. Environment
Blibli have two environment layers that can be used by Blibli Merchants. The top layer is Production Environment which used for production needs
and the other is Staging Environment for integration testing purpose before they move to Production. Their difference is Production has base url
https://api.blibli.com/ and staging has https://api-perf.gdn-app.com/

The staging environment contain 3 major services:

1. Blibli Merchant API Staging : https://api-perf.gdn-app.com/v2/...


2. MTA Staging: https://merchant-perf.gdn-app.com/MTA/login
3. Blibli Staging : https://wwwperf.gdn-app.com/

If you want to connect to staging environment, see below steps:

1. Provide your public IP to be whitelisted, so you can access our staging server through that IP.
2. After your IP has been whitelisted, you need to register as new merchant in staging environment.
3. Ping us to activate your new merchant account.
4. Register your API credentials and API secret for staging server. You can follow guidelines below but use the staging url.
5. Enjoy!

Page: 4 | Go to table of contents


Created by agie.falah@gdn-commerce.com
3. Sample Codes
You don’t need extra effort to develop auth mechanism logic anymore. Please download our sample codes here:

➢ Java Client : https://www.static-src.com/wcsstore/Indraprastha/merchant/api/sdk/Blibli-Merchant-API_Java-Client-1-0.zip


How to use:
1. Unzip the package
2. Import the .jar file to your project
3. Look at ‘Sample.java’ as an example of using the client SDK.
➢ PHP Client : https://www.static-src.com/wcsstore/Indraprastha/merchant/api/sdk/Blibli-Merchant-API_PHP-Client-1.0.zip
How to use:
1. Unzip the package,
2. Put it on any PHP server directory
3. Look at ‘index.php’ as an example of using the client codes

4. API Authentication
To make a connection, merchant should be able:

1. Get API token to authenticate current merchant.


2. Generate a valid signature for every API request, the signature is generated base on current request metadata.

4.1 API Token


API token is an authentication key to validate each merchant who will access Blibli Merchant API. A single token key can be used to send multiple
request while it was still valid. The API token expiration time is 24 hours.

Before API token expired, client is able to resfresh the expiration time by calling “Refresh Token API”. Refresh token is valid for 12 hours. Refreshing
the token will return a new API token.

Calling “Get Token API” and “Refresh Token API” is limited to 10 times a day for both requests.

To get the valid token, merchant must have API credential. Merchant can do the API credential registration in the MTA web page on
https://merchant.blibli.com/MTA/api-docs/. See registration step below:

Page: 5 | Go to table of contents


Created by agie.falah@gdn-commerce.com
Picture 2.1 Go to “Merchant API” page

Picture 2.2 Open “API Client Manager” panel

Page: 6 | Go to table of contents


Created by agie.falah@gdn-commerce.com
Picture 2.3 Set your client credential password

The API credential is unique per merchant. After merchant complete the registration, they can get their token via “Get Token API” and place
their credential information like Picture 2.4.

Picture 2.4 Putting API credential when get token, using postman

4.2 API Signature


API signature is used as second layer of authentication mechanism. Client should generate the signature for every request. The signature will be
valid until 15 minutes for specified request. Here is a mechanism to generate signature:

Page: 7 | Go to table of contents


Created by agie.falah@gdn-commerce.com
4.2.1 Build the raw signature based on request meta data
The string pattern are:

{Request method}
{MD5 of request body}
{Content type}
{Current date}
{URL request}

Raw Signature Example for POST request Raw Signature Example for GET request
POST\ndd50f190b5bce5deca42dfa3dbea08a3\napplication/json\nMon GET\n\n\nMon May 16 14:07:15 WIB
May 16 14:07:15 WIB 2016\n/mtaapi/api/businesspartner/v1/feed/status
2016\n/mtaapi/api/businesspartner/v1/product/updateProduct

4.2.2 Get the API client secret


API client secret will be combined with the “raw signature” to generate the valid signature. The “API secret key” is unique per merchant. Merchant
can register their secret key on API Client Manager panel, see Picture 2.5. Merchant can revoke their secret key, if they want to disconnect their
API integration.

The secret key is cached for 1 hour. Once merchant changes the secret key, it will take 1 hour to apply the changes.

Page: 8 | Go to table of contents


Created by agie.falah@gdn-commerce.com
Picture 2.5 Set your client secret key

Page: 9 | Go to table of contents


Created by agie.falah@gdn-commerce.com
4.2.3 Hash using HMAC SHA-256
The final step is combine the "raw signature” and “API client secret” then hash using HMAC SHA-256. Read these following reference about HMAC
SHA-256 mechanism:
https://kayako.atlassian.net/wiki/display/DEV/Generating+an+API+Signature
http://www.jokecamp.com/blog/examples-of-creating-base64-hashes-using-hmac-sha256-in-different-languages/#java

The signature will be attached on every request header as “x-blibli-mta-authorization”, see Picture 2.6.

Picture 2.6 Placing API signature using postman

5. API Contract
The API contract documentation can be seen here:
https://documenter.getpostman.com/view/5397152/RWaNP6XQ

You can import this online documentation into your local postman using “Run in Postman” button:

It only supports staging environment url, for production just replace https://api-perf.gdn-app.com with https://api.blibli.com. As best practice
please follow these guidelines to understand the documentation easily:

Page: 10 | Go to table of contents


Created by agie.falah@gdn-commerce.com
5.1 Document Version & Important News

Please check the document version, make sure you’re always updated. We use version pattern as x.x.x.x when the first three number (x.x.x) is
the API version and the last number is document version. Refer to above example, 5.14.1 is the current API version then .2 is document version.

Check this online documentation periodically, since we only send the update notification in Whatsapp Group (Blibli Merchant API). Join the
general Whatsapp Group by make a request to Blibli Merchant Care.

Also don’t miss any policies or API development plan on “Important News!” folder. You’ll get clear policies and its due date on it.

Page: 11 | Go to table of contents


Created by agie.falah@gdn-commerce.com
5.2 Document Release Note
Keep updated by looking at API doocument “RELEASE NOTE”. We put down the updates detail in this section for every version. You can see the
update history clearly there.

Page: 12 | Go to table of contents


Created by agie.falah@gdn-commerce.com
5.3 Document Term & Terminology
Are you confused about the document term? Refer to Glossary” section to have better understanding.

Page: 13 | Go to table of contents


Created by agie.falah@gdn-commerce.com
5.4 Oops Its Obsolete
Make sure your implementation is always up to date. We’ll inform the obsolete and deprecated APIs and its due date there. Obsolete means that
we no longer support them, but its still available to use (please move to newer version as soon as possible). Deprecated means that these APIs are
no longer available. Please pay attention to this section.

Page: 14 | Go to table of contents


Created by agie.falah@gdn-commerce.com
5.5 Self Service Using SAS API
Serve yourself using SAS API to create testing data in staging environment. It supports:

1) product approval
2) order payment approval
3) order creation

For every SAS API you’ve to get SAS Token using the credential as stated in the documentation below.

Page: 15 | Go to table of contents


Created by agie.falah@gdn-commerce.com
5.6 API Term & Condition
Please check the term & conditions for each API in this part. Please understand the rules before using the APIs.

5.7 Various API Responses


By using this dropdowm menu, you can see the various API responses for given condition. It’ll show different API request and response for each
condition.

Page: 16 | Go to table of contents


Created by agie.falah@gdn-commerce.com
6. API Usage Flows
6.1 Create Product Flow
This flow explain the usage of Create Product Flow Version 2, when you able to send both product information and product images together.
The previous flow is deprecated because you must separate API hit for both processes.

Page: 17 | Go to table of contents


Created by agie.falah@gdn-commerce.com
6.2 Update Product Summary
This flow divided into two, each flow focused on stock updates condition. If you want to update price or
buyable flag just use Flow A instead.

Page: 17 | Go to table of contents


Created by agie.falah@gdn-commerce.com
6.3 Update Product Detail Flow
This flow is used when you want to update product information details, like: description, product name,
etc. This API is work for each Blibli Product Item SKU level, which recognize has ID pattern like XXX-
XXXXX-XXXXX-XXXXX.

Page: 18 | Go to table of contents


Created by agie.falah@gdn-commerce.com
6.4 Order Partial Fulfillment Flow
In case merchant cant totally fulfill customer needs, then they must use Partial Fulfillment option. This
option allow to fulfill customer needs partially or not at all (OOS – Order Out of stock).

Page: 19 | Go to table of contents


Created by agie.falah@gdn-commerce.com
6.5 Fulfill Regular Order Flow
This flow explain about regular order fulfillment which divided into 2 major flows for PICKUP &
DROPSHIP type.

Page: 20 | Go to table of contents


Created by agie.falah@gdn-commerce.com
6.6 Fulfill Big Product Order Flow
This flow show you on how to handle Big Product order fulfillment flow. “Big Product” type means that
the delivery responsibility is handled by merchant itself.

Page: 21 | Go to table of contents


Created by agie.falah@gdn-commerce.com
6.7 Fulfill BOPIS Order Flow
This flow show you how BOPIS fulfillment work. The expecatation of BOPIS flow is customer will come to
your store to pickup their goods then you do settlement process directly.

Page: 22 | Go to table of contents


Created by agie.falah@gdn-commerce.com
6.8 Regular Order Status Movement
This diagram show you the order status movement for regular order.

Page: 23 | Go to table of contents


Created by agie.falah@gdn-commerce.com
6.9 Big Product & BOPIS Order Status Movement
This diagram explain the order status movement for Big Product and BOPIS Order.

Page: 24 | Go to table of contents


Created by agie.falah@gdn-commerce.com
6.10 Order Status Movement for Partial Fulfillment
This diagram show you the order status movement when you use partial fulfillment.

Page: 25 | Go to table of contents


Created by agie.falah@gdn-commerce.com
6.11 Order Status Movement for Blibli Internal Decision Flow
This diagram explain order status movement for Blibli Internal Decision. Blibli has internal decision to
cancel or edit the quantity of orders for certain reason. Please contact Blibli Merchant Care about this
decision term.

Page: 26 | Go to table of contents


Created by agie.falah@gdn-commerce.com

You might also like