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 |
|
|
---|---|---|---|---|
|
Ngày cập nhật từ |
date |
vd: 2020/06/01 |
|
|
Ngày cập nhật đến |
date |
vd: 2020/06/02 |
|
|
Tên sản phẩm |
text |
|
|
|
số lượng trên 1 trang |
int |
Mặc định là 10 và tối đa là 50 |
|
|
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 để 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:
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 sản phẩm |
int |
|
||
|
Tên ngành hàng |
text |
|
||
|
Tên sản phẩm |
text |
|
||
|
danh sách thuộc tính |
array |
xem table **attributes |
||
|
Mã sản phẩm |
text |
|
||
|
Danh sách link chứng từ sp |
array |
|
||
|
Link hình sp |
text |
|
||
|
Link sp trên sendo.vn |
text |
|
||
|
chỉ số đánh giá sp |
decimal |
|
||
|
Trạng thái sp |
int |
|
||
|
Trạng thái sp dạng chữ |
text |
|
||
|
trạng thái còn hàng/ hết hàng |
boolean |
|
||
|
giá khuyến mãi |
decimal |
Không còn sử dụng |
||
|
tồn kho |
int |
|
||
|
Có thể xóa hay không |
boolean |
|
||
|
Có thể Sửa hay không |
boolean |
|
||
|
Có thể chia sẻ hay không |
boolean |
|
||
|
Có thể up (lượt up ) hay không |
boolean |
|
||
|
Id ngành hàng cuối |
int |
|
||
|
Có đang chạy khuyến mãi hay không |
boolean |
|
||
|
Ngày úp cuối của sp |
timestamp |
|
||
|
khối lượng |
|
|
||
|
quá hạn cập nhật hay không |
boolean |
|
||
|
Lý do bị từ chối (nếu có) |
text |
|
||
|
đường dẫn ngành hàng |
|
|
||
|
ngày hậu kiểm cuối |
timestamp |
|
||
|
người cập nhật cuối |
text |
|
||
|
Đã hậu kiểm hay không |
boolean |
|
||
|
danh sách link file chứng từ |
array |
|
||
|
Tên thương hiệu |
text |
|
||
|
Lý do từ chối nếu có |
|
|
||
|
giá khuyến mãi |
decimal |
|
||
|
ngày bắt đầu khuyến mãi |
timestamp |
|
||
|
ngày kết thúc khuyến mãi |
timestamp |
|
||
|
đơn vị |
int |
|
||
|
ngày cập nhật cuối |
timestamp |
|
||
|
chiều cao |
decimal |
|
||
|
chiều dài |
decimal |
|
||
|
chiều rộng |
decimal |
|
||
|
không dùng |
|
|
||
|
Giá thấp nhất (sp thuộc tính) |
decimal |
|
||
|
Giá cao nhất (sp thuộc tính) |
decimal |
|
||
|
Có đang cấu hình thuộc tính hay không |
boolean |
|
||
|
số lượng sản phẩm con |
int |
|
||
|
cấu hình loại sản phẩm |
object |
|
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ả |
||
---|---|---|---|---|---|---|---|
|
Id thuộc tính |
int |
Có |
Có |
|
||
|
Tên thuộc tính |
text |
Không |
Không |
|
||
|
giá trị thuộc tính |
array |
Có |
Có |
|
||
|
Có phải thuộc tinh user tự tạo ngoài hệ thống hay không |
boolean |
Có |
Có |
true: thuộc tính shop tự tạo thêm, false: thuộc tính hệ thống |
||
|
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 } |