MENU navbar-image

Introduction

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

Authenticating requests

To authenticate requests, include an Authorization header 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"
    }
}
 

Request      

POST api/vendor/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email is required. Example: evie55@example.net

password   string   

The password is required. Example: +hvR8h7ReBa~Na_Qm:

session_id   string  optional  

Example: alias

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

Request      

POST api/vendor/register

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

name   string   

The name is required. Example: vero

email   string   

The email is required. Example: cortez83@example.net

password   string   

The password is required. Example: A-8bGS'C}@NxkI`

password_confirmation   string   

The password_confirmation is required. Example: ad

country   string  optional  

optional The country is optional. Example: occaecati

state   string  optional  

optional The state is optional. Example: assumenda

city   string  optional  

optional The city is optional. Example: illum

phone   string  optional  

optional The phone is optional. Example: vel

zip   string  optional  

optional The zip is optional. Example: maxime

address   string  optional  

optional The address is optional. Example: consectetur

image   file  optional  

optional The image is optional. Example: C:\Users\Invision\AppData\Local\Temp\php286E.tmp

shops   object   

The shops array is required.

name   string   

The shops.name is required. Example: aut

sub_domain   string   

The shops.name is required. Example: sunt

shop_message   string  optional  

optional The shops.name is optional. Example: et

shop_details   string  optional  

optional The shops.name is optional. Example: corrupti

gs   object   

The gs array is required.

favicon   file   

The gs.favicon is required. Example: C:\Users\Invision\AppData\Local\Temp\php286F.tmp

logo   file   

The gs.logo is required. Example: C:\Users\Invision\AppData\Local\Temp\php2870.tmp

footer_logo   file   

The gs.footer_logo is required. Example: C:\Users\Invision\AppData\Local\Temp\php2871.tmp

title   string   

The gs.title is required. Example: nulla

primary_color   string   

The gs.primary_color is required. Example: voluptas

secondary_color   string   

The gs.secondary_color is required. Example: non

contact_email   string   

The gs.contact_email is required. Example: rebekah16@example.org

contact_phone   string   

The gs.contact_phone is required. Example: earum

contact_address   string   

The gs.contact_address is required. Example: molestias

currency_id   integer  optional  

optional The gs.currency_id is optional. Example: 17

auth_net_client_key   string  optional  

The gs.auth_net_client_key is optional. Example: qui

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

Request      

GET api/vendor/profile

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

GET api/vendor/logout

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/vendor/add-vendor

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

name   string   

The name is required. Example: dolores

email   string   

The email is required. Example: kyra.greenholt@example.net

password   string   

The password is required. Example: NSjXreA=C?4PpAKK2

password_confirmation   string   

The password_confirmation is required. Example: maxime

country   string  optional  

optional The country is optional. Example: et

state   string  optional  

optional The state is optional. Example: veritatis

city   string  optional  

optional The city is optional. Example: totam

phone   string  optional  

optional The phone is optional. Example: occaecati

zip   string  optional  

optional The zip is optional. Example: optio

address   string  optional  

optional The address is optional. Example: est

image   file  optional  

optional The image is optional. Example: C:\Users\Invision\AppData\Local\Temp\php2B4A.tmp

shops   object   

The shops array is required.

name   string   

The shops.name is required. Example: nobis

sub_domain   string   

The shops.name is required. Example: soluta

shop_message   string  optional  

optional The shops.name is optional. Example: eligendi

shop_details   string  optional  

optional The shops.name is optional. Example: est

gs   object   

The gs array is required.

favicon   file   

The gs.favicon is required. Example: C:\Users\Invision\AppData\Local\Temp\php2B4B.tmp

logo   file   

The gs.logo is required. Example: C:\Users\Invision\AppData\Local\Temp\php2B4C.tmp

footer_logo   file   

The gs.footer_logo is required. Example: C:\Users\Invision\AppData\Local\Temp\php2B4D.tmp

title   string   

The gs.title is required. Example: quidem

primary_color   string   

The gs.primary_color is required. Example: alias

secondary_color   string   

The gs.secondary_color is required. Example: quia

contact_email   string   

