MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include an Authorization header in the form "Basic {credentials}". The value of {credentials} should be your username/id and your password, joined with a colon (:), and then base64-encoded.

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.

Endpoints

GET api/v2/{name}/media-url

Example request:
curl --request GET \
    --get "https://itmedicalvetsolutions.com/api/v2/id/media-url" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/id/media-url"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 200
x-ratelimit-remaining: 199
 

{
    "success": false,
    "status_code": 404,
    "message": [
        "App Not Found"
    ],
    "data": []
}
 

Request      

GET api/v2/{name}/media-url

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: id

Pets

Add Pet

requires authentication

add pet by user email

age: format should be “2 years” if only in years or “2 years 2 months” if in years and months both

weight: format should be “10 lbs”

Example request:
curl --request POST \
    "https://itmedicalvetsolutions.com/api/v2/dolores/pet/add" \
    --header "Authorization: Basic {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"sed\",
    \"age\": \"reiciendis\",
    \"sex\": \"nulla\"
}"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/dolores/pet/add"
);

const headers = {
    "Authorization": "Basic {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "sed",
    "age": "reiciendis",
    "sex": "nulla"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "status_code": 200,
    "message": [
        "Pet Added"
    ],
    "data": {
        "email": "testgoodcharlievmp@mailinator.co",
        "pet": {
            "user_id": 3572,
            "app_id": 5,
            "name": "abcd 411222",
            "sex": "Female",
            "sex_type": "Spayed",
            "breed": "horny",
            "weight": "111",
            "age": "2 years",
            "color": "Brown",
            "species": "cat",
            "updated_at": "2023-07-26 14:07:51",
            "created_at": "2023-07-26 14:07:51",
            "id": 2087,
            "veterians": null,
            "medicals": null,
            "insurnaces": null,
            "pet_veterians": [],
            "pet_medicals": [],
            "pet_insurnaces": []
        }
    }
}
 

Request      

POST api/v2/{name}/pet/add

Headers

Authorization      

Example: Basic {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: dolores

Body Parameters

name   string   

Example: sed

species   string  optional  
age   string   

Example: reiciendis

breed   string  optional  
color   string  optional  
weight   string  optional  
sex   string   

Example: nulla

sex_type   string  optional  
dob   string  optional  

Update Pet

requires authentication

update pet by user email and pet Id

if you want to send your pet image then use form-data for payload instead of raw where the key type would be file instead of text. ”profile”:”[image_path]

Example request:
curl --request POST \
    "https://itmedicalvetsolutions.com/api/v2/animi/pet/update" \
    --header "Authorization: Basic {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"nolan.jeffrey@example.com\",
    \"pet_id\": 3,
    \"pet\": {
        \"name\": \"voluptatum\",
        \"color\": \"eum\",
        \"sex\": \"provident\",
        \"sex_type\": \"corrupti\",
        \"species\": \"quaerat\",
        \"weight\": 11
    }
}"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/animi/pet/update"
);

const headers = {
    "Authorization": "Basic {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "nolan.jeffrey@example.com",
    "pet_id": 3,
    "pet": {
        "name": "voluptatum",
        "color": "eum",
        "sex": "provident",
        "sex_type": "corrupti",
        "species": "quaerat",
        "weight": 11
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "status_code": 200,
    "message": [
        "Pet Updated"
    ],
    "data": {
        "pet": {
            "id": 2087,
            "user_id": 3572,
            "app_id": 5,
            "pet_id": null,
            "name": "milo",
            "species": "cat",
            "age": "2 years",
            "breed": "horny",
            "color": "Brown",
            "weight": "111",
            "sex": "Female",
            "sex_type": "Spayed",
            "profile": null,
            "created_at": "2023-07-26 14:07:51",
            "updated_at": "2023-07-26 14:07:16",
            "deleted_at": null,
            "veterians": null,
            "medicals": null,
            "insurnaces": null,
            "pet_veterians": [],
            "pet_medicals": [],
            "pet_insurnaces": []
        }
    }
}
 

Request      

POST api/v2/{name}/pet/update

Headers

Authorization      

Example: Basic {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: animi

Body Parameters

email   string   

Example=example@gmail.com Example: nolan.jeffrey@example.com

pet_id   integer   

Example=12 Example: 3

pet   object  optional  
name   string  optional  

Example: voluptatum

color   string  optional  

Example: eum

sex   string  optional  

Example: provident

sex_type   string  optional  

Example: corrupti

species   string   

Example: quaerat

weight   integer  optional  

Example: 11

Remove Pet

requires authentication

remove pet by user email and pet Id

Example request:
curl --request POST \
    "https://itmedicalvetsolutions.com/api/v2/sunt/pet/remove" \
    --header "Authorization: Basic {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"glittel@example.net\",
    \"pet_id\": 17
}"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/sunt/pet/remove"
);

