Pet Management API
Create, read, update, and delete pet profiles using the Petnow API.
Overview
The Pet Management API allows you to perform CRUD (Create, Read, Update, Delete) operations on pet profiles.
Create Pet
Create a new pet profile.
Endpoint: POST /v2/pets
Request
curl -X POST "https://api.petify.petnow.io/v2/pets" \
-H "x-petnow-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"species": "DOG",
"breed": "Golden Retriever",
"metadata": "{\"name\": \"Buddy\", \"age\": 3, \"owner\": \"John Doe\"}"
}'import requests
import json
url = "https://api.petify.petnow.io/v2/pets"
headers = {
"x-petnow-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"species": "DOG",
"breed": "Golden Retriever",
"metadata": json.dumps({
"name": "Buddy",
"age": 3,
"owner": "John Doe"
})
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(result)
# {"success": true, "data": {"id": "pet-uuid-1234"}}const response = await fetch("https://api.petify.petnow.io/v2/pets", {
method: "POST",
headers: {
"x-petnow-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
species: "DOG",
breed: "Golden Retriever",
metadata: JSON.stringify({
name: "Buddy",
age: 3,
owner: "John Doe"
})
})
});
const result = await response.json();
console.log(result);
// {success: true, data: {id: "pet-uuid-1234"}}Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
species | string | ✅ | Species: DOG or CAT |
breed | string | ❌ | Breed |
metadata | string | ❌ | Additional info as JSON string |
Response
{
"success": true,
"data": {
"id": "pet-uuid-1234"
}
}Using Metadata: You can store additional information such as name, age, and owner details in the metadata field as a JSON string.
List Pets
Retrieve all registered pets.
Endpoint: GET /v2/pets
Request
curl -X GET "https://api.petify.petnow.io/v2/pets" \
-H "x-petnow-api-key: YOUR_API_KEY"import requests
url = "https://api.petify.petnow.io/v2/pets"
headers = {
"x-petnow-api-key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
result = response.json()
print(result)const response = await fetch("https://api.petify.petnow.io/v2/pets", {
method: "GET",
headers: {
"x-petnow-api-key": "YOUR_API_KEY"
}
});
const result = await response.json();
console.log(result);Response
{
"success": true,
"data": [
{
"id": "pet-uuid-1234",
"species": "DOG",
"breed": "Golden Retriever",
"metadata": "{\"name\": \"Buddy\", \"age\": 3}",
"hasFingerprint": true,
"createdAt": "2026-01-15T10:30:00Z"
},
{
"id": "pet-uuid-5678",
"species": "CAT",
"breed": "Russian Blue",
"metadata": "{\"name\": \"Nabi\", \"age\": 2}",
"hasFingerprint": false,
"createdAt": "2026-01-10T14:20:00Z"
}
]
}data is the pet array directly (not wrapped in a pets field). Each item includes hasFingerprint (a boolean indicating whether the pet has any registered fingerprints).
Get Pet Details
Retrieve detailed information about a specific pet.
Endpoint: GET /v2/pets/{petId}
Request
curl -X GET "https://api.petify.petnow.io/v2/pets/pet-uuid-1234" \
-H "x-petnow-api-key: YOUR_API_KEY"import requests
pet_id = "pet-uuid-1234"
url = f"https://api.petify.petnow.io/v2/pets/{pet_id}"
headers = {
"x-petnow-api-key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
result = response.json()
print(result)const petId = "pet-uuid-1234";
const response = await fetch(`https://api.petify.petnow.io/v2/pets/${petId}`, {
method: "GET",
headers: {
"x-petnow-api-key": "YOUR_API_KEY"
}
});
const result = await response.json();
console.log(result);Response
{
"success": true,
"data": {
"id": "pet-uuid-1234",
"species": "DOG",
"breed": "Golden Retriever",
"metadata": "{\"name\": \"Buddy\", \"age\": 3, \"owner\": \"John Doe\"}",
"hasFingerprint": true,
"createdAt": "2026-01-15T10:30:00Z"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Pet ID |
species | string | DOG or CAT |
breed | string | Breed |
metadata | string | Additional info as JSON string |
hasFingerprint | boolean | Whether the pet has any registered fingerprints |
createdAt | string | Creation timestamp (ISO 8601) |
Update Pet
Update a pet's metadata.
Endpoint: PATCH /v2/pets/{petId}
Request
curl -X PATCH "https://api.petify.petnow.io/v2/pets/pet-uuid-1234" \
-H "x-petnow-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"breed": "Golden Retriever Mix",
"metadata": "{\"name\": \"Buddy\", \"age\": 4, \"owner\": \"John Doe\", \"vaccinated\": true}"
}'import requests
import json
pet_id = "pet-uuid-1234"
url = f"https://api.petify.petnow.io/v2/pets/{pet_id}"
headers = {
"x-petnow-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"breed": "Golden Retriever Mix",
"metadata": json.dumps({
"name": "Buddy",
"age": 4,
"owner": "John Doe",
"vaccinated": True
})
}
response = requests.patch(url, headers=headers, json=data)
result = response.json()
print(result)const petId = "pet-uuid-1234";
const response = await fetch(`https://api.petify.petnow.io/v2/pets/${petId}`, {
method: "PATCH",
headers: {
"x-petnow-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
breed: "Golden Retriever Mix",
metadata: JSON.stringify({
name: "Buddy",
age: 4,
owner: "John Doe",
vaccinated: true
})
})
});
const result = await response.json();
console.log(result);Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
metadata | string | ✅ | Additional info as JSON string |
breed | string | ❌ | Breed |
Response
{
"success": true,
"data": {
"isSuccessful": true
}
}Update returns only { "isSuccessful": true } — it does not echo back the updated pet. Call Get Pet Details afterwards if you need the updated values.
Delete Pet
Delete a pet profile and all associated biometric data.
Endpoint: DELETE /v2/pets/{petId}
Request
curl -X DELETE "https://api.petify.petnow.io/v2/pets/pet-uuid-1234" \
-H "x-petnow-api-key: YOUR_API_KEY"import requests
pet_id = "pet-uuid-1234"
url = f"https://api.petify.petnow.io/v2/pets/{pet_id}"
headers = {
"x-petnow-api-key": "YOUR_API_KEY"
}
response = requests.delete(url, headers=headers)
print(response.status_code) # 204 No Contentconst petId = "pet-uuid-1234";
const response = await fetch(`https://api.petify.petnow.io/v2/pets/${petId}`, {
method: "DELETE",
headers: {
"x-petnow-api-key": "YOUR_API_KEY"
}
});
console.log(response.status); // 204 No ContentResponse
Returns 204 No Content on success.
Warning: Deleting a pet also deletes all registered fingerprints and appearance images. This action cannot be undone.
Metadata Schema Example
Here's an example schema for the metadata field:
{
"name": "Buddy",
"age": 3,
"gender": "male",
"owner": {
"name": "John Doe",
"phone": "010-1234-5678",
"email": "user@example.com"
},
"vaccinated": true,
"registrationNumber": "123456789",
"notes": "Has allergies"
}Tip: Since metadata is stored as a JSON string, you need to parse it when retrieving. You can freely define field names and structure according to your business requirements.