The gs.contact_email is required. Example: charlotte03@example.net

contact_phone   string   

The gs.contact_phone is required. Example: doloremque

contact_address   string   

The gs.contact_address is required. Example: autem

currency_id   integer  optional  

optional The gs.currency_id is optional. Example: 13

auth_net_client_key   string  optional  

The gs.auth_net_client_key is optional. Example: dolorem

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

Request      

GET api/vendor/brands

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

search   string  optional  
paginate   boolean  optional  

Example: false

page_size   integer  optional  

Example: 14

column   string  optional  

Example: eveniet

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

Request      

GET api/vendor/coupons

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

optional The search is optional. Example: officiis

paginate   boolean  optional  

optional The paginate is optional. Example: false

page_size   integer  optional  

optional The page_size is optional. Example: 1

shop_id   integer  optional  

optional The shop_id is optional this is for individual shop record. Example: 1

Body Parameters

search   string  optional  

Example: neque

paginate   boolean  optional  

Example: false

page_size   integer  optional  

Example: 3

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

Request      

POST api/vendor/coupons

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

all_shop   boolean   

The all_shop is required. Ex [1 or 0] Example: false

title   string   

The title is required. Example: modi

code   string   

The code is required. Example: inventore

start_date   date   

The start_date is required. Example: aut

end_date   date  optional  

optional The end_date is optional. Example: nam

type   string   

The type is required. Ex [percentage | fixed-amount] Example: vel

value   decimal   

The value is required. Example: delectus

min_amount   decimal  optional  

optional The min_amount is optional. Example: consequatur

discount_cap   decimal  optional  

optional The discount_cap is optional. Example: dicta

usage_limit   integer  optional  

optional The usage_limit is optional. Example: 16

usage_limit_per_user   integer  optional  

optional The usage_limit_per_user is optional. Example: 4

status   boolean  optional  

optional The status is optional. Ex [1 for active | 0 for in-active] Example: false

shop_id   integer   

The shop_id is required when admin store coupon. Example: 7

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

Request      

GET api/vendor/coupons/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the coupon. Example: 12

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

Request      

PUT api/vendor/coupons/{id}

PATCH api/vendor/coupons/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the coupon. Example: 12

Body Parameters

all_shop   boolean   

The all_shop is required. Ex [1 or 0] Example: true

title   string   

The title is required. Example: blanditiis

code   string   

The code is required. Example: debitis

start_date   date   

The start_date is required. Example: non

end_date   date  optional  

optional The end_date is optional. Example: et

type   string   

The type is required. Ex [percentage | fixed-amount] Example: assumenda

value   decimal   

The value is required. Example: error

min_amount   decimal  optional  

optional The min_amount is optional. Example: fuga

discount_cap   decimal  optional  

optional The discount_cap is optional. Example: incidunt

usage_limit   integer  optional  

optional The usage_limit is optional. Example: 15

usage_limit_per_user   integer  optional  

optional The usage_limit_per_user is optional. Example: 5

status   boolean  optional  

optional The status is optional. Ex [1 for active | 0 for in-active] Example: true

shop_id   integer   

The shop_id is required when admin store coupon. Example: 7

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

Request      

DELETE api/vendor/coupons/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the coupon. Example: 12

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

Request      

GET api/vendor/dashboard-stats

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

shop_id   string  optional  
year   string  optional  

Must be 4 digits. Example: 4160

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

Request      

GET api/vendor/discounts

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

optional The search is optional. Example: est

paginate   boolean  optional  

optional The paginate is optional. Example: false

page_size   integer  optional  

optional The page_size is optional. Example: 17

shop_id   integer  optional  

optional The shop_id is optional this is for individual shop record. Example: 11

Body Parameters

search   string  optional  

Example: nesciunt

paginate   boolean  optional  

Example: false

page_size   integer  optional  

Example: 3

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

Request      

POST api/vendor/discounts

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The title is required. Example: dolores

start_date   date   

The start_date is required. Example: ipsum

end_date   date  optional  

optional The end_date is optional. Example: totam

type   string   

The type is required. Ex [percentage | fixed-amount] Example: vel

value   decimal   

The value is required. Example: deleniti

