Product list - Lấy thông tin sản phẩm

Danh mục trợ giúp

Tin mới

Bắt đầu bán hàng

Quy định và chính sách

Quản lý đơn hàng

Quản lý shop

Quản lý tài chính

Quản lý khiếu nại

Kết nối API

Product list - Lấy thông tin sản phẩm

API lấy thông tin danh sách sản phẩm theo một khoảng thời gian:

  • Tìm kiếm theo Token sẽ lấy điều kiện tìm kiếm theo thông tin trên Token và bỏ qua các thông tin khác trên bộ lọc.

  • Token có thời gian hết hạn, phải bỏ token hết hạn ra để có thể tiếp tục tìm kiếm.

Changed history:

Description

Date

Author

Add filter by productStatus

 

Param:

Field

Tên diễn giải

Kiểu dữ liệu

 

date_from

Ngày cập nhật từ

date

vd: 2020/06/01

date_to

Ngày cập nhật đến

date

vd: 2020/06/02

product_name

Tên sản phẩm

text

 

page_size

số lượng trên 1 trang

int

Mặc định là 10 và tối đa là 50

status

Trạng thái sản phẩm

int?

default null: lấy tất cả trạng thái sản phẩm.

More info: List of enums - Danh sách các enum sử dụng trên sản phẩm.

token

Token để lấy danh sách đơn hàng trang kế tiếp hoặc trước đó

string

Shop lấy dữ cho trang tiếp theo hoặc trang trước đó shop cần điền thông tin vào token tương ứng ở output:

  • token = next_token: trang tiếp theo

  • token = previous_token: Trang trước đó

Hệ thống sẽ ưu tiên lấy data theo thông tin nhập vào token và bỏ qua các thông tin: page_size, product_name, date_from, date_to. Trường hợp token = "" hệ thống sẽ mặc định lấy trang đầu tiên với các thông tin yêu cầu page_size, product_name, date_from, date_to

Code Snippet request:

Sample Request
  curl -X POST \
  	https://open.sendo.vn/api/partner/product/search \
  -H 'authorization: bearer {token}' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
    "page_size": 10,
    "product_name": "",
    "date_from": "2020-05-01",
    "date_to": "2020-05-28",
    "status":null,
    "token": ""
	}'


Response:

Tên field

Tên diễn giải

kiểu dữ liệu

Mô tả

id

Id sản phẩm

int

 

category_4_name

Tên ngành hàng

text

 

name

Tên sản phẩm

text

 

attributes

danh sách thuộc tính

array

xem table **attributes

sku

Mã sản phẩm

text

 

certificate_file

Danh sách link chứng từ sp

array

 

image

Link hình sp

text

 

link

Link sp trên sendo.vn

text

 

rating

chỉ số đánh giá sp

decimal

 

status

Trạng thái sp

int

 

status_name

Trạng thái sp dạng chữ

text

 

stock

trạng thái còn hàng/ hết hàng

boolean

 

promotion_price

giá khuyến mãi

decimal

Không còn sử dụng

stock_quantity

tồn kho

int

 

can_delete

Có thể xóa hay không

boolean

 

can_edit

Có thể Sửa hay không

boolean

 

can_share

Có thể chia sẻ hay không

boolean

 

can_up

Có thể up (lượt up ) hay không

boolean

 

cate_4_id

Id ngành hàng cuối

int

 

is_promotion

Có đang chạy khuyến mãi hay không

boolean

 

up_product_date_timestamp

Ngày úp cuối của sp

timestamp

 

weight

khối lượng

 

 

is_off

quá hạn cập nhật hay không

boolean

 

reason_comment

Lý do bị từ chối (nếu có)

text

 

url_path

đường dẫn ngành hàng

 

 

review_date_timestamp

ngày hậu kiểm cuối

timestamp

 

updated_user

người cập nhật cuối

text

 

is_review

Đã hậu kiểm hay không

boolean

 

file_attachments

danh sách link file chứng từ

array

brand_name

Tên thương hiệu

text

 

reason_code

Lý do từ chối nếu có

 

 

special_price

giá khuyến mãi

decimal

 

promotion_from_date_timestamp

ngày bắt đầu khuyến mãi

timestamp

 

promotion_to_date_timestamp

ngày kết thúc khuyến mãi

timestamp

 

unit_id

đơn vị

int

 

updated_at_timestamp

ngày cập nhật cuối

timestamp

 

height

chiều cao

decimal

 

length

chiều dài

decimal

 

width

chiều rộng

decimal

 

shipping_images

không dùng

 

 

final_price_min

Giá thấp nhất (sp thuộc tính)

decimal

 

final_price_max

Giá cao nhất (sp thuộc tính)

