MENU navbar-image

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());

Request      

POST api/v1/auth/send-otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

phone   string     

Must match the regex /^+[1-9]\d{6,14}$/. Must not be greater than 16 characters. Example: bngzmiyvdljnikhw

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());

Request      

POST api/v1/auth/verify-otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

phone   string     

Must match the regex /^+[1-9]\d{6,14}$/. Must not be greater than 16 characters. Example: bngzmiyvdljnikhw

otp   string     

Must be 6 characters. Example: aykcmy

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());

Request      

POST api/v1/auth/google

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: gbailey@example.net

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
}
 

Request      

GET api/v1/auth/profile

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

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());

Request      

POST api/v1/auth/update-profile

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

avatar   file  optional    

Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\gupta\AppData\Local\Temp\phpE95A.tmp

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());

Request      

POST api/v1/auth/logout

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

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
}
 

Request      

GET api/v1/pets/{pet_id}/collaborators

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

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());

Request      

POST api/v1/pets/{pet_id}/collaborators

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

Body Parameters

phone   string     

Must not be greater than 20 characters. Example: bngzmiyvdljnikhw

role   string     

Example: family

Must be one of:
  • family
  • vet

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());

Request      

PUT api/v1/pets/{pet_id}/collaborators/{id}

PATCH api/v1/pets/{pet_id}/collaborators/{id}

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

id   integer     

The ID of the collaborator. Example: 1

Body Parameters

role   string     

Example: family

Must be one of:
  • family
  • vet

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());

Request      

DELETE api/v1/pets/{pet_id}/collaborators/{id}

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

id   integer     

The ID of the collaborator. Example: 1

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
}
 

Request      

GET api/v1/pets/{pet_id}/documents

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

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());

Request      

POST api/v1/pets/{pet_id}/documents

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

Body Parameters

title   string     

Must not be greater than 255 characters. Example: b

description   string  optional    

Must not be greater than 2000 characters. Example: Et animi quos velit et fugiat.

category_id   string     

The id of an existing record in the document_categories table. Example: architecto

document_date   string  optional    

Must be a valid date. Must be a date before or equal to today. Example: 2022-04-21

issued_by   string  optional    

Must not be greater than 255 characters. Example: n

files   file[]     

Must be a file. Must not be greater than 10240 kilobytes.

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
}
 

Request      

GET api/v1/pets/{pet_id}/documents/{id}

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

id   integer     

The ID of the document. Example: 16

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());

Request      

DELETE api/v1/pets/{pet_id}/documents/{id}

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

id   integer     

The ID of the document. Example: 16

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());

Request      

POST api/v1/pets/{pet_id}/documents/{id}

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

id   integer     

The ID of the document. Example: 16

Body Parameters

title   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Must not be greater than 2000 characters. Example: Et animi quos velit et fugiat.

category_id   string  optional    

The id of an existing record in the document_categories table.

document_date   string  optional    

Must be a valid date. Must be a date before or equal to today. Example: 2022-04-21

issued_by   string  optional    

Must not be greater than 255 characters. Example: n

files   file[]     

Must be a file. Must not be greater than 10240 kilobytes.

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());

Request      

POST api/v1/pets/{pet_id}/documents/{document_id}/files

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

document_id   integer     

The ID of the document. Example: 16

Body Parameters

files   file[]     

Must be a file. Must not be greater than 10240 kilobytes.

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
}
 

Request      

GET api/v1/invites

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

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());

Request      

POST api/v1/invites/{collaborator_invite_id}/accept

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

collaborator_invite_id   string     

The ID of the collaborator invite. Example: architecto

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());

Request      

POST api/v1/invites/{collaborator_invite_id}/decline

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

collaborator_invite_id   string     

The ID of the collaborator invite. Example: architecto

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"
        }
    ]
}
 

Request      

GET api/v1/species

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

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
        }
    ]
}
 

Request      

GET api/v1/species/{species_id}/breeds

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

species_id   integer     

The ID of the species. Example: 1

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"
        }
    ]
}
 

Request      

GET api/v1/document-categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

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
}
 

Request      

GET api/v1/pets

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

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());

Request      

POST api/v1/pets

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

species_id   string     

The id of an existing record in the species table. Example: architecto

breed_id   string  optional    

The id of an existing record in the breeds table.

date_of_birth   string  optional    

Must be a valid date. Must be a date before or equal to today. Example: 2022-04-21

gender   string  optional    

Example: unknown

Must be one of:
  • male
  • female
  • unknown
weight_kg   number  optional    

Must be at least 0. Must not be greater than 999.99. Example: 22

medical_notes   string  optional    

Must not be greater than 5000 characters. Example: g

is_neutered   boolean  optional    

Example: true

is_vaccinated   boolean  optional    

Example: true

microchip_number   string  optional    

Must not be greater than 255 characters. Example: z

address_line_1   string  optional    

This field is required when pincode, city, or state is present. Must not be greater than 255 characters. Example: m