status   boolean  optional  

optional The status is optional. Ex [1 for active | 0 for in-active] Example: true

shop_id   integer   

The shop_id is required when admin store discount. Example: 13

brand_id   integer   

The brand_id is required when admin|vendor store discount for individual brand. Example: 9

product_id   integer   

The product_id is required when admin|vendor store discount for individual product. Example: 14

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

Request      

GET api/vendor/discounts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the discount. Example: mollitia

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
}
 

Request      

PUT api/vendor/discounts/{id}

PATCH api/vendor/discounts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the discount. Example: ut

Body Parameters

title   string   

The title is required. Example: repudiandae

start_date   date   

The start_date is required. Example: consequatur

end_date   date  optional  

optional The end_date is optional. Example: sunt

type   string   

The type is required. Ex [percentage | fixed-amount] Example: numquam

value   decimal   

The value is required. Example: hic

status   boolean  optional  

optional The status is optional. Ex [1 for active | 0 for in-active] Example: false

shop_id   integer   

The shop_id is required when admin store discount. Example: 12

brand_id   integer   

The brand_id is required when admin|vendor store discount for individual brand. Example: 15

product_id   integer   

The product_id is required when admin|vendor store discount for individual product. Example: 15

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):


{}
 

Request      

DELETE api/vendor/discounts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the discount. Example: enim

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

Request      

GET api/vendor/payments

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

optional The search is required. Example: voluptas

paginate   boolean  optional  

optional The paginate is optional. Example: false

Body Parameters

search   string  optional  

Example: ut

paginate   boolean  optional  

Example: false

page_size   integer  optional  

Example: 11

shop_id   string  optional  
payment_id   string  optional  

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

Request      

GET api/vendor/faqs

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

search   string  optional  

Example: aliquid

paginate   boolean  optional  

Example: true

page_size   integer  optional  

Example: 3

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

Request      

POST api/vendor/faqs

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The title is required. Example: quidem

details   string   

The details is required. Example: autem

sorting   integer  optional  

optional The sorting is optional. Example: 12

shop_id   integer   

The shop_id is required when admin store faq. Example: 14

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

Request      

GET api/vendor/faqs/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the faq. Example: 1

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

Request      

PUT api/vendor/faqs/{id}

PATCH api/vendor/faqs/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the faq. Example: 1

Body Parameters

title   string   

The title is required. Example: tempore

details   string   

The details is required. Example: deserunt

sorting   integer  optional  

optional The sorting is optional. Example: 9

shop_id   integer   

The shop_id is required when admin store faq. Example: 1

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

Request      

DELETE api/vendor/faqs/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the faq. Example: 1

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

Request      

GET api/vendor/settings

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/vendor/update-settings

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

shop_id   integer   

The shop_id is required when admin update vendor settings. Example: 3

name   string  optional  

optional The name is optional. Example: quia

country   string  optional  

optional The country is optional. Example: dolorum

state   string  optional  

optional The state is optional. Example: ea

city   string  optional  

Must not be greater than 50 characters. Example: duroclxalqddsmiibcqn

phone   string  optional  

optional The phone is optional. Example: facere

zip   string  optional  

optional The zip is optional. Example: aspernatur

address   string  optional  

optional The address is optional. Example: sunt

image   string  optional  
shops   string[]   

The shops is required.

name   string  optional  

Must not be greater than 30 characters. Example: gqjeurmalgqqnkgeekbmwulo

shop_number   string  optional  

optional The shops.shop_number is optional. Example: ut

shop_address   string  optional  

optional The shops.shop_address is optional. Example: suscipit

reg_number   string  optional  

optional The shops.reg_number is optional. Example: recusandae

shop_message   string  optional  

optional The shops.shop_message is optional. Example: quasi

shop_details   string  optional  

optional The shops.shop_details is optional. Example: dignissimos

gs   string[]   

The shops is required.

is_featured_product   string  optional  
is_banner   string  optional  
logo_type   string  optional  
favicon   string  optional  

optional The gs.favicon is optional. Example: eum

logo   string  optional  

optional The gs.logo is optional. Example: sunt

footer_logo   string  optional  

