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 with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
Authentication
APIs for managing authentication
Login
login for Admin | Vendor
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"evie55@example.net\",
\"password\": \"+hvR8h7ReBa~Na_Qm:\",
\"session_id\": \"alias\"
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "evie55@example.net",
"password": "+hvR8h7ReBa~Na_Qm:",
"session_id": "alias"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"status_code": 200,
"message": [
"User Logged In Successfully"
],
"data": {
"user": {
"id": 23,
"uuid": "86d72d8a-ad00-49c8-add0-ff2acec176d5",
"name": "test123",
"email": "testinguser@mailinator.com",
"phone": "0123456987",
"address": "test",
"image": null,
"status": 1,
"created_at": "2023-04-12"
},
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiMjllZWZhNzM1M2M4NjdkYmYzNjkzNDc3YTVkZWIxOGE2ZjdlNDU5YjA4NjljZDQ1NjQ1ZmUyY2QxNzY5NTQ1NWZiZjcyOThhMzJiZmM3MzkiLCJpYXQiOjE2ODEyODM5MTEuOTc4MDYzLCJuYmYiOjE2ODEyODM5MTEuOTc4MDY4LCJleHAiOjE3MTI5MDYzMTEuOTYzNzE0LCJzdWIiOiIyMyIsInNjb3BlcyI6W119.Z4Dw9ilnQcwa6WKQjzZgl3kalTZJ6aXHeLbOW8xgclsCSvhrLwQHxpyLbHFhDncma1uHaYjX5uSzUQNfnJuG3IAzXa4N2zBiLEwinqvgkUOQ-ydLPL0U9f35DAoTV66dvZjLuX4aymTIm5__nGHY8VYx7aCmnKDoZ0cN_Xa89jo9TDzGR5MQ9UHJHIV22tY3T-c-rHiBRQn9eHxx9f_Z-XFwY-oWuYI8SjeXDE1UB2NdcPFFHDmUBNPSOIoj5coYgnemvjZ7IPcK46fQVYI43HpmyaBbyKtGSQU3sWun8l2hAv-h5aDS2KRDaHA66SBeU86-6dK4ezK57UlhLEgTJAugZyo0WKTHjn_6l0-Axi3fnUgqYihBxQYSe9CFepGVIN_qGVLyuKB1RXcoz0W52gEPV7qz2fkXeX4MCPQ_XDSbc4AHojiquOGF-FZJ4T2yQmTL-6FHqxbCr0wDmtnqGQSChIbauSiev63DJQrdRKJWIUF_dtqDvFk1SBgJnNUhncjouVjDer5FbjG5UPzT7JMwcetThIMK8ln4gKoUqarKWRloGMi-PhbBfIvGItmH3wsptSF3RKdHsIechkUmrbvCotJzVgkBc2hJsZlcQV1QvUSts_ArUQlBizvwMpuQXyOXrgA0JnJDCY0KW_aCvJsFj9m-tGwW9UiGjP_972Q"
}
}
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.
Signup Vendor
registration vendor
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/register" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=vero"\
--form "email=cortez83@example.net"\
--form "password=A-8bG`S'C}@NxkI"\
--form "password_confirmation=ad"\
--form "country=occaecati"\
--form "state=assumenda"\
--form "city=illum"\
--form "phone=vel"\
--form "zip=maxime"\
--form "address=consectetur"\
--form "shops[name]=aut"\
--form "shops[sub_domain]=sunt"\
--form "shops[shop_message]=et"\
--form "shops[shop_details]=corrupti"\
--form "gs[title]=nulla"\
--form "gs[primary_color]=voluptas"\
--form "gs[secondary_color]=non"\
--form "gs[contact_email]=rebekah16@example.org"\
--form "gs[contact_phone]=earum"\
--form "gs[contact_address]=molestias"\
--form "gs[currency_id]=17"\
--form "gs[auth_net_client_key]=qui"\
--form "image=@C:\Users\Invision\AppData\Local\Temp\php286E.tmp" \
--form "gs[favicon]=@C:\Users\Invision\AppData\Local\Temp\php286F.tmp" --form "gs[logo]=@C:\Users\Invision\AppData\Local\Temp\php2870.tmp" --form "gs[footer_logo]=@C:\Users\Invision\AppData\Local\Temp\php2871.tmp" const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/register"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'vero');
body.append('email', 'cortez83@example.net');
body.append('password', 'A-8bG`S'C}@NxkI');
body.append('password_confirmation', 'ad');
body.append('country', 'occaecati');
body.append('state', 'assumenda');
body.append('city', 'illum');
body.append('phone', 'vel');
body.append('zip', 'maxime');
body.append('address', 'consectetur');
body.append('shops[name]', 'aut');
body.append('shops[sub_domain]', 'sunt');
body.append('shops[shop_message]', 'et');
body.append('shops[shop_details]', 'corrupti');
body.append('gs[title]', 'nulla');
body.append('gs[primary_color]', 'voluptas');
body.append('gs[secondary_color]', 'non');
body.append('gs[contact_email]', 'rebekah16@example.org');
body.append('gs[contact_phone]', 'earum');
body.append('gs[contact_address]', 'molestias');
body.append('gs[currency_id]', '17');
body.append('gs[auth_net_client_key]', 'qui');
body.append('image', document.querySelector('input[name="image"]').files[0]);
body.append('gs[favicon]', document.querySelector('input[name="gs[favicon]"]').files[0]);
body.append('gs[logo]', document.querySelector('input[name="gs[logo]"]').files[0]);
body.append('gs[footer_logo]', document.querySelector('input[name="gs[footer_logo]"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"success": true,
"status_code": 200,
"message": [
"Vendor signup is pending for approval by admin"
],
"data": {
"user": {
"id": 59,
"uuid": "5f965ca3-ea0e-4cb8-ba46-2098fa2866e4",
"is_admin_approved": null,
"name": "test",
"email": "vendor4@pets-meds.com",
"role": "vendor",
"phone": "(705) 461-1717",
"address": "259 Hillside Dr S",
"zip": "P5A 1N7",
"image": null,
"status": null,
"created_at": "2023-05-04",
"shop": {
"id": 50,
"vendor_id": 59,
"name": "vendor4",
"slug": "vendor4",
"shop_number": null,
"shop_address": null,
"reg_number": null,
"shop_message": "The passage experienced a surge in popularity during the 1960s when Letraset used it on their dry-transfer sheets, and again during the 90s as desktop publishers bundled the text with their software. Today it's seen all around the web; on templates",
"shop_details": null,
"shop_image": null,
"created_at": "2023-05-04T11:21:35.000000Z",
"updated_at": "2023-05-04T11:21:35.000000Z",
"deleted_at": null
},
"general_settings": {
"id": 50,
"favicon": "https://petmeds24.s3.us-west-2.amazonaws.com/local/images/general-settings/NzJYKsfpW9zVcpRnJOCtMRU8A8ZjMagSTmrJVg0S.png",
"logo": "https://petmeds24.s3.us-west-2.amazonaws.com/local/images/general-settings/ajBOyNxBpgMJBN2AdbfrH2rY5Ej7rKOjXar0qnWz.png",
"footer_logo": "https://petmeds24.s3.us-west-2.amazonaws.com/local/images/general-settings/BS9JU9ho8mGnIOOQg68u1Rd8KVUglIAEqrmevHbd.png",
"banners": null,
"title": "test vendor 123413",
"primary_color": "#2bbef9",
"secondary_color": "#212529",
"loader": "1564224328loading3gif",
"contact_email": "vendor@pets-meds247.com",
"contact_phone": "+1 123 456 7890",
"contact_address": "Street pets-meds New-York USA 75600",
"mail_driver": "smtp",
"mail_host": "smtpmailtrap.io",
"mail_port": "25",
"mail_encryption": "TLS",
"mail_user": "bc0787d74e8e64",
"mail_pass": "d1e867c163fea6",
"from_email": "ali.pets-meds.com",
"from_name": "Pets-Meds",
"is_smtp": 0,
"default_payment_gateway": "Authorized-net",
"stripe_key": "sk_test_732F2dDpMu6Czdv0T6kfXmr1",
"auth_net_api_login_id": "58Zn3AfaV8q",
"auth_net_transaction_key": "7p85da448SXX9xz4",
"copy_right": "COPYRIGHT© 2020. All Rights Reserved By PetMeds247",
"return_policy": "COPYRIGHT© 2020. All Rights Reserved By PetMeds247",
"created_at": "2023-05-04"
}
}
}
}
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.
Profile
requires authentication
Get profile from login session
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/profile" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/profile"
);
const headers = {
"Authorization": "Bearer {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": [
"User fetched successfully"
],
"data": {
"user": {
"id": 23,
"uuid": "86d72d8a-ad00-49c8-add0-ff2acec176d5",
"name": "test123",
"email": "testinguser@mailinator.com",
"phone": "0123456987",
"address": "test",
"image": null,
"status": 1,
"created_at": "2023-04-12"
}
}
}
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.
Sign-out
requires authentication
signout request
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/logout" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/logout"
);
const headers = {
"Authorization": "Bearer {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": 200,
"message": [
"User Logged Out Successfully"
],
"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.
Signup Vendor
registration vendor
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/add-vendor" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=dolores"\
--form "email=kyra.greenholt@example.net"\
--form "password=NSjXreA=C?4PpAKK2"\
--form "password_confirmation=maxime"\
--form "country=et"\
--form "state=veritatis"\
--form "city=totam"\
--form "phone=occaecati"\
--form "zip=optio"\
--form "address=est"\
--form "shops[name]=nobis"\
--form "shops[sub_domain]=soluta"\
--form "shops[shop_message]=eligendi"\
--form "shops[shop_details]=est"\
--form "gs[title]=quidem"\
--form "gs[primary_color]=alias"\
--form "gs[secondary_color]=quia"\
--form "gs[contact_email]=charlotte03@example.net"\
--form "gs[contact_phone]=doloremque"\
--form "gs[contact_address]=autem"\
--form "gs[currency_id]=13"\
--form "gs[auth_net_client_key]=dolorem"\
--form "image=@C:\Users\Invision\AppData\Local\Temp\php2B4A.tmp" \
--form "gs[favicon]=@C:\Users\Invision\AppData\Local\Temp\php2B4B.tmp" --form "gs[logo]=@C:\Users\Invision\AppData\Local\Temp\php2B4C.tmp" --form "gs[footer_logo]=@C:\Users\Invision\AppData\Local\Temp\php2B4D.tmp" const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/add-vendor"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'dolores');
body.append('email', 'kyra.greenholt@example.net');
body.append('password', 'NSjXreA=C?4PpAKK2');
body.append('password_confirmation', 'maxime');
body.append('country', 'et');
body.append('state', 'veritatis');
body.append('city', 'totam');
body.append('phone', 'occaecati');
body.append('zip', 'optio');
body.append('address', 'est');
body.append('shops[name]', 'nobis');
body.append('shops[sub_domain]', 'soluta');
body.append('shops[shop_message]', 'eligendi');
body.append('shops[shop_details]', 'est');
body.append('gs[title]', 'quidem');
body.append('gs[primary_color]', 'alias');
body.append('gs[secondary_color]', 'quia');
body.append('gs[contact_email]', 'charlotte03@example.net');
body.append('gs[contact_phone]', 'doloremque');
body.append('gs[contact_address]', 'autem');
body.append('gs[currency_id]', '13');
body.append('gs[auth_net_client_key]', 'dolorem');
body.append('image', document.querySelector('input[name="image"]').files[0]);
body.append('gs[favicon]', document.querySelector('input[name="gs[favicon]"]').files[0]);
body.append('gs[logo]', document.querySelector('input[name="gs[logo]"]').files[0]);
body.append('gs[footer_logo]', document.querySelector('input[name="gs[footer_logo]"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"success": true,
"status_code": 200,
"message": [
"Vendor signup is pending for approval by admin"
],
"data": {
"user": {
"id": 59,
"uuid": "5f965ca3-ea0e-4cb8-ba46-2098fa2866e4",
"is_admin_approved": null,
"name": "test",
"email": "vendor4@pets-meds.com",
"role": "vendor",
"phone": "(705) 461-1717",
"address": "259 Hillside Dr S",
"zip": "P5A 1N7",
"image": null,
"status": null,
"created_at": "2023-05-04",
"shop": {
"id": 50,
"vendor_id": 59,
"name": "vendor4",
"slug": "vendor4",
"shop_number": null,
"shop_address": null,
"reg_number": null,
"shop_message": "The passage experienced a surge in popularity during the 1960s when Letraset used it on their dry-transfer sheets, and again during the 90s as desktop publishers bundled the text with their software. Today it's seen all around the web; on templates",
"shop_details": null,
"shop_image": null,
"created_at": "2023-05-04T11:21:35.000000Z",
"updated_at": "2023-05-04T11:21:35.000000Z",
"deleted_at": null
},
"general_settings": {
"id": 50,
"favicon": "https://petmeds24.s3.us-west-2.amazonaws.com/local/images/general-settings/NzJYKsfpW9zVcpRnJOCtMRU8A8ZjMagSTmrJVg0S.png",
"logo": "https://petmeds24.s3.us-west-2.amazonaws.com/local/images/general-settings/ajBOyNxBpgMJBN2AdbfrH2rY5Ej7rKOjXar0qnWz.png",
"footer_logo": "https://petmeds24.s3.us-west-2.amazonaws.com/local/images/general-settings/BS9JU9ho8mGnIOOQg68u1Rd8KVUglIAEqrmevHbd.png",
"banners": null,
"title": "test vendor 123413",
"primary_color": "#2bbef9",
"secondary_color": "#212529",
"loader": "1564224328loading3gif",
"contact_email": "vendor@pets-meds247.com",
"contact_phone": "+1 123 456 7890",
"contact_address": "Street pets-meds New-York USA 75600",
"mail_driver": "smtp",
"mail_host": "smtpmailtrap.io",
"mail_port": "25",
"mail_encryption": "TLS",
"mail_user": "bc0787d74e8e64",
"mail_pass": "d1e867c163fea6",
"from_email": "ali.pets-meds.com",
"from_name": "Pets-Meds",
"is_smtp": 0,
"default_payment_gateway": "Authorized-net",
"stripe_key": "sk_test_732F2dDpMu6Czdv0T6kfXmr1",
"auth_net_api_login_id": "58Zn3AfaV8q",
"auth_net_transaction_key": "7p85da448SXX9xz4",
"copy_right": "COPYRIGHT© 2020. All Rights Reserved By PetMeds247",
"return_policy": "COPYRIGHT© 2020. All Rights Reserved By PetMeds247",
"created_at": "2023-05-04"
}
}
}
}
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.
Brand
APIs for Brand.
Get all brands
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/brands" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"paginate\": false,
\"page_size\": 14,
\"column\": \"eveniet\"
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/brands"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"paginate": false,
"page_size": 14,
"column": "eveniet"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 541,
"name": "Taryn Schuster",
"details": "Sunt ipsum in optio ut. Repellat nihil repellendus eaque in vero. Blanditiis rerum dolorum doloribus porro sunt ea odit veritatis. Omnis distinctio minima dolores quis libero quibusdam.",
"image": "https://via.placeholder.com/200x200.png/0077aa?text=dolorem",
"status": true
},
{
"id": 542,
"name": "Novella Thompson",
"details": "Rem ipsum ab voluptatem et quidem maxime saepe. Dolores nobis sunt et dolores ipsa. Amet molestiae explicabo dolorem odit.",
"image": "https://via.placeholder.com/200x200.png/0033ee?text=tempora",
"status": 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.
Coupon
Get All Coupon
requires authentication
Get all Coupon Admin|Vendor
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/coupons?search=officiis&paginate=&page_size=1&shop_id=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"search\": \"neque\",
\"paginate\": false,
\"page_size\": 3
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/coupons"
);
const params = {
"search": "officiis",
"paginate": "0",
"page_size": "1",
"shop_id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"search": "neque",
"paginate": false,
"page_size": 3
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 12,
"title": "dummy coupon",
"code": "dummy151",
"start_date": "2023-09-04",
"end_date": "2023-09-21",
"type": "percentage",
"value": "22.00",
"min_amount": "0.00",
"discount_cap": "0.00",
"usage_limit": 0,
"used_limit": null,
"usage_limit_per_user": 0,
"status": 0,
"all_shop": 0
},
{
"id": 12,
"title": "dummy coupon",
"code": "dummy151",
"start_date": "2023-09-04",
"end_date": "2023-09-21",
"type": "percentage",
"value": "22.00",
"min_amount": "0.00",
"discount_cap": "0.00",
"usage_limit": 0,
"used_limit": null,
"usage_limit_per_user": 0,
"status": 0,
"all_shop": 0
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store Coupon
requires authentication
Store Coupon Admin|Vendor
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/coupons" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"all_shop\": false,
\"title\": \"modi\",
\"code\": \"inventore\",
\"start_date\": \"aut\",
\"end_date\": \"nam\",
\"type\": \"vel\",
\"value\": \"delectus\",
\"min_amount\": \"consequatur\",
\"discount_cap\": \"dicta\",
\"usage_limit\": 16,
\"usage_limit_per_user\": 4,
\"status\": false,
\"shop_id\": 7
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/coupons"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"all_shop": false,
"title": "modi",
"code": "inventore",
"start_date": "aut",
"end_date": "nam",
"type": "vel",
"value": "delectus",
"min_amount": "consequatur",
"discount_cap": "dicta",
"usage_limit": 16,
"usage_limit_per_user": 4,
"status": false,
"shop_id": 7
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 12,
"title": "dummy coupon",
"code": "dummy151",
"start_date": "2023-09-04",
"end_date": "2023-09-21",
"type": "percentage",
"value": "22.00",
"min_amount": "0.00",
"discount_cap": "0.00",
"usage_limit": 0,
"used_limit": null,
"usage_limit_per_user": 0,
"status": 0,
"all_shop": 0
},
{
"id": 12,
"title": "dummy coupon",
"code": "dummy151",
"start_date": "2023-09-04",
"end_date": "2023-09-21",
"type": "percentage",
"value": "22.00",
"min_amount": "0.00",
"discount_cap": "0.00",
"usage_limit": 0,
"used_limit": null,
"usage_limit_per_user": 0,
"status": 0,
"all_shop": 0
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show Coupons
requires authentication
Show Coupons Admin|Vendor
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/coupons/12" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/coupons/12"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 12,
"title": "dummy coupon",
"code": "dummy151",
"start_date": "2023-09-04",
"end_date": "2023-09-21",
"type": "percentage",
"value": "22.00",
"min_amount": "0.00",
"discount_cap": "0.00",
"usage_limit": 0,
"used_limit": null,
"usage_limit_per_user": 0,
"status": 0,
"all_shop": 0
},
{
"id": 12,
"title": "dummy coupon",
"code": "dummy151",
"start_date": "2023-09-04",
"end_date": "2023-09-21",
"type": "percentage",
"value": "22.00",
"min_amount": "0.00",
"discount_cap": "0.00",
"usage_limit": 0,
"used_limit": null,
"usage_limit_per_user": 0,
"status": 0,
"all_shop": 0
}
]
}
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 Coupons
requires authentication
Update Coupons Admin|Vendor
Example request:
curl --request PUT \
"http://pet-meds-backend-updated.local/api/vendor/coupons/12" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"all_shop\": true,
\"title\": \"blanditiis\",
\"code\": \"debitis\",
\"start_date\": \"non\",
\"end_date\": \"et\",
\"type\": \"assumenda\",
\"value\": \"error\",
\"min_amount\": \"fuga\",
\"discount_cap\": \"incidunt\",
\"usage_limit\": 15,
\"usage_limit_per_user\": 5,
\"status\": true,
\"shop_id\": 7
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/coupons/12"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"all_shop": true,
"title": "blanditiis",
"code": "debitis",
"start_date": "non",
"end_date": "et",
"type": "assumenda",
"value": "error",
"min_amount": "fuga",
"discount_cap": "incidunt",
"usage_limit": 15,
"usage_limit_per_user": 5,
"status": true,
"shop_id": 7
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 12,
"title": "dummy coupon",
"code": "dummy151",
"start_date": "2023-09-04",
"end_date": "2023-09-21",
"type": "percentage",
"value": "22.00",
"min_amount": "0.00",
"discount_cap": "0.00",
"usage_limit": 0,
"used_limit": null,
"usage_limit_per_user": 0,
"status": 0,
"all_shop": 0
},
{
"id": 12,
"title": "dummy coupon",
"code": "dummy151",
"start_date": "2023-09-04",
"end_date": "2023-09-21",
"type": "percentage",
"value": "22.00",
"min_amount": "0.00",
"discount_cap": "0.00",
"usage_limit": 0,
"used_limit": null,
"usage_limit_per_user": 0,
"status": 0,
"all_shop": 0
}
]
}
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 Coupons
requires authentication
Delete Coupons Admin|Vendor
Example request:
curl --request DELETE \
"http://pet-meds-backend-updated.local/api/vendor/coupons/12" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/coupons/12"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": 12,
"title": "dummy coupon",
"code": "dummy151",
"start_date": "2023-09-04",
"end_date": "2023-09-21",
"type": "percentage",
"value": "22.00",
"min_amount": "0.00",
"discount_cap": "0.00",
"usage_limit": 0,
"used_limit": null,
"usage_limit_per_user": 0,
"status": 0,
"all_shop": 0
},
{
"id": 12,
"title": "dummy coupon",
"code": "dummy151",
"start_date": "2023-09-04",
"end_date": "2023-09-21",
"type": "percentage",
"value": "22.00",
"min_amount": "0.00",
"discount_cap": "0.00",
"usage_limit": 0,
"used_limit": null,
"usage_limit_per_user": 0,
"status": 0,
"all_shop": 0
}
]
}
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.
Dashboard Stats
Get statistics data based on the provided parameters.
requires authentication
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/dashboard-stats" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"year\": \"4160\"
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/dashboard-stats"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"year": "4160"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"success": false,
"status": 401,
"message": "you are not authenticated. Please login.",
"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.
Discount
Get All Discount
requires authentication
Get all Discount Admin|Vendor
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/discounts?search=est&paginate=&page_size=17&shop_id=11" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"search\": \"nesciunt\",
\"paginate\": false,
\"page_size\": 3
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/discounts"
);
const params = {
"search": "est",
"paginate": "0",
"page_size": "17",
"shop_id": "11",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"search": "nesciunt",
"paginate": false,
"page_size": 3
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"status_code": 200,
"message": [
"Discounts fetch successfully"
],
"data": {
"list": [
{
"id": 1,
"shop_id": 4,
"brand_id": 4,
"product_id": 2,
"title": "Fifty Fifty",
"start_date": "2023-09-15",
"end_date": null,
"type": "percentage",
"value": "50.00",
"status": 1,
"created_by": "admin",
"updated_by": null,
"shop": {
"name": "pet meds city"
},
"brand": {
"name": "Meloxicam"
},
"product": {
"name": "Epi-Otic Advanced Ear Cleanser, 8 fl oz"
}
}
],
"pagination": {
"total": 1,
"current": 1,
"first": 1,
"last": 1,
"previous": 0,
"next": 1,
"pages": [
1
],
"from": 1,
"to": 1
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store Discount
requires authentication
Store Discount Admin|Vendor
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/discounts" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"dolores\",
\"start_date\": \"ipsum\",
\"end_date\": \"totam\",
\"type\": \"vel\",
\"value\": \"deleniti\",
\"status\": true,
\"shop_id\": 13,
\"brand_id\": 9,
\"product_id\": 14
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/discounts"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "dolores",
"start_date": "ipsum",
"end_date": "totam",
"type": "vel",
"value": "deleniti",
"status": true,
"shop_id": 13,
"brand_id": 9,
"product_id": 14
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"status_code": 201,
"message": [
"Discount created successfully"
],
"data": {
"id": 1,
"shop_id": "4",
"brand_id": "4",
"product_id": "2",
"title": "Fifty Fifty",
"start_date": "2023-09-15",
"end_date": null,
"type": "percentage",
"value": "50",
"status": "1",
"created_by": "admin",
"updated_by": null,
"shop": {
"name": "pet meds city"
},
"brand": {
"name": "Meloxicam"
},
"product": {
"name": "Epi-Otic Advanced Ear Cleanser, 8 fl oz"
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show Discount
requires authentication
Show Discount Admin|Vendor
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/discounts/mollitia" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/discounts/mollitia"
);
const headers = {
"Authorization": "Bearer {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": [
"Discounts fetch successfully"
],
"data": {
"id": 1,
"shop_id": 4,
"brand_id": 4,
"product_id": 2,
"title": "Fifty Fifty",
"start_date": "2023-09-15",
"end_date": "2023-09-15",
"type": "percentage",
"value": "50.00",
"status": 1,
"created_by": "admin",
"updated_by": "admin",
"shop": {
"name": "pet meds city"
},
"brand": {
"name": "Meloxicam"
},
"product": {
"name": "Epi-Otic Advanced Ear Cleanser, 8 fl oz"
}
}
}
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 Discount
requires authentication
Update Discount Admin|Vendor
Example request:
curl --request PUT \
"http://pet-meds-backend-updated.local/api/vendor/discounts/ut" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"repudiandae\",
\"start_date\": \"consequatur\",
\"end_date\": \"sunt\",
\"type\": \"numquam\",
\"value\": \"hic\",
\"status\": false,
\"shop_id\": 12,
\"brand_id\": 15,
\"product_id\": 15
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/discounts/ut"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "repudiandae",
"start_date": "consequatur",
"end_date": "sunt",
"type": "numquam",
"value": "hic",
"status": false,
"shop_id": 12,
"brand_id": 15,
"product_id": 15
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"status_code": 200,
"message": [
"Discount updated 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.
Delete Discount
requires authentication
Delete Discount Admin|Vendor
Example request:
curl --request DELETE \
"http://pet-meds-backend-updated.local/api/vendor/discounts/enim" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/discounts/enim"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{}
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.
Endpoints
All Payments
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/payments?search=voluptas&paginate=" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"search\": \"ut\",
\"paginate\": false,
\"page_size\": 11
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/payments"
);
const params = {
"search": "voluptas",
"paginate": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"search": "ut",
"paginate": false,
"page_size": 11
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"success": false,
"status": 401,
"message": "you are not authenticated. Please login.",
"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.
Faqs
Get All Faqs Get all Faqs Admin|Vendor|User
requires authentication
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/faqs" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"search\": \"aliquid\",
\"paginate\": true,
\"page_size\": 3
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/faqs"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"search": "aliquid",
"paginate": true,
"page_size": 3
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"title": "Explicabo possimus autem modi voluptatem nam iusto.",
"details": "Ut rem nemo in et cupiditate ut ea in. Ut magni corrupti et et dignissimos asperiores aut. Voluptatibus voluptatum eum enim omnis.",
"sorting": null
},
{
"id": null,
"title": "Sit debitis et nobis delectus sunt.",
"details": "Velit esse est at quas tempore. Est consequuntur cum beatae officia in voluptatem. Deleniti et sint fugiat aut mollitia repudiandae.",
"sorting": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store Faqs Store Faqs Admin|Vendor
requires authentication
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/faqs" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"quidem\",
\"details\": \"autem\",
\"sorting\": 12,
\"shop_id\": 14
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/faqs"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "quidem",
"details": "autem",
"sorting": 12,
"shop_id": 14
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"title": "Eos molestias laborum aperiam rerum et.",
"details": "Culpa molestias atque repellendus at sit dolorem quas. Quia sequi nihil quia error nihil vel.",
"sorting": null
},
{
"id": null,
"title": "Consequatur sed repellendus officiis delectus.",
"details": "Quia quibusdam culpa error natus quo voluptatum modi quis. Quaerat vel inventore voluptates necessitatibus. Est unde error ex voluptatem. Expedita deserunt veritatis ut qui.",
"sorting": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show Faqs
requires authentication
Show Faqs Admin|Vendor
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/faqs/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/faqs/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"title": "Enim non voluptates quis consequatur autem iure aut.",
"details": "Odio quia quibusdam labore explicabo. Quisquam quo tenetur recusandae hic earum impedit. Repellat in nam earum est aut.",
"sorting": null
},
{
"id": null,
"title": "Ut dolorem et sapiente et minus quos ipsam.",
"details": "Omnis quibusdam ut quia dolorum mollitia. Saepe et voluptatum consequatur quisquam impedit aut. Nihil at ipsum dignissimos et ipsam.",
"sorting": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Faqs
requires authentication
Update Faqs Admin|Vendor
Example request:
curl --request PUT \
"http://pet-meds-backend-updated.local/api/vendor/faqs/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"tempore\",
\"details\": \"deserunt\",
\"sorting\": 9,
\"shop_id\": 1
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/faqs/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "tempore",
"details": "deserunt",
"sorting": 9,
"shop_id": 1
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"title": "Ipsam quia reprehenderit modi laboriosam a.",
"details": "Incidunt ipsam maxime omnis sit. Omnis vel inventore velit. Ea sunt iusto modi atque ea consequuntur. Quaerat laboriosam cum in vel.",
"sorting": null
},
{
"id": null,
"title": "Qui ut voluptas dicta sunt reprehenderit exercitationem itaque.",
"details": "Enim vitae non quidem ratione. Et soluta autem dolor dolorem aut omnis. Velit dolor quidem odit consequatur. Dolorum aut saepe eligendi non natus voluptatem et.",
"sorting": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Faqs
requires authentication
Delete Faqs Admin|Vendor
Example request:
curl --request DELETE \
"http://pet-meds-backend-updated.local/api/vendor/faqs/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/faqs/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{
"id": null,
"title": "Rem at laboriosam aut sunt nihil.",
"details": "Eos omnis sed repellat repudiandae aut voluptates. Voluptatem ea voluptas velit vel impedit. Voluptas amet sit sunt officiis facere omnis. Fugiat a deleniti odit veritatis.",
"sorting": null
},
{
"id": null,
"title": "Autem quia praesentium nostrum reiciendis deleniti.",
"details": "Id ducimus asperiores non dolor non. Cupiditate possimus sunt quis autem consectetur eum. Minima in quis qui iure dolorem laboriosam. Ex facilis cumque qui corporis maxime consequuntur animi.",
"sorting": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
General Setting
Vendor Profile Settings
requires authentication
Get Vendor profile and general settings
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/settings" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/settings"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"uuid": null,
"is_admin_approved": null,
"name": "Bertram Cummerata",
"email": "sid.dicki@hotmail.com",
"role": null,
"phone": null,
"address": null,
"city": null,
"state": null,
"country": null,
"zip": null,
"image": null,
"status": null,
"created_at": "2023-10-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.
Update Vendor profile and general settings
requires authentication
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/update-settings" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"shop_id\": 3,
\"name\": \"quia\",
\"country\": \"dolorum\",
\"state\": \"ea\",
\"city\": \"duroclxalqddsmiibcqn\",
\"phone\": \"facere\",
\"zip\": \"aspernatur\",
\"address\": \"sunt\",
\"shops\": [
\"et\"
],
\"gs\": [
\"voluptas\"
],
\"pf\": {
\"contact_phone\": \"trmfsnskuff\",
\"business_phone\": \"dhjxvvfvphvgxpfc\",
\"city\": \"gapy\",
\"state\": \"bkyzweakbchdc\",
\"zip_code\": \"wbik\"
}
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/update-settings"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"shop_id": 3,
"name": "quia",
"country": "dolorum",
"state": "ea",
"city": "duroclxalqddsmiibcqn",
"phone": "facere",
"zip": "aspernatur",
"address": "sunt",
"shops": [
"et"
],
"gs": [
"voluptas"
],
"pf": {
"contact_phone": "trmfsnskuff",
"business_phone": "dhjxvvfvphvgxpfc",
"city": "gapy",
"state": "bkyzweakbchdc",
"zip_code": "wbik"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": null,
"uuid": null,
"is_admin_approved": null,
"name": "Lucius Brakus",
"email": "zoe86@parker.com",
"role": null,
"phone": null,
"address": null,
"city": null,
"state": null,
"country": null,
"zip": null,
"image": null,
"status": null,
"created_at": "2023-10-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.
Add or Update Banners
requires authentication
add or update banners
Get Banners
requires authentication
Get all banners
Invoice
Get Invoices
requires authentication
Get all invoices for Admin | Vendor
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/get-invoices?search=culpa&paginate=&page_size=9&status=ea&start_date=aliquid&end_date=natus" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/get-invoices"
);
const params = {
"search": "culpa",
"paginate": "0",
"page_size": "9",
"status": "ea",
"start_date": "aliquid",
"end_date": "natus",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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: *
{
"success": false,
"status": 401,
"message": "you are not authenticated. Please login.",
"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.
Order
All Orders
requires authentication
Get all orders for user | vendor | admin
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/orders?search=ab&paginate=" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"paginate\": false
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/orders"
);
const params = {
"search": "ab",
"paginate": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"paginate": false
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"success": false,
"status": 401,
"message": "you are not authenticated. Please login.",
"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.
Cancel Order
requires authentication
Cancel order for Admin | Manufacturer | Vendor
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/cancel-order" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"order_id\": 15,
\"note\": \"numquam\"
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/cancel-order"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"order_id": 15,
"note": "numquam"
};
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.
Order Approval By Vet
requires authentication
Order approval by vet Admin | Manufacturer
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/order-approval-vet" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"order_id\": 11,
\"is_vet_approved\": false
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/order-approval-vet"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"order_id": 11,
"is_vet_approved": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"status_code": 200,
"message": [
"Order approved successfully by vet"
],
"data": {
"id": 1,
"uuid": "ddb6f224-8f87-47ff-926a-73a54fbd46c3",
"user_id": 1,
"shop_id": 4,
"order_number": "34C1FC01",
"order_date": "2023-06-20 13:50:40",
"is_vet_approved": "1",
"vet_approval_date": "2023-09-06T13:06:53.570718Z",
"shipping_method_name": "UPS",
"shipping_price": "5.00",
"sub_total": "10.24",
"total": "15.24",
"tax": null,
"use_billing_address_for_shipping": 0,
"status": "Pending",
"vendor_commission_total": 10,
"admin_commission_total": 0,
"pdf_url": "https://petmeds24.s3.us-west-2.amazonaws.com/orders/pdf/34C1FC01.pdf",
"created_at": "2023-06-20"
}
}
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.
Capture Payment For RX
requires authentication
Capture Payment For RX Admin | Manufacturer
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/capture-payment" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"order_id\": 1
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/capture-payment"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"order_id": 1
};
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.
Page
Get all pages Admin|Vendor
requires authentication
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/pages?shop_id=labore" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_by\": \"created_at\",
\"order_by\": \"desc\",
\"search\": \"doloremque\",
\"paginate\": true,
\"page_size\": 12
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/pages"
);
const params = {
"shop_id": "labore",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_by": "created_at",
"order_by": "desc",
"search": "doloremque",
"paginate": true,
"page_size": 12
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"data": {
"id": 1,
"title": "About Us",
"slug": "about-us",
"details": "<div><h2><font size=\"6\">Title number 1</font><br></h2><h2><div><p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p></div></h2><h2><font size=\"6\">Title number 2</font><br></h2><h2><div><p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using Content here, content here, making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for lorem ipsum will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p></div></h2></div><div></div>",
"image": null,
"status": 1
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Vendor Show page Admin|Vendor
requires authentication
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/pages/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/pages/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": {
"id": 1,
"title": "About Us",
"slug": "about-us",
"details": "<div><h2><font size=\"6\">Title number 1</font><br></h2><h2><div><p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p></div></h2><h2><font size=\"6\">Title number 2</font><br></h2><h2><div><p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using Content here, content here, making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for lorem ipsum will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p></div></h2></div><div></div>",
"image": null,
"status": 1
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update page Admin|Vendor
requires authentication
Example request:
curl --request PUT \
"http://pet-meds-backend-updated.local/api/vendor/pages/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "details=ducimus"\
--form "status=1"\
--form "title=quaerat"\
--form "image=@C:\Users\Invision\AppData\Local\Temp\php2B7D.tmp" const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/pages/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('details', 'ducimus');
body.append('status', '1');
body.append('title', 'quaerat');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());Example response (200):
{
"data": {
"id": 1,
"title": "About Us",
"slug": "about-us",
"details": "<div><h2><font size=\"6\">Title number 1</font><br></h2><h2><div><p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p></div></h2><h2><font size=\"6\">Title number 2</font><br></h2><h2><div><p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using Content here, content here, making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for lorem ipsum will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).</p></div></h2></div><div></div>",
"image": null,
"status": 1
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
ProductCommission
POST api/vendor/product-commissions
requires authentication
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/product-commissions" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"eoikwympj\",
\"value\": 16
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/product-commissions"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "eoikwympj",
"value": 16
};
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.
POST api/vendor/add-commission
requires authentication
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/add-commission" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"vzojwssbgkyanb\",
\"value\": 12
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/add-commission"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "vzojwssbgkyanb",
"value": 12
};
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.
Products
Get All Products
requires authentication
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/products?search=explicabo&paginate=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"paginate\": true,
\"page_size\": 13,
\"meta\": \"minima\",
\"brandId\": 4,
\"shopId\": 19,
\"min_price\": 3814185.917523753,
\"max_price\": 3658525.4
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/products"
);
const params = {
"search": "explicabo",
"paginate": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"paginate": true,
"page_size": 13,
"meta": "minima",
"brandId": 4,
"shopId": 19,
"min_price": 3814185.917523753,
"max_price": 3658525.4
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store Products
requires authentication
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/products" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=sint"\
--form "category_id=18"\
--form "brand_id=10"\
--form "sku=20"\
--form "price=127.12983"\
--form "map_price=nfwyxegwhhrod"\
--form "discount_price=5936672.4375"\
--form "product_type=aut"\
--form "top=12"\
--form "trending=5"\
--form "details=autem"\
--form "others=quo"\
--form "meta_keywords=xwswdooicscpaqpie"\
--form "stock=10"\
--form "stock_check=1"\
--form "is_refundable=9"\
--form "is_prescription=11"\
--form "uploaded_by=1"\
--form "status=8"\
--form "image=@C:\Users\Invision\AppData\Local\Temp\php2AC4.tmp" const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/products"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'sint');
body.append('category_id', '18');
body.append('brand_id', '10');
body.append('sku', '20');
body.append('price', '127.12983');
body.append('map_price', 'nfwyxegwhhrod');
body.append('discount_price', '5936672.4375');
body.append('product_type', 'aut');
body.append('top', '12');
body.append('trending', '5');
body.append('details', 'autem');
body.append('others', 'quo');
body.append('meta_keywords', 'xwswdooicscpaqpie');
body.append('stock', '10');
body.append('stock_check', '1');
body.append('is_refundable', '9');
body.append('is_prescription', '11');
body.append('uploaded_by', '1');
body.append('status', '8');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{}
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 Product By Slug
requires authentication
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/products/aliquid" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"slug\": \"laudantium\"
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/products/aliquid"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"slug": "laudantium"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{}
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 product
requires authentication
Example request:
curl --request PUT \
"http://pet-meds-backend-updated.local/api/vendor/products/sunt" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=et"\
--form "category_id=3"\
--form "brand_id=5"\
--form "sku=14"\
--form "price=1413667.4"\
--form "map_price=tuvsksnixzaihyexjexmss"\
--form "discount_price=14613.523"\
--form "product_type=quia"\
--form "top=13"\
--form "trending=9"\
--form "details=recusandae"\
--form "others=aut"\
--form "meta_keywords=racswamyzrnytjpiq"\
--form "stock=2"\
--form "stock_check="\
--form "is_refundable=14"\
--form "is_prescription=9"\
--form "uploaded_by=7"\
--form "status=19"\
--form "image=@C:\Users\Invision\AppData\Local\Temp\php2AD5.tmp" const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/products/sunt"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'et');
body.append('category_id', '3');
body.append('brand_id', '5');
body.append('sku', '14');
body.append('price', '1413667.4');
body.append('map_price', 'tuvsksnixzaihyexjexmss');
body.append('discount_price', '14613.523');
body.append('product_type', 'quia');
body.append('top', '13');
body.append('trending', '9');
body.append('details', 'recusandae');
body.append('others', 'aut');
body.append('meta_keywords', 'racswamyzrnytjpiq');
body.append('stock', '2');
body.append('stock_check', '');
body.append('is_refundable', '14');
body.append('is_prescription', '9');
body.append('uploaded_by', '7');
body.append('status', '19');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());Example response (200):
{}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a product by ID.
requires authentication
Example request:
curl --request DELETE \
"http://pet-meds-backend-updated.local/api/vendor/products/occaecati" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/products/occaecati"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieves and returns the featured products.
requires authentication
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/feature-products" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/feature-products"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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: *
{
"success": false,
"status": 401,
"message": "you are not authenticated. Please login.",
"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.
POST api/vendor/update-feature-product
requires authentication
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/update-feature-product" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"ab\"
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/update-feature-product"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "ab"
};
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.
Product Block Admin | Vendor
requires authentication
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/products/update-meta/molestiae?slug=dicta" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "price=1399.95492079"\
--form "store_id=18"\
--form "is_blocked_by_admin="\
--form "is_blocked_by_store_admin=1"\
--form "slug=similique"\
--form "product[featured]=1"\
--form "product[is_refundable]="\
--form "product[top]="\
--form "product[trending]=1"\
--form "product[is_prescription]=1"\
--form "product_id=7"\
--form "product[image]=@C:\Users\Invision\AppData\Local\Temp\php2AF5.tmp" --form "product[additional_images][]=@C:\Users\Invision\AppData\Local\Temp\php2AF6.tmp" const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/products/update-meta/molestiae"
);
const params = {
"slug": "dicta",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('price', '1399.95492079');
body.append('store_id', '18');
body.append('is_blocked_by_admin', '');
body.append('is_blocked_by_store_admin', '1');
body.append('slug', 'similique');
body.append('product[featured]', '1');
body.append('product[is_refundable]', '');
body.append('product[top]', '');
body.append('product[trending]', '1');
body.append('product[is_prescription]', '1');
body.append('product_id', '7');
body.append('product[image]', document.querySelector('input[name="product[image]"]').files[0]);
body.append('product[additional_images][]', document.querySelector('input[name="product[additional_images][]"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"success": true,
"status_code": 200,
"message": [
"Product has been blocked by vendor"
],
"data": {
"product_id": "2",
"store_id": "2",
"is_blocked_by_admin": "1",
"is_blocked_by_store_admin": "1",
"price": "65.230",
"updated_at": "2023-04-27T10:19:13.000000Z",
"created_at": "2023-04-27T10:19:13.000000Z",
"id": 4
}
}
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
Get all users
requires authentication
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/users" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/users"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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: *
{
"success": false,
"status": 401,
"message": "you are not authenticated. Please login.",
"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.
Vendor
Check store sub-domain if exists
requires authentication
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/check-sub-domain" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sub_domain\": \"non\"
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/check-sub-domain"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sub_domain": "non"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"status_code": 200,
"message": [
"The given Sub-domain is available"
],
"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.
Vendor Update Password
requires authentication
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/update-password" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"current_password\": \"dolorem\",
\"new_password\": \"bds\",
\"confirm_new_password\": \"assumenda\",
\"title\": \"dolorum\",
\"details\": \"voluptatibus\",
\"sorting\": 1,
\"shop_id\": 18
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/update-password"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"current_password": "dolorem",
"new_password": "bds",
"confirm_new_password": "assumenda",
"title": "dolorum",
"details": "voluptatibus",
"sorting": 1,
"shop_id": 18
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"status_code": 200,
"message": [
"Vendor password has been updated 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.
product block by vendor
requires authentication
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/product-block-by-vendor" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 2,
\"price\": 4314029.468180568,
\"is_blocked_by_store_admin\": true
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/product-block-by-vendor"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 2,
"price": 4314029.468180568,
"is_blocked_by_store_admin": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"status_code": 200,
"message": [
"Product has been blocked by vendor"
],
"data": {
"product_id": "2",
"store_id": "2",
"is_blocked_by_store_admin": "1",
"price": "65.230",
"updated_at": "2023-04-27T10:19:13.000000Z",
"created_at": "2023-04-27T10:19:13.000000Z",
"id": 4
}
}
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 all Vendor
requires authentication
Example request:
curl --request GET \
--get "http://pet-meds-backend-updated.local/api/vendor/vendor" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"search\": \"iure\",
\"paginate\": true,
\"page_size\": 17,
\"is_approved\": 1
}"
const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/vendor"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"search": "iure",
"paginate": true,
"page_size": 17,
"is_approved": 1
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{}
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.
Vendor Store
requires authentication
Example request:
curl --request POST \
"http://pet-meds-backend-updated.local/api/vendor/vendor" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=ztigrdhwcmfc"\
--form "email=ruthie48@example.org"\
--form "password=J6-lN)m9=Q]F:7"\
--form "password_confirmation=assumenda"\
--form "country=peinj"\
--form "state=udqekavakkfxuwuww"\
--form "city=rakifzgc"\
--form "phone=zowwb"\
--form "zip=tpgdoqb"\
--form "address=ksrceodsrrjdb"\
--form "image=@C:\Users\Invision\AppData\Local\Temp\php2B26.tmp" const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/vendor"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'ztigrdhwcmfc');
body.append('email', 'ruthie48@example.org');
body.append('password', 'J6-lN)m9=Q]F:7');
body.append('password_confirmation', 'assumenda');
body.append('country', 'peinj');
body.append('state', 'udqekavakkfxuwuww');
body.append('city', 'rakifzgc');
body.append('phone', 'zowwb');
body.append('zip', 'tpgdoqb');
body.append('address', 'ksrceodsrrjdb');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{}
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 Vendor
requires authentication
Example request:
curl --request PUT \
"http://pet-meds-backend-updated.local/api/vendor/vendor/7" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "password=t!r<m+"\
--form "country=gajqyaxzsugisc"\
--form "state=yusgaelacfni"\
--form "city=ksvtkhplvxwmfgd"\
--form "phone=ublkxgawrhs"\
--form "zip=yy"\
--form "address=vxa"\
--form "image=@C:\Users\Invision\AppData\Local\Temp\php2B37.tmp" const url = new URL(
"http://pet-meds-backend-updated.local/api/vendor/vendor/7"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('password', 't!r<m+');
body.append('country', 'gajqyaxzsugisc');
body.append('state', 'yusgaelacfni');
body.append('city', 'ksvtkhplvxwmfgd');
body.append('phone', 'ublkxgawrhs');
body.append('zip', 'yy');
body.append('address', 'vxa');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());Example response (200):
{}
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.