业务接口

介绍 卡游售卖机开放平台 提供的业务接口

抽卡机基础档案

分页获取城市列表

使用 client_credentials 模式,获取accessToken后进行接口调用

GET /api/city/list

  • 请求参数
参数名称参数值是否必填示例备注
AuthorizationBearer 12f7764bd76e4350bd87772390444d7cBearer 12f7764bd76e4350bd87772390444d7cBearer accessToken
page11页码从1开始
pageSize1010默认10
  • 返回数据
名称类型是否必须备注
codeNumber返回码
msgString返回信息
timestampNumber时间戳
resultobject
itemsArray
idIntegerid
nameString城市名称
codeString城市编码
totalInteger总记录数
  • 返回说明

    • 正确的返回:
        {
            "result": {
                "items": [
                    {
                        "id": 35,
                        "name": "淮安",
                        "code": "320800"
                    },
                    {
                        "id": 36,
                        "name": "盐城",
                        "code": "320900"
                    },
                    {
                        "id": 37,
                        "name": "扬州",
                        "code": "321000"
                    },
                    {
                        "id": 38,
                        "name": "镇江",
                        "code": "321100"
                    },
                    {
                        "id": 39,
                        "name": "泰州",
                        "code": "321200"
                    },
                    {
                        "id": 40,
                        "name": "宿迁",
                        "code": "321300"
                    },
                    {
                        "id": 41,
                        "name": "杭州",
                        "code": "330100"
                    },
                    {
                        "id": 42,
                        "name": "宁波",
                        "code": "330200"
                    },
                    {
                        "id": 43,
                        "name": "温州",
                        "code": "330300"
                    },
                    {
                        "id": 44,
                        "name": "嘉兴",
                        "code": "330400"
                    }
                ],
                "total": 368
            },
            "code": 0,
            "type": "success",
            "message": "操作成功",
            "timestamp": 1676267565
        }
    
    • 错误的返回:
        {
            "code": 500,
            "msg": "token is timeout. please retry.",
            "timestamp": 1608008002
        }
    

分页获取场地列表

使用 client_credentials 模式,获取accessToken后进行接口调用

GET /api/site/list

  • 请求参数
参数名称参数值是否必填示例备注
AuthorizationBearer 12f7764bd76e4350bd87772390444d7cBearer 12f7764bd76e4350bd87772390444d7cBearer accessToken
page11页码从1开始
pageSize1010默认10
  • 返回数据
名称类型是否必须备注
codeNumber返回码
msgString返回信息
timestampNumber时间戳
resultobject
itemsArray
codeString编码
nameString名称
stateInteger状态:1启用 0未启用
openTimeInteger开始营业时间
closeTimeInteger结束营业时间
addressInteger地址
addressExtInteger扩展地址
lngInteger经度
latInteger纬度
imgsArray门面图
totalInteger
  • 返回说明

    • 正确的返回:
        {
            "result": {
                "items": [{
                    "code": "CD000077",
                    "name": "1010出货测试场地",
                    "siteType": "default",
                    "state": 1,
                    "gradeType": 1,
                    "openTime": "09:00:00",
                    "closeTime": "22:00:00",
                    "address": "上海市闵行区吴中路1588号",
                    "addressExt": "",
                    "lng": "121.372544",
                    "lat": "31.174052",
                    "imgs": []
                }],
                "total": 62
            },
            "code": 0,
            "type": "success",
            "message": "操作成功",
            "timestamp": 1665970440
        }
    
    • 错误的返回:
        {
            "code": 500,
            "msg": "token is timeout. please retry.",
            "timestamp": 1608008002
        }
    

分页获取场地列表(包含点位信息)

使用 client_credentials 模式,获取accessToken后进行接口调用

GET /api/site/list-with-points

  • 请求参数
参数名称参数值是否必填示例备注
AuthorizationBearer 12f7764bd76e4350bd87772390444d7cBearer 12f7764bd76e4350bd87772390444d7cBearer accessToken
page11页码从1开始
pageSize1010默认10
  • 返回数据