optional The gs.footer_logo is optional. Example: et

title   string  optional  

optional The gs.title is optional. Example: in

primary_color   string  optional  

optional The gs.primary_color is optional. Example: illo

secondary_color   string  optional  

optional The gs.secondary_color is optional. Example: possimus

contact_email   string  optional  

optional The gs.contact_email is optional. Example: koch.katheryn@example.org

contact_phone   string  optional  

optional The gs.contact_phone is optional. Example: tempore

contact_address   string  optional  

optional The gs.contact_address is optional. Example: nobis

show_otc_products   boolean  optional  

optional The gs.show_otc_products is optional. Example: true

show_rx_products   string  optional  
partner_id   string  optional  

optional The gs.partner_id is optional. Example: architecto

footer_color   string  optional  

optional The gs.footer_color is optional. Example: repellat

mission_statement   string  optional  

optional The gs.mission_statement is optional. Example: ipsam

font_type   string  optional  

optional The gs.font_type is optional. Example: facere

powered_by   string  optional  

optional The gs.powered_by is optional. Example: neque

default_payment_gateway   string  optional  

optional The gs.default_payment_gateway is optional. Ex: Stripe,Authorized-net Example: aut

stripe_key   string  optional  

optional The gs.stripe_key is optional. Example: officia

stripe_publishable_key   string  optional  
auth_net_api_login_id   string  optional  

optional The gs.auth_net_api_login_id is optional. Example: sit

auth_net_transaction_key   string  optional  

optional The gs.auth_net_transaction_key is optional. Example: sit

auth_net_client_key   string  optional  
copy_right   string  optional  

Must not be greater than 255 characters. Example: vqqm

primary_text_color   string  optional  

optional The gs.primary_text_color is optional. Example: officia

secondary_text_color   string  optional  

optional The gs.secondary_text_color is optional. Example: odit

pg   object  optional  
default_payment_gateway   string  optional  
stripe_key   string  optional  
stripe_publishable_key   string  optional  
auth_net_api_login_id   string  optional  
auth_net_transaction_key   string  optional  
auth_net_client_key   string  optional  
pf   object  optional  
contact_name   string  optional  
company_legal_name   string  optional  
contact_phone   string  optional  

Must not be greater than 20 characters. Example: trmfsnskuff

contact_email   string  optional  
business_phone   string  optional  

Must not be greater than 20 characters. Example: dhjxvvfvphvgxpfc

business_email   string  optional  
website   string  optional  
business_address_for_primary_account   string  optional  
city   string  optional  

Must not be greater than 50 characters. Example: gapy

state   string  optional  

Must not be greater than 50 characters. Example: bkyzweakbchdc

zip_code   string  optional  

Must not be greater than 7 characters. Example: wbik

are_you_registered_to_collect_sales_tax_list_states   string  optional  
current_pims_or_pos_or_web_host   string  optional  
taxpayer_id_number_ein   string  optional  
nabp_verified   string  optional  
standalone_or_child_company   string  optional  

Add or Update Banners

requires authentication

add or update banners

Example request:
curl --request POST \
    "http://pet-meds-backend-updated.local/api/vendor/banners/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"banners\": [
        \"repellendus\"
    ]
}"
const url = new URL(
    "http://pet-meds-backend-updated.local/api/vendor/banners/update"
);

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

let body = {
    "banners": [
        "repellendus"
    ]
};

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

Example response (200):


{
    "success": true,
    "status_code": 200,
    "message": [
        "Banners updated successfully"
    ],
    "data": [
        "https://petmeds24.s3.us-west-2.amazonaws.com/staging/images/general-settings/banners/DWFNHVaitP9KgKgk8StoizOC3Thc4YP5j7EN9qNx.png",
        "https://petmeds24.s3.us-west-2.amazonaws.com/staging/images/general-settings/banners/6yxC6UetdJfJBFL7Ke4e6Hd5nrEICizAP8lPTuM8.png",
        "https://petmeds24.s3.us-west-2.amazonaws.com/staging/images/general-settings/banners/WBl11riXuSQUGYc7L0aUtqShz1s2HT3LwHyFQzcr.png",
        "https://petmeds24.s3.us-west-2.amazonaws.com/staging/images/general-settings/banners/KsTSmLUKyvffghsPQ6w086pdSvCZ7skPAsNLKx2X.png"
    ]
}
 

