Skip to main content

Alerts API

Common Request Information

Header Parameters

Parameter NameTypeRequiredDescription
X-AuthorizationstringtrueRequest authentication header. For authentication rules, see Authentication. Standard format: Bearer ${Access_token}
AcceptstringtrueMust be set to application/json
Content-TypestringtrueMust be set to application/json

HTTP Response Status Codes

Status CodeDescription
200Request succeeded
400Parameter error
401Authentication failed. Please refer to Authentication to generate authentication information

Business Error Codes

Status CodeError CodeDescriptionSolution
400PARAM_ERRORParameter errorCheck 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
401SIGN_ERRORSignature errorPermission verification exception. Please refer to the documentation in detail
403NO_AUTHNo permissionApply for permissions related to this interface on the platform
429FREQUENCY_LIMITEDFrequency limit exceededRequest frequency exceeds the limit. Please reduce the frequency of interface requests
500SYSTEM_ERRORSystem errorSystem exception. Please call again with the same parameters

Alert Entity Information

Parameter NameTypeRequiredDescription
petIdstring(36)true[Pet ID] The pet associated with the alert
scorestring(32)false[Alert Score] Between 0 and 10; higher scores indicate greater severity
remarkstring(32)false[Remarks]
statusintegertrue[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 NameTypeRequiredDescription
codeintegertrueBusiness status code
msgstring(32)trueResponse 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 NameTypeRequiredDescription
codeintegertrueBusiness status code
msgstring(32)trueResponse 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.

image-20260613151104355

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" : {}
}