address_line_2   string  optional    

Must not be greater than 255 characters. Example: i

pincode   string  optional    

This field is required when address_line_1 is present. Must not be greater than 10 characters. Example: yvdljn

city   string  optional    

This field is required when address_line_1 is present. Must not be greater than 100 characters. Example: i

state   string  optional    

This field is required when address_line_1 is present. Must not be greater than 100 characters. Example: k

photo   file  optional    

Must be an image. Must not be greater than 5120 kilobytes. Example: C:\Users\gupta\AppData\Local\Temp\phpEAB3.tmp

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
}
 

Request      

GET api/v1/pets/{id}

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the pet. Example: 1

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());

Request      

DELETE api/v1/pets/{id}

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the pet. Example: 1

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());

Request      

POST api/v1/pets/{id}

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the pet. Example: 1

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

species_id   string  optional    

The id of an existing record in the species table.

breed_id   string  optional    

The id of an existing record in the breeds table.

date_of_birth   string  optional    

Must be a valid date. Must be a date before or equal to today. Example: 2022-04-21

gender   string  optional    

Example: male

Must be one of:
  • male
  • female
  • unknown
weight_kg   number  optional    

Must be at least 0. Must not be greater than 999.99. Example: 22

medical_notes   string  optional    

Must not be greater than 5000 characters. Example: g

is_neutered   boolean  optional    

Example: false

is_vaccinated   boolean  optional    

Example: false

microchip_number   string  optional    

Must not be greater than 255 characters. Example: z

address_line_1   string  optional    

This field is required when pincode, city, or state is present. Must not be greater than 255 characters. Example: m

address_line_2   string  optional    

Must not be greater than 255 characters. Example: i

pincode   string  optional    

This field is required when address_line_1 is present. Must not be greater than 10 characters. Example: yvdljn

city   string  optional    

This field is required when address_line_1 is present. Must not be greater than 100 characters. Example: i

state   string  optional    

This field is required when address_line_1 is present. Must not be greater than 100 characters. Example: k

photo   file  optional    

Must be an image. Must not be greater than 5120 kilobytes. Example: C:\Users\gupta\AppData\Local\Temp\phpEAC3.tmp

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());

Request      

POST api/v1/pets/{pet_id}/photo

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

Body Parameters

photo   file     

Must be an image. Must not be greater than 5120 kilobytes. Example: C:\Users\gupta\AppData\Local\Temp\phpEAD4.tmp

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
}
 

Request      

GET api/v1/pets/{pet_id}/reminders

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

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());

Request      

POST api/v1/pets/{pet_id}/reminders

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

Body Parameters

title   string     

Must not be greater than 255 characters. Example: b

description   string  optional    

Must not be greater than 2000 characters. Example: Et animi quos velit et fugiat.

category   string     

Example: vaccine

Must be one of:
  • medication
  • food
  • vaccine
  • housing
  • grooming
recurrence   string     

Example: weekly

Must be one of:
  • once
  • daily
  • weekly
  • monthly
  • yearly
remind_at   string     

Must be a valid date. Example: 2026-03-27T12:42:05

end_date   string  optional    

Must be a valid date. Must be a date after or equal to remind_at. Example: 2052-04-19

alert_before_minutes   integer  optional    

Example: 1440

Must be one of:
  • 0
  • 5
  • 10
  • 15
  • 30
  • 60
  • 1440
is_active   boolean  optional    

Example: false

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
}
 

Request      

GET api/v1/pets/{pet_id}/reminders/{id}

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

id   integer     

The ID of the reminder. Example: 16

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());

Request      

PUT api/v1/pets/{pet_id}/reminders/{id}

PATCH api/v1/pets/{pet_id}/reminders/{id}

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

id   integer     

The ID of the reminder. Example: 16

Body Parameters

title   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Must not be greater than 2000 characters. Example: Et animi quos velit et fugiat.

category   string  optional    

Example: grooming

Must be one of:
  • medication
  • food
  • vaccine
  • housing
  • grooming
recurrence   string  optional    

Example: weekly

Must be one of:
  • once
  • daily
  • weekly
  • monthly
  • yearly
remind_at   string  optional    

Must be a valid date. Example: 2026-03-27T12:42:05

end_date   string  optional    

Must be a valid date. Must be a date after or equal to remind_at. Example: 2052-04-19

alert_before_minutes   integer  optional    

Example: 0

Must be one of:
  • 0
  • 5
  • 10
  • 15
  • 30
  • 60
  • 1440
is_active   boolean  optional    

Example: false

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());

Request      

DELETE api/v1/pets/{pet_id}/reminders/{id}

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

pet_id   integer     

The ID of the pet. Example: 1

id   integer     

The ID of the reminder. Example: 16

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
}
 

Request      

GET api/v1/reminders/upcoming

Headers

Authorization        

Example: Bearer {SANCTUM_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

days   integer  optional    

Number of days to look ahead. Defaults to 7. Example: 14