Endpoints活动

推送会话的活动记录

针对产品声明的活动类型批量提交活动记录。记录逐条校验,响应中包含每条记录的状态(`accepted`,或带原因的 `rejected`)。重复提交 `id` 已被接受的记录是安全的空操作——它会再次计为 `accepted`,不会被重复存储。若会话不存在或已被撤销,则整批请求被拒绝。

POST
/activity/push
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/activity/push" \  -H "Content-Type: application/json" \  -d '{    "sessionId": "b1a6482d-5242-4b4a-aa88-3fa52595a672",    "records": [      {        "id": "7c3e0c6e-9c2a-4f1e-bd2b-1f9a3c6d8e10",        "type": "2f9a1c84-6b3e-4d52-9f08-1a7c3e5d9b20",        "value": {          "seconds": 1800        },        "timestamp": "2026-06-24T14:32:05Z"      },      {        "id": "a4f2b8d1-3e7c-4a90-8b6f-2c5d9e0a1b34",        "type": "8d3b6e10-4f29-4a71-bc52-9e0a1c7d3f64",        "value": {          "amount": 999,          "currency": "USD"        },        "timestamp": "2026-06-24T15:02:05Z"      }    ]  }'
{  "sessionId": "b1a6482d-5242-4b4a-aa88-3fa52595a672",  "accepted": 2,  "rejected": 0,  "records": [    {      "id": "7c3e0c6e-9c2a-4f1e-bd2b-1f9a3c6d8e10",      "status": "accepted"    },    {      "id": "a4f2b8d1-3e7c-4a90-8b6f-2c5d9e0a1b34",      "status": "accepted"    }  ]}