const headers = {
    "Authorization": "Basic {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "glittel@example.net",
    "pet_id": 17
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "status_code": 200,
    "message": [
        "Pet data deleted successfully"
    ],
    "data": true
}
 

Request      

POST api/v2/{name}/pet/remove

Headers

Authorization      

Example: Basic {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: sunt

Body Parameters

email   string   

Example=example@gmail.com Example: glittel@example.net

pet_id   integer   

Example=12 Example: 17

Get Pets

requires authentication

list of pets

This endpoint will get all the pets for the provided user email

email will go as a query param

Example request:
curl --request GET \
    --get "https://itmedicalvetsolutions.com/api/v2/cumque/pet/list?search_value=aut&search_by=in&page=5&pagination=1&perPage=8" \
    --header "Authorization: Basic {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/cumque/pet/list"
);

const params = {
    "search_value": "aut",
    "search_by": "in",
    "page": "5",
    "pagination": "1",
    "perPage": "8",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Basic {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "status_code": 200,
    "message": [
        "pet list"
    ],
    "data": {
        "list": [
            {
                "id": 2086,
                "user_id": 3572,
                "app_id": 5,
                "pet_id": null,
                "name": "TestDog",
                "species": "cat",
                "age": "1/1/1970, 5:00:00 AM",
                "breed": "Affenpinscher",
                "color": "Black",
                "weight": "2years 3months",
                "sex": "Male",
                "sex_type": "spayed",
                "profile": null,
                "created_at": "2023-07-26 13:07:02",
                "updated_at": "2023-07-26 13:07:02",
                "deleted_at": null,
                "veterians": null,
                "medicals": null,
                "insurnaces": null,
                "pet_veterians": [],
                "pet_medicals": [],
                "pet_insurnaces": []
            },
            {
                "id": 2087,
                "user_id": 3572,
                "app_id": 5,
                "pet_id": null,
                "name": "milo",
                "species": "cat",
                "age": "2 years",
                "breed": "horny",
                "color": "Brown",
                "weight": "111",
                "sex": "Female",
                "sex_type": "Spayed",
                "profile": null,
                "created_at": "2023-07-26 14:07:51",
                "updated_at": "2023-07-26 14:07:16",
                "deleted_at": null,
                "veterians": null,
                "medicals": null,
                "insurnaces": null,
                "pet_veterians": [],
                "pet_medicals": [],
                "pet_insurnaces": []
            }
        ]
    }
}
 

Request      

GET api/v2/{name}/pet/list

Headers

Authorization      

Example: Basic {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: cumque

Query Parameters

search_value   string  optional  

Example: aut

search_by   string  optional  

Example: in

page   integer  optional  

Example: 5

pagination   boolean  optional  

Example: true

perPage   integer  optional  

Example: 8

Reports

Web User List

requires authentication

update emergency info of user

selectedProtected refers to current user type i.e. “users” or “protect_users”

Example request:
curl --request POST \
    "https://itmedicalvetsolutions.com/api/v2/vero/report/webappuser/profile" \
    --header "Authorization: Basic {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_from\": \"magnam\",
    \"date_to\": \"reprehenderit\",
    \"search_value\": \"consectetur\",
    \"pagination\": \"dolores\",
    \"page\": \"et\",
    \"perPage\": \"molestiae\",
    \"status\": \"delectus\",
    \"selectedProtect\": \"fugit\"
}"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/vero/report/webappuser/profile"
);

