Skip to main content

Animals API

Public 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 successful
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 permissionPlease apply 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

Animal Entity Information

Parameter NameTypeRequiredDescription
idstring(36)true[Animal ID] Unique identifier of the animal
nfcstring(32)false[Animal NFC] Usually unique under the user
scutcheonstring(32)false[Animal Tag] e.g., ear tag number of cattle
namestring(32)false[Animal Name] Naming of the animal
petSpeciesIdintegertrue[Species ID] e.g., 1-Cat, 2-Dog, 3-Rabbit, 4-Horse, 5-Cattle, 6-Sheep, 7-Pig
petSpeciesBreedIdintegerfalse[Breed ID] Internal system number, optional
breedNamestring(32)false[Breed Name] Corresponding breed name of the animal
rfidstring(36)false[Animal Electronic Identifier]
birthDatestring(64)false[Animal Birth Date] Format: yyyy-MM-dd, e.g., 2026-06-01
genderintegerfalse[Animal Gender] 0-Male, 1-Female, 2-Castrated, 3-Unknown
weightdoublefalse[Animal Weight] Weight of the animal
weightUnitstring(32)false[Animal Weight Unit] Unit of animal weight, optional: kg, lb. Default: kg
hairColorstring(32)false[Animal Fur Color] Fur color of the animal
isMixedintegertrue[Is Mixed Breed] 0-Purebred, 1-Mixed breed
isNeuteredintegerfalse[Is Neutered] 0-Not neutered, 1-Neutered
isSterilizedintegerfalse[Is Sterilized] 0-Not sterilized, 1-Sterilized
isVaccinatedintegerfalse[Is Vaccinated] 0-Not vaccinated, 1-Vaccinated
descriptionstring(32)false[Animal Remarks]
phonestring(32)false[Contact Phone]
emailstring(32)email[Contact Email]

Add Animal

Interface Description

Request Method: [POST] /api/petserver/pet/save

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

Body Parameters

Refer to the above Animal Entity for JSON content specifications, and pass in the corresponding fields to add a pet.

Response Parameters

200 OK

Parameter NameTypeRequiredDescription
codeintegertrueBusiness status code
msgstring(32)trueResponse message
dataobjecttrueAdded pet information

Delete Animal

Interface Description

Request Method: [DELETE] /api/petserver/pet/delete

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

Body Parameters

Parameter NameTypeRequiredDescription
idsarraytrue[Animal ID Array] Unique identifiers of animals

Response Parameters

200 OK

Parameter NameTypeRequiredDescription
codeintegertrueBusiness status code
msgstring(32)trueResponse message

Modify Animal

Interface Description

Request Method: [POST] /api/petserver/pet/updatePetInfo/${petId}

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

Body Parameters

Refer to the above Animal Entity for JSON content, and pass in the corresponding fields to modify. petId corresponds to the pet ID.

Response Parameters

200 OK

Parameter NameTypeRequiredDescription
codeintegertrueBusiness status code
msgstring(32)trueResponse message
dataobjecttrueModified pet information

Query Animal

Interface Description

Request Method: [POST] /api/petserver/user/listAllPetInfo

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

Query Parameters

Parameter NameTypeRequiredDescription
currPageintegerfalse[Current Page, Page Number - 1] Default: 0, page numbering starts from 0
pageSizeintegerfalse[Page Size] Default: 10
sortPropertystring(36)false[Sort Field] Optional: createTime, updateTime. Default: createTime
sortOrderstring(36)false[Sort Order] Optional: ASC, DESC. Default: DESC

Body Parameters

Parameter NameTypeRequiredDescription
searchTextstring(36)true[Search Text] Supports fuzzy search of nfc, scutcheon, rfid, name fields

Response Parameters

200 OK

Parameter NameTypeRequiredDescription
codeintegertrueBusiness status code
msgstring(32)trueResponse message
dataobjecttrueQuery results
data.dataarraytrueAnimal list information
data.countintegertrueTotal number of animals
data.currPageintegertrueCurrent page number
data.pageSizeintegertrueCurrent page size
data.totalPagesintegertrueTotal number of pages

Request Examples

Replace ${Access_token} below with the actual access token you retrieved.

Add Animal

curl Example

POST

curl -X POST \
https://iot.seismi.co/api/petserver/pet/save \
-H "X-Authorization: Bearer ${Access_token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"nfc" : "1230000109",
"scutcheon" : "123456",
"name" : "test",
"petSpeciesId" : 5,
"rfid" : "56565656565",
"birthDate" : "2018-06-08",
"gender" : 0,
"weight" : 1400,
"weightUnit" : "lb",
"description" : "test",
"phone" : "",
"email" : ""
}'

Response Example

200 OK

{
"code" : "200",
"msg" : "success",
"data" : {'id': 'a6c62ed7-198e-45c3-8578-762710d5b044'}
}

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 Animal

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/petserver/pet/delete \
-H "X-Authorization: Bearer ${Access_token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]'

Response Example

200 OK

{
"code" : "200",
"msg" : "success"
}

Modify Animal

curl Example

Replace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx with the 36-digit UUID ID returned from your previous creation request.

POST

curl -X POST \
https://iot.seismi.co/api/petserver/pet/updatePetInfo/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
-H "X-Authorization: Bearer ${Access_token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"nfc" : "1230000109",
"scutcheon" : "xxxxxxxx",
"name" : "test",
"petSpeciesId" : 5,
"rfid" : "56565656565",
"birthDate" : "2018-06-08",
"gender" : 0,
"weight" : 1400,
"weightUnit" : "lb",
"description" : "test",
"phone" : "",
"email" : ""
}'

Response Example

200 OK

{
"code" : "200",
"msg" : "success",
"data" : {}
}

Query Animal

curl Example

POST

curl -X POST \
https://iot.seismi.co/api/petserver/user/listAllPetInfo \
-H "X-Authorization: Bearer ${Access_token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"searchText" : "1230000109"
}'

Response Example

200 OK

{
"code" : "200",
"msg" : "success",
"data" : {"data": [], "count": 0, "currPage": 0, "pageSize": 10, "totalPages": 0 }
}