Petnow LogoPetnow

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.b2b.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.b2b.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)
# {"data": {"id": "pet-uuid-1234"}}
const response = await fetch("https://api.b2b.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);
// {data: {id: "pet-uuid-1234"}}

Request Parameters

FieldTypeRequiredDescription
speciesstringSpecies: DOG or CAT
breedstringBreed
metadatastringAdditional info as JSON string

Response

{
  "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.b2b.petnow.io/v2/pets" \
  -H "x-petnow-api-key: YOUR_API_KEY"
import requests

url = "https://api.b2b.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.b2b.petnow.io/v2/pets", {
  method: "GET",
  headers: {
    "x-petnow-api-key": "YOUR_API_KEY"
  }
});

const result = await response.json();
console.log(result);

Response

{
  "data": {
    "pets": [
      {
        "id": "pet-uuid-1234",
        "species": "DOG",
        "breed": "Golden Retriever",
        "metadata": "{\"name\": \"Buddy\", \"age\": 3}",
        "createdAt": "2026-01-15T10:30:00Z"
      },
      {
        "id": "pet-uuid-5678",
        "species": "CAT",
        "breed": "Russian Blue",
        "metadata": "{\"name\": \"Nabi\", \"age\": 2}",
        "createdAt": "2026-01-10T14:20:00Z"
      }
    ]
  }
}

Get Pet Details

Retrieve detailed information about a specific pet.

Endpoint: GET /v2/pets/{petId}

Request

curl -X GET "https://api.b2b.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.b2b.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.b2b.petnow.io/v2/pets/${petId}`, {
  method: "GET",
  headers: {
    "x-petnow-api-key": "YOUR_API_KEY"
  }
});

const result = await response.json();
console.log(result);

Response

{
  "data": {
    "id": "pet-uuid-1234",
    "species": "DOG",
    "breed": "Golden Retriever",
    "metadata": "{\"name\": \"Buddy\", \"age\": 3, \"owner\": \"John Doe\"}",
    "fingerprintCount": 5,
    "appearanceCount": 2,
    "createdAt": "2026-01-15T10:30:00Z",
    "updatedAt": "2026-01-16T09:15:00Z"
  }
}

Update Pet

Update a pet's metadata.

Endpoint: PATCH /v2/pets/{petId}

Request

curl -X PATCH "https://api.b2b.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.b2b.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.b2b.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

FieldTypeRequiredDescription
breedstringBreed
metadatastringAdditional info as JSON string

Response

{
  "data": {
    "id": "pet-uuid-1234",
    "species": "DOG",
    "breed": "Golden Retriever Mix",
    "metadata": "{\"name\": \"Buddy\", \"age\": 4, \"owner\": \"John Doe\", \"vaccinated\": true}",
    "updatedAt": "2026-01-19T11:00:00Z"
  }
}

Delete Pet

Delete a pet profile and all associated biometric data.

Endpoint: DELETE /v2/pets/{petId}

Request

curl -X DELETE "https://api.b2b.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.b2b.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 Content
const petId = "pet-uuid-1234";
const response = await fetch(`https://api.b2b.petnow.io/v2/pets/${petId}`, {
  method: "DELETE",
  headers: {
    "x-petnow-api-key": "YOUR_API_KEY"
  }
});

console.log(response.status);  // 204 No Content

Response

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.

Next Steps

On this page