NAV Navbar
shell
  • OVERVIEW
  • PRODUCT ENPOINTS
  • ORDER ENPOINTS
  • MULTICHANNEL ENDPOINTS
  • SELLER ENPOINTS
  • WEBHOOKS
  • HTTP ERROR CODES
  • OVERVIEW

    Introduction to the Seller Center API

    This document describes in details of the Seller Center API that enables the programmatic maintenance of products and orders.

    Audiences

    This document is intended to technicians and developers who are responsible for system design and solution integration between Tiki and third-party system.

    Requests and Responses

    While most methods are called via GET, some write methods get additional request data sent via POST.

    All methods return a response document, which indicates the status of the operation (either Success or Error) and optionally provides results and/or details related to the specified action. In those cases, additional data is sent to the server using a POST request. The data must be in JSON format and Content Type must be in Application/Json

    Signing Requests

    As far as security measures go, APIs are always content with having an API key as header when an endpoint is called.
    In Tiki seller center, the API key is configured for each seller before integrate with the third party system.
    When calling an API, the API key must be added to API headers as in example below:

    {
        "tiki-api": "eccf4e05-b3b0-4e9f-9044-86c0cbd1f386"
    }
    

    In this example the string "eccf4e05-b3b0-4e9f-9044-86c0cbd1f386" is the API key that configured for the seller, you can find it in seller detail information screen in Tiki seller center as below:

    If lacks API key in API headers when calling an API you might have got an authentication error as below:

    Wrong token: status: 403
    {
        'msg' =>'Permission denied'
    }
    

    OR

    Connection was disabled for temporary by seller : status: 200
    {
        'msg' =>'Kết nối đang tạm ngưng bởi seller',
        'integration_status' => -1
    }
    

    Rate Limiting

    Rates limit how many HTTP requests a developer can make in a given period of seconds or minutes.
    Tiki will send some additional headers back to the client telling how many requests are available and what are the limits allowed, for example:

    X-RateLimit-Limit-Second: 50
    X-RateLimit-Remaining-Second: 30
    
    X-RateLimit-Limit-Minute: 500
    X-RateLimit-Remaining-Minute: 300
    

    If any of the limits configured is being reached, the plugin will return a HTTP/1.1 429 status code to the client with the following JSON body:

    {"message":"API rate limit exceeded"}
    

    API Base URL

    API Base URL is the URL prefix of every API mentioned in this document.

    Sandbox

    The base URL of sanbox environment is: https://api-sandbox-sellercenter.tiki.vn/integration
    This URL used for testing APIs before launching on production environment.

    For example the method of API Search Products mentioned in this document is GET/products.
    When calling this API in sanbox environment, the full URL must be GEThttps://api-sandbox-sellercenter.tiki.vn/integration/products

    Production

    The base URL of product environment is: https://api-sellercenter.tiki.vn/integration
    This URL used for operating real transactions.

    PRODUCT ENPOINTS

    Overview

    Product Structure

    For example:

    API List

    API name Method Link Description
    Search Products GET /products Returns a list of products, base on a specific search query by product name and an optional product category.
    Search By MinCode GET /min_code Returns a list of products, base on min_code input to search product.
    Get Product Details GET /products/{product_id} Returns a list of product attributes and it's sub products (if exist), base on Product ID
    Get Seller Products GET /products/{product_id}/seller_products Returns a list of SKUs of a product, base on Product ID
    Get Categories GET /categories Returns a list of product categories, base on Parent Category ID
    Get Attributes by Category ID GET /categories/{category_id}/attributes Returns a list of attributes including their option values of a product category, base on Category ID
    Create Product POST /product Creates a new product. The created product may be a simple product or a configurable product (see Product Structure above for more details).
    Link To Existing Product POST /link Link an exited product with unique SKU number within third-party system to an existed seller SKU within Tiki seller center.
    Update Price/Quantity PUT /skus/pricequantity Update price and quantity for a list of SKUs.
    System supports maximum 5 SKUs in a request.
    Update Product Status PUT /skus/status Update status (Active / Inactive) for an existing seller SKU.
    Get Requests GET /requests Returns a list of requests for creating new products.
    Get Request by ID GET /requests/{request_id} Returns information of a product request base on request ID.

    Search Products

    Sample:

    URL: "https://api-sandbox-sellercenter.tiki.vn/integration/products?name=iphone7"
    

    Response:

     {
        "data": [
            {
                "id": 293478,
                "status": 1,
                "name": "Ốp Lưng iPhone 7 Tuxedo Elektro Mạ Viền",
                "thumbnail": "/2/9/2901957563847_1.u2470.d20161129.t095153.162360.jpg",
                "sku": "2904056754475",
                "type": "configurable"
            },
            {
                "id": 269569,
                "status": 1,
                "name": "iPhone 7 256GB - Chính hãng FPT",
                "thumbnail": "/i/p/iphone 7 256gb silver-1.u504.d20160919.t180539.920454.jpg",
                "sku": "5800673559462",
                "type": "configurable"
            }
        ],
        "total": 10
    }
    

    Returns a list of products, base on a search query that you specify. The search querry contains a string for product name and may be a specific product category ID. The search returns the products at highest level of Product Structure (simple products, configurable products) and not include inactive products.

    Method: GET /products

    Parameters

    Parameter Type Required Description
    name String Yes A search string for product name.
    Example: name=harry porter
    category Integer Identifier of the product category at highest level in Tiki category structure within that the search will be performed. If this parameter is not set it will search in all categories. The ID of a category can be retrieved by calling Get Categories with no parameter needed.
    page Integer Page no of paging, default is 1
    limit Integer Nuber of records per page, default is 20

    Responses

    The search result returns a list of products that contain the following elements:

    Key Type Description
    id Integer Identifier of the product in Tiki system.
    status Integer Product status (active/inactive).
    name String Product name.
    type  String There are two types of product:
    - Simple Product: the product that does not contain sub products.
    - Configurable Product: the product that contains sub products.
    See Product Structure for more details.
    thumbnail String The URL of the thumbnail image.

    Search By MinCode

    Sample:

    URL https://api-sandbox-sellercenter.tiki.vn/integration/min_code?min_code=1005189692212,1000060961449
    

    Response:

     {
       "data": [
         {
           "id": 904049,
           "name": "[Single helmet version] HTC VIVE Pro Professional Edition Smart VR glasses PCVR 3D helmet",
           "sku": "1000060961449",
           "min_code": "1000060961449",
           "status": "enabled",
           "visibility": "invisible",
           "type": "simple",
           "master_id": 904047,
           "price": 257115,
           "thumbnail": "https:\/\/uat.tikicdn.com\/cache\/280x280\/ts\/product\/9b\/bd\/aa\/10bdcf91a90efc2b1708be78e4ee5152.jpg"
         },
         {
           "id": 1453208,
           "name": "[CH\u00c0O 2019] \u0110i\u1ec7n Tho\u1ea1i OPPO F9 X\u00c1CH TAY CAO C\u1ea4P ( T\u1eb6NG K\u00c8M \u1ed0P L\u01afNG + K\u00cdNH C\u01af\u1edcNG L\u1ef0C) \u0110\u1eb2NG C\u1ea4P NH\u1ea4T",
           "sku": "1005189692212",
           "min_code": "1005189692212",
           "status": "disabled",
           "visibility": "invisible",
           "type": "simple",
           "master_id": 1453207,
           "price": 3027000,
           "thumbnail": "https:\/\/uat.tikicdn.com\/cache\/280x280\/ts\/product\/7d\/2c\/61\/d3f3d8722be7909e3e29384d1868a747.jpg"
         }
       ],
       "total": 2
     }
    

    Returns a list of products base on min_code. The search returns the products at highest level of Product Structure (simple products, configurable products) and not include inactive products.

    Method: GET /min_code

    Parameters

    Parameter Type Required Description
    min_code String Yes Values of min_code search.

    Responses

    The search result returns a list of products that contain the following elements:

    Key Type Description
    id Integer Identifier of the product in Tiki system.
    name String Product name.
    type  String There are two types of product:
    - Simple Product: the product that does not contain sub products.
    - Configurable Product: the product that contains sub products.
    See Product Structure for more details.
    thumbnail String The URL of the thumbnail image.
    sku String Tiki sku.
    min_code String MinCode of product.
    price Integer Price product.
    status String Status product. Values: disabled, enabled.
    visibility String Product is invisible or visible.
    master_id Integer Product master id. (Need in creating new seller product by existed product)

    Get Product Details

    Sample:

    URL: "https://api-sandbox-sellercenter.tiki.vn/integration/products/293478"
    

    Response:

    {
        "id": 293478,
        "sku": "2904056754475",
        "type": "configurable",
        "images": [
            {
                "id": 13635694,
                "path": "/2/9/2905636543106_1.u2470.d20161129.t094759.692747.jpg",
                "url": "http://uat.cdn.tiki.services/media/catalog/product/2/9/2905636543106_1.u2470.d20161129.t094759.692747.jpg",
                "position": 1,
                "is_gallery": 0,
                "is_default": null,
                "is_disabled": 0,
                "is_new": false,
                "is_info": true
            },
            {
                "id": 13635695,
                "path": "/2/9/2901957563847_1.u2470.d20161129.t094745.253306.jpg",
                "url": "http://uat.cdn.tiki.services/media/catalog/product/2/9/2901957563847_1.u2470.d20161129.t094745.253306.jpg",
                "position": 2,
                "is_gallery": 0,
                "is_default": null,
                "is_disabled": 0,
                "is_new": false,
                "is_info": false
            },
            {
                "id": 13635696,
                "path": "/2/9/2904470881825_1.u2470.d20161129.t094752.502638.jpg",
                "url": "http://uat.cdn.tiki.services/media/catalog/product/2/9/2904470881825_1.u2470.d20161129.t094752.502638.jpg",
                "position": 3,
                "is_gallery": 0,
                "is_default": null,
                "is_disabled": 0,
                "is_new": false,
                "is_info": false
            },
            {
                "id": 13635697,
                "path": "/2/9/2905636543106_4.u2470.d20161129.t094900.690227.jpg",
                "url": "http://uat.cdn.tiki.services/media/catalog/product/2/9/2905636543106_4.u2470.d20161129.t094900.690227.jpg",
                "position": 6,
                "is_gallery": 0,
                "is_default": null,
                "is_disabled": 0,
                "is_new": false,
                "is_info": false
            }
        ],
        "attributes": {
            "name": "Ốp Lưng iPhone 7 Tuxedo Elektro Mạ Viền  ",
            "price": "100000.00"
        },
        "children": [
            {
                "id": 559963,
                "sku": "2901214312782",
                "type": "simple",
                "price": 100000,
                "attributes": {
                    "name": "Ốp Lưng iPhone 7 Tuxedo Elektro Mạ Viền Màu Đen",
                    "price": "100000.00"
                }
            },
            {
                "id": 559964,
                "sku": "2900957468701",
                "type": "simple",
                "price": 100000,
                "attributes": {
                    "name": "Ốp Lưng iPhone 7 Tuxedo Elektro Mạ Viền Màu Xám",
                    "price": "100000.00"
                }
            },
            {
                "id": 559965,
                "sku": "2903276425189",
                "type": "simple",
                "price": 100000,
                "attributes": {
                    "name": "Ốp Lưng iPhone 7 Tuxedo Elektro Mạ Viền Màu Vàng",
                    "price": "100000.00"
                }
            }
        ],
        "configurable_attributes": [
            "color"
        ]
    }
    

    Returns detail information of a product including a list of product attributes, images and sub products (in case the product to get details is a configurable products), base on Product ID

    Method: GET /products/{product_id}

    Parameters

    Parameter Type Required Description
    product_id Integer Yes Identifier of the product which you want to get detail info. To get the ID of a product you can use method Search Products.

    Responses

    Key Type Description
    Id integer Identifier of the product
    type String There are two types of product:
    - Simple Product: the product that does not contain sub products.
    - Configurable Product: the product that contains sub products.
    See Product Structure for more details.
    images Array  URLs of product images 
    attributes Array  Product attributes and their values  
    children Array  Sub products (in case the product you get details is a configurable product) 
    Configurable_attributes Array  The configurable attributes that used to define different sub products within a configurable product.
    Example: iPhone 7 32GB is a configurable product. It has a configurable attribute is color. Set variant values for this attribute we get 3 sub products below:
    - iPhone 7 32GB Black
    - iPhone 7 32GB Silver
    - iPhone 7 32GB Gold

    Get Seller Products

    Sample:

    URL: "https://api-sandbox-sellercenter.tiki.vn/integration/seller/products/662251"
    

    Result:

    {
        "data": [
            {
                "id": 662253,
                "productset_id": 27,
                "master_id": 662251,
                "name": "Test-Combo Tinh Dầu Xông CaRoLine 3 Chai 10ml - Hộp Xanh_66297_KB",
                "sku": "1534099438981",
                "status": "enabled",
                "price": 148000,
                "thumbnail": "https://uat.tikicdn.com/ts/product/b8/28/c0/0224b75b5ed7524dc97e698097b5de2d.jpg",
                "seller": {
                    "id": 747,
                    "name": "CUNGMUA",
                    "slug": "cungmua",
                    "logo": "http://uat.cdn.tiki.services/ts/seller/e9/4f/ef/7fba663975fb1874d74693c2c982f1ef.png",
                    "store_id": 205,
                    "listdata_id": 220958
                },
                "inventory": {
                    "inventory_type": "backorder",
                    "quantity": 6,
                    "qty": 0,
                    "qty_available": 0
                },
                "attributes": {
                    "name": "Smart Tivi Samsung 48 inch UA48H5203",
                    "meta_title": "Smart Tivi LED Samsung 48 inch UA48H5203 - seller_id: 659"
                }
            }
        ],
        "paging": {
            "total": 1,
            "current_page": 1,
            "from": 0,
            "to": 20,
            "per_page": 20,
            "last_page": 1
        }
    }
    

    Returns a list of SKUs of a product that the seller has in Tiki system base on Product ID. If the product ID is not set, it will return all SKUs of the seller.

    Method: GET /seller/products/{product_id}

    Parameters

    Parameter Type Required Description
    product_id Integer Identifier of the product you want to get its SKU. If this parameter is not set, it will return all SKUs of the seller.
    product_code String Code of the seller SKU you want to get.
    category_id Integer Identifier of the product category you want to search SKUs within it. The ID of a category can be retrieved by calling Get Categories with no parameter needed.
    page Integer Page no of paging, default is 1
    limit Integer Number of records per page, default is 20
    include String No attribute -> Include product attribute in list

    Responses

    This method return a list of seller SKUs includes the following elements:

    Key Type Description
    Id integer Indentifier of the seller SKU within Tiki Seller Center
    seller_product_code String Code of the seller SKU within Tiki Seller Center.
    name String Seller SKU name
    seller Array  Infomation of the seller from that the API is called.
    master_id Integer Identifier of the product that contains the seller SKU. It may be ID of a simple product or ID of a sub product within a configurable products (See Product Struture for more details).
    price integer sales price of the seller SKU
    thumbnail string URL of the SKU's thumbnail image
    inventory.type String Inventory type of the product that seller will do business with Tiki, that accept the following option values:
    - backorder: product kept at seller stock, just transferred to Tiki stock after sales order placed by customer
    - instock: product consigned at Tiki stock, order fulfilled by Tiki
    - virtual: e-voucher products
    inventory.quantity integer maximum quantity of a backorder item that allow to sales up to
    inventory.qty integer current inventory level of the item in Tiki stock for sales, applied for instock item only
    inventory.qty_available integer available quantity for sales (= inventory.qty - quantity in processing orders), applied for instock item only

    Get Categories

    Sample:

    URL: "https://api-sandbox-sellercenter.tiki.vn/integration/categories?parent_id=3"
    

    Response:

    [
     {
        id:1883,
        name:"Nhà Cửa - Đời Sống",
        status:"active"
      },
      {
        id:1884,
        name:"Thiết Bị Số - Phụ Kiện Số test01",
        status:"active"
      }
    ]
    

    Returns a list of product categories, base on Parent Category ID. It will not return the inactive categories. Method: GET /categories

    Parameters

    Parameter Type Required Description
    parent_id Integer ID of the category which you want to get list of the sub categories within it. If this parameter is not set, it will return list of categories at highest level in Tiki category structure.

    Responses

    The API returns a list of product categories includes the following elements:

    Key Type Description
    id integer Identifier of the product category within Tiki seller center
    name String Category name
    status String Category status (active, inactive)
    is_primary boolean True: the category that you can create a product directly within it.
    False: the category that you cannot create a product directly within it.

    Example: The category Phones - Tablets is not a primary category (is_primary = False) so you cannot create a product directly within it, but you can create a product directly in Smartphones - a sub category of Phones - Tablets with is_primary = True

    Get Attributes by Category ID

    Sample:

    URL: "https://api-sandbox-sellercenter.tiki.vn/integration/categories/{category_id}/attributes"
    

    Response:

    [
        {
            "id": 56,
            "code": "name",
            "display_name": "Tên sản phẩm",
            "description": null,
            "default_value": "",
            "is_required": true,
            "is_basic": true,
            "is_configurable": true,
            "values": []
        },
        {
            "id": 757,
            "code": "support_p24h",
            "display_name": "Giao hàng nhanh 24h",
            "description": "",
            "default_value": "0",
            "is_required": false,
            "is_basic": true,
            "is_configurable": false,
            "values": []
        }
    ]
    

    Returns a list of attributes of a product category, also includes the option values of the attributes with input type is list of items or drop-down list, base on Category ID.
    The returned list is not empty only when the given category ID is a primary category (is_primary = True), see Get Categories for more details.

    Method: GET /categories/{category_id}/attributes

    Parameters

    Parameter Type Required Description
    category_id Integer Yes Identifier of the category within Tiki seller center that contains the attributes you want to get. It should be a primary category (category with is_primary = True), if not the returned list will be empty.

    You can get ID of the categories at highest level in Tiki category structure by calling Get Categories with no parameter is set. To get ID of the categories at lower level, calling Get Categories with parameter is the Category ID you retrieved at upper level.

    Responses

    Key Type Description
    category_id Integer Identifier of the category within Tiki Seller Center
    attributes Array List of attributes of the given category ID

    The attributes is a list of attributes that contains the following elements:

    Key Type Description
    code String Attribute code, also the unique key of the attribute within Tiki system
    display_name String Attribute name
    description String Detail description of the attribute
    default_value String Default value of the attribute 
    is_required Boolean True: must fill value for this attribute when creating product.
    False: can ignore filling value for this attribute when creating product 
    values Array List of option values in case the attribute has input type is List of items or Drop-down list

    Create Product

    Sample data for create a simple product:

     {
      "category_id": 1846,
      "attributes": {
        "name": "Laptop Dell Vostro 17 XPPP",
        "product_imei": "",
        "product_serial": "",
        "support_p24h": "0",
        "bulky": "0",
        "disallow_transport_plane": "0",
        "support_cod": "1",
        "is_hot": "0",
        "visibility": "4",
        "unit": "28014",
        "po_type": "48697",
        "news_from_date": "",
        "is_free_gift": "31828",
        "use_new_layout": "0",
        "requested_tax": "45968",
        "news_to_date": "",
        "preorder_date": "",
        "preorder": "0",
        "preorderdescript": "",
        "is_imported": "",
        "promotion": "",
        "giftwrap": "1",
        "rma_status": "45908",
        "product_length": "",
        "product_width": "",
        "product_height": "",
        "product_weight_kg": "",
        "product_volume_metric": "",
        "delivery_attributes": [],
        "require_expiry_date": "0",
        "cpu": "",
        "cpu_speed": "",
        "chip_set": "",
        "system_requirements": "",
        "screen_size": "",
        "resolution": "",
        "display_color": "",
        "display_type": "",
        "bo_nho_do_hoa": "",
        "thiet_ke_card": "",
        "dung_luong_dientu": "",
        "loai_o_dia": "",
        "ram": "",
        "loai_ram": "",
        "bus": "",
        "camera": "",
        "audio_technology": "",
        "o_dia_quang": "",
        "cong_ket_noi": "",
        "card_reader": "",
        "network_internet": "",
        "wifi": "",
        "bluetooth": "",
        "ket_noi_khong_day_khac": "",
        "loai_pin": "",
        "charge_time": "",
        "battery_life": "",
        "product_top_features": "",
        "dropship": "0",
        "item_model_number": "",
        "brand": "18805",
        "supplier": "45779",
        "manufacturer_electronics": "",
        "description": "test omni channel",
        "short_description": "",
        "video": "",
        "weight": "1888",
        "product_weight": "",
        "dimensions": "",
        "color": null,
        "giao_tiep_mang": "",
        "included_accessories": "",
        "hinh_thuc_bao_hanh": "",
        "warranty_lifetime": "",
        "warranty_and_service": "",
        "express_vietnamese": "",
        "price": 12222222,
        "special_price": "",
        "special_from_date": "",
        "special_to_date": "",
        "meta_title": "1",
        "meta_keyword": "",
        "meta_description": "1",
        "filter_laptop_price": "",
        "filter_laptop_product_kind": "",
        "filter_laptop_brand": "",
        "filter_laptop_series": "",
        "filter_laptop_cpu": "",
        "filter_laptop_memory": "",
        "filter_laptop_hard_disk_type": [],
        "filter_laptop_storage": [],
        "filter_laptop_card": [],
        "filter_laptop_screen_size": "",
        "filter_laptop_touch": "",
        "filter_laptop_system": "",
        "tag_status": "0",
        "tag_coupon_code": "",
        "tag_discount": "",
        "tag_discount_option": "",
        "tag_display_option": "",
        "tag_begin_date": "",
        "tag_end_date": "",
        "tag_is_app_only": "0"
      },
      "image": "http://uat.cdn.tiki.services/ts/tmp/db/a1/b1/adb0ff1a949526cc688b06cd97313630.jpeg",
      "images": [
        "http://uat.cdn.tiki.services/ts/tmp/db/a1/b1/adb0ff1a949526cc688b06cd97313630.jpeg"
      ],
      "skus": [
        {
          "sku": "abc1",
          "price": 20000,
          "quantity": 20
        }
      ]
    }
    

    Sample data for create a configurable product (multi-SKU product):

    {
      "category_id": 1846,
      "attributes": {
        "name": "Apple Macbook Air 13.3 MMGG2 - Hàng Chính Hãng",
        "product_imei": "",
        "product_serial": "",
        "support_p24h": "0",
        "bulky": "0",
        "disallow_transport_plane": "0",
        "support_cod": "1",
        "is_hot": "0",
        "visibility": "3",
        "unit": "28014",
        "po_type": "111134",
        "news_from_date": "",
        "is_free_gift": "31828",
        "use_new_layout": "0",
        "requested_tax": "45968",
        "news_to_date": "",
        "preorder_date": "",
        "preorder": "0",
        "preorderdescript": "",
        "is_imported": "",
        "promotion": "",
        "giftwrap": "1",
        "rma_status": "45908",
        "product_length": "",
        "product_width": "",
        "product_height": "",
        "product_weight_kg": "",
        "product_volume_metric": "",
        "delivery_attributes": [],
        "require_expiry_date": "0",
        "cpu": "",
        "cpu_speed": "",
        "chip_set": "",
        "system_requirements": "",
        "screen_size": "",
        "resolution": "",
        "display_color": "",
        "display_type": "",
        "bo_nho_do_hoa": "",
        "thiet_ke_card": "",
        "dung_luong_dientu": "",
        "loai_o_dia": "",
        "ram": "",
        "loai_ram": "",
        "bus": "",
        "camera": "",
        "audio_technology": "",
        "o_dia_quang": "",
        "cong_ket_noi": "",
        "card_reader": "",
        "network_internet": "",
        "wifi": "",
        "bluetooth": "",
        "ket_noi_khong_day_khac": "",
        "loai_pin": "",
        "charge_time": "",
        "battery_life": "",
        "product_top_features": "",
        "dropship": "0",
        "item_model_number": "",
        "brand": "74988",
        "supplier": "34354",
        "manufacturer_electronics": "",
        "description": "abc",
        "short_description": "",
        "video": "",
        "weight": "10000",
        "product_weight": "",
        "dimensions": "",
        "color": null,
        "giao_tiep_mang": "",
        "included_accessories": "",
        "hinh_thuc_bao_hanh": "",
        "warranty_lifetime": "",
        "warranty_and_service": "",
        "express_vietnamese": "",
        "price": 10000000,
        "special_price": "",
        "special_from_date": "",
        "special_to_date": "",
        "meta_title": "1",
        "meta_keyword": "",
        "meta_description": "1",
        "filter_laptop_price": "",
        "filter_laptop_product_kind": "",
        "filter_laptop_brand": "",
        "filter_laptop_series": "",
        "filter_laptop_cpu": "",
        "filter_laptop_memory": "",
        "filter_laptop_hard_disk_type": [],
        "filter_laptop_storage": [],
        "filter_laptop_card": [],
        "filter_laptop_screen_size": "",
        "filter_laptop_touch": "",
        "filter_laptop_system": "",
        "tag_status": "0",
        "tag_coupon_code": "",
        "tag_discount": "",
        "tag_discount_option": "",
        "tag_display_option": "",
        "tag_begin_date": "",
        "tag_end_date": "",
        "tag_is_app_only": "0"
      },
      "image": "http://uat.cdn.tiki.services/ts/tmp/15/8e/a9/9bfcb7627ed264582862d887831a649f.jpeg",
      "images": [
        "http://uat.cdn.tiki.services/ts/tmp/15/8e/a9/9bfcb7627ed264582862d887831a649f.jpeg",
        "http://uat.cdn.tiki.services/ts/tmp/15/8e/a9/9bfcb7627ed264582862d887831a649f.jpeg"
      ],
      "option_attributes": [
        "color"
      ],
      "skus": [
        {
          "sku": "abc1",
          "price": 10000000,
          "quantity": 20,
          "attributes": {
            "name": "Apple Macbook Air 13.3 MMGG2 - Hàng Chính Hãng",
            "color": "11735",
            "price": 10000000
          },
          "image": "http://uat.cdn.tiki.services/ts/tmp/15/8e/a9/9bfcb7627ed264582862d887831a649f.jpeg",
          "images": [
            "http://uat.cdn.tiki.services/ts/tmp/15/8e/a9/9bfcb7627ed264582862d887831a649f.jpeg",
            "http://uat.cdn.tiki.services/ts/tmp/15/8e/a9/9bfcb7627ed264582862d887831a649f.jpeg"
          ]
        },
        {
          "sku": "abc2",
          "price": 10000000,
          "quantity": 20,
          "attributes": {
            "name": "Apple Macbook Air 13.3 MMGG2 - Hàng Chính Hãng",
            "color": "11736",
            "price": 10000000
          },
          "image": "http://uat.cdn.tiki.services/ts/tmp/15/8e/a9/9bfcb7627ed264582862d887831a649f.jpeg",
          "images": [
            "http://uat.cdn.tiki.services/ts/tmp/15/8e/a9/9bfcb7627ed264582862d887831a649f.jpeg",
            "http://uat.cdn.tiki.services/ts/tmp/15/8e/a9/9bfcb7627ed264582862d887831a649f.jpeg"
          ]
        }
      ]
    }
    

    Sample data for add a new sub product into an existed configurable product:

    {
      "product_id": 606249,
      "skus": [
        {
          "sku": "abc4",
          "price": 10000000,
          "quantity": 20,
          "inventory_type": "backorder",
          "pickup_method": "manual",
          "attributes": {
            "name": "Apple Macbook Air 13.3 MMGG2 - Hàng Chính Hãng",
            "color": "11735",
            "price": 10000000
          },
          "image": "http://uat.cdn.tiki.services/ts/tmp/15/8e/a9/9bfcb7627ed264582862d887831a649f.jpeg",
          "images": [
            "http://uat.cdn.tiki.services/ts/tmp/15/8e/a9/9bfcb7627ed264582862d887831a649f.jpeg",
            "http://uat.cdn.tiki.services/ts/tmp/15/8e/a9/9bfcb7627ed264582862d887831a649f.jpeg"
          ]
        }
      ]
    }
    

    Sample data for create a seller SKU for an existed product (a simple product or a sub product of a configurable product):

    {
      "associated_product_id": 606071,
      "skus": [
        {
          "sku": "SELLERSKU01",
          "price": 500000,
          "quantity": 20,
          "inventory_type": "backorder",
          "pickup_method": "manual",
          "supplier": 114228
        }
      ]
    }
    

    Create a new product, the created product may be a simple product or a configurable product includes its sub products (see Product Structure for more details). You also can create seller SKUs for an existed product by using this API.

    Method: POST /product

    Parameters

    Parameter Type Required Description
    product_id Integer Identifier of a product within Tiki system, this parameter is set when you create sub products for an existed configurable product.
    category_id Integer Yes ID of the category you want to create product in that. It must be a primary category (is_primary=True, see Get Categories for more details)
    image String Yes URL of the thumbnail image
    images Array URLs of the product images
    attributes Array The common attributes of the products, must fill value for all the required attributes at least.
    option_attributes Array Attributes that use to create variant sub products within a configurable product.
    For Example: color usually used as option attribute of a smartphone product, size (S, M, L, XL) usually used as option attribute of a shirt, skirt.
    associated_product_id Integer Identifier of the product that you want to create seller SKU for it. It must be a simple product or a sub product of a configurable product.
    skus Array Yes List of seller SKUs you want to create for a product with ID = associated_product_id above.

    One SKU in list of skus above contains the following elements:

    Parameter Type Required Description
    sku String Yes Identifier of the SKU within third-party system, that will be added into Tiki seller center as third_party_sku.
    price Integer Yes Sales price of the product.
    quantity Integer Yes The current available quantity for sell of this SKU.
    image String Yes URL of thumbnail image
    images Array Yes URLs of product images
    attributes Array Yes Specific attributes of the seller SKU (SKU name, optional attributes)
    inventory_type String Yes Inventory type of the product that seller will do business with Tiki, that accept the following option values:
    - backorder: product kept at seller stock, just transferred to Tiki stock after sales order placed by customer
    - instock: product consigned at Tiki stock, order fulfilled by Tiki
    - virtual: e-voucher products
    - seller_backorder: product kept at seller stock, order fulfilled by Seller
    supplier String ID of Tiki warehouse where backorder products from seller will transfer to. This parameter required in case inventory_type = backorder and accepts the following option values
    - 114226: HN (Ha Noi)
    - 114227: SGN (Sai Gon)
    - 114228: SGN, HN
    pickup_method String # If inventory_type = backorder: shipping method required for backorder products from seller to tiki warehouse, option values:
    - manual: Tiki pickup at seller site
    - supplier: seller ship to tiki warehouse.
    ---
    # If inventory_type = seller_backorder: shipping method required for seller_backorder products from seller to customer, option values:
    - manual: Customer pickup at seller site
    - supplier: seller ship to customer.

    Responses

    Key Type Description
    request_id String Request ID responded by Tiki Seller Center after executing successfully the request of creating product  
    state string The approval status of request 

    Returned Code

    HTTP Code Description
    200 Success
    400 Wrong format

    Sample Data:

    {
      "product_id": 603859,
      "sku": "bz3"
    }
    

    Response:

    {
      "request_id": "ac25e5db-632f-40de-8bc8-ced35ddbb365",
      "state": "approved"
    }
    

    Link an exited product with unique SKU number within third-party system to an existed seller SKU within Tiki seller center.
    After calling this method, the SKU number of the product at third-party system will be add into seller SKU in Tiki seller center as third_party_sku. From then all transactions related to this product will be synchronized between Tiki seller center and third-party system, such as the order transactions will be transferred from Tiki seller center to third-pary system and the update of price, inventory level will be transferred from third-party system to Tiki seller center.

    Method: POST /link

    Parameters

    Parameter Type Required Description
    product_id Integer Required Identifier of the seller SKU within Seller Center Tiki.
    sku String Required Identifier of the product within third-party system.

    Update Price/Quantity

    Sample Data in case update by third-party sku that linked into Seller Center

    {
     "skus" :[
          {
              "sku": "1001",
              "price": 100000,
              "quantity": 100,
              "status": 1
          },
         {
              "sku": "1002",
              "price": 100000,
              "quantity": 100,
              "status": 1
          }
    ]
    }
    

    Sample Data in case update by product code within Seller Center

    {
     "skus" :[
          {
              "product_code": "S3001",
              "price": 100000,
              "quantity": null,
              "status": null
          },
         {
              "product_code": "S3002",
              "price": 100000,
              "quantity": null,
              "status": null
          }
    ]
    }
    

    The fields with null value in json data will be ignored in the update processing.

    Update sales price and inventory level for one or more SKUs in Tiki seller center.
    System supports maximum of 5 SKUs in one request.

    Method: PUT /skus/pricequantity

    Parameters

    Parameter Type Required Description
    skus Array Yes List of SKUs will be updated sales price and inventory level.

    Each SKU in skus array contains following elements.

    Parameter Type Required Description
    sku String Yes Identifier of the product within third-party system, it also stored as third_party_sku in the corresponding SKU within Tiki seller center (see Link To Existing Product for more details).
    price Integer Yes Sales price will be applied for the SKU
    quantity Integer Yes Current inventory level that will be updated for the SKU.
    status Integer Yes The status will be updated for the SKU
    1: Active
    2: Inactive
    Parameter Type Required Description
    product_code String Yes The seller product code within Seller Center
    price Integer Yes Sales price will be applied for the SKU
    quantity Integer Yes Current inventory level that will be updated for the SKU.
    status Integer Yes The status will be updated for the SKU
    1: Active
    2: Inactive

    In case you just want to update some of the fields (price, quantity, status), should set null for other fields in json, see the example for more details.

    Returned Code

    HTTP Code Description
    200 Success
    400 Missing skus informations
    {
    'success': false,
    'msg' : Vui lòng truyền thông tin sku
    }
    400 Exceed the request limit (The maximum number of products in request body is 5)
    {
    'success': false,
    'msg' : Số lương sku không vượt quá 5
    }

    Update Product Status

    Sample Data:

    {
        "status": 1,
        "sku": '332932'
    }
    

    Update status (Active / Inactive) for an existing seller SKU.
    Method: PUT /skus/status

    Parameters

    Parameter Type Required Description
    sku string Yes Identifier of the product within third-party system that also also stored as third_party_sku in the corresponding SKU within Tiki seller center
    status string Yes The status will be updated for the SKU
    1: Active
    2: Inactive

    Get Requests

    Sample:

    URL: "https://api-sandbox-sellercenter.tiki.vn/integration/request"
    

    Result:

    {
       "data": [
           {
               "request_id": "6ce4cbc7-5d86-4880-8f2a-24e771e35403",
               "state": "approved",
               "approval_reasons": ""
           },
           {
               "request_id": "f207a56e-7cd0-44ac-ac5d-b0f5914ad3b4",
               "state": "awaiting_approve",
               "approval_reasons": ""
           }
       ],
       "paging": {
           "total": 1,
           "current_page": 1,
           "from": 0,
           "to": 20,
           "per_page": 20,
           "last_page": 2
       }
    }
    

    Returns a list of requests for creating new products.

    Method: GET /requests

    Parameters

    Parameter Type Required Description
    state string The approval state of the request for creating new product that may be one of these values: awaiting_approval, approved, rejected.
    If this parameter is ignored, it will return all product requests of the seller.

    Get Request by ID

    Sample:

    URL: "https://api-sandbox-sellercenter.tiki.vn/integration/request?request_id=6ce4cbc7-5d86-4880-8f2a-24e771e35403"
    

    Result:

    {
         "request_id": "6ce4cbc7-5d86-4880-8f2a-24e771e35403",
         "state": "approved",
         "approval_reasons": ""
    }
    

    Returns information of a product request base on request ID.

    Method: GET /requests/{request_id}

    Parameters

    Parameter Type Required Description
    request_id string Identifier of the product request. You can get request_id of the product requests by calling method Get Requests.

    ORDER ENPOINTS

    API List

    API name Method Link Description
    Get Orders GET /orders Returns a list of sales orders managed by signing in seller, base on a specific search query.
    Get Order Details GET orders/{order_code} Returns detail information including product items of a sales order, base on order code.
    Filter Orders GET /list-orders Returns a list of order detail items, base on a specific search query.
    Get PO List GET /po Returns a list of inventory requisitions for backorder items, base on a specific query.
    Get PO Details GET /po/{po_id} Returns detail infomation of a specific inventory requisition, base on Requisition ID.
    Get PO Confirmation Info GET /po/{po_id}/confirm
    Confirm PO PUT /po/{po_id} Seller confirm a list of product items of a specific requisition.
    Get Order Print Labels GET print/orders Return shipping or invoice label url of sale orders, base on order codes.

    Get Orders

    Sample:

    URL: "GET /orders?purchased_from=2017-08-28 00:00:00&purchased_to=2017-08-28 23:59:59&status=cho_in?include=delivery_info"
    

    Result:

    {
        "data": [
            {
                "id": 8226450,
                "code": "95861654",
                "status": "canceled",
                "coupon_code": null,
                "gift_card_code": null,
                "gift_card_amount": 0,
                "subtotal": 17200000,
                "grand_total": 13932000,
                "purchased_at": "2017-10-05 15:25:05",
                "discount": {
                    "discount_amount": 3268000,
                    "discount_coupon": 0
                },
                "shipping": {
                    "allow_check": true,
                    "estimation_time_min": 3,
                    "estimation_time_max": 4,
                    "delivery_address_type": 1,
                    "shipping_amount": 0,
                    "shipping_discount_amount": 48000,
                    "shipping_discount_tiki_first": 0,
                    "is_24h": false,
                    "plan_name": "standard",
                    "estimation_description": "dự kiến giao hàng vào Thứ hai, 09/10/2017 - Thứ ba, 10/10/2017"
                },
                "shipping_address": {
                    "id": 15853136,
                    "name": "Nguyen Manh Quynh",
                    "street": "123 Nguyen Thi Minh Khai",
                    "ward": "Phường Dakao",
                    "city": "Quận 1",
                    "region": "Hồ Chí Minh",
                    "country": "VN",
                    "phone": "0903000000"
                }
            },
            {
                "id": 8226470,
                "code": "86774161",
                "status": "cho_in",
                "coupon_code": null,
                "gift_card_code": null,
                "gift_card_amount": 0,
                "subtotal": 4320000,
                "grand_total": 3499200,
                "purchased_at": "2017-10-04 16:07:15",
                "discount": {
                    "discount_amount": 820800,
                    "discount_coupon": 0
                },
                "shipping": {
                    "allow_check": true,
                    "estimation_time_min": 1,
                    "estimation_time_max": 2,
                    "delivery_address_type": 1,
                    "shipping_amount": 0,
                    "shipping_discount_amount": 14000,
                    "shipping_discount_tiki_first": 0,
                    "is_24h": false,
                    "plan_name": "standard",
                    "estimation_description": "dự kiến giao hàng vào Thứ năm, 05/10/2017 - Thứ sáu, 06/10/2017"
                },
                "delivery_info": {
                    "shipping_code": "NJVTK446893354"
                },
                "shipping_address": {
                    "id": 15853136,
                    "name": "Nguyen Manh Quynh",
                    "street": "123 Nguyen Thi Minh Khai",
                    "ward": "Phường Dakao",
                    "city": "Quận 1",
                    "region": "Hồ Chí Minh",
                    "country": "VN",
                    "phone": "0903000000"
                }
            }
        ],
        "paging": {
            "total": 683,
            "per_page": 2,
            "current_page": 1,
            "last_page": 342,
            "from": 1,
            "to": 2
        }
    }
    

    Returns a list of sales orders managed by signing in seller, base on a specific search query.

    Method: GET /orders

    Parameters

    Parameter Type Required Description
    purchased_from String The start date-time that orders were placed
    Format: YY-MM-DD hh:mm:ss
    Eg, “2017-10-16 00:00:00”
    purchased_to String The end date-time that orders were placed
    Format: YY-MM-DD hh:mm:ss
    Eg, “2017-10-22 00:00:00”
    updated_from String The start date-time that orders were updated
    Format: YY-MM-DD hh:mm:ss
    Eg, “2017-10-16 00:00:00”
    updated_to String The end date-time that orders were updated
    Format: YY-MM-DD hh:mm:ss
    Eg, “2017-10-22 00:00:00”
    status String Order status, refer to List of Order Status for more details
    page Integer Page no of paging, default is 1
    limit Integer Nuber of records per page
    include String Include value = delivery_info

    Order Status

    Status Description
    processing Order placed successfully, waiting for next processing. It will be auto turned into cho_in status if no unusual states of matter.
    doi_thanh_toan Order placed successfully, payment transaction is processing (prepaid order).
    da_thanh_toan Order paid successfully (prepaid order).
    cho_in Order confirmed by Tiki, ready for fulfilment.
    phan_cong_lay_hang Assigned to pick up goods from Tiki stock.
    dang_lay_hang Picking items for the order.
    dang_dong_goi Packaging items for the order.
    dong_goi_xong Order is packaged, ready for delivery.
    len_ke Order is put on pre-delivery area, or returned to this area after a limited times of unsuccessful delivery.
    ban_giao_doi_tac Order transferred to delivery agent.
    dang_van_chuyen On delivery to customer.
    giao_hang_thanh_cong Order delivered to customer successfully
    complete Delivered to customer and get paid successfully.
    canceled Order canceled.
    holded Tiki Care hold the order due to unusual states of matter
    returned Order returned

    Responses

    Key Type Description
    id Integer Identifier of sales order within Tiki seller center
    code String An unique key that auto generated by system
    status String Order status, see List of Order Status for more details
    coupon_code String Coupon code that applied to the order
    subtotal integer Total order amount before discounts
    grand_total integer Total order amount after applied discounts
    purchased_at String Date-time when the order was placed
    shipping.shipping_amount integer Shipping fee
    shipping.estimation_description String Estimated delivery time
    shipping_address.name String Name of order receiver
    shipping_address.street String Street address for order delivery
    shipping_address.ward String The ward of delivery address (example: Phuong Ben Thanh)
    shipping_address.city String The district of delivery address (example: Quan 1)
    shipping_address.region String Province, City of delivery address (example: TP HCM)
    delivery_info.shipping_code String Shipping code (example: NJVTK446893354),

    Get Order Details

    Sample:

    URL: "GET /orders/72650868?include=delivery_info"
    

    Result:

    {
        "id": 8224740,
       "code": "72650868",
       "status": "cho_in",
       "coupon_code": null,
       "gift_card_code": null,
       "gift_card_amount": 0,
       "subtotal": 6616000,
       "grand_total": 5954400,
       "purchased_at": "2017-08-28 15:34:11",
       "fulfillment_type": "seller_delivery",
       "discount": {
           "discount_amount": 661600,
           "discount_coupon": 0
       },
      "shipping": {
           "shipping_amount": 0,
           "shipping_discount_amount": 14000,
           "estimation_description": "dự kiến giao hàng vào Thứ tư, 30/08/2017 - Thứ năm,     31/08/2017"
       },
       "shipping_address": {
           "id": 15853136,
           "name": "Nguyen Manh Quynh",
           "street": "123 Nguyen Thi Minh Khai",
           "ward": "Phường Dakao",
           "city": "Quận 1",
           "region": "Hồ Chí Minh",
           "country": "VN",
           "phone": "0903000000"
       },
        "delivery_info": {
            "shipping_code": "NJVTK446893354"
        },
       "items": [
           {
               "id": 24858234,
               "product_id": 582130,
               "product_name": "Máy Cạo Râu Nam Philips PQ217",
               "product_sku": "1325477473287",
               "qty": 4,
               "price": 799000,
               "subtotal": 3196000,
               "discount_amount": 319600,
               "discount_percent": 0,
               "confirmation_status": "seller_canceled",
               "confirmed_at": "2017-08-28 16:31:33",
    
           },
           {
               "id": 24858235,
               "product_id": 582128,
               "product_name": "Máy Cạo Râu Nam Philips AT620",
               "product_sku": "1322860449942",
               "qty": 2,
               "price": 1710000,
               "subtotal": 3420000,
               "discount_amount": 342000,
               "discount_percent": 0,
               "confirmation_status": "seller_confirmed",
               "confirmed_at": "2017-08-28 16:31:33",
           }
       ]
    }
    

    Returns detail information including product items of a sales order, base on order code.

    Method: GET /orders/{order_code}

    Responses

    Key Type Description
    id Integer Identifier of sales order within Tiki seller center
    code String An unique key that auto generated by system
    status String Order status, see List of Order Status for more details
    coupon_code String Coupon code that applied to the order
    subtotal integer Total order amount before discounts
    grand_total integer Total order amount after applied discounts
    purchased_at String Date-time when the order was placed
    fulfillment_type String Order fulfillment types:
    - Seller Delivery orders are fulfillment_type = seller_delivery
    - Orders from abroad (Crossborder) are orders with fulfillment_type = cross_border
    - Dropship orders directly from the seller (Dropship) are orders with fulfillment_type = dropship
    - Tiki Delivery (Tiki Delivery) are orders with fulfillment_type not in seller_delivery, cross_border, dropship (i.e. fulfillment_type = null, empty, tiki_delivery)
    shipping.shipping_amount integer Shipping fee
    shipping.estimation_description String Estimated delivery time
    shipping_address.name String Name of order receiver
    shipping_address.street String Street address for order delivery
    shipping_address.ward String The ward of delivery address (example: Phuong Ben Thanh)
    shipping_address.city String The district of delivery address (example: Quan 1)
    shipping_address.region String Province, City of delivery address (example: TP HCM)
    items Array List of product items of the order
    delivery_info.shipping_code String Shipping code (example: NJVTK446893354),

    In that the items is a list of product items that contain the following elements

    Key Type Description
    id integer Identifier of order line item within Tiki seller center
    product_id integer Product ID within Tiki seller center
    product_name String Product name
    seller_product_code String Code of the seller SKU within Tiki Seller Center.
    product_sku String Identifier of the product within third-party system, that is added as a field of the product in Tiki system.
    qty integer Item quantity in the order
    price integer Sales price of the product in the order
    subtotal integer Amount of order item before discount  
    discount_amount integer Discount amount of order item
    discount_percent integer Discount percentage of order item = discount_amount / subtotal
    confirmation_status String Confirmation status of the order item 
    confirmed_at String Date-time when the order item was confirmed

    Filter Orders

    Sample:

    URL: "GET /list-orders?codes=95861654,86774161"
    

    Result:

    {
        "data": [
            {
                "id": 8226450,
                "code": "95861654",
                "status": "canceled",
                "coupon_code": null,
                "gift_card_code": null,
                "gift_card_amount": 0,
                "subtotal": 17200000,
                "grand_total": 13932000,
                "purchased_at": "2017-10-05 15:25:05",
                "fulfillment_type": "seller_delivery",
                "discount": {
                    "discount_amount": 3268000,
                    "discount_coupon": 0
                },
                "shipping": {
                    "allow_check": true,
                    "estimation_time_min": 3,
                    "estimation_time_max": 4,
                    "delivery_address_type": 1,
                    "shipping_amount": 0,
                    "shipping_discount_amount": 48000,
                    "shipping_discount_tiki_first": 0,
                    "is_24h": false,
                    "plan_name": "standard",
                    "estimation_description": "dự kiến giao hàng vào Thứ hai, 09/10/2017 - Thứ ba, 10/10/2017"
                },
               "shipping_address": {
                   "id": 15853136,
                   "name": "Nguyen Manh Quynh",
                   "street": "123 Nguyen Thi Minh Khai",
                   "ward": "Phường Dakao",
                   "city": "Quận 1",
                   "region": "Hồ Chí Minh",
                   "country": "VN",
                   "phone": "0903000000"
               },
                "items": [
                    {
                        "id": 24861048,
                        "order_id": 8226450,
                        "product_id": 581508,
                        "product_name": "Smart Tivi Cong 4K Samsung 40 inch UA40JU6600 ",
                        "product_sku": "",
                        "product_type": "simple",
                        "qty": 1,
                        "price": 17000000,
                        "subtotal": 17000000,
                        "discount_amount": 3230000,
                        "discount_percent": 0,
                        "discount_tikixu": 0,
                        "is_freegift": false,
                        "seller_id": 659,
                        "inventory_type": "backorder",
                        "confirmation_status": "seller_confirmed",
                        "confirmed_at": "2017-09-21 15:32:20",
                        "sla_confirmed_at": "2017-09-22 10:00:00",
                        "created_at": "2017-10-05 15:25:05",
                        "updated_at": "2017-09-21 15:32:52",
                        "serial_number": [],
                        "imei": [],
                        "tiki_sku": "8908513625869"
                    },
                    {
                        "id": 24861049,
                        "order_id": 8226450,
                        "product_id": 581908,
                        "product_name": "Barron's Toefl IBT Internet Based Test 12th (Sách kèm 10CD)",
                        "product_sku": "",
                        "product_type": "simple",
                        "qty": 1,
                        "price": 200000,
                        "subtotal": 200000,
                        "discount_amount": 38000,
                        "discount_percent": 0,
                        "discount_tikixu": 0,
                        "is_freegift": false,
                        "seller_id": 737,
                        "inventory_type": "backorder",
                        "confirmation_status": "seller_confirmed",
                        "confirmed_at": "2017-09-21 15:32:12",
                        "sla_confirmed_at": "2017-09-22 10:00:00",
                        "created_at": "2017-10-05 15:25:05",
                        "updated_at": "2017-09-21 15:32:52",
                        "serial_number": [],
                        "imei": [],
                        "tiki_sku": "2393816850111"
                    }
                ]
            },
            {
                "id": 8226470,
                "code": "86774161",
                "status": "cho_in",
                "coupon_code": null,
                "gift_card_code": null,
                "gift_card_amount": 0,
                "subtotal": 4320000,
                "grand_total": 3499200,
                "purchased_at": "2017-10-04 16:07:15",
                "fulfillment_type": "seller_delivery",
                "discount": {
                    "discount_amount": 820800,
                    "discount_coupon": 0
                },
                "shipping": {
                    "allow_check": true,
                    "estimation_time_min": 1,
                    "estimation_time_max": 2,
                    "delivery_address_type": 1,
                    "shipping_amount": 0,
                    "shipping_discount_amount": 14000,
                    "shipping_discount_tiki_first": 0,
                    "is_24h": false,
                    "plan_name": "standard",
                    "estimation_description": "dự kiến giao hàng vào Thứ năm, 05/10/2017 - Thứ sáu, 06/10/2017"
                },
               "shipping_address": {
                   "id": 15853136,
                   "name": "Nguyen Manh Quynh",
                   "street": "123 Nguyen Thi Minh Khai",
                   "ward": "Phường Dakao",
                   "city": "Quận 1",
                   "region": "Hồ Chí Minh",
                   "country": "VN",
                   "phone": "0903000000"
               },
                "items": [
                    {
                        "id": 24861069,
                        "order_id": 8226470,
                        "product_id": 581964,
                        "product_name": "Bộ 3 It's Well Plus Bọt Rửa Mặt Chiết Xuất Dâu Tây - Bí Ngô - Kiwi",
                        "product_sku": "",
                        "product_type": "simple",
                        "qty": 3,
                        "price": 1440000,
                        "subtotal": 4320000,
                        "discount_amount": 820800,
                        "discount_percent": 0,
                        "discount_tikixu": 0,
                        "is_freegift": false,
                        "seller_id": 659,
                        "inventory_type": "backorder",
                        "confirmation_status": "waiting",
                        "confirmed_at": "",
                        "sla_confirmed_at": "2017-09-22 10:00:00",
                        "created_at": "2017-10-04 16:07:14",
                        "updated_at": "2017-09-21 16:08:05",
                        "serial_number": [],
                        "imei": [],
                        "tiki_sku": "1338199366331"
                    }
                ]
            }
        ],
        "paging": {
            "total": 2,
            "per_page": 20,
            "current_page": 1,
            "last_page": 1,
            "from": 1,
            "to": 2
        }
    }
    

    Returns a list of orders with detail items, base on a specific search query.

    Method: GET /list-orders

    Parameters

    Parameter Type Required Description
    purchased_from String The start date-time that orders were placed
    Format: YY-MM-DD hh:mm:ss
    Eg, “2017-10-16 00:00:00”
    purchased_to String The end date-time that orders were placed
    Format: YY-MM-DD hh:mm:ss
    Eg, “2017-10-22 00:00:00”
    updated_from String The start date-time that orders were updated
    Format: YY-MM-DD hh:mm:ss
    Eg, “2017-10-16 00:00:00”
    updated_to String The end date-time that orders were updated
    Format: YY-MM-DD hh:mm:ss
    Eg, “2017-10-22 00:00:00”
    status String Order status, refer to List of Order Status for more details
    codes string List of order codes separated by comma(,).
    Eg: 95861654,86774161

    Responses

    The API returns a list of orders that contain the following elements

    Key Type Description
    id Integer Identifier of sales order within Tiki seller center
    code String An unique key that auto generated by system
    status String Order status, see List of Order Status for more details
    coupon_code String Coupon code that applied to the order
    subtotal integer Total order amount before discounts
    grand_total integer Total order amount after applied discounts
    purchased_at String Date-time when the order was placed
    shipping.shipping_amount integer Shipping fee
    shipping.estimation_description String Estimated delivery time
    shipping_address.name String Name of order receiver
    shipping_address.street String Street address for order delivery
    shipping_address.ward String The ward of delivery address (example: Phuong Ben Thanh)
    shipping_address.city String The district of delivery address (example: Quan 1)
    shipping_address.region String Province, City of delivery address (example: TP HCM)
    items Array List of product items of the order

    In that the items is a list of product items that contain the following elements

    Key Type Description
    id integer Identifier of order line item within Tiki seller center
    product_id integer Product ID within Tiki seller center
    product_name String Product name
    seller_product_code String Code of the seller SKU within Tiki Seller Center.
    product_sku String Identifier of the product within third-party system, that is added as a field of the product in Tiki system.
    qty integer Item quantity in the order
    price integer Sales price of the product in the order
    subtotal integer Amount of order item before discount  
    discount_amount integer Discount amount of order item
    discount_percent integer Discount percentage of order item = discount_amount / subtotal
    confirmation_status String Confirmation status of the order item 
    confirmed_at String Date-time when the order item was confirmed

    Confirm an order

    Sellers may need to confirm some actions as listing below:

    Note: a notifcation is required if seller needs to notify customer about order via sms or email.

    HTTP Request

    POST /orders/{code}/confirm

    Confirm a item as successfully delivered

    {
      "order": {
        "delivery_status": "complete|canceled",
        "delivery_note": "something details"
      },
      "evouchers": {
        "codes":[
          {
             "code":"1548180",
             "expiry_date":"2017-12-31"
          },
          {
             "code":"5523522",
             "expiry_date":"2017-12-31"
          }
        ],
        "sms": "An tha ga Buffet lau. Nha hang Buffet BBQ Hot Pot Hong Kong New. DC Tang 4 Toa nha Artemis so 3 Le Trong Tan. Ma: 1548180, 1582805. HSD: 14\/12."
      }
    }
    

    Update delivery status

    Update delivery status for order of seller delivery:

    HTTP Request

    POST /orders/update_delivery_confirmation

    Update delivery status completed.

    {
      "order_id": "8443672",
      "note": "note something",
      "status": "1"
    }
    

    Update delivery status canceled.

    {
      "order_id": "8443672",
      "note": "note something",
      "status": "0"
    }
    

    Result:

    {
      "id": "8443672",
      "delivery_confirmed": 1,
      "delivery_confirmed_at": 1561606099,
      "delivery_appointment_date": null,
      "delivery_failure_cause": null,
      "delivery_canceled": 0,
      "delivery_note": "note something<br\/>https:\/\/guat.tikicdn.com\/ts\/tmp\/74\/7f\/b8\/6df055b9fa59a68d6513f3e9a0cc7f9d.jpg<br\/>https:\/\/guat.tikicdn.com\/ts\/tmp\/35\/15\/38\/20dcfdd813232206f173df8dac78159c.jpg<br\/>https:\/\/guat.tikicdn.com\/ts\/tmp\/70\/20\/15\/8c90067118f6447c0c6a07cb1ae7a775.jpg",
      "code": "806618929"
    }
    

    Parameters

    Parameter Type Required Description
    order_id String Yes Order id in list order of seller delivery.
    note String Yes Note something (ex: Id card).
    status String Yes Status of delivery, have options:
    - 0: Delivery canceled.
    - 1: Delivery completed.
    url Array Array urls of handling documents (ex: screen soft), max 3.
    failure_cause String Failure cause. Options:
    - nha-ban-het-hang-huy-don-hang: Nhà bán hết hàng - hủy đơn hàng. (Auto canceled order)
    - san-pham-khong-dung-nhu-mo-ta: Sản phẩm không đúng như mô tả,
    - nha-ban-dong-goi-san-pham-sai-quy-cach: Nhà bán đóng gói sản phẩm sai quy cách,
    - nha-ban-khong-giao-kip-hen-lai-khach-hang: Nhà bán không giao kịp - Hẹn lại khách hàng,
    - khach-hang-khong-con-nhu-cau: Khách hàng không còn nhu cầu. (Auto canceled order)
    - khach-hang-yeu-cau-sua-don-hang: Khách hàng yêu cầu sửa đơn hàng,
    - khach-hang-cung-cap-sai-dia-chi-doi-dia-chi: Khách hàng cung cấp sai địa chỉ, đổi địa chỉ,
    - khach-lien-lac-duoc: Không liên lạc được,
    - khach-hang-hen-giao-lai: Khách hàng hẹn giao lại,
    - khach-hang-khong-qua-nhan-hang: Khách hàng không qua nhận hàng,
    appointment_date string String datetime with format Y-m-d H:i:s.
    cancel_order string Set auto cancel order. Options: default 0 (no auto cancel), 1 (auto cancel).

    Get Information of Backorder

    Sample:

    URL: "GET /backorder/items?order_code=206413366&confirm_ids=24891181"
    

    Result:

    {
        "code": 200,
        "data": [
            {
                "id": 8327181,
                "applied_rule_ids": null,
                "original_code": null,
                "code": "209086060",
                "status": "cho_in",
                "state": "processing",
                "coupon_code": null,
                "gift_card_code": null,
                "gift_card_amount": 0,
                "subtotal": 1300000,
                "grand_total": 1300000,
                "warehouse_id": 4,
                "created_at": "2018-05-11 13:47:21",
                "updated_at": "2018-05-11 13:47:27",
                "purchased_at": "2018-05-11 13:47:21",
                "type": "backorder",
                "fulfillment_type": "tiki_delivery",
                "items": {
                    "sgn": {
                        "items": [
                            {
                                "id": 24891243,
                                "order_id": 8327181,
                                "applied_rule_ids": null,
                                "discount_coupon": 0,
                                "product_id": 676615,
                                "product_name": "Nồi Cơm Điện Tử Bluestone RCB-5925W",
                                "product_sku": "6648568901465",
                                "product_type": "simple",
                                "qty": 1,
                                "price": 1300000,
                                "subtotal": 1300000,
                                "discount_amount": 0,
                                "discount_percent": 0,
                                "discount_tikixu": 0,
                                "is_freegift": false,
                                "is_taxable": true,
                                "seller_id": 871,
                                "inventory_type": "backorder",
                                "confirmation_status": "waiting",
                                "confirmed_at": "",
                                "sla_confirmed_at": "2018-05-14 08:47:00",
                                "created_at": "2018-05-11 13:47:21",
                                "updated_at": "2018-05-11 13:47:29",
                                "serial_number": [],
                                "imei": [],
                                "cancel_reason_code": "",
                                "code": "NCD",
                                "unit": "Cái"
                            }
                        ]
                    }
                }
            }
        ]
    }
    

    Returns detail information including product items of a back order, base on order code.

    Method: GET /backorder/items

    Parameters

    Parameter Type Required Description
    order_code String order code
    confirm_ids Integer Id of order items need to be confirmed

    Get Warehouses of Backorder

    Sample:

    URL: "GET /backorder/warehouses"
    

    Result:

    {
        "hn": [
            {
                "id": 71,
                "seller": {
                    "id": 659,
                    "name": "ZERA SHOP",
                    "code": "S00000659"
                },
                "is_primary": false,
                "status": 1,
                "name": "ZERA SHOP",
                "street": "52 ut tich",
                "contact_name": "ZERA SHOP",
                "contact_phone": "1234567890",
                "contact_email": "abc@tiki.vn",
                "region": {
                    "code": "VN034",
                    "name": "Hà Nội"
                },
                "district": {
                    "code": "VN034018",
                    "name": "Quận Ba Đình"
                },
                "ward": {
                    "code": "VN034018009",
                    "name": "Phường Nguyễn Trung Trực"
                }
            }
        ],
        "sgn": [
            {
                "id": 65,
                "is_primary": false,
                "status": 1,
                "name": "Kho HCM mới",
                "street": "test 1",
                "contact_name": "Phan mai vi",
                "contact_phone": "0998987987989",
                "contact_email": "shopmuaban1@gmail.com",
                "region": {
                    "code": "VN039",
                    "name": "Hồ Chí Minh"
                },
                "district": {
                    "code": "VN039013",
                    "name": "Quận 5"
                },
                "ward": {
                    "code": "VN039013006",
                    "name": "Phường 06"
                }
            },
            {
                "id": 49,
                "is_primary": false,
                "status": 1,
                "name": "Kho 1",
                "street": "c1/22 Phạm Hùng",
                "contact_name": "Phan Mai Vi",
                "contact_phone": "0789879898989",
                "contact_email": "shopmuaban1@gmail.com",
                "region": {
                    "code": "VN039",
                    "name": "Hồ Chí Minh"
                },
                "district": {
                    "code": "VN039016",
                    "name": "Quận 8"
                },
                "ward": {
                    "code": "VN039016008",
                    "name": "Phường 08"
                }
            }
        ]
    }
    

    Returns detail information of warehouse of Tiki that seller registries for backorder model.

    Method: GET /backorder/warehouses

    Confirm Backorder

    Sample:

    URL: "POST /backorder/confirms"
    
    Parameter explanation:
    {
      "order_code":"379026938",
      "confirm_ids":"24891244",
      "tracking_number":"379026938",
      "items":{
        "379026938":{
          "sgn":{
            "seller_inventory_id":"90"
          }
        }
      }
    }
    
    

    Result:

    {"code":200,"message":"ok"}
    

    Returns detail information including product items of a back order, base on order code.

    Method: POST /backorder/confirms

    Parameters

    Parameter Type Required Description
    order_code String Yes order code
    confirm_ids Integer Yes Id of order items need to be confirmed
    tracking_number String Yes Can input by order code.
    items Object Yes A json object that contains a list of items of a specific backorder that seller want to confirm. {< order_code >:{< warehouse_code >:{"seller_inventory_id":< id from backorder warehouses api>}}}

    Get PO List

    Sample:

    URL: "GET /po"
    

    Result:

    {
        "data": [
            {
                "id": 2383,
                "seller_id": 659,
                "status": "waiting_for_items",
                "code": "SGN/BOP/2017/10/00935",
                "warehouse_code": "sgn",
                "expected_pickup_date": 1507025460,
                "actual_pickup_date": false,
                "confirmed_date": 1507022051,
                "expected_qty": 1,
                "actual_qty": null,
                "pickup_method": "manual",
                "seller_address_id": null,
                "seller_inventory_id": 65,
                "note": "Phiếu gởi hàng cho đơn hàng Backorder: [45869617 - 1332065078816:1]",
                "type": "backorder",
                "created_at": 1507021907
            }
            ],
        "paging": {
            "total": 392,
            "per_page": 20,
            "current_page": 1,
            "last_page": 20,
            "from": 1,
            "to": 20
        }
    }
    

    Returns a list of inventory requisitions for backorder items, base on a specific query.

    Method: GET /po

    Parameters

    Parameter Type Required Description
    status String Status of inventory requisition (draft
    code String Requisition code
    page Integer Page no of paging, default is 1
    limit Integer Nuber of records per page, default is 20

    Get PO Details

    Sample: "GET /po/2383"
    

    Result:

    {
        "id": 2383,
        "seller_id": 659,
        "status": "waiting_for_items",
        "code": "SGN/BOP/2017/10/00935",
        "warehouse_code": "sgn",
        "expected_pickup_date": 1507025460,
        "actual_pickup_date": false,
        "confirmed_date": 1507022051,
        "expected_qty": 1,
        "actual_qty": null,
        "pickup_method": "manual",
        "seller_address_id": null,
        "seller_inventory_id": 65,
        "note": "Phiếu gởi hàng cho đơn hàng Backorder: [45869617 - 1332065078816:1]",
        "type": "backorder",
        "created_at": 1507021907
    }
    

    Returns detail infomation of a specific inventory requisition, base on Requisition ID.

    Method: GET /po/{po_id}

    Get PO Confirmation Info

    Sample: "GET /po/2383/confirm"
    

    Result:

    {
        "data": [
            {
                "id": 1875,
                "backorder_id": 2246,
                "order_item_id": 24862229,
                "product_sku": "1332065078816",
                "product_name": "Bộ Đôi It's Well Plus: Kem Sữa Trắng Da Mellissa Và Sophia CC Cream",
                "product_qty": 1,
                "order_created_date": "2017-10-03 15:47:34",
                "is_processed": 1,
                "inventory_requisition_id": 2383,
                "status": "fulfilled",
                "created_at": "2017-10-03 15:47:47",
                "updated_at": "2017-10-03 16:14:11",
                "product_unit": "Cái",
                "seller_product_code": "m_61",
                "total_expected_qty": 1,
                "qty_available": 117,
                "thumbnail": "http://uat.cdn.tiki.services/cache/280x280/media/catalog/product/1/_/1_1_16.u499.d20160801.t160447.jpg",
                "orders": [
                    {
                        "id": 8227250,
                        "original_code": null,
                        "code": "45869617",
                        "status": "cho_in",
                        "state": "processing",
                        "coupon_code": null,
                        "gift_card_code": null,
                        "gift_card_amount": 0,
                        "subtotal": 1630000,
                        "grand_total": 1530000,
                        "tikixu_point": 0,
                        "warehouse_id": 4,
                        "created_at": "2017-10-03 15:47:34",
                        "updated_at": "2017-10-03 15:47:36",
                        "purchased_at": "2017-10-03 15:47:34",
                        "is_rma": 0,
                        "contained_backorder_items": true,
                        "type": "instock",
                        "discount": {
                            "discount_amount": 100000,
                            "discount_coupon": 0
                        },
                        "customer": {
                            "id": 100083641,
                            "email": "tikitest3@gmail.com",
                            "name": "Tiki Test"
                        },
                        "tax": {
                            "code": null,
                            "name": null,
                            "address": null
                        },
                        "shipping": {
                            "allow_check": true,
                            "estimation_time_min": 1,
                            "estimation_time_max": 2,
                            "delivery_address_type": 1,
                            "shipping_amount": 0,
                            "shipping_discount_amount": 10000,
                            "shipping_discount_tiki_first": 0,
                            "is_24h": false,
                            "plan_name": "standard",
                            "estimation_description": "dự kiến giao hàng vào Thứ tư, 04/10/2017 - Thứ năm, 05/10/2017"
                        },
                        "total_product_qty": 1,
                        "error": {
                            "code": "is_processed",
                            "message": "Sản phẩm đã có hàng không cần gởi thêm."
                        },
                        "item": {
                            "id": 24862229,
                            "order_id": 8227250,
                            "product_id": 581938,
                            "product_name": "Bộ Đôi It's Well Plus: Kem Sữa Trắng Da Mellissa Và Sophia CC Cream",
                            "product_sku": "1332065078816",
                            "product_type": "simple",
                            "qty": 1,
                            "price": 1630000,
                            "subtotal": 1630000,
                            "discount_amount": 100000,
                            "discount_percent": 0,
                            "discount_tikixu": 0,
                            "is_freegift": false,
                            "seller_id": 659,
                            "inventory_type": "backorder",
                            "confirmation_status": "seller_confirmed",
                            "confirmed_at": "2017-10-03 16:14:11",
                            "sla_confirmed_at": "2017-10-04 10:00:00",
                            "created_at": "2017-10-03 15:47:34",
                            "updated_at": "2017-10-03 16:14:11",
                            "serial_number": [],
                            "imei": []
                        }
                    }
                ],
                "total_suggest_qty": -116,
                "total_order_qty": 1
            }
        ]
    }
    

    Method: GET /po/{po_id}/confirm

    Confirm PO

    Sample:
    "PUT /po/2383?items=%7B%221332065078816%22%3A%5B%7B%22order_code%22%3A%2220057855%22%2C%22action%22%3A%22confirm%22%7D%5D%7D"
    
    Parameter explanation:
    
    "items":["1332065078816":{"order_code":"20057855","action":"confirm"}]
    

    Result:

    {
       "id":2332,
       "seller_id":659,
       "status":"waiting_for_items",
       "code":null,
       "warehouse_code":"sgn",
       "expected_pickup_date":1506680100,
       "actual_pickup_date":false,
       "confirmed_date":false,
       "expected_qty":1,
       "actual_qty":null,
       "pickup_method":"manual",
       "seller_address_id":null,
       "seller_inventory_id":49,
       "note":"Phi\u1ebfu g\u1edfi h\u00e0ng cho \u0111\u01a1n h\u00e0ng Backorder: [20057855 - 1332065078816:1]",
       "type":"backorder",
       "created_at":1506676529,
       "transactions":[
    
       ],
       "inventory":{
          "id":49,
          "seller":{
             "id":659,
             "name":null,
             "code":null
          },
          "is_primary":false,
          "status":1,
          "name":"Kho 1",
          "street":"c1\/22 Ph\u1ea1m H\u00f9ng",
          "contact_name":"Phan Mai Vi",
          "contact_phone":"0789879898989",
          "contact_email":"shopmuaban1@gmail.com",
          "region":{
             "code":"VN039",
             "name":"H\u1ed3 Ch\u00ed Minh"
          },
          "district":{
             "code":"VN039016",
             "name":"Qu\u1eadn 8"
          },
          "ward":{
             "code":"VN039016008",
             "name":"Ph\u01b0\u1eddng 08"
          }
       }
    }
    

    Seller confirm a list of product items of a specific requisition.

    Method: PUT /po/{po_id}

    Parameters

    Parameter Type Required Description
    items Object Yes A json object that contains a list of items of a specific requisition that seller want to confirm.

    The format of items as below
    {
     "items": [
      "sku1": {"order_code":"order1", "action":"confirm"},
      "sku2": {"order_code":"order2", "action":"confirm"}
     ]
    }

    Get Order Print Labels

    Sample get shipping label: "GET /print/orders?code=833662058"
    

    Result :

    {
        "shipping_label_url": "http://uat.tikicdn.com/ts/print/1b/67/52/d54614ae10e18b2112c38845641a693d.html"
    }
    
    Sample get invoice label: "GET /print/orders?code=290680584&label=invoice"
    

    Result :

    {
        "invoice_label_url": "https://guat.tikicdn.com/ts/print/12/34/5d/669d74d1da850e337aeefdaf9aa9cef9.html"
    }
    

    Return shipping or invoice label url of sale orders, base on order codes.

    Method: GET /print/orders

    Parameters

    Parameter Type Required Description
    code String Yes order code need get labels.
    label String Label need download. If null, default is shipping label, option values:
    - shipping: Get link shipping label
    - invoice: Get link invoice label.
    format String Default is html, option values: html, pdf(Just support label = invoice).

    MULTICHANNEL ENDPOINTS

    API List

    API name Method Link Description
    Create Order POST /multichannel/create-order Create new order.
    Get Regions GET /multichannel/regions Get VN regions
    Get Districts GET /multichannel/region/{region_id}/districts Get districts of a region
    Get Wards GET /multichannel/region/{region_id}/district/{district_id}/wards Get wards of a districts

    Create Order

    Method: POST /integration/multichannel/create-order

    Parameters

    Parameter Type Required Description
    external_code string No
    receivable_total integer No Giá trị đơn hàng tiki sẽ thu hộ, không set, giá trị mặc định sẽ là grand_total ở phần response
    shipping_address object Yes
    shipping_address.full_name string Yes
    shipping_address.telephone string Yes
    shipping_address.region_id integer Yes
    shipping_address.city_id integer Yes
    shipping_address.ward_id integer Yes
    shipping_address.street string Yes
    items array Yes [item, item, item]
    item.product_ind integer Yes
    item.qty integer Yes
    item.price integer Yes

    Response

    Key Type Description
    order_code string
    grand_total integer
    telephone string
    shipping_address string
    created_at string Datetime format
    delivery_commitment_time string Datetime format

    Sample HTTP Request

    POST /integration/multichannel/create-order

    {
      "external_code": "18042601",
      "receivable_total": "1000000",
      "shipping_address": {
        "full_name": "Nguyen Vu Loc",
          "telephone": "0983016385",
          "region_id": 294,
          "city_id": 485,
          "ward_id": 10434,
          "street": "52 Ut Tich"
      },
      "items": [
          {
              "product_id": 581726,
              "qty": 1,
              "price": 100000
          }
      ]
    }
    

    Sample result

    {
        "success": true,
        "order_code": "507631961",
        "grand_total": 95000,
        "telephone": "0983016385",
        "shipping_address": "52 Ut Tich, Phường 04, Quận 10, Hồ Chí Minh, Việt Nam",
        "created_at": "2018-04-26 14:43:41",
        "delivery_commitment_time": "2018-04-26 17:00:00",
        "items": [
            {
                "id": "24892921",
                "qty": "1"
            }
        ]
    }
    

    Get regions

    GET /multichannel/regions

    Response

    {
        "data": [
            {
                "id": 278,
                "name": "An Giang",
                "tiki_code": "VN011"
            },
            {
                "id": 279,
                "name": "Bạc Liêu",
                "tiki_code": "VN015"
            }, ...
        ]
    }
    

    Get districts

    GET /multichannel/region/278/districts

    Response

    {
        "data": [
            {
                "id": 614,
                "name": "Huyện An Phú",
                "tiki_code": "VN011001"
            },
            {
                "id": 615,
                "name": "Huyện Tịnh Biên",
                "tiki_code": "VN011007"
            }, ...
        ]
    }
    

    Get wards

    GET /multichannel/region/278/district/614/wards

    Response

    {
        "data": [
            {
                "id": 1,
                "name": "Thị trấn An Phú",
                "tiki_code": "VN011001001"
            },
            {
                "id": 2,
                "name": "Thị Trấn Long Bình",
                "tiki_code": "VN011001002"
            }, ...
        ]
    }
    

    SELLER ENPOINTS

    API List

    API name Method Link Description
    Seller Registration POST /registers Register a new seller on Tiki seller center.
    Get Seller Infomation GET /seller Returns information of the signing in seller.

    Seller Registration

    Register a new seller on Tiki seller center.

    Method: POST /registers
    No API key required for this method

    Parameters

    Parameter Type Required Description
    contact_name String Yes Name of seller
    contact_email String Yes Email of seller
    contact_phone String Yes Phone of seller
    seller_channel String Yes Seller channel name
    store_name String Yes Name of store 
    website_url String Yes url to store of seller
    main_trading_category Integer Yes Main category id which the seller will sale in. The ID of a category can be retrieved by calling Get Categories with no parameter needed. 
    business_type String  Yes  Business type of seller (household
    inventory_type String Yes Inventory type that seller will do business with Tiki, that accept the following option values:
    - backorder: product kept at seller stock, just transferred to Tiki stock after sales order placed by customer
    - instock: product consigned at Tiki stock, order fulfilled by Tiki
    - virtual: e-voucher products
    Default value is "backorder"

    Responses

    The API returns a list of product items that contain the following elements

    Key Type Description
    id integer Indentifier of seller within Tiki seller center
    secret String Seller's secret key to consume tiki’s api
    code String Seller code, an unique key of seller within Tiki seller center
    name String Name of seller ( from parameters)
    website_url String url of website (from parameters)
    hotline String Phone of seller (from parameters)
    email String Email of seller (from parameters)
    connect_to integer Parsed from IP of the request
    product_is_sync integer config of syncing product between tiki and partner( 0
    seller_channel integer Seller channel name (from parameters)
    tax_address String
    status Integration Status of seller on Tiki seller center

    Get Seller Information

    Sample:

    URL: GET /seller"
    

    Result:

    {
        "listdata_id": 0,
        "id": 659,
        "logo": "http://uat.cdn.tiki.services/ts/seller/4a/d1/83/4ad18324bdbf3e84a4f9d7a546fc8392.png",
        "logo_printing": "",
        "code": "S00000659",
        "contract_code": "HATGIONG",
        "name": "ZERA SHOP",
        "status": 1,
        "kam_id": null,
        "kam_name": null,
        "kam_phone": null,
        "kam_email": null,
        "hotline": "0988768768787",
        "website_url": null,
        "email": "zerashop@gmail.com",
        "inventory_type": {
            "0": "instock",
            "1": "backorder"
        },
        "tax_code": "087687687687",
        "tax_name": "ZERA SHOP",
        "secret": "2a4a1d17-1465-485c-b5af-09be0dc3e5ef",
        "connect_to": "partner",
        "product_is_sync": 1,
        "integration_status": -1,
        "seller_channel": "abc",
        "tax_address": "c1/22 Phạm Hùng",
        "updated_at": 1505193581,
        "created_at": 1498626345
    }
    

    Returns information of the signing in seller.

    Method: GET /seller
    API key required, no parameters required.

    WEBHOOKS

    Introduction to webhook

    You can use webhook subscriptions to receive notifications about particular events. After you've subscribed to a webhook, you can let your app execute code immediately after specific events occur, instead of having to make API calls periodically to check their status or retrieve data. For example, you can rely on webhooks to trigger an action in your app when a customer creates an order. By using webhooks subscriptions you can make fewer API calls overall, which makes sure that your apps are more efficient and update quickly.

    Register a webhook

    Tiki allow you to register an https:// URL where the event data can be stored in JSON formats. Webhooks are commonly used for:

    Currently, you need to send us an url to configure your webhook. You are able to modify your webhook yourself in Tiki Seller Center soon in the future.

    Request

    After you configure a webhook subscription, the events that you specified will trigger a webhook notification each time they occur. This notification is a POST request, contains a JSON payload, and HTTPS headers that provide context. For example, the orders/create webhook includes the following headers:

    X-Tiki-Topic: orders/create
    X-Tiki-Checksum: JNpyUB2+bKHBQlv0XyeWTBFLi/pC2t2NP/SDkc1he00=
    X-Tiki-Request-ID: 2c335abc-cb15-48f8-b420-36bdc9aee5da
    

    To verify that the request came from Tiki, compute the hash from a combination string of data input and seller code, then compare it to the value in the X-Tiki-Checksum header. If they match, you can be sure that the Webhook was sent from Tiki. Header X-Tiki-Request-ID could be used for debugging.

    Below is a simple example in PHP of how one might verify a webhook request.

    define('TIKI_SELLER_CODE', 'my_seller_code');
    
    $checksum_header = $_SERVER['HTTP_X_TIKI_CHECKSUM'];
    $data = file_get_contents('php://input');
    $checksum_calculated = base64_encode(hash_hmac('sha256', $data, TIKI_SELLER_CODE, true));
    $verified = hash_equals($checksum_header, $checksum_calculated);
    

    Respond to a webhook

    Your webhook acknowledges that it received data by sending a 200 OK response. Any response outside of the 200 range will let Tiki know that you did not receive your webhook.

    We have implemented a 5-second timeout period and a retry period for subscriptions. We wait 5 seconds for a response to each request, and if there isn't one or we get an error, we retry the connection to a total of 15 times.

    To make sure that apps don't accidentally run over the timeout limit, we now recommend that apps defer processing until after the response has been sent.

    List of supported webhook events and topics

    Webhooks are available for the following events:

    Events Topics
    Order orders/create, orders/paid, orders/cancelled

    Payload

    {
      "code": "14530425",
      "status": "complete",
      "coupon_code": null,
      "grand_total": 225000,
      "created_at": "2017-07-11 00:38:12",
      "updated_at": "2017-07-18 20:33:10",
      "contained_backorder_items": false,
      "type": "instock",
      "selected_method": "cod",
      "customer": {
        "name": "Nguyễn Thúy Vân"
      },
      "tax": {
        "code": null,
        "name": null,
        "address": null
      },
      "shipping": {
        "shipping_amount": 0,
        "plan_name": "standard",
        "estimation_description": "dự kiến giao hàng vào Thứ tư, 12/07/2017 - Thứ năm, 13/07/2017"
      },
      "items": [
        {
          "product_id": 710674,
          "product_name": "Bộ Túi Hộp Cơm Thủy Tinh Chịu Nhiệt",
          "product_sku": "4112181818698",
          "qty": 1,
          "price": 179000,
          "subtotal": 179000,
          "inventory_type": "instock",
          "confirmation_status": null,
          "confirmed_at": "",
          "sla_confirmed_at": "",
          "created_at": "2017-07-11 00:38:12",
          "updated_at": "2017-07-18 20:33:10",
          "serial_number": [],
          "imei": []
        }
      ]
    }
    

    HTTP ERROR CODES

    The Seller Center APIs use the following HTTP error codes:

    Error Code Meaning
    400 Bad Request -- Your request sucks.
    401 Unauthorized -- Your API key is wrong.
    403 Forbidden -- The request is hidden for administrators only.
    404 Not Found -- The specified request could not be found.
    405 Method Not Allowed -- You tried to access a request with an invalid method.
    406 Not Acceptable -- You requested a format that isn't json.
    410 Gone -- The request has been removed from our servers.
    418 I'm a teapot.
    429 Too Many Requests -- You're requesting too many requests! Slow down!
    500 Internal Server Error -- We had a problem with our server. Try again later.
    503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.