Introduction
API para la gestión de mascotas con sus dueños(En este caso Gatos). Esta es una API RESTful robusta, desarrollada conLaravel 8.x+ y PHP, cuyo objetivo es gestionar personas y sus mascotas. La API utiliza JWT (JSON Web Tokens) para la autenticación de usuarios, garantizando la seguridad de las rutas privadas. El proyecto sigue una arquitectura sugerida que incluye el uso de controladores, servicios, repositorios, recursos y validadores (Form Requests) para mantener una estructura de código limpia y escalable.
Esta api esta realizada para gestionar los procesos CRUD de las mascotas y sus dueños (personas)
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
Auth
Autenticación de un usuario en el API
Get a JWT via given credentials.
Example request:
curl --request POST \
"https://pet-management-api.lorenzorojo.com/api/v1/auth/login" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "{
\"email\": \"qkunze@example.com\",
\"password\": \"Z5ij-e\\/dl4m{o,\"
}"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/auth/login"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"email": "qkunze@example.com",
"password": "Z5ij-e\/dl4m{o,"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/auth/login';
$response = $client->post(
$url,
[
'headers' => [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'email' => 'qkunze@example.com',
'password' => 'Z5ij-e/dl4m{o,',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Log the user out (Invalidate the token).
requires authentication
Example request:
curl --request POST \
"https://pet-management-api.lorenzorojo.com/api/v1/auth/logout" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/auth/logout"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/auth/logout';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the authenticated User.
requires authentication
Example request:
curl --request GET \
--get "https://pet-management-api.lorenzorojo.com/api/v1/auth/me" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/auth/me"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/auth/me';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": "Invalid tokenWrong number of segments"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Refresh a token.
requires authentication
Example request:
curl --request POST \
"https://pet-management-api.lorenzorojo.com/api/v1/auth/refresh" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/auth/refresh"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/auth/refresh';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store new User
Example request:
curl --request POST \
"https://pet-management-api.lorenzorojo.com/api/v1/auth/register" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"vmqeopfuudtdsufvyvddq\",
\"email\": \"kunde.eloisa@example.com\",
\"password\": \"4[*UyPJ\\\"}6\"
}"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/auth/register"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"name": "vmqeopfuudtdsufvyvddq",
"email": "kunde.eloisa@example.com",
"password": "4[*UyPJ\"}6"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/auth/register';
$response = $client->post(
$url,
[
'headers' => [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'vmqeopfuudtdsufvyvddq',
'email' => 'kunde.eloisa@example.com',
'password' => '4[*UyPJ"}6',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Person
Person owner pets management
Display a listing of the resource.
requires authentication
Example request:
curl --request GET \
--get "https://pet-management-api.lorenzorojo.com/api/v1/person?page=73&perPage=13" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/person"
);
const params = {
"page": "73",
"perPage": "13",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/person';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'query' => [
'page' => '73',
'perPage' => '13',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": "Invalid tokenWrong number of segments"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created resource in storage.
requires authentication
Example request:
curl --request POST \
"https://pet-management-api.lorenzorojo.com/api/v1/person" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"vmqeopfuudtdsufvyvddq\",
\"email\": \"kunde.eloisa@example.com\",
\"birthdate\": \"2025-08-19\"
}"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/person"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"name": "vmqeopfuudtdsufvyvddq",
"email": "kunde.eloisa@example.com",
"birthdate": "2025-08-19"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/person';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'vmqeopfuudtdsufvyvddq',
'email' => 'kunde.eloisa@example.com',
'birthdate' => '2025-08-19',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified resource.
requires authentication
Example request:
curl --request GET \
--get "https://pet-management-api.lorenzorojo.com/api/v1/person/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/person/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/person/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": "Invalid tokenWrong number of segments"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"https://pet-management-api.lorenzorojo.com/api/v1/person/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"vmqeopfuudtdsufvyvddq\",
\"email\": \"kunde.eloisa@example.com\",
\"birthdate\": \"2025-08-19\"
}"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/person/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"name": "vmqeopfuudtdsufvyvddq",
"email": "kunde.eloisa@example.com",
"birthdate": "2025-08-19"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/person/1';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'vmqeopfuudtdsufvyvddq',
'email' => 'kunde.eloisa@example.com',
'birthdate' => '2025-08-19',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
requires authentication
Example request:
curl --request DELETE \
"https://pet-management-api.lorenzorojo.com/api/v1/person/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/person/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/person/1';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Pet
Pet Management
Display a listing of the resource.
requires authentication
Example request:
curl --request GET \
--get "https://pet-management-api.lorenzorojo.com/api/v1/pet?page=73&perPage=13" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/pet"
);
const params = {
"page": "73",
"perPage": "13",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/pet';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'query' => [
'page' => '73',
'perPage' => '13',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": "Invalid tokenWrong number of segments"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created resource in storage.
requires authentication
Example request:
curl --request POST \
"https://pet-management-api.lorenzorojo.com/api/v1/pet" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"vmqeopfuudtdsufvyvddq\",
\"species\": \"amniihfqcoynlazghdtqt\",
\"breed\": \"qxbajwbpilpmufinllwlo\",
\"age\": 17,
\"person_id\": 17
}"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/pet"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"name": "vmqeopfuudtdsufvyvddq",
"species": "amniihfqcoynlazghdtqt",
"breed": "qxbajwbpilpmufinllwlo",
"age": 17,
"person_id": 17
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/pet';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'vmqeopfuudtdsufvyvddq',
'species' => 'amniihfqcoynlazghdtqt',
'breed' => 'qxbajwbpilpmufinllwlo',
'age' => 17,
'person_id' => 17,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified resource.
requires authentication
Example request:
curl --request GET \
--get "https://pet-management-api.lorenzorojo.com/api/v1/pet/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/pet/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/pet/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": "Invalid tokenWrong number of segments"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"https://pet-management-api.lorenzorojo.com/api/v1/pet/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"vmqeopfuudtdsufvyvddq\",
\"species\": \"amniihfqcoynlazghdtqt\",
\"breed\": \"qxbajwbpilpmufinllwlo\",
\"age\": 17,
\"person_id\": 17
}"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/pet/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"name": "vmqeopfuudtdsufvyvddq",
"species": "amniihfqcoynlazghdtqt",
"breed": "qxbajwbpilpmufinllwlo",
"age": 17,
"person_id": 17
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/pet/1';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'vmqeopfuudtdsufvyvddq',
'species' => 'amniihfqcoynlazghdtqt',
'breed' => 'qxbajwbpilpmufinllwlo',
'age' => 17,
'person_id' => 17,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
requires authentication
Example request:
curl --request DELETE \
"https://pet-management-api.lorenzorojo.com/api/v1/pet/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/pet/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/pet/1';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get available breeds 'The CAT API'
requires authentication
Example request:
curl --request GET \
--get "https://pet-management-api.lorenzorojo.com/api/v1/pet/cat/breeds?page=0&perPage=10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/pet/cat/breeds"
);
const params = {
"page": "0",
"perPage": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/pet/cat/breeds';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'query' => [
'page' => '0',
'perPage' => '10',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": "Invalid tokenWrong number of segments"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reports
API Reports
Devuelve una persona con sus mascotas
requires authentication
Example request:
curl --request GET \
--get "https://pet-management-api.lorenzorojo.com/api/v1/person/1/with-pets" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "Content-Type: application/json"
const url = new URL(
"https://pet-management-api.lorenzorojo.com/api/v1/person/1/with-pets"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://pet-management-api.lorenzorojo.com/api/v1/person/1/with-pets';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"id": 111,
"name": "Pepito",
"email": "pepito123@gmail.com",
"birthdate": "13-08-1995",
"pets": [
{
"id": 11,
"name": "Michilina",
"species": "cat",
"breed": "angora",
"age": "10.00",
"image_url": null,
"life_span": null,
"adaptability": null,
"reference_image_id": null,
"created_at": "2025-05-18"
},
{
"id": 12,
"name": "Minina",
"species": "cat",
"breed": "Criolla",
"age": "8.00",
"image_url": null,
"life_span": null,
"adaptability": null,
"reference_image_id": null,
"created_at": "2025-05-18"
},
{
"id": 13,
"name": "Minina",
"species": "cat",
"breed": "Criolla",
"age": "8.00",
"image_url": null,
"life_span": null,
"adaptability": null,
"reference_image_id": null,
"created_at": "2025-05-18"
},
{
"id": 14,
"name": "Minina Acur",
"species": "cat",
"breed": "Abyssinian",
"age": "8.00",
"image_url": "https://cdn2.thecatapi.com/images/0XYvRd7oD.jpg",
"life_span": "14 - 15",
"adaptability": 5,
"reference_image_id": "0XYvRd7oD",
"created_at": "2025-05-18"
},
{
"id": 15,
"name": "Minina Acur sdsdsdsd",
"species": "Gato",
"breed": "Abyssinian",
"age": "5.00",
"image_url": "https://cdn2.thecatapi.com/images/0XYvRd7oD.jpg",
"life_span": "14 - 15",
"adaptability": 5,
"reference_image_id": "0XYvRd7oD",
"created_at": "2025-05-18"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.