1. Home
  2. Docs
  3. Current
  4. Guides
  5. TIKI Theory V2
  6. Order

Order

This page contains the detailed payload of an order.

Prerequisites

It’s better to know about our current operation models and guiding before stepping into the order details.

Payload detail

Order detail

NameTypeExampleDescription
codeString745467462Unique order code
relation_codeString896493516The order code of the parent order
The parent order is splited or modified into this (and others) order
fulfillment_typeStringcross_borderHow the order is fulfilled a.k.a the fulfillment model of the order
See order fulfillment type
statusStringcompleteThe status where the order is in the process to customer hands
is_rmaBooleanfalseIs this order a replacement for a returned product or a servicing product (RMA flow)
is_vat_exportingBooleanfalseIf the customer requested to export VAT bill
has_backorder_itemsBooleantrueIf this order has at least 1 Order Item V2 with inventory_type=backorder
created_atTimestamp2020-08-10 18:50:17When the order is created
updated_atTimestamp2020-08-18 11:10:02The latest update time of the order
invoiceOrder Invoice The order invoice data: Total value, discounts, fees of customer and seller
tiki_warehouseTiki Warehouse Info The Tiki warehouse that fulfills the order
itemsList<Order Item V2> All Order Item V2s details
shippingShipping Info Shipping information of the order: Shipping status, plan, partner, address
paymentPayment Info Payment information
deliveryDelivery Confirmation Delivery confirmation
customerCustomer Info Customer information
installment_infoInstallment Info Installment information
cancel_infoCancel Info Cancellation details
rma_infoRma Info RMA information
status_historiesList<Status History> All the status changes of this order
seller_warehouseSeller WarehouseSeller warehouse info to pickup order
storeSeller Store InfoSeller store info

Order V2 Sample

