1. Home
  2. Docs
  3. Current
  4. API References
  5. Order API

Order API

The table below lists APIs that can be used for orders management.

Order APIs require order scope.

All operation models

Get list ordersReturns a list of orders managed by signing in seller, base on a specific search query
Get order detailsReturns detail information including product items of an order, base on order code
Get seller warehouses for confirmationReturn the seller warehouses to be used in orders confirmation

Drop-shipping

Get expected pickup timesGet expected pickup times that seller can use to confirm their drop-ship order at the moment.
Confirm enough DS stockConfirm that there are enough commodity to fulfill the drop-ship order.
And provide the expected pickup time for your package.
Confirm drop-ship packing is doneConfirm 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 stampOrder labels for drop shipping

On-demand fulfillment

Confirm enough ODF stockConfirm that there are enough commodity to fulfill orders
Get shipping labelOrder labels for ODF

Seller delivery

Confirm enough SD stockConfirm that there are enough commodity to fulfill orders
Get invoice labelOrder labels for seller delivery
Update delivery status for seller deliveryUpdate delivery status

Cross border

Confirm enough CB stockConfirm that there are enough commodity to fulfill orders
Get cross border labelOrder labels for cross border
Update shipment status for cross borderUpdate 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 includeable options

HTTP Request

GET https://api.tiki.vn/integration/v2/orders?code=303886378,781534461

Query parameters

All query parameters are optional.

NameTypeExampleDescription
pageInteger5 Default 1Index of the page of orders to be returned
Page is base 1 and must be > 0
limitInteger25 Default 20Size of the page of orders to be returned
Limit must be > 0
codeString936734420,704309977Search orders by order codes
Format: comma,separated,order,codes
skuString675902566253,195612014248Search orders by product sku
Format: comma,separated,skus
item_confirmation_statusStringwaitingSearch orders by confirmation status
Values: See order item confirmation status
item_inventory_typeSet Expressionin%7Cbackorder,preorderSearch orders that contains at least 1 order item satisfy the inventory type expression
Values: backorder, instock, preorder
fulfillment_typeSet Expressionnin%7Ccross_border,dropshipSearch orders by fulfillment type (operation model)
Values: See order fulfillment type
statusSet Expressionin%7Ccomplete,closedSearch orders by order single or multiple statuses
Values: See order status
includeStringstatus_histories,item.feesFetch additional order information
Format: comma,separated,values
Values: See include-able
is_rmaBooleantrueSearch RMA orders – The replacement order for returned products
filter_date_byStringlast7daysSearch orders by created_at date range
Values: today, last7days, last30days
created_from_dateTimestamp2020-08-20 15:00:00Search orders with created_at greater than the sepecified timestamp
created_to_dateTimestamp2020-08-20 15:00:00Search orders with created_at less than the sepecified timestamp
updated_from_dateTimestamp2020-08-20 15:00:00Deprecated. 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_dateTimestamp2020-08-20 15:00:00Deprecated. 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_byStringcreated_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 set
    • nin: 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 of cross_border OR dropship
    • 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 as 2020-08-20T15:00:00+0700

Include-able

Include-able fieldsDescription
status_historiesFetch Status History field in Order
item.feesFetch Order Item Fee field in Order Item
item.confirmation_historiesFetch Confirmation History

Response Ok

If everything is ok, you will receive a list of orders according to what you requested:

FieldTypeDescription
dataList<Order>A list of orders satisfied the search query
pagingPagingPaging 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.