decimal

 

is_config_variant

Có đang cấu hình thuộc tính hay không

boolean

 

variants_length

số lượng sản phẩm con

int

 

voucher

cấu hình loại sản phẩm

object

product_type: int  1: sp vật lý, 2: voucher vé giấy, 3: evoucher start_date_timestamp: ngày bắt đầu (voucher /eVoucher) end_date_timestamp: ngày kết thúc (voucher /eVoucher) is_check_date: true → start + end phải có value, fales → start + end có thể rỗng

Attributes:

Tên field

Tên diễn giải

kiểu dữ liệu

Dùng trong Tạo/ Cập nhật

Bắt buộc

Mô tả

attribute_id

Id thuộc tính

int

 

attribute_name

Tên thuộc tính

text

Không

Không

 

attribute_values

giá trị thuộc tính

array

id : Id của giá trị thuộc tính, khác với id của thuộc tính

value: giá trị hiển thị trên UI của thuộc tính

is_custom: Có phải giá trị User tự thêm ngoài hệ thống hay không

attribute_img: Hình ảnh của màu sắc - dùng cho thuộc tính có hình (màu sắc)

attribute_is_custom

Có phải thuộc tinh user tự tạo ngoài hệ thống hay không

boolean

true: thuộc tính shop tự tạo thêm, false: thuộc tính hệ thống

attribute_is_image

có phải thuộc tính có hình hay không

boolean

Không

Không

 

Code Snippet response