名称类型是否必须备注
codeNumber返回码
msgString返回信息
timestampNumber时间戳
resultobject
itemsArray
codeString场地编码
nameString场地名称
stateInteger场地状态:1启用 0未启用
openTimeString场地开始营业时间
closeTimeString场地结束营业时间
cityCodeString城市编码
cityNameString城市名称
addressString场地地址
addressExtString场地扩展地址
lngFloat场地经度
latFloat场地纬度
imgsArray场地门面图
pointsArray点位列表
codeString点位编码
nameString点位名称
gradeTypeInteger订单系统类型:1浪沙 2术铂
imeiString设备号
cargolanesArray货道信息
goodsCodeString商品编号
productNameString商品名称
productPicString商品封面图
stockInteger商品库存
guidePriceInteger零售价,单位分
totalInteger
  • 返回说明

    • 正确的返回:
        {
            "result": {
                "items": [{
                    "code": "CD000077",
                    "name": "1010出货测试场地",
                    "siteType": "default",
                    "state": 1,
                    "openTime": "09:00:00",
                    "closeTime": "22:00:00",
                    "cityCode": "300200",
                    "cityName": "上海",
                    "address": "上海市闵行区吴中路1588号",
                    "addressExt": "",
                    "lng": "121.372544",
                    "lat": "31.174052",
                    "imgs": ["http://xxxx/xxx.png"],
                    "points": [{
                        "code": "DW00007",
                        "name": "1010出货测试场地1号点位",
                        "imei": "web1111",
                        "gradeType": 1,
                        "cargolanes": [{
                            "goodsCode": "SP111",
                            "productName": "火影1",
                            "productPic": "http://xxx/xxx.png",
                            "stock": 100,
                            "guidePrice": 1000
                        },{
                            "goodsCode": "SP111",
                            "productName": "火影1",
                            "productPic": "http://xxx/xxx.png",
                            "stock": 100,
                            "guidePrice": 1000
                        }]
                    },{
                        "code": "DW00008",
                        "name": "1010出货测试场地2号点位",
                        "imei": "web11112",
                        "gradeType": 1,
                        "cargolanes": [{
                            "goodsCode": "SP1111",
                            "productName": "火影2",
                            "productPic": "http://xxx/xxx.png",
                            "stock": 100,
                            "guidePrice": 1000
                        },{
                            "goodsCode": "SP1121",
                            "productName": "火影3",
                            "productPic": "http://xxx/xxx.png",
                            "stock": 100,
                            "guidePrice": 1000
                        }]
                    }]
                }],
                "total": 62
            },
            "code": 0,
            "type": "success",
            "message": "操作成功",
            "timestamp": 1665970440
        }
    
    • 错误的返回:
        {
            "code": 500,
            "msg": "token is timeout. please retry.",
            "timestamp": 1608008002
        }
    

根据场地编码获取场地详情(包含点位信息)

使用 client_credentials 模式,获取accessToken后进行接口调用

GET /api/site/detail

  • 请求参数
参数名称参数值是否必填示例备注
AuthorizationBearer 12f7764bd76e4350bd87772390444d7cBearer 12f7764bd76e4350bd87772390444d7cBearer accessToken
siteCodeCD111CD1111场地编码
  • 返回数据
名称类型是否必须备注
codeNumber返回码
msgString返回信息
timestampNumber时间戳
resultobject
codeString场地编码
nameString场地名称
stateInteger场地状态:1启用 0未启用
openTimeString场地开始营业时间
closeTimeString场地结束营业时间
addressString场地地址
addressExtString场地扩展地址
lngFloat场地经度
latFloat场地纬度
imgsArray场地门面图
pointsArray点位列表
codeString点位编码
nameString点位名称
gradeTypeInteger订单系统类型:1浪沙 2术铂
imeiString设备号
cargolanesArray货道信息
goodsCodeString商品编号
productNameString商品名称
productPicString商品封面图
stockInteger商品库存
  • 返回说明

    • 正确的返回:
        {
            "result": {
                "code": "CD000077",
                "name": "1010出货测试场地",
                "siteType": "default",
                "state": 1,
                "openTime": "09:00:00",
                "closeTime": "22:00:00",
                "address": "上海市闵行区吴中路1588号",
                "addressExt": "",
                "lng": "121.372544",
                "lat": "31.174052",
                "imgs": ["http://xxxx/xxx.png"],
                "points": [{
                    "code": "DW00007",
                    "name": "1010出货测试场地1号点位",
                    "gradeType": 1,
                    "imei": "web1111",
                    "cargolanes": [{
                        "goodsCode": "SP111",
                        "productName": "火影1",
                        "productPic": "http://xxx/xxx.png",
                        "stock": 100
                    },{
                        "goodsCode": "SP111",
                        "productName": "火影1",
                        "productPic": "http://xxx/xxx.png",
                        "stock": 100
                    }]
                },{
                    "code": "DW00008",
                    "name": "1010出货测试场地2号点位",
                    "gradeType": 1,
                    "imei": "web11112",
                    "cargolanes": [{
                        "goodsCode": "SP1111",
                        "productName": "火影2",
                        "productPic": "http://xxx/xxx.png",
                        "stock": 100
                    },{
                        "goodsCode": "SP1121",
                        "productName": "火影3",
                        "productPic": "http://xxx/xxx.png",
                        "stock": 100
                    }]
                }]
            },
            "code": 0,
            "type": "success",
            "message": "操作成功",
            "timestamp": 1665970440
        }
    
    • 错误的返回:
        {
            "code": 500,
            "msg": "token is timeout. please retry.",
            "timestamp": 1608008002
        }
    