NameTypeExampleDescription
includeStringstatus_histories,item.feesSee 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
}
NameTypeExampleDescription
available_item_idsList<Integer>[ 1334323, 1334325 ]Put order item ids with enough stock to fulfill the order.
seller_inventory_idInteger123492Seller 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
        }
    ]
}
NameTypeExampleDescription
data/*/idInteger109481415The id of the newly created Inventory Requisition
codeInteger200HTTP 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"
        }
    ]
}
PathTypeExampleDescription
seller_idInteger1771The Id of the seller who’s making the call
pickup_slots/*/expected_pickup_slotStringnextday_9amThe constant describing the meaning of the pickup time option
pickup_slots/*/expected_pickup_timeTimestamp2021-11-30 09:00:00The 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
}
NameTypeExampleDescription
confirmation_statusStringseller_confirmedMust be either:
seller_confirmed: Confirm enough stock to fulfill the order
seller_canceled: NOT enough stock to fulfill the order
seller_inventory_idInteger123492Seller inventory that supplies commodities. See get seller inventories for confirmation.
expected_pickup_timeTimestampDeprecate. 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
}
NameTypeExampleDescription
codeInteger200HTTP 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
}
NameTypeExampleDescription
seller_inventory_idInteger123492Seller inventory that supplies commodities. Must be the same as the seller_inventory_id used in stock availability confirm

Response Ok

{
    "code": 200
}
NameTypeExampleDescription
codeInteger200HTTP 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

NameTypeExampleDescription
tiki_warehouse_codesList<String>sgn,hn,vlList 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
            ]
        }
    ]
}
NameTypeExampleDescription
seller_inventoriesList<Seller Inventory>The list of seller inventories that matches any of the provided Tiki warehouses
mappingsList<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

FieldMandatoryExampleDescription
statusYesfailed_deliveryDelivery status:
successful_delivery
failed_delivery
failure_causeNoredelivery_appointmentIf you set the status = failed_delivery, you must provide a failure_cause
appointment_dateNo2020-12-24 12:00:00If you set the failure_cause = redelivery_appointment, you must provide an appointment date with customer
noteNoFailed to deliver because …The delivery note to be saved you will see in delivery confirmation

Possible failure_cause:

Failure causeDescriptionWill cancel the order?
out_of_needsCustomer no longer needs the itemsYes
redelivery_appointmentCustomer or seller wants to make another delivery attemptNo
out_of_stockProducts are out of stockYes

Example request body:

{
    "status": "failed_delivery",
    "failure_cause": "out_of_needs",
    "note": "Cannot contact customer"
}

Response ok

Content-Type: application/json

FieldTypeExampleDescription
messageString“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

NameMandatoryExampleDescription
statusYsuccessful_deliveryStatus of shipment, see option list bellow
update_timeY2019-06-22 18:12:17The timestamp of the status update

Shipment status options for self-deliver cross_border:

Cross border shipment statusDescription
transferring_to_foreign_warehousesOrders transferring to your foreign warehouses
has_come_to_foreign_warehousesOrders has come to your foreign warehouses
rotating_to_vietnamOrders rotating to vietnam
customs_clearanceCustoms clearance processing
customs_clearance_completeCustoms clearance complete
item_arrived_in_vietnamOrders arrived in vietnam
ready_for_deliveryOrders ready for delivery
on_deliveryOrders on delivery
successful_deliveryOrders 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

FieldTypeExampleDescription
messageString“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:

HTTP Request

GET https://api.tiki.vn/integration/v2/orders/{code}/tiki-delivery/labels?format=

Query parameters

KeyExampleDescription
formathtmlFormat of the printable label. Available formats: html

Response ok

FieldDescription
shipping_label_urlUrl 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:

HTTP Request

GET https://api.tiki.vn/integration/v2/orders/{code}/seller-delivery/labels?format=

Query parameters

KeyExampleDescription
formathtmlFormat of the printable label. Available formats: html

Response ok

FieldDescription
invoice_label_urlUrl 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:

HTTP Request

GET https://api.tiki.vn/integration/v2/orders/{code}/dropship/labels?format=

Query parameters

KeyExampleDescription
formathtmlFormat of the printable label. Available formats: html

Response ok

FieldDescription
shipping_label_urlUrl to the shipping label with the specified format. This label should be printed and sticked outside the package.
shipping_stamp_urlUrl 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:

HTTP Request

GET https://api.tiki.vn/integration/v2/orders/{code}/cross-border/labels?format=

Query parameters

KeyExampleDescription
formathtmlFormat of the printable label. Available formats: html

Response ok

FieldDescription
crossborder_label_urlUrl 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.

Was this article helpful to you? Yes No 1

How can we help?

Leave a Reply

Your email address will not be published.