Alerts API
Common Request Information
Header Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| X-Authorization | string | true | Request authentication header. For authentication rules, see Authentication. Standard format: Bearer ${Access_token} |
| Accept | string | true | Must be set to application/json |
| Content-Type | string | true | Must be set to application/json |
HTTP Response Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded |
| 400 | Parameter error |
| 401 | Authentication failed. Please refer to Authentication to generate authentication information |
Business Error Codes
| Status Code | Error Code | Description | Solution |
|---|---|---|---|
| 400 | PARAM_ERROR | Parameter error | Check parameters according to the error description returned by the interface; parameters must be filled in accordance with the field filling instructions in the API documentation |
| 401 | SIGN_ERROR | Signature error | Permission verification exception. Please refer to the documentation in detail |
| 403 | NO_AUTH | No permission | Apply for permissions related to this interface on the platform |
| 429 | FREQUENCY_LIMITED | Frequency limit exceeded | Request frequency exceeds the limit. Please reduce the frequency of interface requests |
| 500 | SYSTEM_ERROR | System error | System exception. Please call again with the same parameters |
Alert Entity Information
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| petId | string(36) | true | [Pet ID] The pet associated with the alert |
| score | string(32) | false | [Alert Score] Between 0 and 10; higher scores indicate greater severity |
| remark | string(32) | false | [Remarks] |
| status | integer | true | [Alert Status] 0 = Alert active, 1 = Alert ended |
Add Alert
Interface Description
Request Method: [POST] /api/petAlert/save
Request Domain: [Primary Domain] https://iot.seismi.co
Body Parameters
Refer to the above Alert Entity for JSON content specifications; pass in the corresponding fields to add an alert.
Response Parameters
200 OK
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| code | integer | true | Business status code |
| msg | string(32) | true | Response message |
Delete Alert
Interface Description
Request Method: [DELETE] /api/petAlert/${id} (id is the system-generated alert ID)
Request Domain: [Primary Domain] https://iot.seismi.co
Response Parameters
200 OK
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| code | integer | true | Business status code |
| msg | string(32) | true | Response message |
Request Examples
Replace ${Access_token} below with the actual access token you retrieved.
Add Alert
curl Example
In the sample data below, replace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx with the animal ID obtained from your previous successful creation request.
POST
curl -X POST \
https://iot.seismi.co/api/petAlert/save \
-H "X-Authorization: Bearer ${Access_token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"petId" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"score" : 8.7,
"remark" : "test",
"status" : 0
}'
Response Example
200 OK
{
"code" : "200",
"msg" : "success",
"data" : {}
}
The screenshot below shows the API response content. The ID circled in the image is a 36-character UUID. This ID is required for all subsequent update and delete operations.

Delete Alert
curl Example
Replace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx with the 36-digit UUID ID returned from your previous creation request.
DELETE
curl -X DELETE \
https://iot.seismi.co/api/petAlert/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
-H "X-Authorization: Bearer ${Access_token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
Response Example
200 OK
{
"code" : "200",
"msg" : "success",
"data" : {}
}