{
    "code": "950030154",
    "relation_code": "",
    "fulfillment_type": "cross_border",
    "status": "complete",
    "is_rma": false,
    "is_vat_exporting": false,
    "has_backorder_items": true,
    "created_at": "2020-08-13 22:53:18",
    "updated_at": "2020-08-15 11:10:02",
    "invoice": {
        "items_count": 1,
        "items_quantity": 1,
        "subtotal": 455000,
        "grand_total": 0,
        "collectible_amount": 0,
        "discount_amount": 474000,
        "discount_tikixu": 474000,
        "discount_promotion": 0,
        "discount_percent": 0,
        "discount_coupon": 0,
        "discount_other": 0,
        "gift_card_amount": 0,
        "gift_card_code": null,
        "coupon_code": null,
        "shipping_amount_after_discount": 19000,
        "shipping_discount_amount": 0,
        "handling_fee": 0,
        "other_fee": 0,
        "total_seller_fee": -69434.34,
        "total_seller_income": 385565.66,
        "purchased_at": "2020-08-13 22:53:18",
        "tax_info": null
    },
    "tiki_warehouse": {
        "id": 4,
        "name": "Sài Gòn",
        "code": "sgn"
    },
    "items": [
        {
            "id": 156907849,
            "product": {
                "id": 11464923,
                "type": "simple",
                "super_id": 0,
                "master_id": 11464922,
                "sku": "8609380684187",
                "name": "Easy Learning Complete German Grammar, Verbs & Vocabu",
                "catalog_group_name": null,
                "inventory_type": "backorder",
                "imeis": [],
                "serial_numbers": [],
                "thumbnail": "https://salt.tikicdn.com/cache/280x280/ts/product/9d/df/0e/20272d014757fb8d94eabb8a630b088b.jpg",
                "seller_product_code": "9780008141783",
                "seller_supply_method": null
            },
            "invoice": {
                "price": 455000,
                "quantity": 1,
                "subtotal": 455000,
                "row_total": 0,
                "discount_amount": 474000,
                "discount_tikixu": 474000,
                "discount_promotion": 0,
                "discount_percent": 0,
                "discount_coupon": 0,
                "discount_other": 0,
                "discount_tikier": 0,
                "discount_tiki_first": 0,
                "is_seller_discount_coupon": false,
                "is_taxable": false,
                "fob_price": 0,
                "seller_fee": -69434.34,
                "seller_income": 385565.66,
                "fees": [
                    {
                        "id": 205244033,
                        "fee_type_key": "percent_per_item_sales_value",
                        "fee_type_name": "Chiết khấu",
                        "status": 1,
                        "quantity": 1,
                        "base_amount": 8,
                        "total_amount": -36400,
                        "discount_amount": 0,
                        "final_amount": -36400
                    },
                    {
                        "id": 205244034,
                        "fee_type_key": "payment_processing_fee",
                        "fee_type_name": "Phí thanh toán",
                        "status": 1,
                        "quantity": 1,
                        "base_amount": 2,
                        "total_amount": -9100,
                        "discount_amount": 0,
                        "final_amount": -9100
                    },
                    {
                        "id": 205244037,
                        "fee_type_key": "ict_tax_fee",
                        "fee_type_name": "Phí nhà thầu",
                        "status": 1,
                        "quantity": 1,
                        "base_amount": 3934.34,
                        "total_amount": -3934.34,
                        "discount_amount": 0,
                        "final_amount": -3934.34
                    },
                    {
                        "id": 205244035,
                        "fee_type_key": null,
                        "fee_type_name": null,
                        "status": 1,
                        "quantity": 1,
                        "base_amount": 20000,
                        "total_amount": -20000,
                        "discount_amount": 0,
                        "final_amount": -20000
                    }
                ]
            },
            "seller": {
                "id": 14626,
                "name": "Experal"
            },
            "confirmation": {
                "status": "confirmed",
                "confirmed_at": "2020-08-14 08:42:33",
                "available_confirm_sla": "2020-08-14 12:00:00",
                "pickup_confirm_sla": null,
                "histories": [
                    {
                        "confirmed_at": "2020-08-14 08:42:33.0",
                        "order_item_id": 156907849,
                        "sla_confirmed_at": "2020-08-14 12:00:00.0",
                        "status": "confirmed"
                    },
                    {
                        "confirmed_at": "2020-08-14 08:42:33.0",
                        "order_item_id": 156907849,
                        "sla_confirmed_at": "2020-08-14 12:00:00.0",
                        "status": "seller_confirmed"
                    },
                    {
                        "confirmed_at": null,
                        "order_item_id": 156907849,
                        "sla_confirmed_at": "2020-08-14 12:00:00.0",
                        "status": "waiting"
                    }
                ]
            },
            "inventory_requisition": {
                "id": 15030509,
                "code": "SGN/BOP/20/08/350345",
                "seller_inventory_id": 13175,
                "status": "done",
                "is_printed": false,
                "pickup_method": "cross_border",
                "warehouse_code": "sgn",
                "error": null,
                "created_at": "2020-08-14 08:42:33"
            },
            "inventory_withdrawals": []
        }
    ],
    "shipping": {
        "partner_id": "1",
        "partner_name": "Tiki Team",
        "tracking_code": null,
        "status": "New",
        "plan": {
            "id": 1,
            "name": "Giao hàng tiêu chuẩn",
            "is_free_shipping": false,
            "promised_delivery_date": "2020-08-28 23:59:59",
            "description": "Giao vào Thứ sáu, 28/08"
        },
        "address": {
            "full_name": "Ho Tan Hung",
            "street": "C/c 86 Tản Đà, phòng 0711",
            "ward": "Phường 11",
            "ward_tiki_code": "VN039013011",
            "district": "Quận 5",
            "district_tiki_code": "VN039013",
            "region": "Hồ Chí Minh",
            "region_tiki_code": "VN039",
            "country": "Việt Nam",
            "country_id": "VN",
            "email": null,
            "phone": "0908******"
        }
    },
    "payment": {
        "method": "cod",
        "is_prepaid": false,
        "status": "success",
        "description": "Thanh toán tiền mặt khi nhận hàng"
    },
    "delivery": {
        "delivery_confirmed": false,
        "delivery_confirmed_at": null,
        "delivery_confirmed_by_customer": false,
        "delivery_confirmed_by_customer_at": null,
        "delivery_note": null
    },
    "customer": {
        "id": 1921399,
        "full_name": "Tan Hung Ho"
    },
    "installment_info": null,
    "cancel_info": null,
    "rma_info": null,
    "status_histories": [
        {
            "id": 1109657602,
            "status": "processing",
            "created_at": "2020-08-13 22:53:18"
        },
        {
            "id": 1109657630,
            "status": "cho_in",
            "created_at": "2020-08-13 22:53:20"
        },
        {
            "id": 1110718708,
            "status": "cho_in",
            "created_at": "2020-08-14 19:11:03"
        },
        ...
        {
            "id": 1111334909,
            "status": "giao_hang_thanh_cong",
            "created_at": "2020-08-15 11:07:53"
        },
        {
            "id": 1111334910,
            "status": "giao_hang_thanh_cong",
            "created_at": "2020-08-15 09:53:00"
        },
        {
            "id": 1111336387,
            "status": "complete",
            "created_at": "2020-08-15 11:07:53"
        }
    ],
     "seller_warehouse": {
        "id": 3302,
        "name": "Kho tính distance 2",
        "code": "WH000003302",
        "street": "496-496A-496B Nguyễn Thị Minh Khai",
        "region_code": "VN039",
        "region_id": 294,
        "region_name": "Hồ Chí Minh",
        "district_code": "VN039011",
        "district_id": 486,
        "district_name": "Quận 3",
        "ward_code": "VN039011002",
        "ward_id": 10443,
        "ward_name": "Phường 02",
        "country_code": "vn",
        "longitude": 106.68235,
        "latitude": 10.76634
      },
      "store": {
        "id": 1452,
        "name": "Farmers Market - Store 1",
        "url": "farmers-market-store-1-i1452"
      }
}