const headers = {
    "Authorization": "Basic {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "date_from": "magnam",
    "date_to": "reprehenderit",
    "search_value": "consectetur",
    "pagination": "dolores",
    "page": "et",
    "perPage": "molestiae",
    "status": "delectus",
    "selectedProtect": "fugit"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "status_code": 200,
    "message": [
        "Successfully Get User Details."
    ],
    "data": [
        {
            "first_name": "vo",
            "last_name": "104",
            "email": "vo+104@petcube.com",
            "phone_no": "",
            "your_registration_date": "2021-09-09 09:29:22",
            "emergency_fund": 3000,
            "next_emergency_activation_date": null,
            "activedays": 114,
            "protect_type": "protect_users",
            "package_type": "monthly",
            "subscription_status": "subscribed"
        },
        {
            "first_name": "vo",
            "last_name": "80",
            "email": "vo+80@petcube.com",
            "phone_no": null,
            "your_registration_date": "2021-09-06 13:28:38",
            "emergency_fund": 0,
            "next_emergency_activation_date": null,
            "activedays": 234,
            "protect_type": "users",
            "package_type": "monthly",
            "subscription_status": "subscribed"
        },
        {
            "first_name": "vo",
            "last_name": "78",
            "email": "vo+78@petcube.com",
            "phone_no": null,
            "your_registration_date": "2021-09-06 12:59:46",
            "emergency_fund": 0,
            "next_emergency_activation_date": null,
            "activedays": 594,
            "protect_type": "users",
            "package_type": "monthly",
            "subscription_status": "subscribed"
        },
        {
            "first_name": "vo",
            "last_name": "73",
            "email": "vo+73@petcube.com",
            "phone_no": null,
            "your_registration_date": "2021-09-06 12:13:07",
            "emergency_fund": 0,
            "next_emergency_activation_date": null,
            "activedays": 594,
            "protect_type": "users",
            "package_type": "monthly",
            "subscription_status": "subscribed"
        },
        {
            "first_name": "Vo79",
            "last_name": "",
            "email": "vo+79@petcube.com",
            "phone_no": "",
            "your_registration_date": "2021-09-03 15:23:10",
            "emergency_fund": 0,
            "next_emergency_activation_date": null,
            "activedays": 594,
            "protect_type": "users",
            "package_type": "monthly",
            "subscription_status": "subscribed"
        },
        {
            "first_name": "vo",
            "last_name": "test",
            "email": "vo+77@petcube.com",
            "phone_no": null,
            "your_registration_date": "2021-09-03 15:11:13",
            "emergency_fund": 0,
            "next_emergency_activation_date": null,
            "activedays": 571,
            "protect_type": "users",
            "package_type": "monthly",
            "subscription_status": "subscribed"
        },
        {
            "first_name": "Viktoriia",
            "last_name": "Obukhova",
            "email": "vo+32@petcube.com",
            "phone_no": "",
            "your_registration_date": "2021-09-03 13:01:30",
            "emergency_fund": 0,
            "next_emergency_activation_date": null,
            "activedays": 661,
            "protect_type": "users",
            "package_type": "monthly",
            "subscription_status": "subscribed"
        },
        {
            "first_name": "vo",
            "last_name": "20",
            "email": "vo+24@petcube.com",
            "phone_no": "",
            "your_registration_date": "2021-09-03 12:59:49",
            "emergency_fund": 0,
            "next_emergency_activation_date": null,
            "activedays": 594,
            "protect_type": "users",
            "package_type": "monthly",
            "subscription_status": "subscribed"
        },
        {
            "first_name": "Viktoriia",
            "last_name": "Obukhova",
            "email": "vo+28@petcube.com",
            "phone_no": "",
            "your_registration_date": "2021-09-03 12:58:49",
            "emergency_fund": 0,
            "next_emergency_activation_date": null,
            "activedays": 594,
            "protect_type": "users",
            "package_type": "monthly",
            "subscription_status": "subscribed"
        },
        {
            "first_name": "Liubomyr",
            "last_name": "Sydor",
            "email": "liubamirrr@gmail.com",
            "phone_no": null,
            "your_registration_date": "2021-09-03 12:27:27",
            "emergency_fund": 0,
            "next_emergency_activation_date": null,
            "activedays": 594,
            "protect_type": "users",
            "package_type": "monthly",
            "subscription_status": "subscribed"
        },
        {
            "first_name": "VO",
            "last_name": "76",
            "email": "vo+76@petcube.com",
            "phone_no": "",
            "your_registration_date": "2021-09-03 10:46:20",
            "emergency_fund": 3000,
            "next_emergency_activation_date": null,
            "activedays": 561,
            "protect_type": "protect_users",
            "package_type": "monthly",
            "subscription_status": "subscribed"
        },
        {
            "first_name": "Vo",
            "last_name": "74",
            "email": "vo+74@petcube.com",
            "phone_no": null,
            "your_registration_date": "2021-09-03 09:57:54",
            "emergency_fund": 0,
            "next_emergency_activation_date": null,
            "activedays": 594,
            "protect_type": "users",
            "package_type": "monthly",
            "subscription_status": "subscribed"
        }
    ]
}
 