{
    "result": {
        "data": [
            {
                "id": 16673653,
                "category_4_name": "Áo sơ mi nam trơn",
                "attributes": [
                    {
                        "attribute_id": 1107,
                        "attribute_name": "Kích thước",
                        "attribute_is_custom": false,
                        "attribute_is_image": false,
                        "attribute_values": [
                            {
                                "id": 20583,
                                "value": "Free size",
                                "attribute_img": null,
                                "is_custom": false
                            }
                        ]
                    },
                    {
                        "attribute_id": 284,
                        "attribute_name": "Màu sắc",
                         "attribute_is_custom": false,
                        "attribute_is_image": false,
                        "attribute_values": [
                            {
                                "id": 602,
                                "value": "Nâu",
                                "attribute_img": null,
                                "is_custom": false
                            }
                        ]
                    }
                ],
                "certificate_file": [],
                "image": "http://mtest.scdn.vn/img1/2020/3_20/n2pBUkD1vZIf2K8dMeOGv9QbA88WDUmz.jpg",
                "link": "http://test.sendo.vn/ao-so-mi-1-16673653.html",
                "name": null,
                "price": 0.0,
                "rating": 0.0,
                "status": 2,
                "status_name": "Đã duyệt",
                "stock": true,
                "stock_quantity": 99993,
                "can_delete": true,
                "can_edit": true,
                "can_share": true,
                "can_up": true,
                "sku": "huygenhuygen",
                "cate_4_id": 2897,
                "is_promotion": false,
                "up_product_date_timestamp": null,
                "weight": 10.0,
                "is_off": false,
                "reason_comment": null,
                "url_path": "thoi-trang-nam/ao-so-mi-nam/ao-so-mi-nam-tron",
                "review_date_timestamp": null,
                "updated_user": "salesorderupdatequantity",
                "is_review": false,
                "file_attachments": [],
                "brand_name": null,
                "reason_code": null,
                "special_price": 1000000.0,
                "promotion_from_date_timestamp": null,
                "promotion_to_date_timestamp": null,
                "unit_id": 2,
                "updated_at_timestamp": 1590476126.0,
                "height": null,
                "length": null,
                "width": null,
                "shipping_images": null,
                "final_price_min": 1000000.0,
                "final_price_max": 1000000.0,
                "is_config_variant": true,
                "variants_length": 1,
                "voucher": {
                    "product_type": 1,
                    "start_date_timestamp": null,
                    "end_date_timestamp": null,
                    "is_check_date": null
                },
                "campaign_status": null
            },
            {
                "id": 16673782,
                "category_4_name": "Đầm ren",
                "attributes": [
                    {
                        "attribute_id": 298,
                        "attribute_name": "Kích thước",
                         "attribute_is_custom": false,
                        "attribute_is_image": false,
                        "attribute_values": [
                            {
                                "id": 25304,
                                "value": "27",
                                "attribute_img": null,
                                "is_custom": false
                            }
                        ]
                    },
                    {
                        "attribute_id": 284,
                        "attribute_name": "Màu sắc",
                         "attribute_is_custom": false,
                        "attribute_is_image": false,
                        "attribute_values": [
                            {
                                "id": 603,
                                "value": "Vàng",
                                "attribute_img": null,
                                "is_custom": false
                            }
                        ]
                    }
                ],
                "certificate_file": [],
                "image": "http://mtest.scdn.vn/img1/2020/3_24/esMGIZidVZODdMEsic9nqdyBM4alRcxj.jpg",
                "link": "http://test.sendo.vn/dam-ren-flash-sale-16673782.html",
                "name": null,
                "price": 0.0,
                "rating": 0.0,
                "status": 2,
                "status_name": "Đã duyệt",
                "stock": true,
                "stock_quantity": 99992,
                "can_delete": true,
                "can_edit": true,
                "can_share": true,
                "can_up": true,
                "sku": "damrenfs",
                "cate_4_id": 2486,
                "is_promotion": false,
                "up_product_date_timestamp": null,
                "weight": 10.0,
                "is_off": false,
                "reason_comment": null,
                "url_path": "thoi-trang-nu/dam/dam-ren",
                "review_date_timestamp": null,
                "updated_user": "salesorderupdatequantity",
                "is_review": false,
                "file_attachments": [],
                "brand_name": null,
                "reason_code": null,
                "special_price": 100000.0,
                "promotion_from_date_timestamp": null,
                "promotion_to_date_timestamp": null,
                "unit_id": 2,
                "updated_at_timestamp": 1592202357.0,
                "height": null,
                "length": null,
                "width": null,
                "shipping_images": null,
                "final_price_min": 100000.0,
                "final_price_max": 100000.0,
                "is_config_variant": true,
                "variants_length": 1,
                "voucher": {
                    "product_type": 1,
                    "start_date_timestamp": null,
                    "end_date_timestamp": null,
                    "is_check_date": null
                },
                "campaign_status": null
            }
            ..................
        ],
        "total_records": 4,
        "next_token": "TqPupq15TljMzG6Vtf14McyK//7UKE3F8MDQfciQ+8l8adqIHqvZOSEwKGzzO6RNNFri9mPDJuM5Ec+CCHNIW+pMwleFyaiR8WiIci1cliq7IYVqDrr2+G5nWVb/GFpFj6brDxi2Fls0Yo57v0jSMSmp28wvwbYAn+S7UoEAxeFzhG5D+DI9MNzapYEM4L6/hxOsnizBNu/VLKVd2mdnAfrG1ecjk/rWSiDucua/Lq8RmTw0g6le8ok1LStDyFzB/ghTVpIXSFviJf60+X7rq3wF94amtmX05HPpJBZmqjhgQSeORp0vvB92+Nl38mH/WhqO3JtjZgu9PVt/0KiguIWs7XNrH29XIKcHZAWvshPrIeitlTBRGYtApajLSEgiP2ms3zISgLx6wM5PF5x/zw0RUCCMmRb+Ji0Ap9rT6lT60yQ0vIv5nM8RvT5agl393JXmpFHEQJtrVzQHq5u8/+7PULnUNsLVHM1xvyhpkFsZHFuof323KI7PALxZvaO+UDAmdHCiXiZiBeqJ/0Ti5Nizs9r2X1PoQNoSDYbJNlioKmoDLjQrJ7P0RVxTSiw/uj7cudhf/uVWqJ0hamGjVBnnebqN91g4WhFGFrPo/rlLV0it0m4nZxExlR9x/+Gj0rmm5c4+Xq7mA4BBZIo0rNq7h1N9DIfVs8lmLlMIMvCQMiYb+F61JtlQThofUEtNHhMxmaiKuxtKtTZlYbtIyupSafFpApaVDgG489sC6iSkKVYwfdtOAVvzSDm6JK1gEJ9UqhLw38obaveu7f9j/a807UTbcnsknLt16aleipanL7TxY9/VQafITEcpdTNbf5mgURdR32HKChNE/FGv3lJFFBsroeH3arKIi2A+cEd/bhOE1UO4u3t3WJcmYiu+S/wycXvBsCAYxJremjPyIrhXH1+1mHzfo0BG1sUzhKLrNZBSRT1AG4MIbFu53iA/YIljA+C64GLCiZ1uD/Ly5U5awzN/bYNDIt/UgtjsQUeb4lkKjp9HNQZih3SQ6YS0YPrKB5LKZb2wtTugF84MzZRBLKDYBB1rEY7VuS3h5Mmx8EVsJute82NXxiUg7Y4WuMLAkxKireDF5BF9zi/rlP3R4gxzo8KUGcPhjG1VgTaHKt42wKCHwcS7u8Dm0PP1UGQvHTq2KhnZlrru1jWL7DATdYTRRDi74Q5DMMbVpWY=",
        "previous_token": null
    },
    "success": true,
    "error": null,
    "status_code": 200
}