分页获取商品列表

使用 client_credentials 模式,获取accessToken后进行接口调用

GET /api/products/list

  • 请求参数
参数名称参数值是否必填示例备注
AuthorizationBearer 12f7764bd76e4350bd87772390444d7cBearer 12f7764bd76e4350bd87772390444d7cBearer accessToken
page11页码从1开始
pageSize1010默认10
  • 返回数据
名称类型是否必须备注
codeNumber返回码
msgString返回信息
timestampNumber时间戳
resultobject
itemsArray
ipIdIntegeripId
ipNameStringip名称
productNameString商品名称
skuCodeString商品SKU
goodsCodeString商品编号
costPriceInteger成本价,单位分
guidePriceInteger零售价,单位分
orderPicString订单图
totalInteger总记录数
  • 返回说明

    • 正确的返回:
        {
            "result": {
                "items": [{
                    "ipId": 10001,
                    "ipName": "奥特曼",
                    "productName": "奥特曼第一弹",
                    "skuCode": "sku1111",
                    "goodsCode": "code1111",
                    "costPrice": 1000,
                    "guidePrice": 1500,
                    "orderPic": "http://aa.com/a.jpg"
                },{
                    "ipId": 10002,
                    "ipName": "奥特曼",
                    "productName": "奥特曼第一弹",
                    "skuCode": "sku1112",
                    "goodsCode": "code1112",
                    "costPrice": 1000,
                    "guidePrice": 1500,
                    "orderPic": "http://aa.com/a.jpg"
                }],
                "total": 2
            },
            "code": 0,
            "type": "success",
            "message": "操作成功",
            "timestamp": 1665970440
        }
    
    • 错误的返回:
        {
            "code": 500,
            "msg": "token is timeout. please retry.",
            "timestamp": 1608008002
        }
    

根据商品编号查询商品详情

使用 client_credentials 模式,获取accessToken后进行接口调用

GET /api/product/detail

  • 请求参数
参数名称参数值是否必填示例备注
AuthorizationBearer 12f7764bd76e4350bd87772390444d7cBearer 12f7764bd76e4350bd87772390444d7cBearer accessToken
goodsCode1000110001商品编码
  • 返回数据
名称类型是否必须备注
codeNumber返回码
msgString返回信息
timestampNumber时间戳
resultobject
ipIdIntegeripId
ipNameStringip名称
productNameString商品名称
skuCodeString商品SKU
goodsCodeString商品编号
costPriceInteger成本价,单位分
guidePriceInteger零售价,单位分
orderPicString订单图
  • 返回说明

    • 正确的返回:
        {
            "result": {
                "ipId": 10001,
                "ipName": "奥特曼",
                "productName": "奥特曼第一弹",
                "skuCode": "sku1111",
                "goodsCode": "code1111",
                "costPrice": 1000,
                "guidePrice": 1500,
                "orderPic": "http://aa.com/a.jpg"
            },
            "code": 0,
            "type": "success",
            "message": "操作成功",
            "timestamp": 1665970440
        }
    
    • 错误的返回:
        {
            "code": 500,
            "msg": "token is timeout. please retry.",
            "timestamp": 1608008002
        }