Request      

POST api/v2/{name}/report/webappuser/profile

Headers

Authorization      

Example: Basic {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: vero

Body Parameters

date_from   date  optional  

not work stand alone - date_to is required Example: magnam

date_to   string  optional  

not work stand alone - date_from is required Example: reprehenderit

search_value   string  optional  

Search by firstname , lastname , email Example: consectetur

pagination   string  optional  

no of records you wnna fetch Example: dolores

page   string  optional  

page no | 1 if not given Example: et

perPage   string  optional  

Example: molestiae

status   string  optional  

filter by user status upgrade,subscribed,cancelled Example: delectus

selectedProtect   string  optional  

users,protect_users Example: fugit

User

Register User

requires authentication

Add new user of v2

⚡Note: this api also use basic authentication

ROLE: should be “users” or “protect_users”

if role = users then emergency fund is not needed but if role = protect_users then emergency fund is required pet details are optional when registering a user but required when talking to a vet

Example request:
curl --request POST \
    "https://itmedicalvetsolutions.com/api/v2/quia/register-user" \
    --header "Authorization: Basic {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"esse\",
    \"email\": \"mcdermott.winifred@example.com\",
    \"role\": \"protect_users\",
    \"dev_type\": \"quo\"
}"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/quia/register-user"
);

const headers = {
    "Authorization": "Basic {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "esse",
    "email": "mcdermott.winifred@example.com",
    "role": "protect_users",
    "dev_type": "quo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "status_code": 200,
    "message": [
        "User registered successfully."
    ],
    "data": {
        "user": {
            "app_id": 5,
            "email": "testgoodcharlievmp@mailinator.co",
            "dev_type": "android",
            "last_name": "umbrella",
            "first_name": "New",
            "phone_no": "",
            "your_registration_date": "2023-07-26 09:15:02",
            "emergency_fund": 3000,
            "updated_at": "2023-07-26 13:07:02",
            "created_at": "2023-07-26 13:07:02",
            "id": 3572,
            "role": "protect_users",
            "status": "subscribed",
            "trial_period": 14,
            "can_use_emergency_funds": false,
            "app": [
                "petcube"
            ],
            "activedays": 0,
            "pets": {
                "id": 2086,
                "user_id": 3572,
                "app_id": 5,
                "pet_id": null,
                "name": "TestDog",
                "species": "cat",
                "age": "1/1/1970, 5:00:00 AM",
                "breed": "Affenpinscher",
                "color": "Black",
                "weight": "2years 3months",
                "sex": "Male",
                "sex_type": "spayed",
                "profile": null,
                "created_at": "2023-07-26 13:07:02",
                "updated_at": "2023-07-26 13:07:02",
                "deleted_at": null,
                "veterians": null,
                "medicals": null,
                "insurnaces": null,
                "pet_veterians": [],
                "pet_medicals": [],
                "pet_insurnaces": []
            },
            "user_status": [
                {
                    "id": 179849,
                    "user_id": 3572,
                    "app_id": 5,
                    "status": "subscribed",
                    "type": "monthly",
                    "created_at": "2023-07-26 13:07:02",
                    "updated_at": "2023-07-26 13:07:02",
                    "date_time": "2023-07-26 09:15:02"
                }
            ]
        },
        "twilioToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2YwZmYwMWVjMWJkYzkyN2ZkZmViYjI5NTkxZmYwMmY2LTE2OTAzNzczMDUiLCJpc3MiOiJTS2YwZmYwMWVjMWJkYzkyN2ZkZmViYjI5NTkxZmYwMmY2Iiwic3ViIjoiQUMxZmIxZWU4OTAxOGEzZDg2ZmJlNWRiNjVhZmQ5NjQ2MCIsImV4cCI6MTY5MDQ2MzMwNSwiZ3JhbnRzIjp7ImlkZW50aXR5IjoibG9jYWwtYXBwLTVfdXNlci0zNTcyIiwiY2hhdCI6eyJzZXJ2aWNlX3NpZCI6IklTYmFhNDg4NDNiYjc1NDQ1MTlkNTg3ZTVlOTIxODI5OTMiLCJwdXNoX2NyZWRlbnRpYWxfc2lkIjoiQ1IxMTZlMGUyMTJhZTY4MmQ3NjEyYWI5YjJhZWFjYzQ1ZCJ9LCJ2aWRlbyI6e319fQ.3VFS5VEJfcrXt8ZmY4qYC9jOINQ9EkuTc4Rrbch8xW8",
        "emergency_stats": {
            "user_type": "protect_users",
            "trial_period_count": 14,
            "trial_period_start_date": "2023-07-26 09:15:02",
            "trial_period_end_date": "2023-08-09 09:15:02",
            "remaining_trial_period_days": 13,
            "last_emergency_activation_date": null,
            "next_emergency_activation_date": null,
            "emergency_fund": 3000,
            "can_activate_Emergency": false
        }
    }
}
 