Request      

POST api/vendor/banners/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

banners   string[]   

The banners is required

Get Banners

requires authentication

Get all banners

Example request:
curl --request GET \
    --get "http://pet-meds-backend-updated.local/api/vendor/banners/get" \
    --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/banners/get"
);

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": [
        "Banners fetched successfully"
    ],
    "data": [
        "https://petmeds24.s3.us-west-2.amazonaws.com/staging/images/general-settings/banners/DWFNHVaitP9KgKgk8StoizOC3Thc4YP5j7EN9qNx.png",
        "https://petmeds24.s3.us-west-2.amazonaws.com/staging/images/general-settings/banners/6yxC6UetdJfJBFL7Ke4e6Hd5nrEICizAP8lPTuM8.png",
        "https://petmeds24.s3.us-west-2.amazonaws.com/staging/images/general-settings/banners/WBl11riXuSQUGYc7L0aUtqShz1s2HT3LwHyFQzcr.png",
        "https://petmeds24.s3.us-west-2.amazonaws.com/staging/images/general-settings/banners/KsTSmLUKyvffghsPQ6w086pdSvCZ7skPAsNLKx2X.png"
    ]
}
 

Request      

GET api/vendor/banners/get

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

GET api/vendor/get-invoices

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

optional The search is optional. Example: culpa

paginate   boolean  optional  

optional The pagination is optional. Example: false

page_size   integer  optional  

optional The page_size is optional. Example: 9

status   string  optional  

optional The status is optional. Example: ea

start_date   string  optional  

date optional The start_date is optional. Example: aliquid

end_date   string  optional  

date optional The end_date is optional. Example: natus

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

Request      

GET api/vendor/orders

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

optional The search is required. Example: ab

paginate   boolean  optional  

optional The paginate is optional. Example: false

Body Parameters

search   string  optional  
paginate   boolean  optional  

Example: false

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

Request      

POST api/vendor/cancel-order

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

order_id   integer   

The order_id is required. Example: 15

note   string   

The note is required. Example: numquam

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

Request      

POST api/vendor/order-approval-vet

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

order_id   integer   

The order_id is required. Example: 11

is_vet_approved   boolean   

The is_vet_approved is required. Example: false

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

Request      

POST api/vendor/capture-payment

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

order_id   integer   

The order_id is required. Example: 1

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&#160;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
    }
}
 

Request      

GET api/vendor/pages

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

shop_id   string   

The shop_id is required when get pages for admin side. Example: labore

Body Parameters

sort_by   string  optional  

Example: created_at

Must be one of:
  • id
  • shop_id
  • title
  • slug
  • details
  • image
  • status
  • created_at
  • updated_at
  • deleted_at
order_by   string  optional  

Example: desc

Must be one of:
  • asc
  • desc
search   string  optional  

Example: doloremque

paginate   boolean  optional  

Example: true

page_size   integer  optional  

Example: 12

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&#160;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
    }
}
 

Request      

GET api/vendor/pages/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the page. Example: 1

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&#160;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
    }
}
 

Request      

PUT api/vendor/pages/{id}

PATCH api/vendor/pages/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the page. Example: 1

Body Parameters

details   string  optional  

optional The details is optional. Example: ducimus

image   file  optional  

Must be an image. Must not be greater than 65535 kilobytes. Example: C:\Users\Invision\AppData\Local\Temp\php2B7D.tmp

status   integer  optional  

Must be at least 0. Must not be greater than 1. Example: 1

title   string   

The title is required. Example: quaerat

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

Request      

POST api/vendor/product-commissions

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

shop_id   string  optional  
type   string   

Must not be greater than 50 characters. Example: eoikwympj

value   integer   

Example: 16

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

Request      

POST api/vendor/add-commission

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

shop_id   string  optional  
type   string   

Must not be greater than 50 characters. Example: vzojwssbgkyanb

value   integer   

Example: 12

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):


{}
 

Request      

