Skip to main content

Treatment 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

Treatment Entity Information

Parameter NameTypeRequiredDescription
idstring(36)false[Record ID] Unique identifier of the record
petIdstring(36)true[Pet ID] Associated pet
symptomsstring(36)false[Symptoms] Description of the pet's symptoms
treatmentsstring(36)false[Treatments] Description of drugs used to treat the pet
tempdoublefalse[Temperature] Recorded temperature of the pet when ill
tempUnitstring(36)false[Temperature Unit] Optional values: ℃, ℉, default is ℉
statusintegertrue[Status] 0 = Under treatment, 1 = Treatment completed, 2 = Deceased

Add or Update Treatment

Interface Description

Request Method: [POST] /api/treatmentRecord/save

Request Domain: [Primary Domain] https://iot.seismi.co

Body Parameters

Input parameters follow the alert entity field specifications, and you only need to pass the required parameters; when id in the request body is empty, a new addition operation is performed; if it is not empty, data update is performed according to id.

Response Parameters

200 OK

Parameter NameTypeRequiredDescription
codeintegertrueBusiness status code
msgstring(32)trueResponse message

Delete Treatment

Interface Description

Request Method: [DELETE] /api/treatmentRecord/${id}, where id is the treatment ID in the system

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 Treatment

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/treatmentRecord/save \
-H "X-Authorization: Bearer ${Access_token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"petId" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status" : 0,
"symptoms" : "test",
"treatments" : "test",
"temp" : 105.2,
"tempUnit" : "℉"
}'

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 Treatment

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