Get Sku Detail - Lấy chi tiết 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

Get Sku Detail - Lấy chi tiết sản phẩm

API Lấy chi tiết sản phẩm, đã bao gồm thuộc tính và ngành hàng

Changed history

Description

Date

Author

add field variant_attribute_hash

add 2 field trong extended_shipping_package

is_using_standard : bool gói tiêu chuẩn

is_using_eco : bool gói bưu kiện

Add field installments
Get Installment Terms - Lấy thông tin cấu hình trả góp

 

Tham số: Tùy vào nhu cầu cần lấy, Shop có thể cung cấp Id hoặc Sku để lấy sản phẩm. Trong trường hợp cung cấp cả 2, Sendo sẽ ưu tiên lấy thông tin theo id

Parameter

Mô tả

Ví dụ

id

id của sản phẩm

int, example: 1403349

sku

mã sản phẩm

string, example: sp123456

Field:

Ghi chú viết tắt:

sp → sản phẩm

sản phẩm đơn: sản phẩm không có cấu hình giá thuộc tính

variant: sản phẩm con

boolean: dạng true/false  yes/no

Tên field

Tên diễn giải

kiểu dữ liệu

Dùng trong tạo/ cập nhật sản phẩm

bắt buộc

Mô tả

id

Id sản phẩm

int

Truyền >0 để cập nhật, 0 để tạo 1 sản phẩm mới

name

Tên sản phẩm

text

 

sku

Mã sản phẩm

text

Unique không trùng đối với 1 shop

price

Giá gốc sản phẩm

decimal

 

stock_availability

Trạng thái còn hàng

boolean

Còn hàng/ hết hàng, khi tạo và cập nhật nếu "stock_quantity" <=0 thì field này phải có value false (hết hàng)

stock_quantity

Tồn kho

int

Tồn kho của sp đơn

description

Mô tả

text

Input dạng html raw text không vượt quá 20 hình (<img> tag), min 100 , max 100.000 ký tự

cat_4_id

Mã ngành hàng cấp 4

int

Mã ngành hàng cuối của sp

status

Trạng thái sp

int

Không

Không

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

tags

Từ khóa

text

Không

 

seo

Các thông tin về SEO

object

Không

Không

 

link

Link sp trên sendo.vn

string

Không

Không

Hệ thống tự sinh ra, không cho thay đổi

relateds

Sp liên quan

array

Không

Không

seo_keyword

Từ khóa SEO

text

Không

 

seo_title

Tiêu đề SEO

text

Không

 

seo_description

Mô tả SEO

text

Không

 

seo_score

Điểm SEO

decimal

Không

Không

 

image

Hình sp

text

Không

Không

 Không cho đổi avatar sau khi lưu,field Picture được sử dụng để tạo và update

category_4_name

Tên ngành hàng cấp 4

text

Không

Không

 

promotion_price

Giá khuyến mãi

decimal

Không

Không

Không còn sử dụng

brand_id

Id thương hiệu

int

 

Bắt buộc > 0 đổi với shopmall, shop thường không sử dụng

brand_name

Tên thương hiệu

text

Không

Không

 

updated_user

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

text

Không

Không

có thể là shop cập nhật, người hậu kiểm, job cron

updated_date_timestamp

Ngày cập nhật

int64

Không

Không

 

created_date_timestamp

Ngày tạo

int64

Không

Không

 

url_path

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

text

Không

Không

 

video_links

Link dẫn tới video của sp

string[]

Không

 

height

Chiều cao

decimal

Hợp lệ khi Khối lượng có giá trị học hoặc  "dài, rộng, cao" có giá trị

length

Chiều dài

decimal

width

Chiều rộng

decimal

weight

Khối lượng

decimal

unit_id

Đơn vị

int

Ví dụ: 1 → Cái
unit List of enums - Danh sách các enum sử dụng trên sản phẩm.

avatar

Ảnh đại diện sản phẩm

object


picture_url: link url hình ảnh

pictures

Danh sách hình của sp

Array


picture_url: link url hình ảnh

certificate_file

danh sách file chứng từ sp

Array

Không

Không

Shop mall bắt buộc có field này


 

attributes

danh sách thuộc tính sp

Array

Xem mô tả: Attributes

promotion_from_date_timestamp

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

int64

Không

 

promotion_to_date_timestamp

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

int64

Không

 