GET api/vendor/products

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

optional The search is required. Example: explicabo

paginate   boolean  optional  

optional The paginate is optional. Example: true

Body Parameters

search   string  optional  
paginate   boolean  optional  

Example: true

page_size   integer  optional  

Example: 13

meta   string  optional  

Example: minima

brandId   integer  optional  

Example: 4

shopId   integer  optional  

Example: 19

min_price   number  optional  

Example: 3814185.9175238

max_price   number  optional  

Example: 3658525.4

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):


{}
 

Request      

POST api/vendor/products

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

name   string   

The name is required. Example: sint

category_id   integer  optional  

optional The category_id is optional. Example: 18

brand_id   integer  optional  

optional The brand_id is optional. Example: 10

sku   integer   

The category_id is optional. Example: 20

price   number   

The price is required. Example: 127.12983

map_price   string   

Must not be greater than 191 characters. Example: nfwyxegwhhrod

discount_price   number  optional  

optional The discount_price is optional. Example: 5936672.4375

product_type   string  optional  

optional The product_type is optional. Example: aut

top   integer   

The top is required. Example: 12

trending   integer   

The trending is required. Example: 5

details   text  optional  

optional The details is optional. Example: autem

others   json  optional  

optional The others is optional. Example: quo

image   file  optional  

Must be an image. Must not be greater than 255 kilobytes. Example: C:\Users\Invision\AppData\Local\Temp\php2AC4.tmp

meta_keywords   string  optional  

Must not be greater than 191 characters. Example: xwswdooicscpaqpie

stock   integer  optional  

Must be at least 0. Must not be greater than 2147483647. Example: 10

stock_check   boolean  optional  

Example: true

is_refundable   integer   

The is_refundable is required. Example: 9

is_prescription   integer   

The is_prescription is required. Example: 11

uploaded_by   integer  optional  

optional The uploaded_by is optional. Comment: null for default products, 0 for admin, other nums for vendor shop id Example: 1

status   integer   

The status is required. Example: 8

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):


{}
 

Request      

GET api/vendor/products/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the product. Example: aliquid

Body Parameters

slug   string   

The slug is required. Example: laudantium

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):


{}
 

Request      

PUT api/vendor/products/{id}

PATCH api/vendor/products/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the product. Example: sunt

Body Parameters

name   string   

The name is required. Example: et

category_id   integer  optional  

optional The category_id is optional. Example: 3

brand_id   integer  optional  

optional The brand_id is optional. Example: 5

sku   integer   

The category_id is optional. Example: 14

price   number   

The price is required. Example: 1413667.4

map_price   string   

Must not be greater than 191 characters. Example: tuvsksnixzaihyexjexmss

discount_price   number  optional  

optional The discount_price is optional. Example: 14613.523

product_type   string  optional  

optional The product_type is optional. Example: quia

top   integer   

The top is required. Example: 13

trending   integer   

The trending is required. Example: 9

details   text  optional  

optional The details is optional. Example: recusandae

others   json  optional  

optional The others is optional. Example: aut

image   file  optional  

Must be an image. Must not be greater than 255 kilobytes. Example: C:\Users\Invision\AppData\Local\Temp\php2AD5.tmp

meta_keywords   string  optional  

Must not be greater than 191 characters. Example: racswamyzrnytjpiq

stock   integer  optional  

Must be at least 0. Must not be greater than 2147483647. Example: 2

stock_check   boolean  optional  

Example: false

is_refundable   integer   

The is_refundable is required. Example: 14

is_prescription   integer   

The is_prescription is required. Example: 9

uploaded_by   integer  optional  

optional The uploaded_by is optional. Comment: null for default products, 0 for admin, other nums for vendor shop id Example: 7

status   integer   

The status is required. Example: 19

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

Request      

DELETE api/vendor/products/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the product. Example: occaecati

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

Request      

GET api/vendor/feature-products

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/vendor/update-feature-product

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

product_id   string   

Example: ab

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

Request      

POST api/vendor/products/update-meta/{slug}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the update metum. Example: molestiae

Query Parameters

slug   string  optional  

The slug is required. Example: dicta

Body Parameters

price   number  optional  

