Add product

  • API này dùng để thêm sản phẩm, tối đa 100 sản phẩm / request.

Request

curl --location 'https://pos.open.nhanh.vn/v3.0/product/add?appId={{appId}}&businessId={{businessId}}' \
--header 'Authorization: {{accessToken}}' \
--header 'Content-Type: application/json' \
--data '[
    {
        "appProductId": "PID001",
        "name": "Sản phẩm 1",
        "importPrice": 50000,
        "price": 100000,
        "oldPrice": 120000,
        "wholesalePrice": 80000,
        "shippingWeight": 300,
        "description": "Mô tả ngắn 1",
        "content": "Nội dung sản phẩm 1",
        "externalImages": [
            "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/71e9c892eb054ee6a04594d56aca1055~tplv-o3syd03w52-origin-jpeg.jpeg?dr=15568&from=520841845&idc=maliva&ps=933b5bde&shcp=2c1af732&shp=1f0b6a75&t=555f072d",
            "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/fcc6b45f1ea240f7b52a8c5ec9e902c5~tplv-o3syd03w52-origin-jpeg.jpeg?dr=15568&from=520841845&idc=maliva&ps=933b5bde&shcp=2c1af732&shp=1f0b6a75&t=555f072d"
        ]
    },
    {
        "appProductId": "PID002",
        "name": "Sản phẩm 2",
        "importPrice": 50000,
        "price": 200000,
        "oldPrice": 220000,
        "wholesalePrice": 80000,
        "shippingWeight": 300,
        "description": "Mô tả ngắn 2",
        "content": "Nội dung sản phẩm 2",
    }
]'
  • Thông tin trong mảng products:

Key
Type
Description

appProductId

string ^{{\color{red}*}}

ID sản phẩm trên hệ thống riêng của bạn

name

string(255) ^{{\color{red}*}}

Tên sản phẩm

code

string(255)

Mã sản phẩm

barcode

string(255)

Mã vạch của sản phẩm

shippingWeight

double

Cân nặng cả vỏ hộp tính bằng gram, được sử dụng để tính phí vận chuyển khi đặt hàng.

vat

int

% thuế giá trị gia tăng (VD: 10)

price

double

Giá bán của sản phẩm

oldPrice

double

Giá cũ sản phẩm

importPrice

double

Giá nhập của sản phẩm

wholesalePrice

double

Giá bán sỉ của sản phẩm

status

string

Xem bảng mô tả trạng thái sản phẩm

categoryId

int

ID danh mục sản phẩm

description

text

Mô tả sản phẩm

content

text

Nội dung chi tiết sản phẩm

externalImages

array

Đường dẫn ảnh không thuộc Nhanh.vn

Response

Failed response

Successful response

{
  "code": 1,
  "data": [
    {
      "id": "(string) ID sản phẩm trên Nhanh.vn",
      "appProductId": "(int) ID sản phẩm trên hệ thống riêng của bạn",
      "barcode": "(string) Mã vạch"
    }
  ]
}

Last updated