Kunton data push interface specification

Kunton vending machine currently open to real-time push of productinventoryreplenishmentpicking data.

push url

Custom push url is supported, and the request method should be POST

[POST] https://xxxxxxxx.xxxxx.xxxx

To ensure security, we recommend that you use https,but we also support http.
If you need to receive different types of data, you will need the corresponding push url.

Interface authentication

Currently Basic Auth is used for authentication by default. Please provide the corresponding username and password. Different interfaces can use the same username and password, or different username and password can be configured separately.

We also supports non-interface authentication, for data security, we recommend using interface authentication.

Parameter Format

The following fields can be received according to your needs.
Factory code push field supports mapping configuration.

Product

[
    {
        "skuCode":"product code",  // not empty
        "skuName":"product name",  // not empty
        "factorySkuCode":"factory product code",
        "factorySkuName":"factory product name",
        "brand":"brand",
        "unitName":"unit of measurement",
        "pack":"pack",
        "taxPrice":0, // price including tax, not empty
        "noTaxPrice":0, // pre-tax price, not empty
        "onSale":false // available, not empty
    }
]

Inventory

{
    "vmCode":"machine code",   // not empty
    "deviceCode":"device code",  // not empty
    "channelLabelCode":0, // channel label code,not empty
    "skuCode":"product code", // not empty
    "skuName":"product name", // not empty
    "factorySkuCode":"factory product code",
    "factorySkuName":"factory product name",
    "stock":0 // current stock // not empty
}

Replenishment

{
    "tradeNumber":"trade number,unique",  // not empty
    "vmCode":"machine code",  // not empty
    "deviceCode":"device code", // not empty
    "vmTime":"machine replenish time", // not empty
    "factoryCode":"factory code", // not empty
    "factoryName":"factory name", // not empty
    "empCode":"replenishment staff code", // not empty
    "empName":"replenishment staff name", // not empty
    "items":[
        {
            "tradeItemNumber":"item trade number,unique", // not empty
            "channelLabelCode":"channel label code", // not empty
            "tradeNum":0, // pick num,not empty
            "skuCode":"product code", // not empty
            "skuName":"product name", // not empty
            "factorySkuCode":"factory product code",
            "factorySkuName":"factory product name",
            "taxPrice":0, // price including tax, not empty
            "noTaxPrice":0, // pre-tax price, not empty
            "taxStatus":false, // factory tax status,not empty
            "unitName":"product unit name",
            "pack":"product pack"
        }
    ]
}

Picking

{
    "tradeNumber":"trade number,unique",  // not empty
    "vmCode":"machine code",  // not empty
    "deviceCode":"device code", // not empty
    "vmTime":"machine replenish time", // not empty
    "factoryCode":"factory code", // not empty
    "factoryName":"factory name", // not empty
    "empCode":"replenishment staff code", // not empty
    "empName":"replenishment staff name", // not empty
    "empDepartmentCode":"staff department code", // not empty
    "costCode":"cost code",
    "projectCode":"project code",
    "items":[
        {
            "tradeItemNumber":"item trade number,unique", // not empty
            "channelLabelCode":"channel label code", // not empty
            "tradeNum":0, // pick num,not empty
            "skuCode":"product code", // not empty
            "skuName":"product name", // not empty
            "factorySkuCode":"factory product code",
            "factorySkuName":"factory product name",
            "taxPrice":0, // price including tax, not empty
            "noTaxPrice":0, // pre-tax price, not empty
            "taxStatus":false, // factory tax status,not empty
            "unitName":"product unit name",
            "pack":"product pack"
        }
    ]
}

Return format

{
    "ok": true,
    "msg": "success",
    "data": {}
}
  • Boolean Field Type ok means whether the push is successful or not
  • String Field Type msg api message representation, if the push fails, the corresponding failure reason should be returned.
  • Object Field Type data reserved field, no need to return.

If there is a network fluctuation or other external reasons that cause the push to fail, it will be pushed again.
After receiving the push data, it is recommended to first save the data, then return the interface, and then proceed with subsequent business processing to prevent interface synchronization waiting for business processing.

文档更新时间: 2024-06-25 06:17   作者:林贤涛