开发平台

电话咨询 400-000-7749

1. 分页查询全部商品分类


接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryProductCategoryPages
请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn",
  • "postBackParameter": {,
  • "parameterType": "abcd",从返回结果中直接取出
  • "parameterValue": "abcd"
  • }
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    postBackParameter Json 查询首页时可以不传,之后的内容从返回结果中取出
    parameterType String 从返回结果中取出
    parameterValue String 从返回结果中取出
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "data": {
  • "postBackParameter": {
  • "parameterType": "abcd",从返回结果中直接取出
  • "parameterValue": "abcd"
  • },
  • "result": [
  • {
  • "uid": 813701230071893827,
  • "parentUid": 0,
  • "name": "工艺品"
  • }
  • ],
  • "pageSize": 100
  • }
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    pageSize int 本次查询预期从库存取出记录数,如果结果集的长度小于pageSize,不需要进行下一页查询
    postBackParameter Json 分页查询回传到服务器的参数结构从第二页开始必须回传,如果没传,每次查询都是第一页
    parameterType String 从返回结果中直接取出用于回传,不能变其值
    parameterValue String 从返回结果中直接取出用于回传,不能变其值
    result List 商品分类实体
    uid Long 当前商品分类唯一标识
    parentUid Long 当前商品分类的父分类的唯一标识
    name String 商品分类名称

    2. 分页查询全部商品图片


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryProductImagePages
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn",
  • "postBackParameter": {
  • "parameterType": "abcd",从返回结果中直接取出
  • "parameterValue": "abcd"
  • }
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    postBackParameter Json 查询首页时可以不传,之后的内容从返回结果中取出
    parameterType String 从返回结果中取出
    parameterValue String 从返回结果中取出
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "data": {
  • "postBackParameter": {
  • "parameterType": "abcd",从返回结果中直接取出
  • "parameterValue": "abcd"
  • },
  • "result": [
  • {
  • "productUid": 1366004607492564649,
  • "productName": "翠玉白菜",
  • "productBarcode": "100",
  • "imageUrl": "http://order.dev.www.onnagokoro.net:12080
  • /productImages/35096/1332771854373.jpg",
  • }
  • ],
  • "pageSize":100
  • }
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    pageSize int 本次查询预期从数据库中取出记录数,如果结果集的长度小于pageSize,不需要进行下一页查询
    postBackParameter json 分页查询回传到服务器的参数结构从第二页开始必须回传,如果没传,每次查询都是第一页
    parameterType String 从返回结果中直接取出用于回传,不能变其值
    parameterValue String 从返回结果中直接取出用于回传,不能变其值
    result List 商品图片实体
    productUid Long 商品的唯一标识
    productName String 商品名称
    productBarcode String 商品的条形码
    imageUrl String 商品图片的url

    3. 根据商品查询商品图片


    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryProductImagesByProductUid
    请求体
  • {
  • "appId": "abcdefghijklmn",
  • "productUid": 1088274448926059360
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    productUid Long 商品uid
    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryProductImagesByBarcode
    请求体
  • {
  • "appId": "abcdefghijklmn",
  • "productBarcode": "6921168509256"
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    productBarcode String 商品条码
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "data": [{
  • "productUid": 1366004607492564649,
  • "productName": "翠玉白菜",
  • "productBarcode": "1001",
  • "imageUrl": "http://order.dev.www.onnagokoro.net:12080
  • /productImages/35096/1332771854373.jpg",
  • }]
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    result List 商品图片实体
    productUid Long 商品的唯一标识
    productName String 商品名称
    productBarcode String 商品的条形码
    imageUrl String 商品图片的url

    4. 根据条形码查询商品信息


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryProductByBarcode
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn",
  • "barcode":"1001"
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    barcode String 商品条码
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "data":{
  • "uid": 1366004607492564649,
  • "categoryUid": 813701230071893827,
  • "name": "翠玉白菜"{
  • "barcode": "1001",
  • "buyPrice": 10000,
  • "sellPrice": 15000,
  • "sellPrice2": 14000,
  • "stock": 123,
  • "maxStock": 888,
  • "minStock": 6,
  • "noStock": 0,
  • "pinyin": "CYBC",
  • "customerPrice": 15000,
  • "isCustomerDiscount": 1,
  • "description": "尺寸:长18.7公分,宽9.1公分,厚5.07公分",
  • "attribute1":"y",
  • "attribute2":"",
  • "attribute3":"",
  • "attribute4":""
  • "attribute5":""
  • "attribute6":""
  • "attribute7":""
  • "attribute8":""
  • }
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    data Json 商品实体信息
    uid Long 商品实体唯一标识
    categoryUid Long 商品分类的唯一标识
    name String 商品名称
    barcode String 商品条形码
    buyPrice BigDecimal 商品进货价
    sellPrice BigDecimal 商品销售价
    sellPrice2 BigDecimal 批发价
    stock BigDecimal 商品库存
    maxStock BigDecimal 库存上限
    minStock BigDecimal 库存下限
    noStock int NULL/0 记库存,1不记库存
    pinyin String 商品名称拼音
    customerPrice BigDecimal 商品会员价
    isCustomerDiscount Integer 是否开启会员折扣支持,为0或null不开启;1开启
    description String[长度6000] 商品描述
    supplierUid Long 供应商唯一标识
    enable Int 1可用 0禁用 -1删除
    attribute1 String 自定义1
    attribute2 String 自定义2
    attribute3 String 自定义3
    attribute4 String 自定义4
    attribute5 String SPU/货号/主编码(服装多颜色尺码)
    attribute6 String 规格
    attribute7 String 是否主商品(多规格时用到)
    attribute8 String 是否多颜色尺码
    productionDate String 生产日期,格式yyyy-MM-dd HH:mm:ss
    shelfLife Integer 保质期(天数)
    自定义1自定义2自定义3自定义4
    零售自定义1自定义2自定义3货号
    餐饮无(无显示)自定义2自定义3页面没显示
    母婴自定义1自定义2自定义3货号
    烘焙自定义1自定义2页面没显示页面没显示
    美业休闲自定义1自定义2自定义3自定义4
    服装颜色尺码无(无显示)货号
    宠物自定义1自定义2自定义3自定义4
    生活服务自定义1自定义2自定义3自定义4
    其他自定义1自定义2自定义3自定义4

    5. 分页查询全部商品信息


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryProductPages
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn",
  • "categoryUid": "123456789",
  • "needAllIncludeDel": 0,
  • "updatedDateTimeFrom": "2021-12-30 11:02:09",
  • "updatedDateTimeTo": "2021-12-31 23:59:59",
  • "postBackParameter": {
  • "parameterType": "abcd",从返回结果中直接取出
  • "parameterValue": "abcd"
  • }
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    categoryUid Long 商品分类唯一标识,根据商品分类查询商品
    needAllIncludeDel int 是否查询已删除的数据 1:是 0:否(默认)
    updatedDateTimeFrom String 修改开始时间,格式为yyyy-MM-dd HH:mm:ss,包含开始时间
    updatedDateTimeTo String 修改结束时间,格式为yyyy-MM-dd HH:mm:ss,包含结束时间
    postBackParameter Json 查询首页时可以不传,之后的内容从返回结果中取出
    parameterType Json 从返回结果中取出
    parameterValue String 从返回结果中取出
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "data":{
  • "postBackParameter": {
  • "parameterType": "abcd",从返回结果中直接取出
  • "parameterValue": "abcd"
  • },
  • "result": [
  • {
  • "uid": 1366004607492564649,
  • "categoryUid": 813701230071893827,
  • "name": "翠玉白菜"{
  • "barcode": "1001",
  • "buyPrice": 10000,
  • "sellPrice": 15000,
  • "stock": 0,
  • "pinyin": "CYBC",
  • "customerPrice": 15000,
  • "isCustomerDiscount": 1,
  • "description": "尺寸:长18.7公分,宽9.1公分,厚5.07公分",
  • "attribute1":"y",
  • "attribute2":"",
  • "attribute3":"",
  • "attribute4":""
  • "attribute5":""
  • "attribute6":""
  • "attribute7":""
  • "attribute8":""
  • }
  • ],
  • "pageSize": 100
  • }
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    pageSize int 本次查询预期从库存取出记录数,如果结果集的长度小于pageSize,不需要进行下一页查询
    postBackParameter Json 分页查询回传到服务器的参数结构从第二页开始必须回传,如果没传,每次查询都是第一页
    parameterType String 从返回结果中直接取出用于回传,不能变其值
    parameterValue String 从返回结果中直接取出用于回传,不能变其值
    result List 商品实体信息,字段信息参照:4. 根据条形码查询商品信息

    6. 修改商品信息


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/updateProductInfo
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn",
  • "productInfo":{
  • "uid": 1366004607492564649,
  • "buyPrice": 10000,
  • "sellPrice": 15000,
  • "stock": 100,
  • "customerPrice": 15000,
  • "isCustomerDiscount": 1
  • }
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    productInfo Json
    uid Long 商品在FUN官网网系统的唯一标识
    buyPrice BigDecimal 进货价,传空或不传不做修改操作
    sellPrice BigDecimal 销售价,传空或不传不做修改操作
    sellPrice2 BigDecimal 商品批发价
    stock BigDecimal 库存,传空或不传不做修改操作
    customerPrice BigDecimal 会员价,传空或不传不做修改操作
    categoryUid Long 商品分类的唯一标识
    supplierUid Long 供应商唯一标识
    isCustomerDiscount Integer 传1表示使用会员折扣计算商品价格传0表示使用商品的会员价
    shelfLife Integer 保质期(天数)
    name String 商品名称
    enable Integer 1可用 0禁用 -1删除
    attribute1 String[长度255] attribute1-attribute10 不同,表示的意义不同,可在后台创建个商品,调用下查询接口,自行对应各个字段的含义
    attribute2 String[长度255] attribute2
    attribute3 String[长度255] attribute3
    attribute4 String[长度255] attribute4
    attribute5 String[长度255] SPU/货号(服装多颜色尺码) 多规格商品,该字段一样
    attribute6 String[长度255] 规格
    attribute7 String[长度255] 是否主商品 1:主商品 0:非主商品 多规格收银时,默认选中的商品 比如默认选中 大杯
    attribute8 String[长度255] attribute8
    attribute9 String[长度255] attribute9
    attribute10 String[长度255] attribute10
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "errorCode":null
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表

    7. 根据唯一标识查询商品信息


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryProductByUid
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn",
  • "productUid":1366004607492564649
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    productUid Long 商品在FUN官网网系统的唯一标识
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "data":{
  • "uid": 1366004607492564649,
  • "categoryUid": 813701230071893827,
  • "name": "翠玉白菜"{
  • "barcode": "1001",
  • "buyPrice": 10000,
  • "sellPrice": 15000,
  • "stock": 0,
  • "pinyin": "CYBC",
  • "customerPrice": 15000,
  • "isCustomerDiscount": 1,
  • "description": "尺寸:长18.7公分,宽9.1公分,厚5.07公分"
  • "attribute1":"y",
  • "attribute2":"",
  • "attribute3":"",
  • "attribute4":""
  • "attribute5":""
  • "attribute6":""
  • "attribute7":""
  • "attribute8":""
  • }
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    data Json 商品实体信息,字段信息参照:4. 根据条形码查询商品信息

    8. 新增加商品信息


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/addProductInfo
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "productInfo":{
  • "categoryUid": 1,
  • "name": "彪哥商品",
  • "barcode": "bgtssp004",
  • "buyPrice": 10,
  • "sellPrice": 15,
  • "stock": 100,
  • "pinyin": "bgtssp",
  • "description": "openApi增加商品测试",
  • "isCustomerDiscount": 1,
  • "supplierUid": 1,
  • "enable": 1
  • },
  • "productCommonAttribute":{
  • "canAppointed": 1,
  • "pluCode": "xxx",
  • "brandUid": 666666,
  • "stockPosition": "库位A",
  • "volume": 15.55,
  • "weight": 101.01,
  • "weightUnit": 1,
  • "enableSN": 1,
  • "isPacking": 1,
  • "isBarcodeScale": 1,
  • "isNewly": 1
  • },
  • "appId": "abcdefghijklmn"
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    productInfo json 商品主要信息
    categoryUid Long 商品分类的唯一标识
    name String 商品名称
    barcode String
  • 商品条形码
    如果后台没该商品,但添加时 报 商品已存在 的错误,表示该商品被删除了
  • buyPrice BigDecimal 商品进货价,不可为0
    sellPrice BigDecimal 商品销售价,不可为0
    sellPrice2 BigDecimal 商品批发价
    stock BigDecimal 商品库存
    maxStock BigDecimal 库存上限
    minStock BigDecimal 库存下限
    noStock Int 是否不记库存 NULL/0 记库存,1不记库存
    pinyin String 商品名称拼音
    customerPrice BigDecimal 商品会员价
    isCustomerDiscount Integer 是否开启会员折扣支持,为0或null不开启;1开启
    description String[长度6000] 商品描述
    supplierUid Long 供应商唯一标识
    shelfLife Integer 保质期(天数)
    attribute1 String[长度255] attribute1-attribute10 不同,表示的意义不同,可在后台创建个商品,调用下查询接口,自行对应各个字段的含义
    attribute2 String[长度255] attribute2
    attribute3 String[长度255] attribute3
    attribute4 String[长度255] attribute4
    attribute5 String[长度255] SPU/货号(服装多颜色尺码) 多规格商品,该字段一样
    attribute6 String[长度255] 规格
    attribute7 String[长度255] 是否主商品 1:主商品 0:非主商品 多规格收银时,默认选中的商品 比如默认选中 大杯
    attribute8 String[长度255] attribute8
    attribute9 String[长度255] attribute9
    attribute10 String[长度255] attribute10
    enable Int 0禁用,1可用
    productCommonAttribute json 商品属性信息
    canAppointed Int 是否可预约 0/NULL-否,1-是
    pluCode String[长度16] 称编码
    brandUid bigInt 品牌关联Uid
    stockPosition String 库位
    volume bigDecimal 体积
    weight bigDecimal 重量
    weightUnit int 重量单位 NULL/1-kg,2-斤
    minSellQuantity bigDecimal 起售量
    enableSN Int 是否开启序列号管理 0/null = 关闭, 1=开启
    isPacking Int 是否包装商品 0/NULL-否,1-是
    isBarcodeScale Int 是否条码秤商品 0/NULL-否,1-是
    isNewly Int 是否新品 0/NULL-否,1-是
    返回结果
  • {
  • "status": "success",
  • "data": {
  • "id": 0,
  • "uid": 287518801523242326,
  • "name": "商品测试",
  • "barcode": " spcs ",
  • "buyPrice": 10,
  • "sellPrice": 15,
  • "stock": 100,
  • "pinyin": "bgtssp",
  • "enable": 1,
  • "description": "openApi增加商品测试"
  • }
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    data Json 商品实体信息,字段信息参照:4. 根据条形码查询商品信息

    9. 查询所有商品单位定义


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryAllProductUnitDef
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn"
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    postBackParameter Json 查询首页时可以不传,之后的内容从返回结果中取出
    parameterType String 从返回结果中取出
    parameterValue String 从返回结果中取出
    返回结果
  • {
  • "status": "success",
  • "data": [
  • {
  • "uid": 1457686229942839743,
  • "name": "千克"
  • }
  • ]
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    data List 商品分类实体
    uid Long 商品单位在FUN官网网收银系统的唯一标识
    name String 商品单位名称

    10. 分页查询全部供应商信息


    接口地址 http://host:port/pospal-api2/openapi/v1/supplierOpenApi/querySupplierPages
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn"
  • "postBackParameter": {
  • "parameterType":"abcdef", 从返回结果中直接取出
  • "parameterValue": "abcdef" 从返回结果中直接取出
  • }
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    postBackParameter Json 查询首页时可以不传,之后的内容从返回结果中取出
    parameterType String 从返回结果中取出
    parameterValue String 从返回结果中取出
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "data": {
  • "postBackParameter": {
  • "parameterType": "abcdef", 从返回结果中直接取出
  • "parameterValue": "abcdef " 从返回结果中直接取出
  • },
  • "result": [
  • {
  • "uid": 140804498492323524,
  • "number": "323524",
  • "name": "FUN官网网收银软件",
  • "linkman": "蒋发财",
  • "gender": "男",
  • "tel": "138009278xx",
  • "email": "[email protected]",
  • "address": "厦门必利达大厦",
  • "remarks": "提供收银软件、硬件整套解决方案",
  • "enable": 1
  • }
  • ],
  • "pageSize": 100
  • }
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    pageSize Int 本次查询预期从库存取出记录数,如果结果集的长度小于pageSize,不需要进行下一页查询
    postBackParameter Json 分页查询回传到服务器的参数结构从第二页开始必须回传,如果没传,每次查询都是第一页
    parameterType String 从返回结果中直接取出用于回传,不能变其值
    parameterValue String 从返回结果中直接取出用于回传,不能变其值
    result List 商品分类实体
    uid Long 供应商在FUN官网网收银系统的唯一标识
    name String 供应商名称
    number String 供应商编号
    linkman String 供应商联系人
    gender String 联系人性别
    tel String 联系人电话
    email String 联系人邮箱
    address String 供应商地址
    remarks String 备注信息
    enable Integer 1:启用;0:禁用,-1删除

    11. 根据条形码批量查询商品信息


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryProductByBarcodes
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn"
  • "barcodes":["000000001","000000002"]
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    barcodes String[] 商品条形码列表,数量<=200
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "data": {[
  • {
  • "uid": 1366004607492566649,
  • "categoryUid": 813701230071893827,
  • "name": "翠玉白菜",
  • "barcode": "1001",
  • "buyPrice": 10000,
  • "sellPrice": 15000,
  • "stock": 0,
  • "pinyin": "CYBC",
  • "customerPrice": 15000,
  • "isCustomerDiscount": 1,
  • "description": "尺 寸:长18.7公分,宽9.1公分"
  • }
  • ]
  • }
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    data List 商品实体信息,字段信息参照4. 根据条形码查询商品信息

    12. 分页商品单位互换规则


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryUnitExchangePages
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn"
  • "postBackParameter": {
  • "parameterType":"abcdef", 从返回结果中直接取出
  • "parameterValue": "abcdef" 从返回结果中直接取出
  • }
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    postBackParameter Json 查询首页时可以不传,之后的内容从返回结果中取出
    parameterType String 从返回结果中取出
    parameterValue String 从返回结果中取出
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "data": {
  • "postBackParameter": {
  • "parameterType": "abcdef", 从返回结果中直接取出
  • "parameterValue": "abcdef " 从返回结果中直接取出
  • },
  • "result": [
  • {
  • "productUid": 380454823457453780,
  • "productUnitUid": 1475901793261803389, //假设名称为克
  • "exchangeQuantity": 1,
  • "isBase": 1 //表示是商品的基准单位
  • }
  • {
  • "productUid": 380454823457453780,
  • "productUnitUid": 1457686229942839743, //假设名称为斤
  • "exchangeQuantity": 500,//表示商品的基准单位 乘以 500 ==》500克
  • "isBase": 0
  • }
  • ]
  • "pageSize": 100
  • }
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    data Json 数据
    pageSize Int 本次查询预期从库存取出记录数,如果结果集的长度小于pageSize,不需要进行下一页查询
    postBackParameter Json 分页查询回传到服务器的参数结构
    从第二页开始必须回传,如果没传,每次查询都是第一页
    parameterType String 从返回结果中直接取出用于回传,不能变其值
    parameterValue String 从返回结果中直接取出用于回传,不能变其值
    result List 商品单位规则交换实体

    13. 根据商品唯一标识查询单位互换规则


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryUnitExchangeByProductUid
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn",
  • "productUid": 380454823457453780
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    productUid Long 商品在FUN官网网的唯一标识
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "data": [
  • {
  • "productUid": 380454823457453780,
  • "productUnitUid": 1475901793261803389, //假设名称为克
  • "exchangeQuantity": 1,
  • "isBase": 1 //表示是商品的基准单位
  • }
  • {
  • "productUid": 380454823457453780,
  • "productUnitUid": 1457686229942839743, //假设名称为斤
  • "exchangeQuantity": 500,//表示商品的基准单位 乘以 500 ==》500克
  • "isBase": 0
  • }
  • ]
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    data List 数据列表
    productUid Long 商品uid
    productUnitUid Long 商品单位uid
    exchangeQuantity Decimal 单位与基准单位的倍数,如 1公斤=1000克 基准单位时,这个值是1
    isBase Int 是否是基准商品的基准单位

    14. 修改商品多级会员价


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/updateProductCustomerPrice
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn",
  • "productUid": 380454823457453780,
  • "customerPriceInfo": [
  • {
  • "categoryUid":1524733201687120511,
  • "price":3
  • },
  • {
  • "categoryUid":1526887983895176306,
  • "price":2
  • }
  • ]
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    productUid Long 商品在FUN官网网的唯一标识
    customerPriceInfo 数组 会员价信息
    categoryUid Long 会员等级在FUN官网网的唯一标识
    price BigDecimal 会员价格
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "errorCode":null
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表

    15. 查询商品其它信息(品牌,库位,重量,单位,标签,属性口味等信息)


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryProducOtherInfotByUids
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn"
  • "productUids":[866421592715769444,1087577300450399426]
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    productUids 数组 商品uid,最多200个
    返回结果
  • {
  • "status": "success",
  • "data": [
  • {
  • "id": 288891,
  • "productUid": 866421592715769444,
  • "brandUid": 1598687498092508967,
  • "brandName": "宝马",
  • "stockPosition": "库位B",
  • "weight": 2222.22,
  • "unitUid": 1592365543294162767,
  • "unitName": "kg",
  • "tagNames": [
  •          "4驱",
  •          "v8"
  • ],
  • "attributes": [
  • {
  • "productAttributeUid":1623400519311680579,
  • "suggest":0
  • },
  • {
  • "productAttributeUid":1623400519312789601,
  • "suggest":0
  • }
  • ]
  • }
  • ]
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    data List 商品其它信息实体
    id int 数据库主键,用不到,直接忽略
    productUid long 商品单位在FUN官网网收银系统的唯一标识
    brandUid long 品牌uid
    brandName String 品牌名称
    stockPosition String 库位
    weight BigDecimal 重量
    unitUid long 基准单位uid
    unitName String 基准单位名称
    tagNames String[] 标签
    attributes List 商品属性(口味)信息
    productAttributeUid Long 商品属性(口味)uid,参照20. 查询全部属性,如口味、颜色尺码
    suggest int 是否推荐:0否,1是

    16. 新增商品分类


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/addCategory
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn",
  • "name": "苹果",
  • "parentUid": 0
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    name String 分类名称
    parentUid long 上级分类(假如苹果的上级分类是水果,这边就填水果的分类uid)
    返回结果
  • {
  • "status": "success",
  • "data": {
  • "id": 0,
  • "uid": 287518801523242326,
  • "name": "苹果",
  • "parentUid": 0,
  • }
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    data Json 商品分类实体信息
    id int 数据库主键,用不到,直接忽略
    uid long 商品分类在FUN官网网收银系统的唯一标识
    name String 分类名称
    parentUid long 上级分类uid

    17. 更新商品分类


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/updateCategory
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn",
  • "uid": "1625554180481319465",
  • "name": "苹果2",
  • "parentUid": 0
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    uid String 分类uid, 通过queryProductCategoryPages 接口获取
    name String 分类名称(如果不想改分类名称,可以称原来的名称)
    parentUid long 上级分类(0:顶级分类     空,-1:不改变父分类)
    返回结果
  • {
  • "status": "success",
  • "data": {
  • "id": 0,
  • "uid": 287518801523242326,
  • "name": "苹果2",
  • "parentUid": 0,
  • }
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    data Json 商品分类实体信息
    id int 数据库主键,用不到,直接忽略
    uid long 商品分类在FUN官网网收银系统的唯一标识
    name String 分类名称
    parentUid long 上级分类uid

    18. 分页查询全部品牌信息


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryProductBrandPages
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn"
  • "postBackParameter": {
  • "parameterType":"abcdef", 从返回结果中直接取出
  • "parameterValue": "abcdef" 从返回结果中直接取出
  • }
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    postBackParameter Json 查询首页时可以不传,之后的内容从返回结果中取出
    parameterType String 从返回结果中取出
    parameterValue String 从返回结果中取出
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "data": {
  • "postBackParameter": {
  • "parameterType": "abcdef", 从返回结果中直接取出
  • "parameterValue": "abcdef " 从返回结果中直接取出
  • },
  • "result": [
  • {
  • "uid": 1598687498092508967,
  • "name": "宝马"
  • }
  • ],
  • "pageSize": 100
  • }
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    pageSize Int 本次查询预期从库存取出记录数,如果结果集的长度小于pageSize,不需要进行下一页查询
    postBackParameter Json 分页查询回传到服务器的参数结构从第二页开始必须回传,如果没传,每次查询都是第一页
    parameterType String 从返回结果中直接取出用于回传,不能变其值
    parameterValue String 从返回结果中直接取出用于回传,不能变其值
    result List 商品分类实体
    uid Long 供应商在FUN官网网收银系统的唯一标识
    name String 品牌名称

    19. 查询全部属性组,如口味组,尺码组


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryAllProductAttributePackage
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn"
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "data": [
  • {
  • "uid": 1623401236904416722,
  • "packageName": "温度"
  • },
  • {
  • "uid": 1623400519311357858,
  • "packageName": "加料"
  • }
  • ]
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    data List 属性组实体
    uid Long 属性组唯一标识
    packageName String 属性组名称

    20. 查询全部属性,如口味、颜色尺码


    接口地址 http://host:port/pospal-api2/openapi/v1/productOpenApi/queryAllProductattribute
    请求头
  • User-Agent: openApi
  • Content-Type: application/json; charset=utf-8
  • accept-encoding: gzip,deflate
  • time-stamp: 1437528688233
  • data-signature: BF706E6AC693BA3B1BABD32E6713431D
  • 请求方式 POST
    请求体
  • {
  • "appId": "abcdefghijklmn"
  • }
  • 参数名 是否必须 类型 说明
    appId String Pospal配置的访问凭证
    返回结果
  • {
  • "status": "success",
  • "messages": [],
  • "data": [
  • {
  • "uid": 1623400519311680579,
  • "attributeName": "椰果",
  • "attributeValue": "1",
  • "packageUid": 1623400519311357858,
  • "isDefault": 0
  • },
  • {
  • "uid": 1623400519312789601,
  • "attributeName": "珍珠",
  • "attributeValue": "2",
  • "packageUid": 1623400519311357858,
  • "isDefault": 0
  • },
  • {
  • "uid": 1623401236904604406,
  • "attributeName": "常温",
  • "attributeValue": "0",
  • "packageUid": 1623401236904416722,
  • "isDefault": 0
  • }
  • ]
  • }
  • 字段名 类型 说明
    status String 是否正确处理请求,返回success或error,不区分大小写
    messages String[] 处理结果的消息
    errorCode int 业务处理的错误代码,参见错误代码表
    data List 属性实体
    uid Long 属性唯一标识
    attributeName String 属性名称
    attributeValue String 属性价格
    packageUid Long 属性组uid,参照19. 查询全部属性组,如口味组,尺码组
    isDefault int 是否默认 1:是     0:否