Order Fulfillment Type

Fulfillment TypeDescription
tiki_deliverySupplied by either Tiki or Seller
Delivered by Tiki
seller_deliverySupplied by Seller
Delivered by Seller
cross_borderSupplied oversea by Seller
dropshipSupplied by Seller
Delivered by Tiki directly to Customer
instant_deliverySupplied by either Tiki or Seller
Delivered instantly online: Ebooks, eVoucher, scratch cards…

Order Invoice

This object contains total value, discounts and fees of customer and seller.

NameTypeExampleDescription
items_countInteger1Number of Order Item V2s
items_quantityInteger1Total quantity of products over all Order Item V2s
subtotalDecimal409000.00Total value of products over all Order Item V2s
grand_totalDecimal0.00Total value of the order the customer needs to pay (counted all customer discounts and customer fees)
collectible_amountDecimal0.00For Cash on Delivery: Total value to collect from the customer when deliver
discount_amountDecimal428000.00Total discount value on the order for the customer
discount_tikixuDecimal428000.00Discount value due to the use of Tiki Xu
discount_promotionDecimal0.00Discount due to promotion at the time of purchasing
discount_percentDecimal0.00Discount due by percent of order value
discount_couponDecimal0.00Discount value due to the use of coupons
discount_otherDecimal0.00Discount value due to other reasons (if any)
gift_card_amountDecimal0.00Discount value due to the use gift cards
gift_card_codeString The gift card code entered by the customer when purchases the order
coupon_codeString The coupon code entered by the customer when purchases the order
shipping_amount_after_discountDecimal19000.00The shipping fee after discount the customer needs to pay
shipping_discount_amountDecimal0.00The discount of the shipping fee
handling_feeDecimal0.00The handling fee for oversized products the customer needs to pay
other_feeDecimal0.00Other customer fee
total_seller_feeDecimal0.00The final fee amount in seller statement
total_seller_incomeDecimal409000.00The final income amount in seller statement
purchased_atTimestamp2020-08-10 18:50:17When the payment is made
tax_infoTax Info Customer tax information