Request      

POST api/v2/{name}/register-user

Headers

Authorization      

Example: Basic {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: quia

Body Parameters

first_name   string   

Example: esse

last_name   string  optional  
email   string   

Must be a valid email address. Example: mcdermott.winifred@example.com

emergency_fund   string  optional  

This field is required when role is protect_users.

role   string   

Must be one of users or protect_users. Example: protect_users

dev_type   string   

Example: quo

phone_no   string  optional  

Talk to Vet User

requires authentication

⚡Note: this api also use basic authentication

The user-end video initiation functionality is being deprecated. Sockets will be used for it. separate document that is provided.

Only for Staging : Now, the talk-to-vet API can accept an additional parameter. This setting will favour a chat connection with the provided doctor email. It will connect to any random vet if the specified doctor is not available online or is already on call.

Example request:
curl --request POST \
    "https://itmedicalvetsolutions.com/api/v2/a/talk-to-vet" \
    --header "Authorization: Basic {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"alverta.schaefer@example.org\",
    \"conversation_request\": \"video\",
    \"pet_id\": 9
}"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/a/talk-to-vet"
);

const headers = {
    "Authorization": "Basic {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "alverta.schaefer@example.org",
    "conversation_request": "video",
    "pet_id": 9
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "status_code": 200,
    "message": [
        "User Found Successfully"
    ],
    "data": {
        "channel": "CHd74f877a018e4e76bb38c8b25152c525",
        "vet": {
            "id": "app-1_vet-152",
            "username": "GoodCharlie Test",
            "profile_image": null
        },
        "identity": "local-app-5_user-3572",
        "stringify_response": "{\"twilioToken\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2YwZmYwMWVjMWJkYzkyN2ZkZmViYjI5NTkxZmYwMmY2LTE2OTAzNzk0MzUiLCJpc3MiOiJTS2YwZmYwMWVjMWJkYzkyN2ZkZmViYjI5NTkxZmYwMmY2Iiwic3ViIjoiQUMxZmIxZWU4OTAxOGEzZDg2ZmJlNWRiNjVhZmQ5NjQ2MCIsImV4cCI6MTY5MDQ2NTQzNSwiZ3JhbnRzIjp7ImlkZW50aXR5IjoibG9jYWwtYXBwLTVfdXNlci0zNTcyIiwiY2hhdCI6eyJzZXJ2aWNlX3NpZCI6IklTYmFhNDg4NDNiYjc1NDQ1MTlkNTg3ZTVlOTIxODI5OTMiLCJwdXNoX2NyZWRlbnRpYWxfc2lkIjoiQ1IxZmY3OWNjNTc2MzI2NDkxZjdjMjJjMTAwMGJhZGQzMCJ9LCJ2aWRlbyI6e319fQ.9DOggS1ObGT-XwYbx4fxIYYhHa2TgolqBruh5GXfh3k\",\"user\":{\"id\":3572,\"app_id\":5,\"email\":\"testgoodcharlievmp@mailinator.co\",\"dev_type\":\"android\",\"twilio_user_sid\":null,\"last_name\":\"umbrella\",\"first_name\":\"New\",\"phone_no\":\"\",\"emergency_fund\":3000,\"your_registration_date\":\"2023-07-26 09:15:02\",\"created_at\":\"2023-07-26 13:07:02\",\"updated_at\":\"2023-07-26 13:07:02\",\"deleted_at\":null,\"next_emergency_activation_date\":null,\"trial_period\":14,\"can_use_emergency_funds\":false,\"app\":[\"petcube\"],\"activedays\":0,\"emergency_lastest_protect\":{\"id\":14146,\"user_id\":3572,\"vet_id\":null,\"type\":\"chat\",\"protected\":\"protect_users\",\"db_user_id\":null,\"created_at\":\"2023-07-26 13:07:02\",\"updated_at\":\"2023-07-26 13:07:02\",\"deleted_at\":null}},\"emergency_stats\":{\"user_type\":\"protect_users\",\"trial_period_count\":14,\"trial_period_start_date\":\"2023-07-26 09:15:02\",\"trial_period_end_date\":\"2023-08-09 09:15:02\",\"remaining_trial_period_days\":13,\"last_emergency_activation_date\":null,\"next_emergency_activation_date\":null,\"emergency_fund\":3000,\"can_activate_Emergency\":false}}"
    }
}
 

