Partner API Documentation
This document explains how to integrate the Petoks Partner API endpoint securely for third-party systems.
Primary Endpoint
- Method:
GET - URL:
api/partner/pet-profile.php - Required query:
pet_external_id
Example URL:
/api/partner/pet-profile.php?pet_external_id=pet_xxxx
Authentication
Use one of the methods below:
- Header
Authorization: Bearer YOUR_API_KEY - Header
X-API-Key: YOUR_API_KEY - Query
api_key=YOUR_API_KEY(use only when strictly needed)
Required Scope
pet.profile.read
If the scope is insufficient, API returns 403 Insufficient scope.
Sample Request
curl -H "Authorization: Bearer YOUR_API_KEY" "https://your-domain/api/partner/pet-profile.php?pet_external_id=pet_xxxx"
Sample Success Response (200)
``json
{
"success": true,
"partner": {
"id": 2,
"name": "Partner A"
},
"pet": {
"external_id": "pet_xxxx",
"name": "Milo",
"username": "milo.cat"
},
"profile": {
"relationship": {},
"vaccinations": [],
"offspring": [],
"certificates": []
}
}
`
Error Codes
- 401
Missing API key / Invalid API key - 403
Insufficient scope / Country not allowed - 404
Pet not found - 422
pet_external_id is required - 429
Rate limit exceeded - 500
Internal server error
Integration Notes
- Always use pet_external_id
, not internal databaseid`. - Partner accesses are logged for audit and monitoring.
- Data returned by this endpoint is read-only.