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": []
}
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
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": []
}
}
}
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 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": []
}
}
}
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 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
}
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 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": []
}
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reports
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"
}
]
}
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.
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
}
}
}
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.
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}}"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Refresh 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"
}
}
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.
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
}
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.
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"
}
}
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.
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
}
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 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"
}
}
}
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.
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());
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.