Request      

POST api/v2/{name}/talk-to-vet

Headers

Authorization      

Example: Basic {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: a

Body Parameters

email   string   

Must be a valid email address. Example: alverta.schaefer@example.org

conversation_request   string   

Must be one of chat or video. Example: video

dev_type   string  optional  
pet_id   integer   

Example: 9

device_token   string  optional  
location_email   string  optional  

Refresh Token

requires authentication

Refresh twilio token

⚡Note: this api also use basic authentication

Example request:
curl --request GET \
    --get "https://itmedicalvetsolutions.com/api/v2/consequatur/refresh" \
    --header "Authorization: Basic {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"identity\": \"voluptate\",
    \"dev_type\": \"omnis\"
}"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/consequatur/refresh"
);

const headers = {
    "Authorization": "Basic {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "identity": "voluptate",
    "dev_type": "omnis"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "status_code": 200,
    "message": [
        "User token"
    ],
    "data": {
        "twilioToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2YwZmYwMWVjMWJkYzkyN2ZkZmViYjI5NTkxZmYwMmY2LTE2OTAzNzk4MDkiLCJpc3MiOiJTS2YwZmYwMWVjMWJkYzkyN2ZkZmViYjI5NTkxZmYwMmY2Iiwic3ViIjoiQUMxZmIxZWU4OTAxOGEzZDg2ZmJlNWRiNjVhZmQ5NjQ2MCIsImV4cCI6MTY5MDQ2NTgwOSwiZ3JhbnRzIjp7ImlkZW50aXR5IjoibG9jYWwtYXBwLTZfdXNlci0yNDU5IiwiY2hhdCI6eyJzZXJ2aWNlX3NpZCI6IklTYmFhNDg4NDNiYjc1NDQ1MTlkNTg3ZTVlOTIxODI5OTMiLCJwdXNoX2NyZWRlbnRpYWxfc2lkIjoiQ1IxMTZlMGUyMTJhZTY4MmQ3NjEyYWI5YjJhZWFjYzQ1ZCJ9LCJ2aWRlbyI6e319fQ.o0lnLa2xnr8pofTgTBWHiGDphv6eVeO2kG3Lr0TRhyU"
    }
}
 