The price is optional. Example: 1399.95492079

store_id   integer  optional  

Example: 18

is_blocked_by_admin   boolean  optional  

The is_blocked_by_admin is required. Example: false

is_blocked_by_store_admin   boolean  optional  

The is_blocked_by_store_admin is required. Example: true

slug   string   

Example: similique

product   object  optional  
name   string  optional  
featured   boolean  optional  

Example: true

product_type   string  optional  
is_refundable   boolean  optional  

Example: false

top   boolean  optional  

Example: false

trending   boolean  optional  

Example: true

meta_keywords   string  optional  
details   string  optional  
image   file  optional  

Must be an image. Example: C:\Users\Invision\AppData\Local\Temp\php2AF5.tmp

additional_images   file[]  optional  

Must be an image.

is_prescription   boolean  optional  

Example: true

product_id   integer  optional  

The product_id is required. Example: 7

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

Request      

GET api/vendor/users

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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

Request      

POST api/vendor/check-sub-domain

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

sub_domain   string   

The sub_domain is required. Example: non

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
}
 

Request      

POST api/vendor/update-password

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

current_password   string   

Example: dolorem

new_password   string   

Must not be greater than 30 characters. Example: bds

confirm_new_password   string   

The value and new_password must match. Example: assumenda

title   string   

The title is required. Example: dolorum

details   string   

The details is required. Example: voluptatibus

sorting   integer  optional  

optional The sorting is optional. Example: 1

shop_id   integer   

The shop_id is required when admin store faq. Example: 18

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

Request      

POST api/vendor/product-block-by-vendor

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

product_id   integer  optional  

The product_id is required. Example: 2

price   number  optional  

The price is optional. Example: 4314029.4681806

is_blocked_by_store_admin   boolean  optional  

The is_blocked_by_store_admin is required. Example: true

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):


{}
 

Request      

GET api/vendor/vendor

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

search   string  optional  

Example: iure

paginate   boolean  optional  

Example: true

page_size   integer  optional  

Example: 17

is_approved   integer  optional  

Must be at least 0. Must not be greater than 1. Example: 1

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):


{}
 

Request      

POST api/vendor/vendor

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: ztigrdhwcmfc

email   string   

Must be a valid email address. Must not be greater than 100 characters. Example: ruthie48@example.org

password   string   

Must be at least 4 characters. Must not be greater than 30 characters. Example: J6-lN)m9=Q]F:7

password_confirmation   string   

The value and password must match. Example: assumenda

country   string  optional  

Must not be greater than 100 characters. Example: peinj

state   string  optional  

Must not be greater than 100 characters. Example: udqekavakkfxuwuww

city   string  optional  

Must not be greater than 100 characters. Example: rakifzgc

phone   string  optional  

Must not be greater than 20 characters. Example: zowwb

zip   string  optional  

Must not be greater than 7 characters. Example: tpgdoqb

address   string  optional  

Must not be greater than 255 characters. Example: ksrceodsrrjdb

image   file  optional  

Must be a file. Must be an image. Must not be greater than 255 kilobytes. Example: C:\Users\Invision\AppData\Local\Temp\php2B26.tmp

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):


{}
 

Request      

PUT api/vendor/vendor/{id}

PATCH api/vendor/vendor/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the vendor. Example: 7

Body Parameters

password   string  optional  

Must be at least 4 characters. Must not be greater than 30 characters. Example: t!r<m+

password_confirmation   string  optional  

The value and password must match.

country   string  optional  

Must not be greater than 100 characters. Example: gajqyaxzsugisc

state   string  optional  

Must not be greater than 100 characters. Example: yusgaelacfni

city   string  optional  

Must not be greater than 100 characters. Example: ksvtkhplvxwmfgd

phone   string  optional  

Must not be greater than 20 characters. Example: ublkxgawrhs

zip   string  optional  

Must not be greater than 7 characters. Example: yy

address   string  optional  

Must not be greater than 255 characters. Example: vxa

image   file  optional  

Must be a file. Must be an image. Must not be greater than 255 kilobytes. Example: C:\Users\Invision\AppData\Local\Temp\php2B37.tmp