The table below lists APIs that can be used for orders management.
Order APIs require
order
scope.
All operation models
Get list orders | Returns a list of orders managed by signing in seller, base on a specific search query |
Get order details | Returns detail information including product items of an order, base on order code |
Get seller warehouses for confirmation | Return the seller warehouses to be used in orders confirmation |
Drop-shipping
Get expected pickup times | Get expected pickup times that seller can use to confirm their drop-ship order at the moment. |
Confirm enough DS stock | Confirm that there are enough commodity to fulfill the drop-ship order. And provide the expected pickup time for your package. |
Confirm that you have done packing the products for the dropship order. Deprecated. This operation is not necessary anymore. You only need to provide your expected pickup time in the confirm enough drop-ship stock API. | |
Get shipping stamp | Order labels for drop shipping |
On-demand fulfillment
Confirm enough ODF stock | Confirm that there are enough commodity to fulfill orders |
Get shipping label | Order labels for ODF |
Seller delivery
Confirm enough SD stock | Confirm that there are enough commodity to fulfill orders |
Get invoice label | Order labels for seller delivery |
Update delivery status for seller delivery | Update delivery status |
Cross border
Confirm enough CB stock | Confirm that there are enough commodity to fulfill orders |
Get cross border label | Order labels for cross border |
Update shipment status for cross border | Update shipment status |
Order Listing V2
Returns a list of sales orders managed by the authorized seller, base on a specific search query.
What’s new?
- Re-organized payload:
- Group related properties into objects
- Rename confused fields
- Correct invoice information when querying by seller
- Split order information into
include
able options
HTTP Request
GET https://api.tiki.vn/integration/v2/orders?code=303886378,781534461
Query parameters
All query parameters are optional.
Name | Type | Example | Description |
---|---|---|---|
page | Integer | 5 Default 1 | Index of the page of orders to be returned Page is base 1 and must be > 0 |
limit | Integer | 25 Default 20 | Size of the page of orders to be returned Limit must be > 0 |
code | String | 936734420,704309977 | Search orders by order codes Format: comma,separated,order,codes |
sku | String | 675902566253,195612014248 | Search orders by product sku Format: comma,separated,skus |
item_confirmation_status | String | waiting | Search orders by confirmation status Values: See order item confirmation status |
item_inventory_type | Set Expression | in%7Cbackorder,preorder | Search orders that contains at least 1 order item satisfy the inventory type expression Values: backorder, instock, preorder |
fulfillment_type | Set Expression | nin%7Ccross_border,dropship | Search orders by fulfillment type (operation model) Values: See order fulfillment type |
status | Set Expression | in%7Ccomplete,closed | Search orders by order single or multiple statuses Values: See order status |
include | String | status_histories,item.fees | Fetch additional order information Format: comma,separated,values Values: See include-able |
is_rma | Boolean | true | Search RMA orders – The replacement order for returned products |
filter_date_by | String | last7days | Search orders by created_at date range Values: today , last7days , last30days |
created_from_date | Timestamp | 2020-08-20 15:00:00 | Search orders with created_at greater than the sepecified timestamp |
created_to_date | Timestamp | 2020-08-20 15:00:00 | Search orders with created_at less than the sepecified timestamp |
updated_from_date | Timestamp | 2020-08-20 15:00:00 | Deprecated. Due to known issue with field updated_at. To get order update, please use our event queues with event types ‣ ORDER_CREATED_SUCCESSFULLY ‣ ORDER_STATUS_UPDATED. Search orders with updated_at greater than the sepecified timestamp |
updated_to_date | Timestamp | 2020-08-20 15:00:00 | Deprecated. Due to known issue with field updated_at. To get order update, please use our event queues with event types ‣ ORDER_CREATED_SUCCESSFULLY ‣ ORDER_STATUS_UPDATED. Search orders with updated_at less than the sepecified timestamp |
order_by | String | created_at%7Casc Default created_at%7Cdesc Where %7C stands for “| “ | Sort orders by a direction then perform the search Format: column|direction Columns: created_at , updated_at Directions: asc , desc |
Set Expression
- Format:
operator%7Ccomma,separated,values
. Where%7C
stands for character “|
“ - Supported set operators:
in
: The property carries a value belong to the values setnin
: The property carries a value NOT belong to the values set
- Examples:
fulfillment_type=in|cross_border,dropship
: Search orders that have the fulfillment type ofcross_border
ORdropship
status=nin|complete,successful_delivery
: Search orders that are NOT completed and NOT delivered yet
Timestamp
- Format:
yyyy-MM-dd HH:mm:ss
- The timestamp will be undertood as it is at UTC+07:00
- Example:
2020-08-20 15:00:00
will be understood as2020-08-20T15:00:00+0700
Include-able
Include-able fields | Description |
---|---|
status_histories | Fetch Status History field in Order |
item.fees | Fetch Order Item Fee field in Order Item |
item.confirmation_histories | Fetch Confirmation History |
Response Ok
If everything is ok, you will receive a list of orders according to what you requested:
Field | Type | Description |
---|---|---|
data | List<Order> | A list of orders satisfied the search query |
paging | Paging | Paging information |
Response Exception
If something wrong happens, you will receive the error body with explanations.
Order Details V2
HTTP Request
GET https://api.tiki.vn/integration/v2/orders/303886378?include=status_histories
Query parameters
All query parameters are optional.
Name | Type | Example | Description |
---|---|---|---|
include | String | status_histories,item.fees | See order listing |
Response Ok
The Order object if found.
Response Exception
If something wrong happens, you will receive the error body with explanations. This object describes many common errors.
Additional 4xx
error includes:
400
Order not found
Confirm enough stock
This API support confirm available stock for operation models:
- On-Demand Fulfillment
- Seller Delivery
- Cross Border
Only confirm the order when:
- Has
status
=queueing
- Has at least 1 item with
items/*/product/inventory_type
=backorder
&&items/*/confirmation/status
=waiting
HTTP Request
POST https://api.tiki.vn/integration/v2/orders/4244037251/confirm-available
Here orderCode
denotes the order you want to confirm.
Request Body
{
"available_item_ids": [
1334323
],
"seller_inventory_id": 1089
}
Name | Type | Example | Description |
---|---|---|---|
available_item_ids | List<Integer> | [ 1334323, 1334325 ] | Put order item ids with enough stock to fulfill the order. |
seller_inventory_id | Integer | 123492 | Seller inventory that supplies commodities. See get seller inventories for confirmation. |
For example, your order has 3 items
- 111111111 (SKU=739348298529354)
- 22222222 (SKU=134534448529354)
- 3333333 (SKU=828348298529354).
But you see that your warehouse does not have enough SKU=139348298529354 (the 2nd item). You should confirm you have enough other items: [111111111, 3333333], these items will be seller_confirmed
. And in this case, 2nd item 22222222 will be seller_canceled
.
Response Ok
{
"code": 200,
"data": [
{
"id": 109481415,
"message": null
}
]
}
Name | Type | Example | Description |
---|---|---|---|
data/*/id | Integer | 109481415 | The id of the newly created Inventory Requisition |
code | Integer | 200 | HTTP Result of the confirmation |
Response Exception
If something wrong happens, you will receive the error body with explanations. This object describes many common errors.
Get expected pickup times
Deprecating.
From July 10th, 2023, we deprecate this API because of changing in order confirmation requirement:
– Tiki will decide pickup time for all drop-shipping orders
– Seller will only need to confirm product availability for these orders
After July 10th, 2023, this API will enter compatibility mode: Return exactly one pickup slot, so system using this API can still use this API without issue.
This API returns the expected pickup times a seller can use to confirm their drop-shipping order.
HTTP Request
GET https://api.tiki.vn/integration/v2/orders/dropship/expected-pickup-slots
Response Ok
{
"seller_id": 875,
"pickup_slots": [
{
"expected_pickup_slot": "sameday_1pm",
"expected_pickup_time": "2021-11-29 13:00:00"
}
]
}
Path | Type | Example | Description |
---|---|---|---|
seller_id | Integer | 1771 | The Id of the seller who’s making the call |
pickup_slots/*/expected_pickup_slot | String | nextday_9am | The constant describing the meaning of the pickup time option |
pickup_slots/*/expected_pickup_time | Timestamp | 2021-11-30 09:00:00 | The expected pickup time that seller can use to confirm their drop-ship order |
Response Exception
If something wrong happens, you will receive the error body with explanations.
Confirm enough stock for Drop Shipping
This API support confirm available stock for Drop Shipping operation model. After seller has confirmed enough stock, seller has to pack products properly. And prepare to for the driver to come picking the package.
Only confirm the dropship order when:
- Has
status
=queueing
- Has at least 1 item with
items/*/product/inventory_type
=backorder
&&items/*/confirmation/status
=waiting
Change from July 10th, 2023
From July 10th, 2023, we change order confirmation requirement:
– Tiki will decide pickup time for all drop-shipping orders:
– Seller will only need to confirm product availability for these orders
–expected_pickup_time
is deprecated
HTTP Request
POST https://api.tiki.vn/integration/v2/orders/4244037251/dropship/confirm-available
Here orderCode
denotes the order you want to confirm availability.
Request Body
{
"confirmation_status": "seller_confirmed",
"seller_inventory_id": 938
}
Name | Type | Example | Description |
---|---|---|---|
confirmation_status | String | seller_confirmed | Must be either: seller_confirmed : Confirm enough stock to fulfill the orderseller_canceled : NOT enough stock to fulfill the order |
seller_inventory_id | Integer | 123492 | Seller inventory that supplies commodities. See get seller inventories for confirmation. |
expected_pickup_time | Timestamp | Deprecate. This field is ignored and deprecate since July 10th, 2023. Your expected date-time for picking your package. See get the list of pickup times for seller. |
Response Ok
{
"code": 200
}
Name | Type | Example | Description |
---|---|---|---|
code | Integer | 200 | HTTP Result of the confirmation |
Response Exception
If something wrong happens, you will receive the error body with explanations.
Confirm packing is done for Drop Shipping
Deprecated.
This operation is not necessary anymore. You only need to provide your expected pickup time in the confirm enough drop-ship stock API.
This API support confirm done packing for Drop Shipping operation model. After seller has confirmed packing, Tiki goes picking up the package and delivers it to customer directly – not through Tiki warehouses.
Only confirm packing the dropship order when:
- Has
status
=queueing
- Has at least 1 item with
items/*/product/inventory_type
=backorder
&&items/*/confirmation/status
=seller_confirmed
HTTP Request
POST https://api.tiki.vn/integration/v2/orders/4244037251/dropship/confirm-packing
Here orderCode
denotes the order you want to confirm packing.
Request Body
{
"seller_inventory_id": 938
}
Name | Type | Example | Description |
---|---|---|---|
seller_inventory_id | Integer | 123492 | Seller inventory that supplies commodities. Must be the same as the seller_inventory_id used in stock availability confirm |
Response Ok
{
"code": 200
}
Name | Type | Example | Description |
---|---|---|---|
code | Integer | 200 | HTTP Result of the confirmation |
Response Exception
If something wrong happens, you will receive the error body with explanations.
Get seller inventories for confirmation
This API return seller inventories and mappings from Tiki warehouses to seller inventories – which
will be used in order confirmation and dropship confirmation.
Notes, this API only return active & requisition inventories those matches the Tiki warehouse codes.
HTTP Request
GET https://api.tiki.vn/integration/v2/seller-inventories?tiki_warehouse_codes=sgn,sgn3,hn4
Query parameters
Name | Type | Example | Description |
---|---|---|---|
tiki_warehouse_codes | List<String> | sgn,hn,vl | List of Tiki warehouse codes |
Response OK
{
"seller_inventories": [
{
"id": 558,
"seller_id": 871,
"is_primary": false,
"name": "Seller Alice Shop Hà Nội",
"status": 1,
"address": {
"street": "01 đường số 2",
"ward": "Xã Đông Xuân",
"district": "Huyện Sóc Sơn",
"region": "Hà Nội",
"country": "Viet Nam"
},
"type": "requisition"
},
{
"id": 1227,
"seller_id": 871,
"is_primary": false,
"name": "HCM",
"status": 1,
"address": {
"street": "Test",
"ward": "Phường 04",
"district": "Quận 6",
"region": "Hồ Chí Minh",
"country": "Viet Nam"
},
"type": "requisition"
}
],
"mappings": [
{
"tiki_warehouse_code": "sgn",
"seller_inventory_ids": [
1227
]
},
{
"tiki_warehouse_code": "sgn3",
"seller_inventory_ids": [
1227
]
},
{
"tiki_warehouse_code": "hn4",
"seller_inventory_ids": [
558
]
}
]
}
Name | Type | Example | Description |
---|---|---|---|
seller_inventories | List<Seller Inventory> | The list of seller inventories that matches any of the provided Tiki warehouses | |
mappings | List<Entry> | The mapping from Tiki warehouses to seller inventories |
For example, below mapping means if the order has Tiki warehouse of hn4
, seller must choose either seller inventory 558
or 693
to confirm the order.
{
"tiki_warehouse_code": "hn4",
"seller_inventory_ids": [
558,
693
]
}
Response Exception
If something wrong happens, you will receive the error body with explanations. This object describes many common errors.
Update delivery status for seller delivery
When you deliver the a seller delivery order, you need to tell whether the delivery is successful or not.
HTTP Request
POST https://api.tiki.vn/integration/v2/orders/{code}/seller-delivery/update-delivery
Request body
Content-Type: application/json
Field | Mandatory | Example | Description |
---|---|---|---|
status | Yes | failed_delivery | Delivery status:successful_delivery failed_delivery |
failure_cause | No | redelivery_appointment | If you set the status = failed_delivery , you must provide a failure_cause |
appointment_date | No | 2020-12-24 12:00:00 | If you set the failure_cause = redelivery_appointment , you must provide an appointment date with customer |
note | No | Failed to deliver because … | The delivery note to be saved you will see in delivery confirmation |
Possible failure_cause
:
Failure cause | Description | Will cancel the order? |
---|---|---|
out_of_needs | Customer no longer needs the items | Yes |
redelivery_appointment | Customer or seller wants to make another delivery attempt | No |
out_of_stock | Products are out of stock | Yes |
Example request body:
{
"status": "failed_delivery",
"failure_cause": "out_of_needs",
"note": "Cannot contact customer"
}
Response ok
Content-Type: application/json
Field | Type | Example | Description |
---|---|---|---|
message | String | “success” |
Response exception
If something wrong happens, you will receive the error body with explanations.
Update shipment status for cross border
Only call this endpoint to update the shipment status of your cross border orders if you have one of the following conditions:
- You are 3rd Party Logistic partner
- Your store handles the shipment of the oversea packages to customers – self-deliver mode
HTTP Request
POST https://api.tiki.vn/integration/v2/orders/{code}/cross-border/update-shipment
Request body
Content-Type: application/json
Name | Mandatory | Example | Description |
---|---|---|---|
status | Y | successful_delivery | Status of shipment, see option list bellow |
update_time | Y | 2019-06-22 18:12:17 | The timestamp of the status update |
Shipment status
options for self-deliver cross_border
:
Cross border shipment status | Description |
---|---|
transferring_to_foreign_warehouses | Orders transferring to your foreign warehouses |
has_come_to_foreign_warehouses | Orders has come to your foreign warehouses |
rotating_to_vietnam | Orders rotating to vietnam |
customs_clearance | Customs clearance processing |
customs_clearance_complete | Customs clearance complete |
item_arrived_in_vietnam | Orders arrived in vietnam |
ready_for_delivery | Orders ready for delivery |
on_delivery | Orders on delivery |
successful_delivery | Orders successful delivery |
Finally, your order delivery status becomes successful delivery, everything is settled.
Example request body:
{
"status": "customs_clearance",
"update_time": "2021-06-11 12:00:00"
}
Response ok
Content-Type: application/json
Field | Type | Example | Description |
---|---|---|---|
message | String | “success” |
Response exception
If something wrong happens, you will receive the error body with explanations.
Get shipping label for on-demand fulfillment
Return order label of an order, with a selectable format. Only invoke this endpoint when:
- Order operation model is on-demand fulfillment
- Order is already confirmed to have enough stock
- Order
status != canceled
HTTP Request
GET https://api.tiki.vn/integration/v2/orders/{code}/tiki-delivery/labels?format=
Query parameters
Key | Example | Description |
---|---|---|
format | html | Format of the printable label. Available formats: html |
Response ok
Field | Description |
---|---|
shipping_label_url | Url to the shipping label with the specified format |
Example response body:
{
"shipping_label_url": "https://uat.tikicdn.com/ts/print/c68cf4ba4b.html"
}
Response exception
If something wrong happens, you will receive the error body with explanations.
Get invoice label for seller delivery
Return invoice label of a seller delivery order, with a selectable format. Only invoke this endpoint when:
- Order operation model is seller delivery
- Order is already confirmed to have enough stock
- Order
status != canceled
HTTP Request
GET https://api.tiki.vn/integration/v2/orders/{code}/seller-delivery/labels?format=
Query parameters
Key | Example | Description |
---|---|---|
format | html | Format of the printable label. Available formats: html |
Response ok
Field | Description |
---|---|
invoice_label_url | Url to the invoice label of the order with the specified format |
Example response body:
{
"invoice_label_url": "https://uat.tikicdn.com/ts/print/c68cf4ba4b.html"
}
Response exception
If something wrong happens, you will receive the error body with explanations.
Get shipping stamp for dropship
Return order labels of a drop shipping order, with a selectable format. Only invoke this endpoint when:
- Order operation model is drop shipping
- Order is already confirmed to have enough stock
- Order
status != canceled
HTTP Request
GET https://api.tiki.vn/integration/v2/orders/{code}/dropship/labels?format=
Query parameters
Key | Example | Description |
---|---|---|
format | html | Format of the printable label. Available formats: html |
Response ok
Field | Description |
---|---|
shipping_label_url | Url to the shipping label with the specified format. This label should be printed and sticked outside the package. |
shipping_stamp_url | Url to the shipping stamp with the specified format. This label should be printed and put inside the package. |
Example response body:
{
"shipping_label_url": "https://uat.tikicdn.com/ts/print/c68cf4ba4b.html",
"shipping_stamp_url": "https://uat.tikicdn.com/ts/print/a7s5baa1a2.html",
}
Response exception
If something wrong happens, you will receive the error body with explanations.
Get cross border label for cross border
Return order label of a cross border order, with a selectable format. Only invoke this endpoint when:
- Order operation model is cross border
- Order is already confirmed to have enough stock
- Order
status != canceled
HTTP Request
GET https://api.tiki.vn/integration/v2/orders/{code}/cross-border/labels?format=
Query parameters
Key | Example | Description |
---|---|---|
format | html | Format of the printable label. Available formats: html |
Response ok
Field | Description |
---|---|
crossborder_label_url | Url to the cross border label with the specified format |
Example response body:
{
"crossborder_label_url": "https://uat.tikicdn.com/ts/print/c68cf4ba4b.html"
}
Response exception
If something wrong happens, you will receive the error body with explanations.