# API LẤY DANH SÁCH MÃ SẢN PHẨM > URL: ``` GET /services/shipment/get-product-code-by-name ``` > Header: Parameter | Mandator | datatype | Description --------- | -------- | ---------| --------- Token | Require | String | Token của shop > Param: Parameter | Mandator | datatype | Description --------- | -------- | ---------| --------- products[] | Require | String | Tên sản phẩm (Truyền theo dạng mảng VD: products[]=Laptop Asus1, products[]=Man hinh Asus) > Curl mẫu: ``` curl --location -g --request GET 'http://{{SERVICE_URL}}/services/shipment/get-product-code-by-name?products[]=Laptop%20Asus1&products[]=Man%20hinh%20Asus' \ --header 'token: {TOKEN_SAMPLE_ABC_123}' ``` > Kết quả trả về nếu không truyền lên products: ```json { "success": false, "message": "Chưa có thông tin sản phẩm!" } ``` > Kết quả trả về nếu không truyền lên products dạng mảng: ```json { "success": false, "message": "Dữ liệu sai định dạng!" } ``` > Kết quả trả về tiêu chuẩn ```json { "success": true, "data": { "Laptop Asus1": { "full_name": "Laptop Asus1", "product_code": "1704005LA12", "weight": 0, "cost": 0 }, "Man hinh Asus": { "full_name": "Man hinh Asus", "product_code": "1704005MHA13", "weight": 0, "cost": 0 } } } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up