API Documentation
Developer resources and documentation for integrating with the PetNect API.
API Overview
RESTful API
- • JSON request/response format
- • HTTP status code responses
- • Bearer token authentication
- • Rate limiting and pagination
- • Comprehensive error handling
Base Information
https://app.petnect.com/api/v1application/jsonBearer {token}Authentication
Getting Started
The PetNect API uses Bearer token authentication. You'll need to authenticate to access protected endpoints.
1. Login to Get Token
POST /api/v1/auth/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "your-password"
}
2. Response
{
"token": "1|abcd1234...",
"user": {
"id": 1,
"name": "John Doe",
"email": "user@example.com"
}
}
3. Use Token in Requests
GET /api/v1/pets
Authorization: Bearer 1|abcd1234...
Content-Type: application/json
Available Endpoints
Authentication
/auth/login
- Authenticate user
/auth/logout
- Revoke token
/auth/me
- Get current user
Pets
/pets
- List user's pets
/pets/{id}
- Get specific pet
/pets
- Create new pet
/pets/{id}
- Update pet
/pets/{id}
- Delete pet
Bookings
/bookings
- List user's bookings
/bookings/{id}
- Get specific booking
/bookings
- Create booking request
/bookings/{id}/status
- Update booking status
Response Format
Success Response
{
"success": true,
"data": {
"id": 1,
"name": "Fluffy",
"type": "cat"
},
"message": "Pet retrieved successfully"
}
Error Response
{
"success": false,
"error": "Validation failed",
"errors": {
"name": ["The name field is required."]
},
"code": 422
}
HTTP Status Codes
Success Codes
200
OK - Request successful
201
Created - Resource created
204
No Content - Successful deletion
Error Codes
400
Bad Request - Invalid request
401
Unauthorized - Authentication required
403
Forbidden - Access denied
404
Not Found - Resource not found
422
Validation Error - Invalid data
429
Rate Limited - Too many requests
Rate Limiting
API Rate Limits
To ensure fair usage, the API has the following rate limits:
- • Authenticated requests: 1000 requests per hour
- • Authentication endpoints: 10 requests per minute
- • File uploads: 50 requests per hour
Rate Limit Headers
Interactive Documentation
Swagger UI Documentation
Explore and test our API endpoints with interactive Swagger documentation.
Interactive documentation is available to administrators and in development environments.
SDKs & Libraries
JavaScript/Node.js
Official SDK for JavaScript applications
Coming SoonPython
Python library for PetNect API
Coming SoonPHP
Native PHP integration library
Coming SoonNeed API Support?
Have questions about implementing the PetNect API? Our developer support team is here to help.