extended_shipping_package

Cấu hình vận chuyển

object

 


is_using_instant: có dùng gói hoả tốc

is_using_in_day: có dùng gói trong ngày

is_self_shipping: có tự vận chuyển

is_using_standard: có dùng gói tiêu chuẩn

is_using_eco: có dùng gói bưu kiện

variants

Danh sách sp con

array

 

Xem mô tả: Variants

is_config_variant

Sản phẩm cấu hình

boolean

Nếu false → sp không có sp con, variants không bắt buộc. YES → phải có variants

is_invalid_variant

Sp có đang bị lỗi ngành hàng thuộc tính

boolean

True nếu sp từng bị đổi ngành hàng dẫn đến thuộc tính không hiển thị được trên ban.sendo.vn

special_price

Giá khuyến mãi 

decimal

Không

 

voucher

thông tin Loại sản phẩm

 


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

is_check_date: boolean : nếu True thì startDate và endDate phải có giá trị

start_date_timestamp: Ngày bắt đầu hiệu lực của Voucher/ E-Voucher. Có hiệu lực khi is_check_date=true.

end_date_timestamp: Ngày kết thúc hiệu lực của Voucher/ E-Voucher.Có hiệu lực khi is_check_date=true.

product_category_types

Loại hình sản phẩm của ngành hàng 

Array

Không

is_flash_sales

Tham gia FlashSale

boolean

Không

Không

 

campaign_status

Trạng thái sự kiện

int

Không

Không

 

can_edit

Có thể cập nhật trạng thái sản phẩm

boolean

Không

Không

True: được phép cập nhật sp, False: không được phép cập nhật sp

installments

Cấu hình trả góp

Array

Không

[3, 6] => 3 tháng, 6 tháng
Thông tin cấu hình trả góp của shop lấy theo API
Get Installment Terms - Lấy thông tin cấu hình trả góp

Variants:

Tên field

Tên diễn giải

Kiểu dữ liệu

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

Bắt buộc

Mô tả

attributes

thuộc tính đã chọn của sp con

array


Xem mô tả: Attributes

variant_is_promotion

có đang khuyến mãi hay không

boolean

không

không

 

variant_sku

mã sản phẩm con

text

không được trùng trong 1 sản phẩm

variant_price

Giá

decimal

 

variant_special_price

Giá khuyến mãi

decimal

không

 

variant_quantity

Tồn kho

int

Không

 

variant_is_flash_sales

Tham gia FlashSale

boolean

Không

Không

 

variant_campaign_status

Trạng thái sự kiện

int

Không

Không

 

variant_promotion_start_date_timestamp

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

int64

Không

 

variant_promotion_end_date_timestamp

Ngày kết thức khuyến mãi

int64

Không

 

variant_attribute_hash

 

string

Không

Khô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_type

Loại thuộc tính

int

Không

Không

 

attribute_name

Tên Thuộc tính

text

Không

 

attribute_is_required

Thuộc tính có bắt buộc hay không

boolean

Không

Không

 

attribute_code

Mã thuộc tính

text

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

is_selected: Giá trị có đang được lưu trong sản phẩm này 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

tối đa 3 thuộc tính (isCheckout+ isCustom)

attribute_is_image

có phải thuộc tính màu sắc hay không

boolean

Không

Không

 

attribute_is_checkout

Cấu hình bắt buộc phải chọn  

boolean

Hệ thống tự sinh ra, không cho thay đổi 

Code Snippet request By ID

Sample Request
curl -X GET \
  'https://open.sendo.vn/api/partner/product?id=16673758 \
  -H 'Authorization: bearer your_access_token' \

Code Snippet request By SKU

Sample Request
curl -X GET \
  'https://open.sendo.vn/api/partner/product?sku=nambuchobe \
  -H 'Authorization: bearer your_access_token' \

Code Snippet request By both (Priority for id)

Sample Request
curl -X GET \
  'https://open.sendo.vn/api/partner/product?id=16673758&sku=nambuchobe \
  -H 'Authorization: bearer your_access_token' \

Code Snippet response