How to compute these numbers?

  • discount_amount is the final discount a customer is benefited on the order:
    • discount_amount = all discount (include discount_tikixu and discount_promotion)
    • discount_promotion = all promotion (include discount_percent, discount_coupon, discount_other,…)
  • subtotal is the total value of all product items:
    • subtotal = ∑ (OrderItemInvoice.quantity * OrderItemInvoice.price)
  • grand_total is final amount a customer has to pay for this order after all discounts and fees:
    • grand_total = subtotaldiscount_amountgift_card_amount + shipping_amount_after_discount + handling_fee + other_fee
    • If computed grand_total is < 0, then it will be set to zero (0)
  • total_seller_income is the final amount the seller will receive after all fees and fee discounts:
    • total_seller_income = ∑ (OrderItemInvoice.seller_income)
    • total_seller_fee = ∑ (OrderItemInvoice.seller_fee)

How to compute discounts?

Formula for computing discounts on the order is complex and changes frequently according to our
business logic. Because discount_amount already counted all kinds of discounts, we can simply use this
field to compute grand_total and total_seller_income.

What do minus (-) and plus (+) mean in invoice?

  • All things related to seller account like total_seller_fee, total_seller_income, seller_fee, seller_income… are treated as statement entry in seller account:
    • 150000 means income, return or revenue
    • -25000 means expense, charge or cost
  • total_seller_fee is later counted in total_seller_income
  • Examples for seller fee:
    • total_seller_fee = -30000: The seller is charged for 30000 due to operation fees
    • total_seller_fee = 50000: The seller receives 50000 due to operation fees
    • total_seller_income = 150000: The final amount seller will receive from Tiki is 150000
    • total_seller_income = -50000: The final amount seller is … charged on the order is 50000

But how can the seller fee be a positive amount?

This is due to the shipping_fee_customer: The shipping fee the seller charges on the customer.

But how can the seller get charged on the order?

This is due to the seller operation fees on the order is bigger than total product value:

  • Seller sets the price too low or
  • Seller violates the SLAs

Tiki Warehouse Info

The Tiki warehouse that fulfills the order. This Tiki warehouse information
together with appropriate seller inventories must be used to confirm the order.

NameTypeExampleDescription
idInteger17Warehouse unique id
nameStringHa Noi 4Warehouse friendly name
codeStringhn4Warehouse unique code

Shipping Info

NameTypeExampleDescription
partner_idString2Selected shipping partner unique Id
partner_nameStringGHNSelected shipping partner name
tracking_codeString31416789187639Tracking number for the shipment
statusStringDeliveredShipping status
planShipping Plan Shipping plan details
addressShipping Address Shipping address details

Shipping Plan

NameTypeExampleDescription
idInteger1The plan unique Id
nameStringGiao hàng tiêu chuẩnThe plan name
is_free_shippingBooleanfalseIs the shipping free
promised_delivery_dateTimestamp2020-08-24 23:59:59The delivery deadline
descriptionStringGiao vào Thứ hai, 24/08A short Vietnamese description about the delivery deadline

Shipping plan description

Shipping Plan IdShipping Plan Name
1Standard plan
3Tiki Now plan
6Scheduled plan

Shipping Address

The details shipping address. The shipping address has 2 private information `email` and `phone`, these fields are only available
in orders with fulfillment_type of seller_delivery or cross_border.

NameTypeExampleDescription
full_nameStringNGUYỄN THỊ ZRecipient full name
streetString13 Nguyen Duc CanhAddress details
wardStringĐình XuyênWard name
ward_tiki_codeStringVN034005007Unique ward code
districtStringGia LâmDistrict name
district_tiki_codeStringVN034005Unique district code
regionStringHà NộiRegion or city name
region_tiki_codeStringVN034Unique region or city code
countryStringViệt NamCountry name
country_idStringVNUnique country code
emailStringexample@mail.comRecipient email
phoneString0123111111Recipient phone number

Payment Info

NameTypeExampleDescription
methodStringcodPayment method
Values: cod, checkmo, momo, pay123, cybersource
is_prepaidBooleanfalseThe order is prepaid
statusStringsuccessStatus of the payment
descriptionStringThanh toán tiền mặt khi nhận hàngDescription of the payment method

Delivery Confirmation

