Animals API
Public 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 successful |
| 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 | Please 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 |
Animal Entity Information
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| id | string(36) | true | [Animal ID] Unique identifier of the animal |
| nfc | string(32) | false | [Animal NFC] Usually unique under the user |
| scutcheon | string(32) | false | [Animal Tag] e.g., ear tag number of cattle |
| name | string(32) | false | [Animal Name] Naming of the animal |
| petSpeciesId | integer | true | [Species ID] e.g., 1-Cat, 2-Dog, 3-Rabbit, 4-Horse, 5-Cattle, 6-Sheep, 7-Pig |
| petSpeciesBreedId | integer | false | [Breed ID] Internal system number, optional |
| breedName | string(32) | false | [Breed Name] Corresponding breed name of the animal |
| rfid | string(36) | false | [Animal Electronic Identifier] |
| birthDate | string(64) | false | [Animal Birth Date] Format: yyyy-MM-dd, e.g., 2026-06-01 |
| gender | integer | false | [Animal Gender] 0-Male, 1-Female, 2-Castrated, 3-Unknown |
| weight | double | false | [Animal Weight] Weight of the animal |
| weightUnit | string(32) | false | [Animal Weight Unit] Unit of animal weight, optional: kg, lb. Default: kg |
| hairColor | string(32) | false | [Animal Fur Color] Fur color of the animal |
| isMixed | integer | true | [Is Mixed Breed] 0-Purebred, 1-Mixed breed |
| isNeutered | integer | false | [Is Neutered] 0-Not neutered, 1-Neutered |
| isSterilized | integer | false | [Is Sterilized] 0-Not sterilized, 1-Sterilized |
| isVaccinated | integer | false | [Is Vaccinated] 0-Not vaccinated, 1-Vaccinated |
| description | string(32) | false | [Animal Remarks] |
| phone | string(32) | false | [Contact Phone] |
| string(32) | [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 Name | Type | Required | Description |
|---|---|---|---|
| code | integer | true | Business status code |
| msg | string(32) | true | Response message |
| data | object | true | Added pet information |
Delete Animal
Interface Description
Request Method: [DELETE] /api/petserver/pet/delete
Request Domain: [Primary Domain] https://iot.seismi.co
Body Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| ids | array | true | [Animal ID Array] Unique identifiers of animals |
Response Parameters
200 OK
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| code | integer | true | Business status code |
| msg | string(32) | true | Response 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 Name | Type | Required | Description |
|---|---|---|---|
| code | integer | true | Business status code |
| msg | string(32) | true | Response message |
| data | object | true | Modified pet information |
Query Animal
Interface Description
Request Method: [POST] /api/petserver/user/listAllPetInfo
Request Domain: [Primary Domain] https://iot.seismi.co
Query Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| currPage | integer | false | [Current Page, Page Number - 1] Default: 0, page numbering starts from 0 |
| pageSize | integer | false | [Page Size] Default: 10 |
| sortProperty | string(36) | false | [Sort Field] Optional: createTime, updateTime. Default: createTime |
| sortOrder | string(36) | false | [Sort Order] Optional: ASC, DESC. Default: DESC |
Body Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| searchText | string(36) | true | [Search Text] Supports fuzzy search of nfc, scutcheon, rfid, name fields |
Response Parameters
200 OK
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| code | integer | true | Business status code |
| msg | string(32) | true | Response message |
| data | object | true | Query results |
| data.data | array | true | Animal list information |
| data.count | integer | true | Total number of animals |
| data.currPage | integer | true | Current page number |
| data.pageSize | integer | true | Current page size |
| data.totalPages | integer | true | Total 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.

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 }
}