Example
{
    "result": {
        "id": 16673758,
        "name": "num bu cho con",
        "sku": "numbuchobe",
        "price": 80000.0,
        "weight": 10.0,
        "stock_availability": false,
        "stock_quantity": 0,
        "description": "<p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#39;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.<span>​</span></p>",
        "cat_4_id": 1297,
        "status": 2,
        "tags": "num vu cho be tap bu binh,dam cho con bu,ao cho con bu,vay cho con bu,do cho con bu",
        "updated_date_timestamp": 1590830538.0,
        "created_date_timestamp": 1584963481.0,
        "seo":"{\"score\":\"\\",\"seo_description\":\"\",\"seo_keyword\":\"\",\"seo_title\":\"\"}",
        "link": "http://test.sendo.vn/num-bu-cho-con-16673758.html",
        "relateds": [],
        "seo_keyword": null,
        "seo_title": null,
        "seo_description": null,
        "seo_score": 0,
        "image": "http://mtest.scdn.vn/img1/2020/3_23/wPtf5OgjHdZqB8RsJicvqGCdf7kGYVWb.jpg",
        "category_4_name": "Đầm đôi mẹ & bé gái",
        "brand_id": 0,
        "brand_name": null,
        "updated_user": "salesorderupdatequantity",
        "url_path": "me-va-be/thoi-trang-gia-dinh-set-trang-phuc/dam-doi",
        "video_links": null,
        "height": 0.0,
        "length": 0.0,
        "width": 0.0,
        "unit_id": 1,
        "avatar": {
            "picture_url": "http://mtest.scdn.vn/img1/2020/3_23/wPtf5OgjHdZqB8RsJicvqGCdf7kGYVWb.jpg"
        },
        "pictures": [
            {
                "picture_url": "http://mtest.scdn.vn/img1/2020/3_23/wPtf5OgjHdZqB8RsJicvqGCdf7kGYVWb.jpg"
            }
        ],
        "certificate_file": [],
        "attributes": [
            {
                "attribute_id": 284,
                "attribute_type": 1,
                "attribute_name": "Màu sắc",
                "attribute_is_required": true,
                "attribute_code": "mau_sac",
                "attribute_is_custom": false,
                "attribute_is_checkout": true,
                "attribute_is_image": true,
                "attribute_values": [
                    {
                        "id": 602,
                        "value": "Nâu",
                        "attribute_img": null,
                        "is_selected": false,
                        "is_custom": false
                    },
                    {
                        "id": 603,
                        "value": "Vàng",
                        "attribute_img": null,
                        "is_selected": true,
                        "is_custom": false
                    },
                    ..................
                ]
            },
            {
                "attribute_id": 333,
                "attribute_type": 3,
                "attribute_name": "Xuất xứ",
                "attribute_is_required": true,
                "attribute_code": "xuat_xu",
                "attribute_is_custom": false,
                "attribute_is_checkout": false,
                "attribute_is_image": false,
                "attribute_values": [
                    {
                        "id": 1418,
                        "value": "Mỹ",
                        "attribute_img": null,
                        "is_selected": false,
                        "is_custom": false
                    },
                    {
                        "id": 1419,
                        "value": "Nhật Bản",
                        "attribute_img": null,
                        "is_selected": true,
                        "is_custom": false
                    },
                  .......
                ]
            }
        ],
        "special_price": 80000.0,
        "promotion_from_date_timestamp": null,
        "promotion_to_date_timestamp": null,
        "is_promotion": false,
        "extended_shipping_package": {
            "is_using_instant": false,
            "is_using_in_day": true,
            "is_self_shipping": false
        },
        "variants": [
            {
                "variant_attributes": [
                    {
                        "attribute_id": 284,
                        "attribute_code": "mau_sac",
                        "option_id": 603
                    }
                ],
                "variant_is_promotion": 0,
                "variant_sku": "Vàng",
                "variant_price": 80000.0,
                "variant_special_price": 50000.0,
                "variant_quantity": 0,
                "variant_promotion_start_date_timestamp": 1584896400.0,
                "variant_promotion_end_date_timestamp": 1592067599.0,
                "variant_is_flash_sales": null,
                "variant_campaign_status": null
            }
        ],
        "is_config_variant": true,
        "is_invalid_variant": false,
        "voucher": {
            "product_type": 1,
            "start_date": null,
            "end_date": null,
            "is_check_date": null
        },
        "product_category_types": [
            1
        ],
        "is_flash_sales": false,
        "campaign_status": null,
        "can_edit": true,
        "installments": [
            3,
            6
        ]
    },
    "success": true,
    "error": null,
    "status_code": 200
}