Sie sind auf Seite 1von 14

PM007:

FBA API Integration


API and Callback Details
Version 3.3 Release Jul 08, 2016

ABSTRACT
Fulfillment by Anchanto (FBA) is regional eCommerce fulfillment
platform, with FBA, business can push orders for fulfillment process in
real-time, access overall order processing status, inventory status as well
communicate with customer about delivery progress if customers opt
for it. FBA can be integrated with any eCommerce platform or
transaction generation system with simple API. This document details
how to use FBA API to push, update and receive orders update, and the
FBA Callbacks that are triggered to provide update on specific events for
orders and products. Even the products can be created on FBA through
APIs from the eCommerce store.

This Document is confidential property of Anchanto Pte Ltd



Table of Contents
1 INTRODUCTION ........................................................................................................... 3
2 FBA APIS FOR INTEGRATION WITH E-STORES ............................................................... 4
2.1 CREATE ORDER API .......................................................................................................... 4
2.1.1 Order_bucket Parameters ..................................................................................... 4
2.1.2 Parameters for shipping_address ......................................................................... 4
2.1.3 Parameters for item_n .......................................................................................... 5
2.1.4 Create Order API Responses .................................................................................. 5
2.1.5 Sample - Create Order API .................................................................................... 5
2.2 CANCEL ORDER API .......................................................................................................... 7
2.2.1 Cancel Order API Responses .................................................................................. 7
2.3 CANCEL ORDER ITEM API .................................................................................................. 7
2.3.1 Cancel Order Item API Responses ......................................................................... 8
2.4 PRODUCT STOCK SYNCHRONIZATION API ............................................................................. 8
2.4.1 Stock Sync API Responses ...................................................................................... 8
2.5 ORDER INVOICE UPDATE API ............................................................................................. 9
2.5.1 Order Invoice Update API Responses .................................................................... 9
2.6 SINGLE PRODUCT CREATE API ............................................................................................ 9
2.6.1 Single Product hash parameters description ........................................................ 9
2.6.2 Single Product Create API Responses .................................................................. 10
2.7 BULK PRODUCT CREATE API ............................................................................................ 10
2.7.1 Bulk Product hash parameters description ......................................................... 10
2.7.2 Bulk Product Create Sample API Requests .......................................................... 11
2.7.3 Bulk Product Create API Responses ..................................................................... 11
2.8 SINGLE PRODUCT UPDATE API ......................................................................................... 11
2.8.1 Product hash parameters description ................................................................. 12
2.8.2 Product Update API Responses ........................................................................... 12
3 FBA CALLBACKS ......................................................................................................... 13
3.1 CALLBACK FOR ORDER ..................................................................................................... 13
3.1.1 Sample – FBA Callbacks ...................................................................................... 13
3.1.2 Order Status Tracking Event ............................................................................... 13
3.2 CALLBACK FOR STOCK SYNCHRONIZATION ........................................................................... 14

This document is Confidential information and property of Anchanto Pte Ltd 2


1 Introduction

Business leverage on Fulfillment by Anchanto (FBA) to scale their business while letting
Anchanto manage entire backend operations such as - order sequencing, picking, packing,
product QA, scheduling delivery, tracking delivery, managing returns, capturing proof of
delivery, getting data quickly for customer etc. are managed easily by Anchanto through FBA
(Fulfillment by Anchanto) platform.

Diagram below illustrates Anchanto’s Fulfillment Platform.

