Introduction
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {SANCTUM_TOKEN}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Authenticate by sending a Bearer token in the Authorization header: Authorization: Bearer {SANCTUM_TOKEN}. Obtain a token by calling the POST /api/v1/login endpoint.
Authentication
Endpoints for OTP login, Google login, profile management, and logout.
Send OTP to a phone number.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/auth/send-otp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone\": \"bngzmiyvdljnikhw\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/auth/send-otp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone": "bngzmiyvdljnikhw"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Verify OTP and get a token.
Creates a new user if the phone number is not registered.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/auth/verify-otp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone\": \"bngzmiyvdljnikhw\",
\"otp\": \"aykcmy\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/auth/verify-otp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone": "bngzmiyvdljnikhw",
"otp": "aykcmy"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Login with Google.
The mobile app handles Google Sign-In and sends the verified email.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/auth/google" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/auth/google"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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's profile.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/auth/profile" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/auth/profile"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": false,
"status_code": 401,
"msg": "Unauthenticated.",
"data": null
}
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 authenticated user's profile.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/auth/update-profile" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=b"\
--form "avatar=@C:\Users\gupta\AppData\Local\Temp\phpE95A.tmp" const url = new URL(
"http://127.0.0.1:8000/api/v1/auth/update-profile"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'b');
body.append('avatar', document.querySelector('input[name="avatar"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());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.
Logout (revoke current token).
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/auth/logout" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/auth/logout"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());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.
Collaborators
Manage collaborator invites for a specific pet.
List collaborators for a pet.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/pets/1/collaborators" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/collaborators"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": false,
"status_code": 401,
"msg": "Unauthenticated.",
"data": null
}
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.
Invite a collaborator by phone number.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/pets/1/collaborators" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"phone\": \"bngzmiyvdljnikhw\",
\"role\": \"family\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/collaborators"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"phone": "bngzmiyvdljnikhw",
"role": "family"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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 a collaborator's role.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/v1/pets/1/collaborators/1" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"role\": \"family\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/collaborators/1"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"role": "family"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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 a collaborator.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/pets/1/collaborators/1" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/collaborators/1"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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.
Documents
Manage documents for a specific pet.
List documents for a pet.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/pets/1/documents" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/documents"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": false,
"status_code": 401,
"msg": "Unauthenticated.",
"data": null
}
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.
Create a document for a pet.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/pets/1/documents" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "title=b"\
--form "description=Et animi quos velit et fugiat."\
--form "category_id=architecto"\
--form "document_date=2022-04-21"\
--form "issued_by=n"\
--form "files[]=@C:\Users\gupta\AppData\Local\Temp\phpEB72.tmp" const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/documents"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('title', 'b');
body.append('description', 'Et animi quos velit et fugiat.');
body.append('category_id', 'architecto');
body.append('document_date', '2022-04-21');
body.append('issued_by', 'n');
body.append('files[]', document.querySelector('input[name="files[]"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());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.
Show a document.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/pets/1/documents/16" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/documents/16"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": false,
"status_code": 401,
"msg": "Unauthenticated.",
"data": null
}
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.
Delete a document.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/pets/1/documents/16" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/documents/16"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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 a document.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/pets/1/documents/16" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "title=b"\
--form "description=Et animi quos velit et fugiat."\
--form "document_date=2022-04-21"\
--form "issued_by=n"\
--form "files[]=@C:\Users\gupta\AppData\Local\Temp\phpEB92.tmp" const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/documents/16"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('title', 'b');
body.append('description', 'Et animi quos velit et fugiat.');
body.append('document_date', '2022-04-21');
body.append('issued_by', 'n');
body.append('files[]', document.querySelector('input[name="files[]"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());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.
Upload files to a document.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/pets/1/documents/16/files" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "files[]=@C:\Users\gupta\AppData\Local\Temp\phpEB93.tmp" const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/documents/16/files"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('files[]', document.querySelector('input[name="files[]"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());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.
Invites
List pending invites for the authenticated user.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/invites" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/invites"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": false,
"status_code": 401,
"msg": "Unauthenticated.",
"data": null
}
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.
Accept an invite.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/invites/architecto/accept" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/invites/architecto/accept"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());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.
Decline an invite.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/invites/architecto/decline" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/invites/architecto/decline"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());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.
Lookups
Public endpoints for species, breeds, and document categories.
List all species.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/species" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/species"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": true,
"status_code": 200,
"msg": "Success",
"data": [
{
"id": 1,
"name": "Dog"
},
{
"id": 2,
"name": "Cat"
}
]
}
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.
List breeds for a species.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/species/1/breeds" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/species/1/breeds"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": true,
"status_code": 200,
"msg": "Success",
"data": [
{
"id": 6,
"name": "Beagle",
"species_id": 1
},
{
"id": 10,
"name": "Boxer",
"species_id": 1
},
{
"id": 4,
"name": "Bulldog",
"species_id": 1
},
{
"id": 15,
"name": "Chihuahua",
"species_id": 1
},
{
"id": 8,
"name": "Dachshund",
"species_id": 1
},
{
"id": 13,
"name": "Doberman",
"species_id": 1
},
{
"id": 2,
"name": "German Shepherd",
"species_id": 1
},
{
"id": 3,
"name": "Golden Retriever",
"species_id": 1
},
{
"id": 14,
"name": "Great Dane",
"species_id": 1
},
{
"id": 17,
"name": "Indian Pariah",
"species_id": 1
},
{
"id": 18,
"name": "Indie / Mixed",
"species_id": 1
},
{
"id": 1,
"name": "Labrador Retriever",
"species_id": 1
},
{
"id": 12,
"name": "Pomeranian",
"species_id": 1
},
{
"id": 5,
"name": "Poodle",
"species_id": 1
},
{
"id": 16,
"name": "Pug",
"species_id": 1
},
{
"id": 7,
"name": "Rottweiler",
"species_id": 1
},
{
"id": 11,
"name": "Shih Tzu",
"species_id": 1
},
{
"id": 9,
"name": "Siberian Husky",
"species_id": 1
}
]
}
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.
List all document categories.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/document-categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/document-categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": true,
"status_code": 200,
"msg": "Success",
"data": [
{
"id": 1,
"name": "Vaccination"
},
{
"id": 2,
"name": "Blood Test"
},
{
"id": 3,
"name": "X-Ray / Imaging"
},
{
"id": 4,
"name": "Prescription"
},
{
"id": 5,
"name": "Insurance"
},
{
"id": 6,
"name": "Surgery Report"
},
{
"id": 7,
"name": "Allergy Report"
},
{
"id": 8,
"name": "Dental Record"
},
{
"id": 9,
"name": "Lab Report"
},
{
"id": 10,
"name": "Other"
}
]
}
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.
Pets
Manage pets owned by or shared with the authenticated user.
List the user's pets.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/pets" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/pets"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": false,
"status_code": 401,
"msg": "Unauthenticated.",
"data": null
}
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.
Create a new pet.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/pets" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=b"\
--form "species_id=architecto"\
--form "date_of_birth=2022-04-21"\
--form "gender=unknown"\
--form "weight_kg=22"\
--form "medical_notes=g"\
--form "is_neutered=1"\
--form "is_vaccinated=1"\
--form "microchip_number=z"\
--form "address_line_1=m"\
--form "address_line_2=i"\
--form "pincode=yvdljn"\
--form "city=i"\
--form "state=k"\
--form "photo=@C:\Users\gupta\AppData\Local\Temp\phpEAB3.tmp" const url = new URL(
"http://127.0.0.1:8000/api/v1/pets"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'b');
body.append('species_id', 'architecto');
body.append('date_of_birth', '2022-04-21');
body.append('gender', 'unknown');
body.append('weight_kg', '22');
body.append('medical_notes', 'g');
body.append('is_neutered', '1');
body.append('is_vaccinated', '1');
body.append('microchip_number', 'z');
body.append('address_line_1', 'm');
body.append('address_line_2', 'i');
body.append('pincode', 'yvdljn');
body.append('city', 'i');
body.append('state', 'k');
body.append('photo', document.querySelector('input[name="photo"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());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.
Show a pet.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/pets/1" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": false,
"status_code": 401,
"msg": "Unauthenticated.",
"data": null
}
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.
Delete a pet.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/pets/1" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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 a pet.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/pets/1" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=b"\
--form "date_of_birth=2022-04-21"\
--form "gender=male"\
--form "weight_kg=22"\
--form "medical_notes=g"\
--form "is_neutered="\
--form "is_vaccinated="\
--form "microchip_number=z"\
--form "address_line_1=m"\
--form "address_line_2=i"\
--form "pincode=yvdljn"\
--form "city=i"\
--form "state=k"\
--form "photo=@C:\Users\gupta\AppData\Local\Temp\phpEAC3.tmp" const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'b');
body.append('date_of_birth', '2022-04-21');
body.append('gender', 'male');
body.append('weight_kg', '22');
body.append('medical_notes', 'g');
body.append('is_neutered', '');
body.append('is_vaccinated', '');
body.append('microchip_number', 'z');
body.append('address_line_1', 'm');
body.append('address_line_2', 'i');
body.append('pincode', 'yvdljn');
body.append('city', 'i');
body.append('state', 'k');
body.append('photo', document.querySelector('input[name="photo"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());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.
Upload a pet's photo.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/pets/1/photo" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "photo=@C:\Users\gupta\AppData\Local\Temp\phpEAD4.tmp" const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/photo"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('photo', document.querySelector('input[name="photo"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());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.
Reminders
Manage reminders for a specific pet.
List reminders for a pet.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/pets/1/reminders" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/reminders"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": false,
"status_code": 401,
"msg": "Unauthenticated.",
"data": null
}
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.
Create a reminder for a pet.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/v1/pets/1/reminders" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"b\",
\"description\": \"Et animi quos velit et fugiat.\",
\"category\": \"vaccine\",
\"recurrence\": \"weekly\",
\"remind_at\": \"2026-03-27T12:42:05\",
\"end_date\": \"2052-04-19\",
\"alert_before_minutes\": 1440,
\"is_active\": false
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/reminders"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "b",
"description": "Et animi quos velit et fugiat.",
"category": "vaccine",
"recurrence": "weekly",
"remind_at": "2026-03-27T12:42:05",
"end_date": "2052-04-19",
"alert_before_minutes": 1440,
"is_active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Show a reminder.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/pets/1/reminders/16" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/reminders/16"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": false,
"status_code": 401,
"msg": "Unauthenticated.",
"data": null
}
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 a reminder.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/v1/pets/1/reminders/16" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"b\",
\"description\": \"Et animi quos velit et fugiat.\",
\"category\": \"grooming\",
\"recurrence\": \"weekly\",
\"remind_at\": \"2026-03-27T12:42:05\",
\"end_date\": \"2052-04-19\",
\"alert_before_minutes\": 0,
\"is_active\": false
}"
const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/reminders/16"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "b",
"description": "Et animi quos velit et fugiat.",
"category": "grooming",
"recurrence": "weekly",
"remind_at": "2026-03-27T12:42:05",
"end_date": "2052-04-19",
"alert_before_minutes": 0,
"is_active": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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.
Delete a reminder.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/v1/pets/1/reminders/16" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/pets/1/reminders/16"
);
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());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.
List upcoming reminders across all of the user's pets.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/v1/reminders/upcoming?days=14" \
--header "Authorization: Bearer {SANCTUM_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/v1/reminders/upcoming"
);
const params = {
"days": "14",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {SANCTUM_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status": false,
"status_code": 401,
"msg": "Unauthenticated.",
"data": null
}
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.