NameTypeExampleDescription
delivery_confirmedBooleantrueDelivery has been confirmed by Tiki, shipping partner or seller
delivery_confirmed_atTimestamp2020-08-10 15:37:32When delivery has been confirmed
delivery_confirmed_by_customerBooleanfalseDelivery has been confirmed by customer
delivery_confirmed_by_customer_atTimestamp When the delivery has been confirmed by customer
delivery_noteStringOrder TKB.RRSIIRQ3 BookingID 4283 has been deliveredDelivery note

Customer Info

NameTypeExampleDescription
idInteger969444Customer Id
full_nameStringTrương Bình TCustomer full name

Installment Info

Installment Info Sample

{
  "installment_fee": 0,
  "month": 6,
  "monthly_pay": 811667
}
NameTypeExampleDescription
installment_feeDecimal240000.00Installment fee of the order
monthInteger12Installment payment term in number of months
monthly_payDecimal390833.00The monthly pay during the payment term

Cancel Info

Below is a cancel info sample.

{
  "reason_code": "202",
  "reason_text": "Đặt trùng:dat trung",
  "comment": null,
  "created_at": "2020-08-24 16:52:37"
}
NameTypeExampleDescription
reason_codeString2034Unique cancel reason code.
reason_textStringThời gian giao hàng quá lâu/sớmCancel reason short description. This may include customer’s explanation.
commentString Cancel reason details description
canceled_atTimestamp2020-06-16 23:59:43When the order is canceled

You can see a list of all reason codes here.


RMA Info

RMA Info Sample

{
  "id": 651612,
  "warehouse_id": 20,
  "original_order_code": "335173848",
  "exchanged_order_code": "953499398",
  "status": "Đổi sản phẩm mới",
  "created_at": "2020-08-18"
}

RMA stands for Return Merchandise Authorization – is a part of the process of
returning a product to receive a refund, replacement, or repair during the product’s warranty period.
Both parties can decide how to deal with it, which could be refund, replacement or repair.

NameTypeExampleDescription
idInteger603055Unique Id of the RMA process
warehouse_idInteger16The Tiki warehouse which handles this process
original_order_codeString789783969The original order of which the product is returned or serviced
Code of the other order
exchanged_order_codeString745467462The replacement order for the original order/product
Code of this order
statusStringHoàn thànhStatus of the RMA process
created_atTimestamp2020-06-09When the RMA process is started

Tax Info

Tax Info Sample

{
  "code": "3901******",
  "address": "Lô ****, Ấp Thuận Đông, Xã Lợi Thuận, Huyện Bến Cầu, Tây Ninh  ",
  "company_name": "CÔNG TY TNHH MỘT THÀNH VIÊN ******* VIỆT NAM "
}

Customer tax information

NameTypeExampleDescription
codeString370281****Tax code
addressStringSố 30 Hoàng Hoa Thám...Tax address
company_nameStringCONG TY TNHH ABC MEDIATax company

Status History

NameTypeExampleDescription
idInteger1105187480Unique Id of the history entry
statusStringsuccessful_deliveryOrder status
created_atTimestamp2020-08-10 18:50:17When the order arrives at this status

Seller Warehouse

NameTypeExampleDescription
idInteger1105187480Unique Id of the warehouse
nameStringKho hang tongName of the warehouse
codeStringWH000003302Unique code of the warehouse
streetStringSố 30 Hoàng Hoa Thám...Address details
region_codeStringVN039Unique region code
region_idInteger295Unique region id
region_nameStringHồ Chí MinhRegion name
district_codeStringVN039007Unique district code
district_idInteger200Unique district id
district_nameStringQuận 10District name
ward_codeStringVN039007004Unique ward code
ward_idInteger10443Unique ward tiki
ward_nameStringPhường 4Ward name
longitudeFloat106.68235Longitude of the warehouse
latitudeFloat10.76634Latitude of the warehouse

Store Info

NameTypeExampleDescription
idInteger1105187480Unique Id of the store
nameStringBigC Thủ Dầu MộtName of seller store
urlStringbigc-thu-dau-mot-store-1-i1452Tiki url of the seller store
Was this article helpful to you? Yes No

How can we help?

Leave a Reply

Your email address will not be published.