eCommerce(Store
Store Users
(In case of Collection at store)

Anchanto(Core(
Fulfillment(Pla2orm

Warehouse Staff, Operations Users, Notifications to end


Customer Support Users Users about Order Status
and Tracking and Delivery

Warehouse(/(Store,(
Last(Mile(Delivery

Delivery Associates
/ Delivery Partners


ECommerce stores / transaction source system can use FBA API to - create, cancel or issue
return collect order. Following are three key parameters required for each API call – a) api
key b) signature and c) email id. You will get this info from Anchanto as part of setup
process, if you need any help during integration or using APIs contact us at
techsupport@anchanto.com. API key and Signature information needs to be maintained
confidential.

Further, FBA also provides event-based callbacks for status change on order, product and
consignment. These callbacks will be pushed on the Callback URL specific to the Retailer
website (if shared).

Subsequent sections of this document details API, FBA Callbacks, needed parameters, data
type and samples of APIs and Callbacks with dummy data at the end.

This document is Confidential information and property of Anchanto Pte Ltd 3


2 FBA APIs for Integration with e-Stores
2.1 Create Order API
Purpose: Post Order on to FBA for processing
URL: http://fba.anchanto.com/order_bucket
Method: POST
Object: JSON

Parameters Description Type M/O *
order_bucket It keeps full detail of order Hash M
api_key Retailer API key for authenticating retailer. This will be Varchar (255) M
provided by FBA separately
signature Retailer admin signature for authenticating retailer. This will Varchar (255) M
be provided by FBA separately
email Retailer admin email. This is the registered email-id on FBA Varchar (255) M
* M = Mandatory, O = Optional

2.1.1 Order_bucket Parameters


Parameters Description Type M/O
number Order Number or Invoice Number Varchar (30) M
item_total Total Order Value (needed for insurance liability) Decimal (8,2) O
total Final total after taxes and shipping fees Decimal (8,2) O
email Customer’s email ID Varchar (255) O
number_of_items Total number of items or products in the order Integer M
completed_at Order date – when it was places on eCom site Datetime M
delivery_date Delivery Date of the order Date O
(dd-mm-yyyy)
delivery_time Delivery Time slot of the order Integer (11) O
express_delivery True for Express Delivery else False Boolean O
shipping_address Shipping Address Details below M
billing_address Billing Address Details below M
payment_total Any payment to be collected at delivery – cash on delivery Decimal (8,2) O
send_as_gift True if order is a Gift order else False Boolean O
greeting_message Greeting message when the order is shipped as gift Order Varchar (255) O
item_n Details of the item (or product). Details below M
is_customer_pickup True if customer is going to self pickup order form DC Boolean O
payment_method “COD”, “Pre-paid”, “Null” Varchar (10) M
order_callback Future Use. This field will be used in future to capture the Varchar (255) O
callback URL where the order status needs to be updated
back from FBA

2.1.2 Parameters for shipping_address


Parameters Description Type M/O
firstname First Name of the customer Varchar (255) M
lastname Last Name of the customer Varchar (255) O
address1 Address field-1 Varchar (255) M
address2 Address field-2 Varchar (255) O
city City Varchar (255) M
zipcode Zipcode or pincode Varchar (45) M
phone Contact phone number of the customer Varchar (255) M
state_name State, if applicable based on the country Varchar (255) O
alternative_phone If any alternate phone number of the customer Varchar (255) O
country Country Varchar (255) M

This document is Confidential information and property of Anchanto Pte Ltd 4


2.1.3 Parameters for item_n
Parameters Description Type M/O
quantity Quantity of the item/ product (>=1) Integer (11) M
id Any particular id defined for the item/ product Integer (11) O
sku SKU of the item/ product Varchar (255) M
price Selling Price of single item/ product Decimal (8,2) O
weight Dimensions of the item/ product Decimal (8,2) O
height Dimensions of the item/ product Decimal (8,2) O
width Dimensions of the item/ product Decimal (8,2) O
depth Dimensions of the item/ product Decimal (8,2) O
product_name Name of the item/ product Varchar (255) M
description Description of the Product/ Item Text O
image URL of the item/ product image Varchar (255) O

2.1.4 Create Order API Responses


• Order Placed Successfully
{“response” : "success", “reference_id” : “R238072882”, “message” : "Order
successfully placed to Fulfillment by Anchanto"}
• Duplicate Order found
{“response” : "duplicate", “reference_id” : “R238072882”, “message” :"duplicate
order number, Order with ROB341E455 this number has been placed on 12 Dec 2013
11:23 PM"}
• Partial Order Created
{"response": "partial_success", "reference_id": "", "message": { "PD_1000":
"PD_1000 is not present", "PD_10000": "PD_10000 is not present" },
"order_number": "TESTIN002", "tracking_number": "ANC3ESA11792", "state":
"partial", "split_orders": [] }
• Invalid Company
{“response” : "failure", “message” : "Unknown Company"}
• Company not activated on fba.anchanto.com
{“response” : "failure", “message” : "Retailer is not activated on fba.anchanto.com"}
• Internal server error
{“response” : "failure", “message” : "Oops!! Server error"}

2.1.5 Sample - Create Order API


The sample API request is put down below for more details.

order_bucket = <values detailed below>
api_key = “b3873438fdfhdfhdfry48748748fhfdjfhdkjfhdf” (as provided by FBA separately)
signature = “34823749dkjfhkdfjdr8y8ryjsbdjhhiuheue87876876” (as provided by FBA
separately)
email = admin@retailer.com

order_bucket = {
"number":"R238072882",
"item_total":201.0,
"total":221.0,
"email":"ben.john@abc.com",
"number_of_items":2,

"completed_at":"Fri, 25 Oct 2013 20:00:16 SGT +08:00",
"delivery_date":"Sat, 28 Dec 2013",
"delivery_time":"4pm - 6pm",

This document is Confidential information and property of Anchanto Pte Ltd 5


“express_delivery”:false,

“is_customer_pickup”:false,
“payment_method”:”COD”,

"payment_total":221.0,
"send_as_gift":false,
"greeting_message":"",

"shipping_address":{
"firstname":"Ben",
"lastname":"John",
"address1":"M G Road",
"address2":null,
"city":"Singapore",
"zipcode":"123456",
"phone":"12345678",
"state_name":"Singapore",
"alternative_phone":null,
"country":"Singapore"
},
"billing_address":{
"firstname":"Ben",
"lastname":"John",
"address1":"M G Road",
"address2":"",
"city":"Singapore",
"zipcode":"123456",
"phone":"12345678",
"state_name":"Singapore",
"alternative_phone":null,
"country":"Singapore"
},
"item_0":{
"quantity":1,
"id":1231,
"sku":"00001500",
"price":45.0,
"weight":null,
"height":null,
"width":null,
"depth":null,
"product_name":"Neem Hair Lotion",
"description":"Lotion for scalp",
"image":"https://retailer.com/nLotion.jpg",
},
"item_1":{
"quantity":1,
"id":1232,
"sku":"00001504",
"price":46.0,
"weight":null,
"height":null,
"width":null,

This document is Confidential information and property of Anchanto Pte Ltd 6


"depth":null,
"product_name":"Jojoba Conditioner",
"description":"For All hair types",
"image":"https://retailer.com/jjba-s.jpg",
}
}

2.2 Cancel Order API


Purpose: In case the order is cancelled on eStore that needs to be cancelled on FBA. This api
will cancel order automatically if requested before order gets packed. If order is beyond
packing line, then it will send an email notification to FBA admin who need to manually
cancel and stop order processing if order is not delivered.

URL: http://fba.anchanto.com/order_bucket/cancel_order/order_number
Method: PUT, Object: JSON

Parameters Description Type M/O
order_number Order number Varchar (255) M
api_key Retailer API key for authenticating retailer Varchar (255) M
signature Retailer admin signature for authenticating retailer Varchar (255) M
email Retailer admin email Varchar (255) M
tracking_number FBA tracking number. The tracking number from FBA is Varchar (255) M
shared in the Create Order API response on successful order
creation. Refer reference_id in 2.1.4 above.

2.2.1 Cancel Order API Responses


• Order Cancelled Successfully
{“response” : "success", “reference_id” : “”, “message” : "Order Cancelled
successfully”}
• Internal server error
{“response” : "failure", “message” : "Oops!! Server error"}
• Order not found or its already delivered
{“response” : "failure", “reference_id” : "", “message” : "Order does not exist or
already delivered"}
• Order is in Delivery queue i.e. it’s being delivered so it can not be cancelled
{“response” :"failure", “message“ : "Order is in delivery queue, it can’t be cancelled"}

2.3 Cancel Order Item API


Purpose: In case the eStore supports cancellation of individual items from the order, this API
helps to cancel the specific item from the order that was already created in FBA earlier. This
API will cancel order item automatically if requested before order gets packed. If order is
beyond packing line, then it will send an email notification to FBA admin who need to
manually cancel and stop order processing if order is not delivered.

URL: http://fba.anchanto.com/order_bucket/cancel_order_item/order_number
Method: PUT, Object: JSON

Parameters Description Type M/O
order_number Order number Varchar (255) M
api_key Retailer API key for authenticating retailer Varchar (255) M
signature Retailer admin signature for authenticating retailer Varchar (255) M
email Retailer admin email Varchar (255) M
tracking_number FBA tracking number. The tracking number from FBA is Varchar (255) M

This document is Confidential information and property of Anchanto Pte Ltd 7


shared in the Create Order API response on successful order
creation. Refer reference_id in 2.1.4 above.
sku Order item SKU you want to cancel Varchar (255) M

2.3.1 Cancel Order Item API Responses


• Order Item Cancelled Successfully
{“response” : "success", “reference_id” : “”, “message” : "Order Item Cancelled
successfully”}
• Internal server error
{“response” : "failure", “message” : "Oops!! Server error"}
• Order not found or its already delivered
{“response” : "failure", “reference_id” : "", “message” : "Order does not exist or
already delivered"}
• Order is in Delivery queue i.e. it’s being delivered so it can not be cancelled
{“response” :"failure", “message“ : "Order is in delivery queue, it can’t be cancelled"}

2.4 Product Stock Synchronization API


Purpose: Fetch current in hand stock of SKU from FBA. You can send as many sku in comma
separated form in skus field. This API is in addition to the automated callback that is
provided to update the usable stock from FBA to eStore, and can be used on need basis to
initiate the stock sync for specific products

URL: http://fba.anchanto.com/fetch_stock
Method: PUT, Object: JSON

Parameters Description Type M/O
api_key Retailer API key for authenticating retailer Varchar (255) M
signature Retailer admin signature for authenticating retailer Varchar (255) M
email Retailer admin email Varchar (255) M
per_page No of SKUs required per page Integer (11) O
page It will show the provided page no detail Integer (11) O
product_skus Product SKUs (Comma separated Skus in String) String M
request_type Value should be “selected” or “all”. String O
- “selected” will return for only selected sku
- “all” will return all sku available for company. If
request type not passed by default it will be
treated as selected.

2.4.1 Stock Sync API Responses


• Success response for selected sku
{"response":"success","message":"","count":2,"total_count":2,"current_page":1,"per
_page":50,"pages":1,"products":[{"sku":"SLING123","quantity":1},{"sku":"PROD001"
,"quantity":70},{"sku":"mmm","quantity":0}]}
• Success response for all
{"response":"success","message":"","count":4,"total_count":4,"current_page":2,"per
_page":50,"pages":1,"products":[{"sku":"GT_Product_1","quantity":798},{"sku":"GT
_Product_2","quantity":1144},{"sku":"GT_Product_3","quantity":1138},{"sku":"GT_P
roduct_4","quantity":1333}]}
• Internal server error
{“response” : "failure", “message” : "Oops!! Server error"}
• Response failure
{“response” : "failure", “message” : "Product SKUs field is compulsory or
request_type should be 'all'"}

This document is Confidential information and property of Anchanto Pte Ltd 8


2.5 Order Invoice Update API


Purpose: To send order invoice to FBA. Use this API if you want to send invoice along with
physical order. This API accepts PDF of the customer order invoice to FBA.

URL: http://fba.anchanto.com/updateinvoice
Method: POST, Object: JSON

Parameters Description Type M/O
api_key Retailer API key for authenticating retailer Varchar (255) M
signature Retailer admin signature for authenticating retailer Varchar (255) M
email Retailer admin email Varchar (255) M
version API version. Latest version is 2.0 Integer (11) M
order_number Order number Varchar (255) M
tracking_number FBA Tracking number. The tracking number from FBA is Varchar (255) M
shared in the Create Order API response on successful order
creation. Refer reference_id in 2.1.4 above
order_invoice file data (maximum 5MB). Good to have PDF format Text M

2.5.1 Order Invoice Update API Responses


• Failure response If invoice data is not in correct format
{:response => "failure", :message => "Unable to process Invoice Data due to:
#{e.message}" }
• Success response
{:response => "success", :message => "Invoice uploaded successfully.",
:order_number => "FBAord1123", :tracking_number => "FBA3FBA1212"}
• Internal server error
{“response” : "failure", “message” : "Oops!! Server error"}

2.6 Single Product Create API


Purpose: To create one product in FBA.
Whenever a new product is created on the eStore it can be created on FBA using this API,
thus eliminating the need of creating same product on FBA separately or create manually on
FBA.

URL for product creation: http://fba.anchanto.com/inventory/product/create
Method: POST, Object: JSON

Parameters Description Type M/O
api_key As provided earlier Varchar (255) M
signature As provided earlier Varchar (255) M
email As provided earlier Varchar (255) M
product Product detail in Hash (refer below table for details) Hash M

2.6.1 Single Product hash parameters description


product hash Parameters Description Type M/O
name Product Name Varchar (255) M
sku Product SKU Varchar (255) M
mfupc_code UPC Code if any Varchar (255) O
merchant_code Merchant code (If product is from Merchant and is Varchar (255) O
tracked in FBA)
width should be grater than 1 (in cm) Decimal (8,2) M

This document is Confidential information and property of Anchanto Pte Ltd 9


height should be grater than 1 (in cm) Decimal (8,2) M
length should be grater than 1 (in cm) Decimal (8,2) M
weight should be grater than 1 (in gms) Decimal (8,2) M
product_type Type of storage required for product. Select either Varchar (255) M
“standard” or “deep_freeze”
cost_price Product cost price Decimal (10,2) M
inventory_threshold_value Threshold value of stock. If product has threshold Integer (11) O
value mentioned then FBA will send email
notification to retailer to refill stock if product stock
reaches its threshold value.
image_url Product Image Link Varchar (255) O

2.6.2 Single Product Create API Responses


• Failure response If invoice data is not in correct format
{:response => "failure", :message => "error message" }
• Success response
{:response => "success", :message => "Product created successfully", :product =>
Product hash }
• Sample Response
{"response":"success","message":"","product":{"company_id":2,"cost_price":"0.0","c
reated_at":"2015-05-
07T15:52:04+08:00","depth":"5.0","fba_sku":"AGRO643144216","height":"2.0","id":
63,"inventory_threshold_value":3,"marchant_id":null,"name":"Product name
1","permalink":"agro643144216","product_code":"121232131232","sku":"ProductS
KU-1","std_buffer_size":0,"storage_type":"standard","updated_at":"2015-05-
07T15:52:04+08:00","weight":"10.0","width":"2.0"}}
• Internal server error
{“response” : "failure", “message” : "Oops!! Server error"}

2.7 Bulk Product Create API
Purpose: To create products in bulk on FBA.
Whenever new products are created in bulk on eStore can be created on FBA using this API,
thus eliminating the need of creating products on FBA separately. The API for Single Product
Creation helps in creating product one by one on FBA that comes in handy for incremental
products. However, the Bulk Product Create API is useful when the eCommerce store is
setup the first time with all products created or in future when products are created in bulk.

URL for product creation: http://fba.anchanto.com/inventory/product/bulk_create
Method: POST, Object: JSON

Parameters Description Type M/O
api_key As provided earlier Varchar (255) M
signature As provided earlier Varchar (255) M
email As provided earlier Varchar (255) M
products Array of Product detail in Hash (refer below table for details) Array M

2.7.1 Bulk Product hash parameters description


product hash Parameters Description Type M/O
name Product Name Varchar (255) M
sku Product SKU Varchar (255) M
mfupc_code UPC Code if any Varchar (255) O
merchant_code Merchant code (If product is from Merchant and is Varchar (255) O
tracked in FBA)

This document is Confidential information and property of Anchanto Pte Ltd 10


width should be grater than 1 (in cm) Decimal (8,2) M
height should be grater than 1 (in cm) Decimal (8,2) M
length should be grater than 1 (in cm) Decimal (8,2) M
weight should be grater than 1 (in gms) Decimal (8,2) M
product_type Type of storage required for product. Select either Varchar (255) M
“standard” or “deep_freeze”
cost_price Product cost price Decimal (10,2) M
inventory_threshold_value Threshold value of stock. If product has threshold Integer (11) O
value mentioned then FBA will send email
notification to retailer to refill stock if product stock
reaches its threshold value.
image_url Product Image Link Varchar (255) O

2.7.2 Bulk Product Create Sample API Requests


• Products Create
{api_key: "test213jklljj3123213123lklkjl213123jlkjl213", email:
"test_company@test.com", signature:
"lAFdQmliOAIKpq1TZUIPmCy84S5ZnFPRO5tYUUYGUYGUYV213UfyEppEXUQ",
version: 2.0, Authorization: "Basic ZnVsZmxtbnQ6QG5jaEB0MA==\n", req_type:
"update", products: [{name: "Product name 1", sku: "ProductSKU-1", mfupc_code:
"121232131232", merchant_code: "XYZZXS", width: 2.0, height: 2.0, length: 5.0,
weight: 10.0, product_type: "standard", cost_price: "", inventory_threshold_value:
3.0, image_url: ""},{name: "Product name 2", sku: "ProductSKU-2", mfupc_code:
"454545454", merchant_code: "XYZZXS", width: 2.0, height: 2.0, length: 5.0, weight:
10.0, product_type: "standard", cost_price: "", inventory_threshold_value: 3.0,
image_url: ""}]}

2.7.3 Bulk Product Create API Responses


• Failure response If invoice data is not in correct format
{:response => "failure", :message => "error message" }
• Success response
{:response => "success", :message => "Products created successfully", :products =>
[Product hash] }
• Partial Success response
{:response => "partial-success", :message => "Few Products created successfully",
:products => [Successfully Created Products hash], :errors => [Errors Array] }
• Internal server error
{“response” : "failure", “message” : "Oops!! Server error"}

2.8 Single Product Update API
Purpose: To update product in FBA.
Whenever there is change in the product details, can be updated on FBA using this API. The
product update is done one by one using this API and not in bulk.

URL for product update: http://fba.anchanto.com/inventory/product/update
Method: POST, Object: JSON

Parameters Description Type M/O
api_key As provided earlier Varchar (255) M
signature As provided earlier Varchar (255) M
email As provided earlier Varchar (255) M
product Product detail in Hash (refer below table for details) Hash M

This document is Confidential information and property of Anchanto Pte Ltd 11


2.8.1 Product hash parameters description


product hash Parameters Description Type M/O
name Product Name Varchar (255) M
sku Product SKU Varchar (255) M
mfupc_code UPC Code if any Varchar (255) O
merchant_code Merchant code (If product is from Merchant and is Varchar (255) O
tracked in FBA)
width should be grater than 1 (in cm) Decimal (8,2) M
height should be grater than 1 (in cm) Decimal (8,2) M
length should be grater than 1 (in cm) Decimal (8,2) M
weight should be grater than 1 (in gms) Decimal (8,2) M
product_type Type of storage required for product. Select either Varchar (255) M
“standard” or “deep_freeze”
cost_price Product cost price Decimal (10,2) M
inventory_threshold_value Threshold value of stock. If product has threshold Integer (11) O
value mentioned then FBA will send email
notification to retailer to refill stock if product stock
reaches its threshold value.
image_url Product Image Link Varchar (255) O

2.8.2 Product Update API Responses


• Failure response If invoice data is not in correct format
{:response => "failure", :message => "error message" }
• Success response
{:response => "success", :message => "Product updated successfully", :product =>
Product hash }
o Sample Response
{"response":"success","message":"","product":{"company_id":2,"cost_price"
:"0.0","created_at":"2015-05-
07T15:52:04+08:00","depth":"5.0","fba_sku":"AGRO643144216","height":"2
.0","id":63,"inventory_threshold_value":3,"marchant_id":null,"name":"Prod
uct name
1","permalink":"agro643144216","product_code":"121232131232","sku":"P
roductSKU-
1","std_buffer_size":0,"storage_type":"standard","updated_at":"2015-05-
07T15:52:04+08:00","weight":"10.0","width":"2.0"}}
• Internal server error
{“response” : "failure", “message” : "Oops!! Server error"}

This document is Confidential information and property of Anchanto Pte Ltd 12


3 FBA Callbacks
FBA gives POST callback on status change for the order and product. Callback URL is
individual to the retailer subscribed on FBA and is must to receive the Callbacks from FBA.
FBA will attempt callback request three times every 4-hours in case of failure. In case of all
three-failure attempts notification is sent to the retailer admin.

3.1 Callback for Order


This callback will be triggered whenever there is a change in the status of the order in FBA.
This will always give you real time status of order. You have to provide a callback URL to
capture this callback in the input box of Callback URL (State Changes) under your company
settings. Please find response detail below in table.

Response Key Description
order_number Order number
tracking_number FBA tracking number
old_state Previous status of the order
new_state New status of the order
event_on Date and time of the event e.g., (Thu, 12 Jun 2014 16:07:49 SGT +08:00)
time_zone Time zone of the FBA server (Singapore)
event_code Future use (to assign event code for the new state)

3.1.1 Sample – FBA Callbacks


Callback URL for the EC Store : 'http://mysite.com/callback'
Method => POST
params => {"event"
"order_number":"R12345678","tracking_number":"FBA2ABC123","old_state":"delivery","ne
w_state":"completed","event_on":"2014-06-24 20:58:07 +0800","time_zone":"Singapore"}}

3.1.2 Order Status Tracking Event


Every event associated with the order state change is captured in the system and is provided
through callback to the initiator or can also be tracked on the FBA tracking URL. Events that
are captured and updated back as part of callback are listed below.

# State Code State Description
1 rfp Picking Line Order is In Picking Line - Yet to be assigned for pickup
2 assign_for_pickup Picking Line Order Assigned to Champ for Picking
3 partial_picked Picking Line Order was partially picked by the champ
4 assign_for_repicking Picking Line Order is assigned to champ for re-picking
5 picked_up Packing Line Order is picked and is moved to Packing Line
6 packup Awaiting Dispatch Order is Qced and Packed. Ready for dispatch
7 dispatch_queue Dispatch Scheduled Order dispatch is scheduled
8 delivery Out For Delivery Order is out for delivery and has left the warehouse
9 no_show No Show Order delivery attempt was unsuccessful
10 complete Delivered/ Completed Order delivered to the customer
11 received_at_warehouse No Show No-show order is received at warehouse
Order to be collected by Customer from the customer
12 self_collect Self Collection after failed delivery attempts
Order is Qced and Packed, and is ready for Customer
13 customer_pickup Customer Pickup Pickup from the Center
14 cancel Cancelled Order is cancelled
15 hold On Hold In case the order is put on hold at the warehouse/ FC
Items to be put-away in the warehouse after return
16 put_away Put Away collection or order cancellation
When new order that cannot be fulfilled completely is in
17 partial Partial partial line

This document is Confidential information and property of Anchanto Pte Ltd 13


3.2 Callback for Stock Synchronization


This callback event is triggered to synch e-Store stock from FBA current stock. You have to
provide a callback URL to capture this callback in the input box of Product Stock Synch
Callback URL under your company settings.

This callback will be triggered in following scenarios -
• When the shipment is received and processed successfully at Anchanto warehouse
• When an Outbound consignment is processed and goes out from Anchanto
warehouse. Outbound consignment is the bulk shipment going out and not the
regular e-commerce orders
• When an order is created on FBA manually using create order form
• When the product quantity is updated/ modified during the stock take exercise

Below table provides the response.

Response Key Description
count Count of individual product
Products Array Product Array. See example below
FBA Api Key Retailer API key for authenticating retailer

Products Array Parameters Description
sku Product SKU
quantity Current quantity of the product


Example for Products Array –
Callback URL for the EC Store : 'http://mysite.com/callback'
Method => POST
params =>
{”fba_api_key”:”1234”,"count":2,"products":[{"sku":"SLING123","quantity":1},{"sku":"PROD
001","quantity":70},{"sku":"mmm","quantity":0}]}


------- End of Document -------

This document is Confidential information and property of Anchanto Pte Ltd 14