Request      

GET api/v2/{name}/refresh

Headers

Authorization      

Example: Basic {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: consequatur

Body Parameters

identity   string   

The idenity provided in your last token Example: voluptate

dev_type   string   

Example: omnis

End Chat

requires authentication

Close Chat By provide channel sid

⚡Note: this api also use basic authentication

This API will be called to end the chat from the user side (your platform)

Example request:
curl --request POST \
    "https://itmedicalvetsolutions.com/api/v2/nulla/end" \
    --header "Authorization: Basic {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"channel_sid\": \"laboriosam\"
}"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/nulla/end"
);

const headers = {
    "Authorization": "Basic {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "channel_sid": "laboriosam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "status_code": 200,
    "message": [
        "End chat successful"
    ],
    "data": true
}
 

Request      

POST api/v2/{name}/end

Headers

Authorization      

Example: Basic {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: nulla

Body Parameters

channel_sid   string   

Example: laboriosam

Vet Feedback

requires authentication

Recomendation on feedback This endpoint will be called to get the feedback from the vets for each chat if the conversation type is “chat” then you need to send “type”: ”chat” and “channel_sid” and if the conversation type is video then “type”: ”video” and “room_sid”

Example request:
curl --request POST \
    "https://itmedicalvetsolutions.com/api/v2/aspernatur/feedback" \
    --header "Authorization: Basic {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"video\"
}"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/aspernatur/feedback"
);

const headers = {
    "Authorization": "Basic {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "video"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "status_code": 200,
    "message": [
        "Vet Feedback"
    ],
    "data": {
        "type": "chat",
        "vet_first_name": "GoodCharlie",
        "vet_last_name": "Test",
        "recommendation": "Recomended to see vet immediately",
        "reason": "Ear infections ",
        "feedback_date": "2023-07-26T23:21:59.000000Z"
    }
}
 

Request      

POST api/v2/{name}/feedback

Headers

Authorization      

Example: Basic {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: aspernatur

Body Parameters

type   string   

Must be one of chat or video. Example: video

channel_sid   string  optional  

This field is required when type is chat.

room_sid   string  optional  

This field is required when type is video.

User Action

requires authentication

Update emergency info of user

⚡Note: this api also use basic authentication

This API will be used to update our system with information about the current status of your users, such as user A, who was a regular user before becoming vet protected, or user B, who was subscribed but is no longer a member. ROLE: should be “users” or “protect_users” Status: should be “subscribed” or “cancelled” a user cannot be degraded from “protected” to “user” unless the user is cancelled

Example request:
curl --request POST \
    "https://itmedicalvetsolutions.com/api/v2/delectus/actions" \
    --header "Authorization: Basic {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"voluptates\",
    \"first_name\": \"h:;<>,\\/|]]$\\/u\",
    \"last_name\": \"M:;<>,s\\/|]]]]]]$\\/u\",
    \"status\": \"rerum\",
    \"emergency_fund\": 6
}"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/delectus/actions"
);

