版权所有©,上海海鼎信息工程股份有限公司,2016-2025,保留所有权利。

接口

1. 接口定义

1.1. 通知服务

1.1.1. 确认通知的状态

POST /{tenant_id}/storedelivery/noticeservice/store/{store_id}/confirm
1.1.1.1. 说明

确认通知的状态

1.1.1.2. 参数
类型 名称 说明 类型

Path

store_id
必填

门店ID

string

Path

tenant_id
必填

租户Id

string

Body

body
可选

1.1.1.3. 响应
HTTP代码 说明 类型

default

successful operation

无内容

1.1.1.4. HTTP请求示例
请求 path
/string/storedelivery/noticeservice/store/string/confirm
请求 body
{
  "ids" : [ "string" ]
}

1.1.2. 消费通知

GET /{tenant_id}/storedelivery/noticeservice/store/{store_id}/consume
1.1.2.1. 说明

消费通知,请在消费后确认通知,否则将重复获得相同通知

1.1.2.2. 参数
类型 名称 说明 类型

Path

store_id
必填

门店ID

string

Path

tenant_id
必填

租户Id

string

Query

count
必填

一次性取的通知数,最多100条。

integer (int32)

Query

topic
可选

主题

string

1.1.2.3. 响应
HTTP代码 说明 类型

200

successful operation

1.1.2.4. HTTP请求示例
请求 path
/string/storedelivery/noticeservice/store/string/consume?count=0
1.1.2.5. HTTP响应示例
响应 200
{
  "notices" : [ {
    "id" : "12212",
    "topic" : "new.order",
    "content" : "212123",
    "content2" : "{\"order_id\":\"212123\",\"delivery_type\":\"deliver\"}",
    "time" : "2018-06-22 14:25:13"
  } ]
}

1.1.3. 新-确认通知的状态

POST /{tenant_id}/storedelivery/noticeservice/{app_id}/store/{store_id}/confirm
1.1.3.1. 说明

新-确认通知的状态

1.1.3.2. 参数
类型 名称 说明 类型

Path

app_id
必填

appId

string

Path

store_id
必填

门店ID

string

Path

tenant_id
必填

租户Id

string

Body

body
可选

1.1.3.3. 响应
HTTP代码 说明 类型

default

successful operation

无内容

1.1.3.4. HTTP请求示例
请求 path
/string/storedelivery/noticeservice/string/store/string/confirm
请求 body
{
  "ids" : [ "string" ]
}

1.1.4. 新-消费通知

GET /{tenant_id}/storedelivery/noticeservice/{app_id}/store/{store_id}/consume
1.1.4.1. 说明

新-消费通知,请在消费后确认通知,否则将重复获得相同通知

1.1.4.2. 参数
类型 名称 说明 类型

Path

app_id
必填

appId

string

Path

store_id
必填

门店ID

string

Path

tenant_id
必填

租户Id

string

Query

count
必填

一次性取的通知数,最多100条。

integer (int32)

Query

topic
可选

主题

string

1.1.4.3. 响应
HTTP代码 说明 类型

200

successful operation

1.1.4.4. HTTP请求示例
请求 path
/string/storedelivery/noticeservice/string/store/string/consume?count=0
1.1.4.5. HTTP响应示例
响应 200
{
  "notices" : [ {
    "id" : "12212",
    "topic" : "new.order",
    "content" : "212123",
    "content2" : "{\"order_id\":\"212123\",\"delivery_type\":\"deliver\"}",
    "time" : "2018-06-22 14:25:13"
  } ]
}

2. 定义

2.1. IdsWrapper

名称 说明 类型

ids
可选

样例 : [ "string" ]

< string > array

2.2. Notice

通知对象

名称 说明 类型

content
可选

通知内容
样例 : "212123"

string

content2
可选

当topic=new.order,消息内容:{"order_id":"212123","delivery_type":"deliver"};当topic=print.order,消息内容:{"names":"摘果单,外卖订单","order_id":"83031581163384949"};当topic=new.compensation,消息内容:{"id":45454545,"order_id":768678978987};
样例 : "{\"order_id\":\"212123\",\"delivery_type\":\"deliver\"}"

string

id
可选

通知ID
样例 : "12212"

string

time
可选

通知发出时间,格式是:yyyy-MM-dd HH:mm:ss
样例 : "2018-06-22 14:25:13"

string

topic
可选

通知主题
样例 : "new.order"

string

2.3. NoticeList

通知列表对象

名称 说明 类型

notices
可选

通知列表
样例 : [ "Notice" ]

< Notice > array