Add new product information

Created by Weebo Support, Modified on Thu, 16 Jun, 2022 at 11:51 PM by Weebo Support

Add new product information

interface address

hostname/openapi/v1/productOpenApi/addProductInfo

Request header

User-Agent: openApi

Content-Type: application/json; charset=utf-8

Accept-encoding: gzip,deflate

Time-stamp: 1437528688233

Data-signature: BF706E6AC693BA3B1BABD32E6713431D

Request method

POST

Request body

{

     "productInfo":{

          "categoryUid": 1,

          "name": "Test Product",

          "barcode": "bgtssp004",

          "buyPrice": 10,

          "sellPrice": 15,

          "stock": 100,

          "pinyin": "bgtssp",

          "description": "openApi add on new product testing",

          "isCustomerDiscount": 1,

          "supplierUid": 1,

          "enable": 1,

     },

     "appId": "abcdefghijklmn"

}

parameter name

Is it necessary

Types of

Instructions

appId

Yes

String

KYBIO configured access credentials

categoryUid

no

Long

The unique identifier of the product category

Name

Yes

String

product name

Barcode

Yes

String

Product barcode

buyPrice

Yes

BigDecimal

Product cost price, cannot be 0

sellPrice

Yes

BigDecimal

Product selling price, cannot be 0

Stock

Yes

BigDecimal

Product stocks

Pinyin

no

String

Product Name Pinyin

customerPrice

no

BigDecimal

Product member price

isCustomerDiscount

no

Integer

Whether to open membership discount support, 0 or null does not open; 1 to open

Description

no

String [length 6000]

product description

supplierUid

no

Long

Vendor unique identifier

Enable

no

Int

0 disabled, 1 available

Return result

{

     "status": "success",

     "data": {

          "id": 0,

          "uid": 287518801523242326,

          "name": "Product Test",

          "barcode": " spcs ",

          "buyPrice": 10,

          "sellPrice": 15,

          "stock": 100,

          "pinyin": "bgtssp",

          "enable": 1,

          "description": "openApi increases product testing"

     }

}

Field name

Types of

Instructions

Status

String

Whether the request is processed correctly, return success or error, case-insensitive

Messages

String[]

Processing result message

errorCode

Int

Operation process error code, see error code table

Data

Json

Product entity information

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article