const headers = {
    "Authorization": "Basic {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "voluptates",
    "first_name": "h:;<>,\/|]]$\/u",
    "last_name": "M:;<>,s\/|]]]]]]$\/u",
    "status": "rerum",
    "emergency_fund": 6
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "status_code": 200,
    "message": [
        "End chat successful"
    ],
    "data": true
}
 

Request      

POST api/v2/{name}/actions

Headers

Authorization      

Example: Basic {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: delectus

Body Parameters

email   string   

Example: voluptates

first_name   string  optional  

Must match the regex /^[a-zA-Z0-9\s’\sığüşöçİĞÜŞÖÇ'"!@#$%^&*()_+{}[]:;<>,.?\/|]+$/u. Example: h:;<>,/|]]$/u

last_name   string  optional  

Must match the regex /^[a-zA-Z0-9\s’\sığüşöçİĞÜŞÖÇ'"!@#$%^&*()_+{}[]:;<>,.?\/|]+$/u. Example: M:;<>,s/|]]]]]]$/u

status   string   

Example: rerum

your_registration_date   string  optional  
phone_no   string  optional  
role   string  optional  
type   string  optional  
emergency_fund   integer  optional  

Example: 6

Delete V2 User

requires authentication

Delete v2 user by email and app id

Example request:
curl --request POST \
    "https://itmedicalvetsolutions.com/api/v2/molestias/delete-user" \
    --header "Authorization: Basic {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"example@gmail.com\",
    \"app_id\": 21
}"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/molestias/delete-user"
);

const headers = {
    "Authorization": "Basic {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "example@gmail.com",
    "app_id": 21
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "status_code": 200,
    "message": [
        "User deleted successfully"
    ],
    "data": {
        "id": 3572,
        "app_id": 5,
        "email": "testgoodcharlievmp@mailinator.co",
        "dev_type": "android",
        "twilio_user_sid": "US443132dc10cf4d489e2cbe4ccac558ec",
        "last_name": "umbrella",
        "first_name": "New",
        "phone_no": "",
        "emergency_fund": 3000,
        "your_registration_date": "2023-07-26 09:15:02",
        "created_at": "2023-07-26 13:07:02",
        "updated_at": "2023-07-26 14:07:49",
        "deleted_at": "2023-07-26 14:07:49",
        "next_emergency_activation_date": null,
        "app": [
            "petcube"
        ],
        "activedays": 0,
        "user_status_latest": {
            "id": 179849,
            "user_id": 3572,
            "app_id": 5,
            "status": "subscribed",
            "type": "monthly",
            "created_at": "2023-07-26 13:07:02",
            "updated_at": "2023-07-26 13:07:02",
            "date_time": "2023-07-26 09:15:02"
        }
    }
}
 

Request      

POST api/v2/{name}/delete-user

Headers

Authorization      

Example: Basic {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: molestias

Body Parameters

email   string   

Example: example@gmail.com

app_id   integer   

Example: 21

User Action

requires authentication

Update emergency info of user

⚡Note: this api also use basic authentication

This API will be called to update call status from the user side (your platform) ⚡NOTE: Status could be notanswered,declined,accepted

Example request:
curl --request POST \
    "https://itmedicalvetsolutions.com/api/v2/ex/video-call-action" \
    --header "Authorization: Basic {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"declined\",
    \"room_sid\": \"similique\"
}"
const url = new URL(
    "https://itmedicalvetsolutions.com/api/v2/ex/video-call-action"
);

const headers = {
    "Authorization": "Basic {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "status": "declined",
    "room_sid": "similique"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v2/{name}/video-call-action

Headers

Authorization      

Example: Basic {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

name   string   

Example: ex

Body Parameters

status   string   

Must be one of notanswered, declined, or accepted. Example: declined

room_sid   string   

Example: similique