MENU navbar-image

Introduction

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

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

This API is not authenticated.

01. Authentication / المصادقة

APIs for user registration, login, logout, and retrieving the current authenticated user. واجهات تسجيل المستخدم، تسجيل الدخول، تسجيل الخروج، وجلب بيانات المستخدم الحالي.

Register new user.

Create a new user account and return a Sanctum bearer token. إنشاء حساب مستخدم جديد وإرجاع توكن Sanctum.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Ayman Ahmed\",
    \"email\": \"user@example.com\",
    \"phone\": \"0500000000\",
    \"password\": \"password\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/register"
);

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

let body = {
    "name": "Ayman Ahmed",
    "email": "user@example.com",
    "phone": "0500000000",
    "password": "password"
};

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

Example response (201):


{
    "success": true,
    "message": "تم إنشاء الحساب بنجاح",
    "data": {
        "token": "1|example-token",
        "user": {
            "id": 1,
            "name": "Ayman Ahmed",
            "email": "user@example.com",
            "phone": "0500000000"
        }
    }
}
 

Request      

POST api/v1/auth/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Full user name. اسم المستخدم الكامل. Must not be greater than 255 characters. Example: Ayman Ahmed

email   string  optional    

User email address. البريد الإلكتروني للمستخدم. This field is required when phone is not present. Must be a valid email address. Must not be greater than 255 characters. Example: user@example.com

phone   string  optional    

User phone number. رقم جوال المستخدم. This field is required when email is not present. Must not be greater than 30 characters. Example: 0500000000

password   string     

User password. كلمة المرور. Example: password

Login user.

Authenticate a user using email/phone and password, then return a Sanctum bearer token. تسجيل دخول المستخدم بالبريد/الجوال وكلمة المرور وإرجاع توكن Sanctum.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"identifier\": \"b\",
    \"password\": \"password\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/login"
);

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

let body = {
    "identifier": "b",
    "password": "password"
};

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

Example response (200):


{
    "success": true,
    "message": "تم تسجيل الدخول بنجاح",
    "data": {
        "token": "1|example-token",
        "user": {
            "id": 1,
            "name": "Ayman Ahmed",
            "email": "user@example.com"
        }
    }
}
 

Request      

POST api/v1/auth/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

identifier   string     

Must not be greater than 255 characters. Example: b

password   string     

User password. كلمة المرور. Example: password

Logout user.

requires authentication

Revoke the current access token for the authenticated user. تسجيل خروج المستخدم وإلغاء التوكن الحالي.

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/logout" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/logout"
);

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


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

Example response (200):


{
    "success": true,
    "message": "تم تسجيل الخروج بنجاح",
    "data": null
}
 

Request      

POST api/v1/auth/logout

Headers

Authorization        

Example: Bearer {token}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get current user.

requires authentication

Return the currently authenticated user profile. إرجاع بيانات المستخدم الحالي.

Example request:
curl --request GET \
    --get "http://localhost/api/v1/auth/me" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/me"
);

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


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

Example response (200):


{
    "success": true,
    "message": "تم جلب بيانات المستخدم بنجاح",
    "data": {
        "id": 1,
        "name": "Ayman Ahmed",
        "email": "user@example.com",
        "phone": "0500000000"
    }
}
 

Request      

GET api/v1/auth/me

Headers

Authorization        

Example: Bearer {token}

Content-Type        

Example: application/json

Accept        

Example: application/json

06. Shipping / شركات التوصيل والشحن

APIs for managing delivery companies and their coverage zones. واجهات إدارة شركات التوصيل ومناطق التغطية.

List delivery companies. عرض شركات التوصيل.

requires authentication

Example request:
curl --request GET \
    --get "http://localhost/api/v1/shipping/delivery-companies" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/shipping/delivery-companies"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

GET api/v1/shipping/delivery-companies

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

Create delivery company. إنشاء شركة توصيل.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/shipping/delivery-companies" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"fast_delivery\",
    \"name\": \"Fast Delivery\",
    \"logo_url\": \"http:\\/\\/www.bailey.biz\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",
    \"website_url\": \"https:\\/\\/www.runte.com\\/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci\",
    \"support_phone\": \"p\",
    \"integration_type\": \"manual\",
    \"api_provider\": \"smsa\",
    \"is_active\": true,
    \"supports_cod\": false,
    \"supports_pickup\": true,
    \"supports_tracking\": true,
    \"base_price\": 20,
    \"price_per_kg\": 2,
    \"price_per_km\": 1,
    \"min_delivery_days\": 1,
    \"max_delivery_days\": 3
}"
const url = new URL(
    "http://localhost/api/v1/shipping/delivery-companies"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "fast_delivery",
    "name": "Fast Delivery",
    "logo_url": "http:\/\/www.bailey.biz\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html",
    "website_url": "https:\/\/www.runte.com\/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci",
    "support_phone": "p",
    "integration_type": "manual",
    "api_provider": "smsa",
    "is_active": true,
    "supports_cod": false,
    "supports_pickup": true,
    "supports_tracking": true,
    "base_price": 20,
    "price_per_kg": 2,
    "price_per_km": 1,
    "min_delivery_days": 1,
    "max_delivery_days": 3
};

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

Example response (201):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

POST api/v1/shipping/delivery-companies

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Unique delivery company code. كود فريد لشركة التوصيل. Must not be greater than 100 characters. Example: fast_delivery

name   string     

Delivery company name. اسم شركة التوصيل. Must not be greater than 255 characters. Example: Fast Delivery

logo_url   string  optional    

Must not be greater than 500 characters. Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

website_url   string  optional    

Must not be greater than 500 characters. Example: https://www.runte.com/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci

support_phone   string  optional    

Must not be greater than 50 characters. Example: p

integration_type   string  optional    

Integration type: manual or api. نوع الربط: يدوي أو API. Example: manual

Must be one of:
  • manual
  • api
api_provider   string  optional    

External API provider key if available. مزود الربط الخارجي إن وجد. Must not be greater than 100 characters. Example: smsa

is_active   boolean  optional    

Whether the company is active. هل الشركة مفعلة. Example: true

supports_cod   boolean  optional    

Whether cash on delivery is supported. هل تدعم الدفع عند الاستلام. Example: false

supports_pickup   boolean  optional    

Whether pickup from store is supported. هل تدعم الاستلام من المتجر. Example: true

supports_tracking   boolean  optional    

Whether tracking is supported. هل تدعم التتبع. Example: true

base_price   number  optional    

Base delivery price. السعر الأساسي للتوصيل. Must be at least 0. Example: 20

price_per_kg   number  optional    

Additional price per kilogram. سعر إضافي لكل كيلو. Must be at least 0. Example: 2

price_per_km   number  optional    

Additional price per kilometer. سعر إضافي لكل كيلومتر. Must be at least 0. Example: 1

min_delivery_days   integer  optional    

Minimum expected delivery days. أقل مدة توصيل متوقعة بالأيام. Must be at least 0. Example: 1

max_delivery_days   integer  optional    

Maximum expected delivery days. أعلى مدة توصيل متوقعة بالأيام. Must be at least 0. Example: 3

config   object  optional    
metadata   object  optional    

Show delivery company details. عرض تفاصيل شركة التوصيل.

requires authentication

Example request:
curl --request GET \
    --get "http://localhost/api/v1/shipping/delivery-companies/16" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/shipping/delivery-companies/16"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

GET api/v1/shipping/delivery-companies/{deliveryCompany_id}

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

deliveryCompany_id   integer     

The ID of the deliveryCompany. Example: 16

Update delivery company. تحديث شركة التوصيل.

requires authentication

Example request:
curl --request PATCH \
    "http://localhost/api/v1/shipping/delivery-companies/16" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"fast_delivery\",
    \"name\": \"Fast Delivery Updated\",
    \"logo_url\": \"http:\\/\\/www.bailey.biz\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",
    \"website_url\": \"https:\\/\\/www.runte.com\\/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci\",
    \"support_phone\": \"p\",
    \"integration_type\": \"api\",
    \"api_provider\": \"w\",
    \"is_active\": true,
    \"supports_cod\": true,
    \"supports_pickup\": true,
    \"supports_tracking\": true,
    \"base_price\": 25,
    \"price_per_kg\": 89,
    \"price_per_km\": 34,
    \"min_delivery_days\": 3,
    \"max_delivery_days\": 22
}"
const url = new URL(
    "http://localhost/api/v1/shipping/delivery-companies/16"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "fast_delivery",
    "name": "Fast Delivery Updated",
    "logo_url": "http:\/\/www.bailey.biz\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html",
    "website_url": "https:\/\/www.runte.com\/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci",
    "support_phone": "p",
    "integration_type": "api",
    "api_provider": "w",
    "is_active": true,
    "supports_cod": true,
    "supports_pickup": true,
    "supports_tracking": true,
    "base_price": 25,
    "price_per_kg": 89,
    "price_per_km": 34,
    "min_delivery_days": 3,
    "max_delivery_days": 22
};

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

Example response (200):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

PATCH api/v1/shipping/delivery-companies/{deliveryCompany_id}

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

deliveryCompany_id   integer     

The ID of the deliveryCompany. Example: 16

Body Parameters

code   string  optional    

Updated unique delivery company code. كود شركة التوصيل بعد التعديل. Must not be greater than 100 characters. Example: fast_delivery

name   string  optional    

Updated delivery company name. اسم شركة التوصيل بعد التعديل. Must not be greater than 255 characters. Example: Fast Delivery Updated

logo_url   string  optional    

Must not be greater than 500 characters. Example: http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html

website_url   string  optional    

Must not be greater than 500 characters. Example: https://www.runte.com/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci

support_phone   string  optional    

Must not be greater than 50 characters. Example: p

integration_type   string  optional    

Integration type: manual or api. نوع الربط: يدوي أو API. Example: api

Must be one of:
  • manual
  • api
api_provider   string  optional    

Must not be greater than 100 characters. Example: w

is_active   boolean  optional    

Whether the company is active. هل الشركة مفعلة. Example: true

supports_cod   boolean  optional    

Example: true

supports_pickup   boolean  optional    

Example: true

supports_tracking   boolean  optional    

Whether tracking is supported. هل تدعم التتبع. Example: true

base_price   number  optional    

Base delivery price. السعر الأساسي للتوصيل. Must be at least 0. Example: 25

price_per_kg   number  optional    

Must be at least 0. Example: 89

price_per_km   number  optional    

Must be at least 0. Example: 34

min_delivery_days   integer  optional    

Must be at least 0. Example: 3

max_delivery_days   integer  optional    

Must be at least 0. Example: 22

config   object  optional    
metadata   object  optional    

Delete delivery company. حذف شركة التوصيل.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/shipping/delivery-companies/16" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/shipping/delivery-companies/16"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

DELETE api/v1/shipping/delivery-companies/{deliveryCompany_id}

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

deliveryCompany_id   integer     

The ID of the deliveryCompany. Example: 16

Add delivery coverage zone. إضافة منطقة تغطية لشركة التوصيل.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/shipping/delivery-companies/16/zones" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"country_code\": \"SA\",
    \"region\": \"Madinah\",
    \"city\": \"Medina\",
    \"district\": \"Quba\",
    \"is_active\": true,
    \"zone_price\": 25,
    \"min_delivery_days\": 1,
    \"max_delivery_days\": 2
}"
const url = new URL(
    "http://localhost/api/v1/shipping/delivery-companies/16/zones"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "country_code": "SA",
    "region": "Madinah",
    "city": "Medina",
    "district": "Quba",
    "is_active": true,
    "zone_price": 25,
    "min_delivery_days": 1,
    "max_delivery_days": 2
};

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

Example response (201):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

POST api/v1/shipping/delivery-companies/{deliveryCompany_id}/zones

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

deliveryCompany_id   integer     

The ID of the deliveryCompany. Example: 16

Body Parameters

country_code   string  optional    

Country code. رمز الدولة. Must be 2 characters. Example: SA

region   string  optional    

Region name. اسم المنطقة. Must not be greater than 100 characters. Example: Madinah

city   string     

City covered by this delivery company. المدينة التي تغطيها شركة التوصيل. Must not be greater than 100 characters. Example: Medina

district   string  optional    

District covered by this delivery company. الحي الذي تغطيه شركة التوصيل. Must not be greater than 100 characters. Example: Quba

is_active   boolean  optional    

Whether this zone is active. هل منطقة التغطية مفعلة. Example: true

zone_price   number  optional    

Delivery price for this zone. سعر التوصيل لهذه المنطقة. Must be at least 0. Example: 25

min_delivery_days   integer  optional    

Minimum delivery days for this zone. أقل مدة توصيل لهذه المنطقة. Must be at least 0. Example: 1

max_delivery_days   integer  optional    

Maximum delivery days for this zone. أعلى مدة توصيل لهذه المنطقة. Must be at least 0. Example: 2

metadata   object  optional    

List store delivery companies. عرض شركات التوصيل المفعلة للمتاجر.

requires authentication

Example request:
curl --request GET \
    --get "http://localhost/api/v1/shipping/store-delivery-companies" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/shipping/store-delivery-companies"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

GET api/v1/shipping/store-delivery-companies

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

Enable delivery company for store. تفعيل شركة توصيل للمتجر.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/shipping/store-delivery-companies" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"store_id\": 1,
    \"delivery_company_id\": 1,
    \"is_active\": true,
    \"custom_base_price\": 12,
    \"custom_free_delivery_min_order\": 200
}"
const url = new URL(
    "http://localhost/api/v1/shipping/store-delivery-companies"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "store_id": 1,
    "delivery_company_id": 1,
    "is_active": true,
    "custom_base_price": 12,
    "custom_free_delivery_min_order": 200
};

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

Example response (201):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

POST api/v1/shipping/store-delivery-companies

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

store_id   integer     

Store ID. رقم المتجر. Must match an existing stored value. Example: 1

delivery_company_id   integer     

Delivery company ID. رقم شركة التوصيل. Must match an existing stored value. Example: 1

is_active   boolean  optional    

Whether this company is active for the store. هل الشركة مفعلة لهذا المتجر. Example: true

custom_base_price   number  optional    

Custom delivery base price for this store. سعر توصيل مخصص لهذا المتجر. Must be at least 0. Example: 12

custom_free_delivery_min_order   number  optional    

Minimum order amount for free delivery. أقل مبلغ طلب للحصول على توصيل مجاني. Must be at least 0. Example: 200

settings   object  optional    

Disable delivery company for store. إلغاء تفعيل شركة التوصيل للمتجر.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost/api/v1/shipping/store-delivery-companies/16" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/shipping/store-delivery-companies/16"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

DELETE api/v1/shipping/store-delivery-companies/{storeDeliveryCompany_id}

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

storeDeliveryCompany_id   integer     

The ID of the storeDeliveryCompany. Example: 16

List delivery quotes. عرض عروض أسعار التوصيل.

requires authentication

Example request:
curl --request GET \
    --get "http://localhost/api/v1/shipping/quotes" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/shipping/quotes"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

GET api/v1/shipping/quotes

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

Generate delivery quotes. توليد عروض أسعار التوصيل المتاحة.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/shipping/quotes/generate" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"store_id\": 1,
    \"cart_id\": 1,
    \"order_id\": 1,
    \"address_id\": 1,
    \"city\": \"Medina\",
    \"district\": \"Quba\",
    \"order_total\": 100,
    \"weight_kg\": 2,
    \"distance_km\": 5,
    \"currency\": \"SAR\"
}"
const url = new URL(
    "http://localhost/api/v1/shipping/quotes/generate"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "store_id": 1,
    "cart_id": 1,
    "order_id": 1,
    "address_id": 1,
    "city": "Medina",
    "district": "Quba",
    "order_total": 100,
    "weight_kg": 2,
    "distance_km": 5,
    "currency": "SAR"
};

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

Example response (201):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

POST api/v1/shipping/quotes/generate

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

store_id   integer     

Store ID. رقم المتجر. Must match an existing stored value. Example: 1

cart_id   integer  optional    

Cart ID if quote is for cart checkout. رقم السلة إذا كان العرض خاصًا بالسلة. Must match an existing stored value. Example: 1

order_id   integer  optional    

Order ID if quote is for an existing order. رقم الطلب إذا كان العرض لطلب موجود. Must match an existing stored value. Example: 1

address_id   integer  optional    

Customer address ID. رقم عنوان العميل. Must match an existing stored value. Example: 1

city   string     

Customer delivery city. مدينة التوصيل الخاصة بالعميل. Must not be greater than 100 characters. Example: Medina

district   string  optional    

Customer delivery district. حي التوصيل الخاص بالعميل. Must not be greater than 100 characters. Example: Quba

order_total   number  optional    

Order total before delivery. إجمالي الطلب قبل التوصيل. Must be at least 0. Example: 100

weight_kg   number  optional    

Shipment weight in kilograms. وزن الشحنة بالكيلو. Must be at least 0. Example: 2

distance_km   number  optional    

Estimated delivery distance in kilometers. المسافة المتوقعة بالكيلومتر. Must be at least 0. Example: 5

currency   string  optional    

Currency code. رمز العملة. Must be 3 characters. Example: SAR

metadata   object  optional    

Select delivery quote. اختيار عرض توصيل.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/shipping/quotes/16/select" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order_id\": 1
}"
const url = new URL(
    "http://localhost/api/v1/shipping/quotes/16/select"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "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());

Example response (200):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

POST api/v1/shipping/quotes/{deliveryQuote_id}/select

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

deliveryQuote_id   integer     

The ID of the deliveryQuote. Example: 16

Body Parameters

order_id   integer  optional    

Order ID to attach the selected delivery quote to. رقم الطلب لربط عرض التوصيل المختار به. Must match an existing stored value. Example: 1

List shipments. عرض الشحنات.

requires authentication

Example request:
curl --request GET \
    --get "http://localhost/api/v1/shipping/shipments" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/shipping/shipments"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

GET api/v1/shipping/shipments

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

Create shipment. إنشاء شحنة.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/shipping/shipments" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order_id\": 1,
    \"delivery_id\": 1,
    \"store_id\": 1,
    \"delivery_company_id\": 1,
    \"delivery_quote_id\": 1,
    \"recipient_name\": \"Ayman Ahmed\",
    \"recipient_phone\": \"0500000000\",
    \"shipping_address\": {
        \"city\": \"Medina\",
        \"district\": \"Quba\"
    },
    \"shipping_fee\": 29,
    \"currency\": \"SAR\",
    \"estimated_delivery_at\": \"2026-06-19T03:07:42\"
}"
const url = new URL(
    "http://localhost/api/v1/shipping/shipments"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order_id": 1,
    "delivery_id": 1,
    "store_id": 1,
    "delivery_company_id": 1,
    "delivery_quote_id": 1,
    "recipient_name": "Ayman Ahmed",
    "recipient_phone": "0500000000",
    "shipping_address": {
        "city": "Medina",
        "district": "Quba"
    },
    "shipping_fee": 29,
    "currency": "SAR",
    "estimated_delivery_at": "2026-06-19T03:07:42"
};

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

Example response (201):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

POST api/v1/shipping/shipments

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

order_id   integer     

Order ID. رقم الطلب. Must match an existing stored value. Example: 1

delivery_id   integer  optional    

Internal delivery record ID if available. رقم سجل التوصيل الداخلي إن وجد. Must match an existing stored value. Example: 1

store_id   integer     

Store ID. رقم المتجر. Must match an existing stored value. Example: 1

delivery_company_id   integer     

Selected delivery company ID. رقم شركة التوصيل المختارة. Must match an existing stored value. Example: 1

delivery_quote_id   integer  optional    

Selected delivery quote ID. رقم عرض التوصيل المختار. Must match an existing stored value. Example: 1

recipient_name   string  optional    

Recipient full name. اسم المستلم. Must not be greater than 255 characters. Example: Ayman Ahmed

recipient_phone   string  optional    

Recipient phone number. رقم جوال المستلم. Must not be greater than 50 characters. Example: 0500000000

pickup_address   object  optional    
shipping_address   object  optional    

Shipping address object. بيانات عنوان التوصيل.

shipping_fee   number  optional    

Final shipping fee. تكلفة التوصيل النهائية. Must be at least 0. Example: 29

currency   string  optional    

Currency code. رمز العملة. Must be 3 characters. Example: SAR

estimated_delivery_at   string  optional    

Must be a valid date. Example: 2026-06-19T03:07:42

metadata   object  optional    

Show shipment details. عرض تفاصيل الشحنة.

requires authentication

Example request:
curl --request GET \
    --get "http://localhost/api/v1/shipping/shipments/16" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/shipping/shipments/16"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

GET api/v1/shipping/shipments/{shipment_id}

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

shipment_id   integer     

The ID of the shipment. Example: 16

Update shipment status. تحديث حالة الشحنة.

requires authentication

Example request:
curl --request PATCH \
    "http://localhost/api/v1/shipping/shipments/16/status" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"in_transit\",
    \"tracking_number\": \"TRK123456\",
    \"external_reference\": \"EXT-123\",
    \"label_url\": \"https:\\/\\/example.com\\/label.pdf\",
    \"note\": \"Shipment is on the way\",
    \"location\": \"Medina\"
}"
const url = new URL(
    "http://localhost/api/v1/shipping/shipments/16/status"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "status": "in_transit",
    "tracking_number": "TRK123456",
    "external_reference": "EXT-123",
    "label_url": "https:\/\/example.com\/label.pdf",
    "note": "Shipment is on the way",
    "location": "Medina"
};

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

Example response (200):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

PATCH api/v1/shipping/shipments/{shipment_id}/status

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

shipment_id   integer     

The ID of the shipment. Example: 16

Body Parameters

status   string     

New shipment status. حالة الشحنة الجديدة. Example: in_transit

Must be one of:
  • pending
  • submitted
  • accepted
  • picked_up
  • in_transit
  • delivered
  • failed
  • cancelled
  • returned
tracking_number   string  optional    

Provider tracking number. رقم التتبع. Must not be greater than 255 characters. Example: TRK123456

external_reference   string  optional    

External provider reference. مرجع شركة التوصيل الخارجي. Must not be greater than 255 characters. Example: EXT-123

label_url   string  optional    

Shipping label URL. رابط بوليصة الشحن. Must not be greater than 500 characters. Example: https://example.com/label.pdf

note   string  optional    

Status update note. ملاحظة تحديث الحالة. Example: Shipment is on the way

location   string  optional    

Current shipment location. موقع الشحنة الحالي. Must not be greater than 255 characters. Example: Medina

provider_payload   object  optional    
metadata   object  optional    

Add shipment tracking event. إضافة حدث تتبع للشحنة.

requires authentication

Example request:
curl --request POST \
    "http://localhost/api/v1/shipping/shipments/16/tracking-events" \
    --header "Authorization: Bearer {token}" \
    --header "X-Locale: ar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"in_transit\",
    \"title\": \"Shipment moved\",
    \"description\": \"Shipment left the sorting center.\",
    \"location\": \"Medina\",
    \"occurred_at\": \"2026-06-19 10:00:00\"
}"
const url = new URL(
    "http://localhost/api/v1/shipping/shipments/16/tracking-events"
);

const headers = {
    "Authorization": "Bearer {token}",
    "X-Locale": "ar",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "status": "in_transit",
    "title": "Shipment moved",
    "description": "Shipment left the sorting center.",
    "location": "Medina",
    "occurred_at": "2026-06-19 10:00:00"
};

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

Example response (201):


{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": {}
}
 

Request      

POST api/v1/shipping/shipments/{shipment_id}/tracking-events

Headers

Authorization        

Example: Bearer {token}

X-Locale        

Example: ar

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

shipment_id   integer     

The ID of the shipment. Example: 16

Body Parameters

status   string     

Tracking event status. حالة حدث التتبع. Example: in_transit

Must be one of:
  • draft
  • pending
  • submitted
  • accepted
  • picked_up
  • in_transit
  • delivered
  • failed
  • cancelled
  • returned
title   string  optional    

Tracking event title. عنوان حدث التتبع. Must not be greater than 255 characters. Example: Shipment moved

description   string  optional    

Tracking event description. وصف حدث التتبع. Example: Shipment left the sorting center.

location   string  optional    

Tracking event location. موقع حدث التتبع. Must not be greater than 255 characters. Example: Medina

occurred_at   string  optional    

When this event occurred. وقت حدوث هذا الحدث. Must be a valid date. Example: 2026-06-19 10:00:00

provider_payload   object  optional    
metadata   object  optional    

07. Payments / الدفع

Process payment gateway webhook

يستقبل إشعارات نجاح أو فشل الدفع من بوابة الدفع، ويحدّث الطلب والشحنة والإشعارات تلقائيًا.

Example request:
curl --request POST \
    "http://localhost/api/v1/payments/webhooks/moyasar" \
    --header "X-Hoota-Webhook-Secret: string Optional shared webhook secret when configured." \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"event_id\": \"evt_paid_123\",
    \"event_type\": \"payment.paid\",
    \"gateway\": \"architecto\",
    \"payment_transaction_id\": 1,
    \"transaction_number\": \"PAY-20260619-ABC123\",
    \"provider_transaction_id\": \"provider_tx_123\",
    \"provider_reference\": \"provider_ref_123\",
    \"provider_status\": \"paid\",
    \"amount\": 125.5,
    \"currency\": \"SAR\",
    \"failure_code\": \"card_declined\",
    \"failure_message\": \"Card was declined.\",
    \"payload\": {
        \"source\": \"gateway\"
    },
    \"metadata\": {
        \"environment\": \"sandbox\"
    }
}"
const url = new URL(
    "http://localhost/api/v1/payments/webhooks/moyasar"
);

const headers = {
    "X-Hoota-Webhook-Secret": "string Optional shared webhook secret when configured.",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "event_id": "evt_paid_123",
    "event_type": "payment.paid",
    "gateway": "architecto",
    "payment_transaction_id": 1,
    "transaction_number": "PAY-20260619-ABC123",
    "provider_transaction_id": "provider_tx_123",
    "provider_reference": "provider_ref_123",
    "provider_status": "paid",
    "amount": 125.5,
    "currency": "SAR",
    "failure_code": "card_declined",
    "failure_message": "Card was declined.",
    "payload": {
        "source": "gateway"
    },
    "metadata": {
        "environment": "sandbox"
    }
};

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

Example response (200):


{
    "success": true,
    "message": "تمت معالجة إشعار الدفع بنجاح",
    "data": {
        "event_id": "evt_paid_123",
        "status": "processed"
    },
    "meta": []
}
 

Example response (422):


{
    "success": false,
    "message": "تعذر مطابقة إشعار الدفع مع عملية دفع",
    "errors": {
        "payment": [
            "Payment transaction could not be found for this webhook."
        ]
    },
    "data": null,
    "meta": []
}
 

Request      

POST api/v1/payments/webhooks/{gateway}

Headers

X-Hoota-Webhook-Secret        

Example: string Optional shared webhook secret when configured.

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

gateway   string     

Payment gateway code. Example: moyasar

Body Parameters

event_id   string  optional    

Unique gateway event ID used for idempotency. Must not be greater than 255 characters. Example: evt_paid_123

event_type   string     

Gateway event type. Must not be greater than 255 characters. Example: payment.paid

gateway   string     

Example: architecto

Must be one of:
  • manual
  • moyasar
  • tap
  • hyperpay
payment_transaction_id   integer  optional    

Internal payment transaction ID when available. Must match an existing stored value. Example: 1

transaction_number   string  optional    

Internal payment transaction number. Must not be greater than 255 characters. Example: PAY-20260619-ABC123

provider_transaction_id   string  optional    

Transaction ID returned by the payment provider. Must not be greater than 255 characters. Example: provider_tx_123

provider_reference   string  optional    

Reference returned by the payment provider. Must not be greater than 255 characters. Example: provider_ref_123

provider_status   string  optional    

Raw provider payment status. Must not be greater than 255 characters. Example: paid

amount   number  optional    

Payment amount reported by the provider. Example: 125.5

currency   string  optional    

Three-letter currency code. Must not be greater than 3 characters. Example: SAR

failure_code   string  optional    

Provider failure code for failed events. Must not be greater than 255 characters. Example: card_declined

failure_message   string  optional    

Provider failure description. Example: Card was declined.

payload   object  optional    

Optional nested raw provider payload.

metadata   object  optional    

Optional integration metadata.

Endpoints

GET api/v1/admin/dashboard

Example request:
curl --request GET \
    --get "http://localhost/api/v1/admin/dashboard" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/admin/dashboard"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/admin/dashboard

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/reports/sales

Example request:
curl --request GET \
    --get "http://localhost/api/v1/admin/reports/sales" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/admin/reports/sales"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/admin/reports/sales

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/reports/orders

Example request:
curl --request GET \
    --get "http://localhost/api/v1/admin/reports/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/admin/reports/orders"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/admin/reports/orders

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/reports/vendors

Example request:
curl --request GET \
    --get "http://localhost/api/v1/admin/reports/vendors" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/admin/reports/vendors"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/admin/reports/vendors

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/reports/inventory

Example request:
curl --request GET \
    --get "http://localhost/api/v1/admin/reports/inventory" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/admin/reports/inventory"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/admin/reports/inventory

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/cart

Example request:
curl --request GET \
    --get "http://localhost/api/v1/cart" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/cart"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/cart

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/cart/items

Example request:
curl --request POST \
    "http://localhost/api/v1/cart/items" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"architecto\",
    \"quantity\": 22,
    \"options\": [
        {
            \"option_name\": \"g\",
            \"option_value\": \"z\",
            \"extra_price\": 77
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/cart/items"
);

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

let body = {
    "product_id": "architecto",
    "quantity": 22,
    "options": [
        {
            "option_name": "g",
            "option_value": "z",
            "extra_price": 77
        }
    ]
};

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

Request      

POST api/v1/cart/items

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

product_id   string     

Must match an existing stored value. Example: architecto

product_variant_id   string  optional    

Must match an existing stored value.

quantity   integer     

Must be at least 1. Example: 22

options   object[]  optional    
option_name   string  optional    

This field is required when options is present. Must not be greater than 255 characters. Example: g

option_value   string  optional    

This field is required when options is present. Must not be greater than 255 characters. Example: z

extra_price   number  optional    

Must be at least 0. Example: 77

PATCH api/v1/cart/items/{cartItem_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/cart/items/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quantity\": 16
}"
const url = new URL(
    "http://localhost/api/v1/cart/items/16"
);

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

let body = {
    "quantity": 16
};

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

Request      

PATCH api/v1/cart/items/{cartItem_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cartItem_id   integer     

The ID of the cartItem. Example: 16

Body Parameters

quantity   integer     

Must be at least 1. Example: 16

DELETE api/v1/cart/items/{cartItem_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/cart/items/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/cart/items/16"
);

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


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

Request      

DELETE api/v1/cart/items/{cartItem_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cartItem_id   integer     

The ID of the cartItem. Example: 16

POST api/v1/cart/apply-coupon

Example request:
curl --request POST \
    "http://localhost/api/v1/cart/apply-coupon" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/cart/apply-coupon"
);

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

let body = {
    "code": "architecto"
};

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

Request      

POST api/v1/cart/apply-coupon

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Must match an existing stored value. Example: architecto

DELETE api/v1/cart/remove-coupon

Example request:
curl --request DELETE \
    "http://localhost/api/v1/cart/remove-coupon" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/cart/remove-coupon"
);

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

let body = {
    "code": "architecto"
};

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

Request      

DELETE api/v1/cart/remove-coupon

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Must match an existing stored value. Example: architecto

POST api/v1/cart/recalculate

Example request:
curl --request POST \
    "http://localhost/api/v1/cart/recalculate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/cart/recalculate"
);

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


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

Request      

POST api/v1/cart/recalculate

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

DELETE api/v1/cart/clear

Example request:
curl --request DELETE \
    "http://localhost/api/v1/cart/clear" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/cart/clear"
);

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


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

Request      

DELETE api/v1/cart/clear

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/categories

Example request:
curl --request GET \
    --get "http://localhost/api/v1/categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/categories"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/categories

Example request:
curl --request POST \
    "http://localhost/api/v1/categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"image\": \"architecto\",
    \"sort_order\": 39,
    \"is_active\": true,
    \"translations\": [
        {
            \"locale\": \"ar\",
            \"name\": \"b\",
            \"description\": \"Eius et animi quos velit et.\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/categories"
);

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

let body = {
    "slug": "b",
    "image": "architecto",
    "sort_order": 39,
    "is_active": true,
    "translations": [
        {
            "locale": "ar",
            "name": "b",
            "description": "Eius et animi quos velit et."
        }
    ]
};

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

Request      

POST api/v1/categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

parent_id   string  optional    

Must match an existing stored value.

slug   string  optional    

Must not be greater than 255 characters. Example: b

image   string  optional    

Example: architecto

sort_order   integer  optional    

Must be at least 0. Example: 39

is_active   boolean  optional    

Example: true

translations   object[]     

Must have at least 1 items.

locale   string     

Example: ar

Must be one of:
  • ar
  • en
name   string     

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

GET api/v1/categories/{category_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/categories/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/categories/16"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/categories/{category_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

category_id   integer     

The ID of the category. Example: 16

PATCH api/v1/categories/{category_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/categories/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"image\": \"architecto\",
    \"sort_order\": 39,
    \"is_active\": false,
    \"translations\": [
        {
            \"locale\": \"en\",
            \"name\": \"g\",
            \"description\": \"Eius et animi quos velit et.\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/categories/16"
);

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

let body = {
    "slug": "b",
    "image": "architecto",
    "sort_order": 39,
    "is_active": false,
    "translations": [
        {
            "locale": "en",
            "name": "g",
            "description": "Eius et animi quos velit et."
        }
    ]
};

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

Request      

PATCH api/v1/categories/{category_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

category_id   integer     

The ID of the category. Example: 16

Body Parameters

parent_id   string  optional    

Must match an existing stored value.

slug   string  optional    

Must not be greater than 255 characters. Example: b

image   string  optional    

Example: architecto

sort_order   integer  optional    

Must be at least 0. Example: 39

is_active   boolean  optional    

Example: false

translations   object[]  optional    

Must have at least 1 items.

locale   string  optional    

This field is required when translations is present. Example: en

Must be one of:
  • ar
  • en
name   string  optional    

This field is required when translations is present. Must not be greater than 255 characters. Example: g

description   string  optional    

Example: Eius et animi quos velit et.

DELETE api/v1/categories/{category_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/categories/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/categories/16"
);

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


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

Request      

DELETE api/v1/categories/{category_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

category_id   integer     

The ID of the category. Example: 16

GET api/v1/brands

Example request:
curl --request GET \
    --get "http://localhost/api/v1/brands" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/brands"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/brands

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/brands

Example request:
curl --request POST \
    "http://localhost/api/v1/brands" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"logo\": \"architecto\",
    \"is_active\": true,
    \"translations\": [
        {
            \"locale\": \"en\",
            \"name\": \"b\",
            \"description\": \"Eius et animi quos velit et.\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/brands"
);

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

let body = {
    "slug": "b",
    "logo": "architecto",
    "is_active": true,
    "translations": [
        {
            "locale": "en",
            "name": "b",
            "description": "Eius et animi quos velit et."
        }
    ]
};

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

Request      

POST api/v1/brands

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

slug   string  optional    

Must not be greater than 255 characters. Example: b

logo   string  optional    

Example: architecto

is_active   boolean  optional    

Example: true

translations   object[]     

Must have at least 1 items.

locale   string     

Example: en

Must be one of:
  • ar
  • en
name   string     

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

GET api/v1/brands/{brand_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/brands/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/brands/16"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/brands/{brand_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

brand_id   integer     

The ID of the brand. Example: 16

PATCH api/v1/brands/{brand_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/brands/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"logo\": \"architecto\",
    \"is_active\": false,
    \"translations\": [
        {
            \"locale\": \"ar\",
            \"name\": \"n\",
            \"description\": \"Eius et animi quos velit et.\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/brands/16"
);

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

let body = {
    "slug": "b",
    "logo": "architecto",
    "is_active": false,
    "translations": [
        {
            "locale": "ar",
            "name": "n",
            "description": "Eius et animi quos velit et."
        }
    ]
};

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

Request      

PATCH api/v1/brands/{brand_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

brand_id   integer     

The ID of the brand. Example: 16

Body Parameters

slug   string  optional    

Must not be greater than 255 characters. Example: b

logo   string  optional    

Example: architecto

is_active   boolean  optional    

Example: false

translations   object[]  optional    

Must have at least 1 items.

locale   string  optional    

This field is required when translations is present. Example: ar

Must be one of:
  • ar
  • en
name   string  optional    

This field is required when translations is present. Must not be greater than 255 characters. Example: n

description   string  optional    

Example: Eius et animi quos velit et.

DELETE api/v1/brands/{brand_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/brands/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/brands/16"
);

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


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

Request      

DELETE api/v1/brands/{brand_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

brand_id   integer     

The ID of the brand. Example: 16

GET api/v1/attributes

Example request:
curl --request GET \
    --get "http://localhost/api/v1/attributes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/attributes"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/attributes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/attributes

Example request:
curl --request POST \
    "http://localhost/api/v1/attributes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"b\",
    \"type\": \"size\",
    \"is_filterable\": false,
    \"is_required\": false,
    \"sort_order\": 39,
    \"translations\": [
        {
            \"locale\": \"en\",
            \"name\": \"b\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/attributes"
);

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

let body = {
    "code": "b",
    "type": "size",
    "is_filterable": false,
    "is_required": false,
    "sort_order": 39,
    "translations": [
        {
            "locale": "en",
            "name": "b"
        }
    ]
};

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

Request      

POST api/v1/attributes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Must not be greater than 100 characters. Example: b

type   string     

Example: size

Must be one of:
  • text
  • color
  • size
  • number
  • select
  • boolean
is_filterable   boolean  optional    

Example: false

is_required   boolean  optional    

Example: false

sort_order   integer  optional    

Must be at least 0. Example: 39

translations   object[]     

Must have at least 1 items.

locale   string     

Example: en

Must be one of:
  • ar
  • en
name   string     

Must not be greater than 255 characters. Example: b

GET api/v1/attributes/{attribute_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/attributes/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/attributes/16"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/attributes/{attribute_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

attribute_id   integer     

The ID of the attribute. Example: 16

PATCH api/v1/attributes/{attribute_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/attributes/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"b\",
    \"type\": \"number\",
    \"is_filterable\": true,
    \"is_required\": true,
    \"sort_order\": 39,
    \"translations\": [
        {
            \"locale\": \"ar\",
            \"name\": \"g\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/attributes/16"
);

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

let body = {
    "code": "b",
    "type": "number",
    "is_filterable": true,
    "is_required": true,
    "sort_order": 39,
    "translations": [
        {
            "locale": "ar",
            "name": "g"
        }
    ]
};

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

Request      

PATCH api/v1/attributes/{attribute_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

attribute_id   integer     

The ID of the attribute. Example: 16

Body Parameters

code   string  optional    

Must not be greater than 100 characters. Example: b

type   string  optional    

Example: number

Must be one of:
  • text
  • color
  • size
  • number
  • select
  • boolean
is_filterable   boolean  optional    

Example: true

is_required   boolean  optional    

Example: true

sort_order   integer  optional    

Must be at least 0. Example: 39

translations   object[]  optional    

Must have at least 1 items.

locale   string  optional    

This field is required when translations is present. Example: ar

Must be one of:
  • ar
  • en
name   string  optional    

This field is required when translations is present. Must not be greater than 255 characters. Example: g

DELETE api/v1/attributes/{attribute_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/attributes/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/attributes/16"
);

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


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

Request      

DELETE api/v1/attributes/{attribute_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

attribute_id   integer     

The ID of the attribute. Example: 16

GET api/v1/attribute-values

Example request:
curl --request GET \
    --get "http://localhost/api/v1/attribute-values" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/attribute-values"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/attribute-values

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/attribute-values

Example request:
curl --request POST \
    "http://localhost/api/v1/attribute-values" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"attribute_id\": \"architecto\",
    \"code\": \"n\",
    \"color_code\": \"gzmiyvdljnikhway\",
    \"sort_order\": 62,
    \"is_active\": true,
    \"translations\": [
        {
            \"locale\": \"ar\",
            \"value\": \"b\",
            \"display_value\": \"n\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/attribute-values"
);

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

let body = {
    "attribute_id": "architecto",
    "code": "n",
    "color_code": "gzmiyvdljnikhway",
    "sort_order": 62,
    "is_active": true,
    "translations": [
        {
            "locale": "ar",
            "value": "b",
            "display_value": "n"
        }
    ]
};

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

Request      

POST api/v1/attribute-values

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

attribute_id   string     

Must match an existing stored value. Example: architecto

code   string  optional    

Must not be greater than 100 characters. Example: n

color_code   string  optional    

Must not be greater than 20 characters. Example: gzmiyvdljnikhway

sort_order   integer  optional    

Must be at least 0. Example: 62

is_active   boolean  optional    

Example: true

translations   object[]     

Must have at least 1 items.

locale   string     

Example: ar

Must be one of:
  • ar
  • en
value   string     

Must not be greater than 255 characters. Example: b

display_value   string  optional    

Must not be greater than 255 characters. Example: n

GET api/v1/attribute-values/{attributeValue_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/attribute-values/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/attribute-values/16"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/attribute-values/{attributeValue_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

attributeValue_id   integer     

The ID of the attributeValue. Example: 16

PATCH api/v1/attribute-values/{attributeValue_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/attribute-values/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"b\",
    \"color_code\": \"ngzmiyvdljnikhwa\",
    \"sort_order\": 50,
    \"is_active\": true,
    \"translations\": [
        {
            \"locale\": \"en\",
            \"value\": \"k\",
            \"display_value\": \"c\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/attribute-values/16"
);

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

let body = {
    "code": "b",
    "color_code": "ngzmiyvdljnikhwa",
    "sort_order": 50,
    "is_active": true,
    "translations": [
        {
            "locale": "en",
            "value": "k",
            "display_value": "c"
        }
    ]
};

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

Request      

PATCH api/v1/attribute-values/{attributeValue_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

attributeValue_id   integer     

The ID of the attributeValue. Example: 16

Body Parameters

attribute_id   string  optional    

Must match an existing stored value.

code   string  optional    

Must not be greater than 100 characters. Example: b

color_code   string  optional    

Must not be greater than 20 characters. Example: ngzmiyvdljnikhwa

sort_order   integer  optional    

Must be at least 0. Example: 50

is_active   boolean  optional    

Example: true

translations   object[]  optional    

Must have at least 1 items.

locale   string  optional    

This field is required when translations is present. Example: en

Must be one of:
  • ar
  • en
value   string  optional    

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

display_value   string  optional    

Must not be greater than 255 characters. Example: c

DELETE api/v1/attribute-values/{attributeValue_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/attribute-values/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/attribute-values/16"
);

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


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

Request      

DELETE api/v1/attribute-values/{attributeValue_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

attributeValue_id   integer     

The ID of the attributeValue. Example: 16

GET api/v1/products

Example request:
curl --request GET \
    --get "http://localhost/api/v1/products" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/products"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/products

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/products

Example request:
curl --request POST \
    "http://localhost/api/v1/products" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"store_id\": \"architecto\",
    \"slug\": \"n\",
    \"sku\": \"g\",
    \"barcode\": \"z\",
    \"type\": \"variable\",
    \"status\": \"active\",
    \"base_price\": 77,
    \"sale_price\": 8,
    \"sale_starts_at\": \"2026-06-19T03:07:42\",
    \"sale_ends_at\": \"2052-07-12\",
    \"is_featured\": false,
    \"is_digital\": true,
    \"translations\": [
        {
            \"locale\": \"en\",
            \"name\": \"n\",
            \"short_description\": \"architecto\",
            \"description\": \"Eius et animi quos velit et.\",
            \"meta_title\": \"v\",
            \"meta_description\": \"architecto\"
        }
    ],
    \"tags\": [
        \"b\"
    ]
}"
const url = new URL(
    "http://localhost/api/v1/products"
);

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

let body = {
    "store_id": "architecto",
    "slug": "n",
    "sku": "g",
    "barcode": "z",
    "type": "variable",
    "status": "active",
    "base_price": 77,
    "sale_price": 8,
    "sale_starts_at": "2026-06-19T03:07:42",
    "sale_ends_at": "2052-07-12",
    "is_featured": false,
    "is_digital": true,
    "translations": [
        {
            "locale": "en",
            "name": "n",
            "short_description": "architecto",
            "description": "Eius et animi quos velit et.",
            "meta_title": "v",
            "meta_description": "architecto"
        }
    ],
    "tags": [
        "b"
    ]
};

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

Request      

POST api/v1/products

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

store_id   string     

Must match an existing stored value. Example: architecto

category_id   string  optional    

Must match an existing stored value.

brand_id   string  optional    

Must match an existing stored value.

slug   string  optional    

Must not be greater than 255 characters. Example: n

sku   string  optional    

Must not be greater than 255 characters. Example: g

barcode   string  optional    

Must not be greater than 255 characters. Example: z

type   string     

Example: variable

Must be one of:
  • simple
  • variable
  • digital
status   string  optional    

Example: active

Must be one of:
  • draft
  • pending_review
  • active
  • inactive
  • rejected
  • archived
base_price   number     

Must be at least 0. Example: 77

sale_price   number  optional    

Must be at least 0. Example: 8

sale_starts_at   string  optional    

Must be a valid date. Example: 2026-06-19T03:07:42

sale_ends_at   string  optional    

Must be a valid date. Must be a date after or equal to sale_starts_at. Example: 2052-07-12

is_featured   boolean  optional    

Example: false

is_digital   boolean  optional    

Example: true

translations   object[]     

Must have at least 1 items.

locale   string     

Example: en

Must be one of:
  • ar
  • en
name   string     

Must not be greater than 255 characters. Example: n

short_description   string  optional    

Example: architecto

description   string  optional    

Example: Eius et animi quos velit et.

meta_title   string  optional    

Must not be greater than 255 characters. Example: v

meta_description   string  optional    

Example: architecto

tags   string[]  optional    

Must not be greater than 100 characters.

GET api/v1/products/{product_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/products/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/products/16"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/products/{product_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product_id   integer     

The ID of the product. Example: 16

PATCH api/v1/products/{product_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/products/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slug\": \"b\",
    \"sku\": \"n\",
    \"barcode\": \"g\",
    \"type\": \"simple\",
    \"status\": \"pending_review\",
    \"base_price\": 12,
    \"sale_price\": 77,
    \"sale_starts_at\": \"2026-06-19T03:07:42\",
    \"sale_ends_at\": \"2052-07-12\",
    \"is_featured\": false,
    \"is_digital\": false,
    \"tags\": [
        \"n\"
    ],
    \"translations\": [
        {
            \"locale\": \"ar\",
            \"name\": \"g\",
            \"short_description\": \"architecto\",
            \"description\": \"Eius et animi quos velit et.\",
            \"meta_title\": \"v\",
            \"meta_description\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/products/16"
);

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

let body = {
    "slug": "b",
    "sku": "n",
    "barcode": "g",
    "type": "simple",
    "status": "pending_review",
    "base_price": 12,
    "sale_price": 77,
    "sale_starts_at": "2026-06-19T03:07:42",
    "sale_ends_at": "2052-07-12",
    "is_featured": false,
    "is_digital": false,
    "tags": [
        "n"
    ],
    "translations": [
        {
            "locale": "ar",
            "name": "g",
            "short_description": "architecto",
            "description": "Eius et animi quos velit et.",
            "meta_title": "v",
            "meta_description": "architecto"
        }
    ]
};

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

Request      

PATCH api/v1/products/{product_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product_id   integer     

The ID of the product. Example: 16

Body Parameters

store_id   string  optional    

Must match an existing stored value.

category_id   string  optional    

Must match an existing stored value.

brand_id   string  optional    

Must match an existing stored value.

slug   string  optional    

Must not be greater than 255 characters. Example: b

sku   string  optional    

Must not be greater than 255 characters. Example: n

barcode   string  optional    

Must not be greater than 255 characters. Example: g

type   string  optional    

Example: simple

Must be one of:
  • simple
  • variable
  • digital
status   string  optional    

Example: pending_review

Must be one of:
  • draft
  • pending_review
  • active
  • inactive
  • rejected
  • archived
base_price   number  optional    

Must be at least 0. Example: 12

sale_price   number  optional    

Must be at least 0. Example: 77

sale_starts_at   string  optional    

Must be a valid date. Example: 2026-06-19T03:07:42

sale_ends_at   string  optional    

Must be a valid date. Must be a date after or equal to sale_starts_at. Example: 2052-07-12

is_featured   boolean  optional    

Example: false

is_digital   boolean  optional    

Example: false

translations   object[]  optional    

Must have at least 1 items.

locale   string  optional    

This field is required when translations is present. Example: ar

Must be one of:
  • ar
  • en
name   string  optional    

This field is required when translations is present. Must not be greater than 255 characters. Example: g

short_description   string  optional    

Example: architecto

description   string  optional    

Example: Eius et animi quos velit et.

meta_title   string  optional    

Must not be greater than 255 characters. Example: v

meta_description   string  optional    

Example: architecto

tags   string[]  optional    

Must not be greater than 100 characters.

DELETE api/v1/products/{product_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/products/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/products/16"
);

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


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

Request      

DELETE api/v1/products/{product_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product_id   integer     

The ID of the product. Example: 16

POST api/v1/product-variants

Example request:
curl --request POST \
    "http://localhost/api/v1/product-variants" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"architecto\",
    \"sku\": \"n\",
    \"barcode\": \"g\",
    \"price\": 12,
    \"sale_price\": 77,
    \"weight\": 8,
    \"status\": \"active\",
    \"values\": [
        {
            \"attribute_id\": \"architecto\",
            \"attribute_value_id\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/product-variants"
);

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

let body = {
    "product_id": "architecto",
    "sku": "n",
    "barcode": "g",
    "price": 12,
    "sale_price": 77,
    "weight": 8,
    "status": "active",
    "values": [
        {
            "attribute_id": "architecto",
            "attribute_value_id": "architecto"
        }
    ]
};

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

Request      

POST api/v1/product-variants

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

product_id   string     

Must match an existing stored value. Example: architecto

sku   string  optional    

Must not be greater than 255 characters. Example: n

barcode   string  optional    

Must not be greater than 255 characters. Example: g

price   number     

Must be at least 0. Example: 12

sale_price   number  optional    

Must be at least 0. Example: 77

weight   number  optional    

Must be at least 0. Example: 8

status   string  optional    

Example: active

Must be one of:
  • active
  • inactive
  • archived
values   object[]  optional    
attribute_id   string     

Must match an existing stored value. Example: architecto

attribute_value_id   string     

Must match an existing stored value. Example: architecto

PATCH api/v1/product-variants/{variant_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/product-variants/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sku\": \"b\",
    \"barcode\": \"n\",
    \"price\": 84,
    \"sale_price\": 12,
    \"weight\": 77,
    \"status\": \"inactive\",
    \"values\": [
        {
            \"attribute_id\": \"architecto\",
            \"attribute_value_id\": \"architecto\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/product-variants/16"
);

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

let body = {
    "sku": "b",
    "barcode": "n",
    "price": 84,
    "sale_price": 12,
    "weight": 77,
    "status": "inactive",
    "values": [
        {
            "attribute_id": "architecto",
            "attribute_value_id": "architecto"
        }
    ]
};

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

Request      

PATCH api/v1/product-variants/{variant_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

variant_id   integer     

The ID of the variant. Example: 16

Body Parameters

product_id   string  optional    

Must match an existing stored value.

sku   string  optional    

Must not be greater than 255 characters. Example: b

barcode   string  optional    

Must not be greater than 255 characters. Example: n

price   number  optional    

Must be at least 0. Example: 84

sale_price   number  optional    

Must be at least 0. Example: 12

weight   number  optional    

Must be at least 0. Example: 77

status   string  optional    

Example: inactive

Must be one of:
  • active
  • inactive
  • archived
values   object[]  optional    
attribute_id   string     

Must match an existing stored value. Example: architecto

attribute_value_id   string     

Must match an existing stored value. Example: architecto

DELETE api/v1/product-variants/{variant_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/product-variants/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/product-variants/16"
);

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


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

Request      

DELETE api/v1/product-variants/{variant_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

variant_id   integer     

The ID of the variant. Example: 16

POST api/v1/product-images

Example request:
curl --request POST \
    "http://localhost/api/v1/product-images" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"architecto\",
    \"image_path\": \"architecto\",
    \"alt_text\": \"n\",
    \"sort_order\": 84,
    \"is_primary\": true
}"
const url = new URL(
    "http://localhost/api/v1/product-images"
);

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

let body = {
    "product_id": "architecto",
    "image_path": "architecto",
    "alt_text": "n",
    "sort_order": 84,
    "is_primary": true
};

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

Request      

POST api/v1/product-images

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

product_id   string     

Must match an existing stored value. Example: architecto

product_variant_id   string  optional    

Must match an existing stored value.

image_path   string     

Example: architecto

alt_text   string  optional    

Must not be greater than 255 characters. Example: n

sort_order   integer  optional    

Must be at least 0. Example: 84

is_primary   boolean  optional    

Example: true

DELETE api/v1/product-images/{image_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/product-images/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/product-images/16"
);

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


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

Request      

DELETE api/v1/product-images/{image_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

image_id   integer     

The ID of the image. Example: 16

POST api/v1/checkout/session

Example request:
curl --request POST \
    "http://localhost/api/v1/checkout/session" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/checkout/session"
);

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


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

Request      

POST api/v1/checkout/session

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/checkout/place-order

Example request:
curl --request POST \
    "http://localhost/api/v1/checkout/place-order" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"customer_name\": \"b\",
    \"customer_email\": \"zbailey@example.net\",
    \"customer_phone\": \"i\",
    \"notes\": \"architecto\",
    \"delivery_quote_id\": 16,
    \"shipping_address\": {
        \"name\": \"b\",
        \"phone\": \"n\",
        \"country\": \"gz\",
        \"city\": \"m\",
        \"district\": \"i\",
        \"address_line\": \"architecto\",
        \"postal_code\": \"n\",
        \"latitude\": 4326.41688,
        \"longitude\": 4326.41688
    }
}"
const url = new URL(
    "http://localhost/api/v1/checkout/place-order"
);

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

let body = {
    "customer_name": "b",
    "customer_email": "zbailey@example.net",
    "customer_phone": "i",
    "notes": "architecto",
    "delivery_quote_id": 16,
    "shipping_address": {
        "name": "b",
        "phone": "n",
        "country": "gz",
        "city": "m",
        "district": "i",
        "address_line": "architecto",
        "postal_code": "n",
        "latitude": 4326.41688,
        "longitude": 4326.41688
    }
};

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

Request      

POST api/v1/checkout/place-order

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

customer_name   string     

Must not be greater than 255 characters. Example: b

customer_email   string  optional    

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

customer_phone   string     

Must not be greater than 50 characters. Example: i

notes   string  optional    

Example: architecto

delivery_quote_id   integer  optional    

Must match an existing stored value. Example: 16

shipping_address   object     
name   string  optional    

Must not be greater than 255 characters. Example: b

phone   string  optional    

Must not be greater than 50 characters. Example: n

country   string  optional    

Must not be greater than 2 characters. Example: gz

city   string     

Must not be greater than 255 characters. Example: m

district   string  optional    

Must not be greater than 255 characters. Example: i

address_line   string     

Example: architecto

postal_code   string  optional    

Must not be greater than 50 characters. Example: n

latitude   number  optional    

Example: 4326.41688

longitude   number  optional    

Example: 4326.41688

GET api/v1/coupons

Example request:
curl --request GET \
    --get "http://localhost/api/v1/coupons" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/coupons"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/coupons

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/coupons

Example request:
curl --request POST \
    "http://localhost/api/v1/coupons" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"b\",
    \"type\": \"percentage\",
    \"value\": 39,
    \"max_discount_amount\": 84,
    \"minimum_order_amount\": 12,
    \"usage_limit\": 27,
    \"usage_limit_per_user\": 35,
    \"starts_at\": \"2026-06-19T03:07:42\",
    \"expires_at\": \"2052-07-12\",
    \"status\": \"archived\",
    \"rules\": [
        {
            \"rule_type\": \"minimum_order\",
            \"operator\": \"n\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/coupons"
);

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

let body = {
    "code": "b",
    "type": "percentage",
    "value": 39,
    "max_discount_amount": 84,
    "minimum_order_amount": 12,
    "usage_limit": 27,
    "usage_limit_per_user": 35,
    "starts_at": "2026-06-19T03:07:42",
    "expires_at": "2052-07-12",
    "status": "archived",
    "rules": [
        {
            "rule_type": "minimum_order",
            "operator": "n"
        }
    ]
};

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

Request      

POST api/v1/coupons

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Must not be greater than 100 characters. Example: b

type   string     

Example: percentage

Must be one of:
  • percentage
  • fixed_amount
  • free_shipping
value   number     

Must be at least 0. Example: 39

max_discount_amount   number  optional    

Must be at least 0. Example: 84

minimum_order_amount   number  optional    

Must be at least 0. Example: 12

usage_limit   integer  optional    

Must be at least 1. Example: 27

usage_limit_per_user   integer  optional    

Must be at least 1. Example: 35

starts_at   string  optional    

Must be a valid date. Example: 2026-06-19T03:07:42

expires_at   string  optional    

Must be a valid date. Must be a date after or equal to starts_at. Example: 2052-07-12

status   string  optional    

Example: archived

Must be one of:
  • active
  • inactive
  • expired
  • archived
rules   object[]  optional    
rule_type   string  optional    

This field is required when rules is present. Example: minimum_order

Must be one of:
  • store
  • category
  • product
  • first_order
  • minimum_order
  • city
  • user
operator   string  optional    

Must not be greater than 50 characters. Example: n

value   string  optional    

GET api/v1/coupons/{coupon_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/coupons/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/coupons/16"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/coupons/{coupon_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

coupon_id   integer     

The ID of the coupon. Example: 16

PATCH api/v1/coupons/{coupon_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/coupons/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"b\",
    \"type\": \"fixed_amount\",
    \"value\": 39,
    \"max_discount_amount\": 84,
    \"minimum_order_amount\": 12,
    \"usage_limit\": 27,
    \"usage_limit_per_user\": 35,
    \"starts_at\": \"2026-06-19T03:07:42\",
    \"expires_at\": \"2052-07-12\",
    \"status\": \"inactive\",
    \"rules\": [
        {
            \"rule_type\": \"first_order\",
            \"operator\": \"n\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/coupons/16"
);

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

let body = {
    "code": "b",
    "type": "fixed_amount",
    "value": 39,
    "max_discount_amount": 84,
    "minimum_order_amount": 12,
    "usage_limit": 27,
    "usage_limit_per_user": 35,
    "starts_at": "2026-06-19T03:07:42",
    "expires_at": "2052-07-12",
    "status": "inactive",
    "rules": [
        {
            "rule_type": "first_order",
            "operator": "n"
        }
    ]
};

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

Request      

PATCH api/v1/coupons/{coupon_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

coupon_id   integer     

The ID of the coupon. Example: 16

Body Parameters

code   string  optional    

Must not be greater than 100 characters. Example: b

type   string  optional    

Example: fixed_amount

Must be one of:
  • percentage
  • fixed_amount
  • free_shipping
value   number  optional    

Must be at least 0. Example: 39

max_discount_amount   number  optional    

Must be at least 0. Example: 84

minimum_order_amount   number  optional    

Must be at least 0. Example: 12

usage_limit   integer  optional    

Must be at least 1. Example: 27

usage_limit_per_user   integer  optional    

Must be at least 1. Example: 35

starts_at   string  optional    

Must be a valid date. Example: 2026-06-19T03:07:42

expires_at   string  optional    

Must be a valid date. Must be a date after or equal to starts_at. Example: 2052-07-12

status   string  optional    

Example: inactive

Must be one of:
  • active
  • inactive
  • expired
  • archived
rules   object[]  optional    
rule_type   string  optional    

This field is required when rules is present. Example: first_order

Must be one of:
  • store
  • category
  • product
  • first_order
  • minimum_order
  • city
  • user
operator   string  optional    

Must not be greater than 50 characters. Example: n

value   string  optional    

DELETE api/v1/coupons/{coupon_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/coupons/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/coupons/16"
);

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


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

Request      

DELETE api/v1/coupons/{coupon_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

coupon_id   integer     

The ID of the coupon. Example: 16

GET api/v1/deliveries

Example request:
curl --request GET \
    --get "http://localhost/api/v1/deliveries" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/deliveries"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/deliveries

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/deliveries

Example request:
curl --request POST \
    "http://localhost/api/v1/deliveries" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order_id\": \"architecto\",
    \"delivery_method\": \"pickup\",
    \"delivery_fee\": 39,
    \"distance_km\": 84,
    \"notes\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/deliveries"
);

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

let body = {
    "order_id": "architecto",
    "delivery_method": "pickup",
    "delivery_fee": 39,
    "distance_km": 84,
    "notes": "architecto"
};

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

Request      

POST api/v1/deliveries

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

order_id   string     

Must match an existing stored value. Example: architecto

delivery_method   string  optional    

Example: pickup

Must be one of:
  • driver
  • pickup
  • shipping_company
delivery_fee   number  optional    

Must be at least 0. Example: 39

distance_km   number  optional    

Must be at least 0. Example: 84

notes   string  optional    

Example: architecto

GET api/v1/deliveries/{delivery_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/deliveries/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/deliveries/16"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/deliveries/{delivery_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

delivery_id   integer     

The ID of the delivery. Example: 16

POST api/v1/deliveries/{delivery_id}/assign-driver

Example request:
curl --request POST \
    "http://localhost/api/v1/deliveries/16/assign-driver" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"driver_id\": \"architecto\",
    \"reason\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/deliveries/16/assign-driver"
);

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

let body = {
    "driver_id": "architecto",
    "reason": "architecto"
};

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

Request      

POST api/v1/deliveries/{delivery_id}/assign-driver

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

delivery_id   integer     

The ID of the delivery. Example: 16

Body Parameters

driver_id   string     

Must match an existing stored value. Example: architecto

reason   string  optional    

Example: architecto

PATCH api/v1/deliveries/{delivery_id}/status

Example request:
curl --request PATCH \
    "http://localhost/api/v1/deliveries/16/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"out_for_delivery\",
    \"note\": \"architecto\",
    \"failure_reason\": \"architecto\",
    \"latitude\": 4326.41688,
    \"longitude\": 4326.41688
}"
const url = new URL(
    "http://localhost/api/v1/deliveries/16/status"
);

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

let body = {
    "status": "out_for_delivery",
    "note": "architecto",
    "failure_reason": "architecto",
    "latitude": 4326.41688,
    "longitude": 4326.41688
};

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

Request      

PATCH api/v1/deliveries/{delivery_id}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

delivery_id   integer     

The ID of the delivery. Example: 16

Body Parameters

status   string     

Example: out_for_delivery

Must be one of:
  • pending
  • assigned
  • picked_up
  • out_for_delivery
  • delivered
  • failed
  • cancelled
note   string  optional    

Example: architecto

failure_reason   string  optional    

This field is required when status is failed. Example: architecto

latitude   number  optional    

Example: 4326.41688

longitude   number  optional    

Example: 4326.41688

GET api/v1/drivers

Example request:
curl --request GET \
    --get "http://localhost/api/v1/drivers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/drivers"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/drivers

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/drivers

Example request:
curl --request POST \
    "http://localhost/api/v1/drivers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": \"architecto\",
    \"vehicle_type\": \"n\",
    \"vehicle_plate_number\": \"g\",
    \"license_number\": \"z\",
    \"status\": \"rejected\",
    \"availability_status\": \"offline\",
    \"is_active\": false
}"
const url = new URL(
    "http://localhost/api/v1/drivers"
);

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

let body = {
    "user_id": "architecto",
    "vehicle_type": "n",
    "vehicle_plate_number": "g",
    "license_number": "z",
    "status": "rejected",
    "availability_status": "offline",
    "is_active": false
};

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

Request      

POST api/v1/drivers

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

user_id   string     

Must match an existing stored value. Example: architecto

vehicle_type   string  optional    

Must not be greater than 255 characters. Example: n

vehicle_plate_number   string  optional    

Must not be greater than 255 characters. Example: g

license_number   string  optional    

Must not be greater than 255 characters. Example: z

status   string  optional    

Example: rejected

Must be one of:
  • pending
  • approved
  • rejected
  • suspended
availability_status   string  optional    

Example: offline

Must be one of:
  • offline
  • online
  • busy
is_active   boolean  optional    

Example: false

GET api/v1/drivers/{driver_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/drivers/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/drivers/16"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/drivers/{driver_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

driver_id   integer     

The ID of the driver. Example: 16

PATCH api/v1/drivers/{driver_id}/status

Example request:
curl --request PATCH \
    "http://localhost/api/v1/drivers/16/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"rejected\",
    \"reason\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/drivers/16/status"
);

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

let body = {
    "status": "rejected",
    "reason": "architecto"
};

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

Request      

PATCH api/v1/drivers/{driver_id}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

driver_id   integer     

The ID of the driver. Example: 16

Body Parameters

status   string     

Example: rejected

Must be one of:
  • pending
  • approved
  • rejected
  • suspended
reason   string  optional    

Example: architecto

PATCH api/v1/drivers/{driver_id}/availability

Example request:
curl --request PATCH \
    "http://localhost/api/v1/drivers/16/availability" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"availability_status\": \"busy\"
}"
const url = new URL(
    "http://localhost/api/v1/drivers/16/availability"
);

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

let body = {
    "availability_status": "busy"
};

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

Request      

PATCH api/v1/drivers/{driver_id}/availability

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

driver_id   integer     

The ID of the driver. Example: 16

Body Parameters

availability_status   string     

Example: busy

Must be one of:
  • offline
  • online
  • busy

PATCH api/v1/drivers/{driver_id}/location

Example request:
curl --request PATCH \
    "http://localhost/api/v1/drivers/16/location" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"latitude\": 4326.41688,
    \"longitude\": 4326.41688
}"
const url = new URL(
    "http://localhost/api/v1/drivers/16/location"
);

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

let body = {
    "latitude": 4326.41688,
    "longitude": 4326.41688
};

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

Request      

PATCH api/v1/drivers/{driver_id}/location

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

driver_id   integer     

The ID of the driver. Example: 16

Body Parameters

latitude   number     

Example: 4326.41688

longitude   number     

Example: 4326.41688

POST api/v1/drivers/{driver_id}/documents

Example request:
curl --request POST \
    "http://localhost/api/v1/drivers/16/documents" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"vehicle_registration\",
    \"file_path\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/drivers/16/documents"
);

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

let body = {
    "type": "vehicle_registration",
    "file_path": "architecto"
};

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

Request      

POST api/v1/drivers/{driver_id}/documents

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

driver_id   integer     

The ID of the driver. Example: 16

Body Parameters

type   string     

Example: vehicle_registration

Must be one of:
  • national_id
  • driving_license
  • vehicle_registration
  • vehicle_insurance
  • profile_photo
file_path   string     

Example: architecto

PATCH api/v1/driver-documents/{driverDocument_id}/review

Example request:
curl --request PATCH \
    "http://localhost/api/v1/driver-documents/16/review" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"approved\",
    \"rejection_reason\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/driver-documents/16/review"
);

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

let body = {
    "status": "approved",
    "rejection_reason": "architecto"
};

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

Request      

PATCH api/v1/driver-documents/{driverDocument_id}/review

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

driverDocument_id   integer     

The ID of the driverDocument. Example: 16

Body Parameters

status   string     

Example: approved

Must be one of:
  • approved
  • rejected
rejection_reason   string  optional    

This field is required when status is rejected. Example: architecto

GET api/v1/engagement/wishlist

Example request:
curl --request GET \
    --get "http://localhost/api/v1/engagement/wishlist" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/engagement/wishlist"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/engagement/wishlist

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/engagement/wishlist

Example request:
curl --request POST \
    "http://localhost/api/v1/engagement/wishlist" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": 16,
    \"notes\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/engagement/wishlist"
);

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

let body = {
    "product_id": 16,
    "notes": "architecto"
};

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

Request      

POST api/v1/engagement/wishlist

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

product_id   integer     

Must match an existing stored value. Example: 16

notes   string  optional    

Example: architecto

DELETE api/v1/engagement/wishlist/{wishlistItem_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/engagement/wishlist/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/engagement/wishlist/16"
);

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


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

Request      

DELETE api/v1/engagement/wishlist/{wishlistItem_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wishlistItem_id   integer     

The ID of the wishlistItem. Example: 16

GET api/v1/engagement/favorites

Example request:
curl --request GET \
    --get "http://localhost/api/v1/engagement/favorites" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/engagement/favorites"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/engagement/favorites

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/engagement/favorites

Example request:
curl --request POST \
    "http://localhost/api/v1/engagement/favorites" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"favoritable_type\": \"driver\",
    \"favoritable_id\": 16,
    \"type\": \"favorite\"
}"
const url = new URL(
    "http://localhost/api/v1/engagement/favorites"
);

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

let body = {
    "favoritable_type": "driver",
    "favoritable_id": 16,
    "type": "favorite"
};

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

Request      

POST api/v1/engagement/favorites

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

favoritable_type   string     

Example: driver

Must be one of:
  • product
  • store
  • driver
favoritable_id   integer     

Example: 16

type   string  optional    

Example: favorite

Must be one of:
  • favorite
metadata   object  optional    

DELETE api/v1/engagement/favorites/{favorite_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/engagement/favorites/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/engagement/favorites/16"
);

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


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

Request      

DELETE api/v1/engagement/favorites/{favorite_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

favorite_id   integer     

The ID of the favorite. Example: 16

GET api/v1/engagement/recently-viewed

Example request:
curl --request GET \
    --get "http://localhost/api/v1/engagement/recently-viewed" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/engagement/recently-viewed"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/engagement/recently-viewed

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/engagement/recently-viewed

Example request:
curl --request POST \
    "http://localhost/api/v1/engagement/recently-viewed" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"viewable_type\": \"store\",
    \"viewable_id\": 16
}"
const url = new URL(
    "http://localhost/api/v1/engagement/recently-viewed"
);

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

let body = {
    "viewable_type": "store",
    "viewable_id": 16
};

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

Request      

POST api/v1/engagement/recently-viewed

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

viewable_type   string     

Example: store

Must be one of:
  • product
  • store
  • driver
viewable_id   integer     

Example: 16

metadata   object  optional    

DELETE api/v1/engagement/recently-viewed

Example request:
curl --request DELETE \
    "http://localhost/api/v1/engagement/recently-viewed" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/engagement/recently-viewed"
);

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


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

Request      

DELETE api/v1/engagement/recently-viewed

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/finance/wallets

Example request:
curl --request GET \
    --get "http://localhost/api/v1/finance/wallets" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/finance/wallets"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/finance/wallets

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/finance/wallets/{wallet_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/finance/wallets/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/finance/wallets/16"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/finance/wallets/{wallet_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 16

GET api/v1/finance/wallets/{wallet_id}/transactions

Example request:
curl --request GET \
    --get "http://localhost/api/v1/finance/wallets/16/transactions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/finance/wallets/16/transactions"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/finance/wallets/{wallet_id}/transactions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

wallet_id   integer     

The ID of the wallet. Example: 16

GET api/v1/finance/commission-rules

Example request:
curl --request GET \
    --get "http://localhost/api/v1/finance/commission-rules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/finance/commission-rules"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/finance/commission-rules

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/finance/commission-rules

Example request:
curl --request POST \
    "http://localhost/api/v1/finance/commission-rules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"percentage\",
    \"value\": 27,
    \"is_active\": false
}"
const url = new URL(
    "http://localhost/api/v1/finance/commission-rules"
);

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

let body = {
    "type": "percentage",
    "value": 27,
    "is_active": false
};

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

Request      

POST api/v1/finance/commission-rules

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

vendor_id   string  optional    

Must match an existing stored value.

store_id   string  optional    

Must match an existing stored value.

type   string     

Example: percentage

Must be one of:
  • percentage
  • fixed
value   number     

Must be at least 0. Example: 27

is_active   boolean  optional    

Example: false

GET api/v1/finance/payout-requests

Example request:
curl --request GET \
    --get "http://localhost/api/v1/finance/payout-requests" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/finance/payout-requests"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/finance/payout-requests

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/finance/payout-requests

Example request:
curl --request POST \
    "http://localhost/api/v1/finance/payout-requests" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"wallet_id\": \"architecto\",
    \"amount\": 4326.41688,
    \"note\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/finance/payout-requests"
);

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

let body = {
    "wallet_id": "architecto",
    "amount": 4326.41688,
    "note": "architecto"
};

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

Request      

POST api/v1/finance/payout-requests

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

wallet_id   string     

Must match an existing stored value. Example: architecto

amount   number     

Example: 4326.41688

note   string  optional    

Example: architecto

PATCH api/v1/finance/payout-requests/{payoutRequest_id}/status

Example request:
curl --request PATCH \
    "http://localhost/api/v1/finance/payout-requests/16/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"pending\",
    \"note\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/finance/payout-requests/16/status"
);

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

let body = {
    "status": "pending",
    "note": "architecto"
};

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

Request      

PATCH api/v1/finance/payout-requests/{payoutRequest_id}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

payoutRequest_id   integer     

The ID of the payoutRequest. Example: 16

Body Parameters

status   string     

Example: pending

Must be one of:
  • pending
  • approved
  • rejected
  • paid
note   string  optional    

Example: architecto

GET api/v1/warehouses

Example request:
curl --request GET \
    --get "http://localhost/api/v1/warehouses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/warehouses"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/warehouses

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/warehouses

Example request:
curl --request POST \
    "http://localhost/api/v1/warehouses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"store_id\": \"architecto\",
    \"name\": \"n\",
    \"city\": \"g\",
    \"address\": \"architecto\",
    \"latitude\": 4326.41688,
    \"longitude\": 4326.41688,
    \"is_active\": true
}"
const url = new URL(
    "http://localhost/api/v1/warehouses"
);

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

let body = {
    "store_id": "architecto",
    "name": "n",
    "city": "g",
    "address": "architecto",
    "latitude": 4326.41688,
    "longitude": 4326.41688,
    "is_active": true
};

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

Request      

POST api/v1/warehouses

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

store_id   string     

Must match an existing stored value. Example: architecto

name   string     

Must not be greater than 255 characters. Example: n

city   string  optional    

Must not be greater than 255 characters. Example: g

address   string  optional    

Example: architecto

latitude   number  optional    

Example: 4326.41688

longitude   number  optional    

Example: 4326.41688

is_active   boolean  optional    

Example: true

GET api/v1/warehouses/{warehouse_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/warehouses/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/warehouses/16"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/warehouses/{warehouse_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

warehouse_id   integer     

The ID of the warehouse. Example: 16

PATCH api/v1/warehouses/{warehouse_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/warehouses/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"city\": \"n\",
    \"address\": \"architecto\",
    \"latitude\": 4326.41688,
    \"longitude\": 4326.41688,
    \"is_active\": true
}"
const url = new URL(
    "http://localhost/api/v1/warehouses/16"
);

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

let body = {
    "name": "b",
    "city": "n",
    "address": "architecto",
    "latitude": 4326.41688,
    "longitude": 4326.41688,
    "is_active": true
};

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

Request      

PATCH api/v1/warehouses/{warehouse_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

warehouse_id   integer     

The ID of the warehouse. Example: 16

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

city   string  optional    

Must not be greater than 255 characters. Example: n

address   string  optional    

Example: architecto

latitude   number  optional    

Example: 4326.41688

longitude   number  optional    

Example: 4326.41688

is_active   boolean  optional    

Example: true

DELETE api/v1/warehouses/{warehouse_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/warehouses/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/warehouses/16"
);

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


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

Request      

DELETE api/v1/warehouses/{warehouse_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

warehouse_id   integer     

The ID of the warehouse. Example: 16

GET api/v1/inventories

Example request:
curl --request GET \
    --get "http://localhost/api/v1/inventories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/inventories"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/inventories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/inventories

Example request:
curl --request POST \
    "http://localhost/api/v1/inventories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"warehouse_id\": \"architecto\",
    \"product_id\": \"architecto\",
    \"quantity\": 39,
    \"reserved_quantity\": 84,
    \"low_stock_threshold\": 12
}"
const url = new URL(
    "http://localhost/api/v1/inventories"
);

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

let body = {
    "warehouse_id": "architecto",
    "product_id": "architecto",
    "quantity": 39,
    "reserved_quantity": 84,
    "low_stock_threshold": 12
};

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

Request      

POST api/v1/inventories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

warehouse_id   string     

Must match an existing stored value. Example: architecto

product_id   string     

Must match an existing stored value. Example: architecto

product_variant_id   string  optional    

Must match an existing stored value.

quantity   integer  optional    

Must be at least 0. Example: 39

reserved_quantity   integer  optional    

Must be at least 0. Example: 84

low_stock_threshold   integer  optional    

Must be at least 0. Example: 12

GET api/v1/inventories/{inventory_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/inventories/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/inventories/16"
);

const headers = {
    "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,
    "message": "يجب تسجيل الدخول أولاً",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/inventories/{inventory_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

inventory_id   integer     

The ID of the inventory. Example: 16

POST api/v1/inventories/{inventory_id}/adjust

Example request:
curl --request POST \
    "http://localhost/api/v1/inventories/16/adjust" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"damage\",
    \"quantity\": 16,
    \"note\": \"architecto\",
    \"reference_type\": \"n\",
    \"reference_id\": 16
}"
const url = new URL(
    "http://localhost/api/v1/inventories/16/adjust"
);

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

let body = {
    "type": "damage",
    "quantity": 16,
    "note": "architecto",
    "reference_type": "n",
    "reference_id": 16
};

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

Request      

POST api/v1/inventories/{inventory_id}/adjust

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

inventory_id   integer     

The ID of the inventory. Example: 16

Body Parameters

type   string     

Example: damage

Must be one of:
  • purchase
  • sale
  • return
  • manual_adjustment
  • reservation
  • reservation_release
  • damage
  • correction
quantity   integer     

Example: 16

note   string  optional    

Example: architecto

reference_type   string  optional    

Must not be greater than 255 characters. Example: n

reference_id   integer  optional    

Example: 16

POST api/v1/stock-reservations

Example request:
curl --request POST \
    "http://localhost/api/v1/stock-reservations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"inventory_id\": \"architecto\",
    \"quantity\": 22,
    \"expires_at\": \"2026-06-19T03:07:42\"
}"
const url = new URL(
    "http://localhost/api/v1/stock-reservations"
);

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

let body = {
    "inventory_id": "architecto",
    "quantity": 22,
    "expires_at": "2026-06-19T03:07:42"
};

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

Request      

POST api/v1/stock-reservations

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

inventory_id   string     

Must match an existing stored value. Example: architecto

quantity   integer     

Must be at least 1. Example: 22

expires_at   string  optional    

Must be a valid date. Example: 2026-06-19T03:07:42

POST api/v1/stock-reservations/{reservation_id}/release

Example request:
curl --request POST \
    "http://localhost/api/v1/stock-reservations/16/release" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/stock-reservations/16/release"
);

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


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

Request      

POST api/v1/stock-reservations/{reservation_id}/release

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

reservation_id   integer     

The ID of the reservation. Example: 16

POST api/v1/stock-reservations/{reservation_id}/confirm

Example request:
curl --request POST \
    "http://localhost/api/v1/stock-reservations/16/confirm" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/stock-reservations/16/confirm"
);

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


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

Request      

POST api/v1/stock-reservations/{reservation_id}/confirm

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

reservation_id   integer     

The ID of the reservation. Example: 16

GET api/v1/marketing/banners

Example request:
curl --request GET \
    --get "http://localhost/api/v1/marketing/banners" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/marketing/banners"
);

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


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

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": [],
    "meta": []
}
 

Request      

GET api/v1/marketing/banners

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/marketing/campaigns/active

Example request:
curl --request GET \
    --get "http://localhost/api/v1/marketing/campaigns/active" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/marketing/campaigns/active"
);

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


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

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": [],
    "meta": []
}
 

Request      

GET api/v1/marketing/campaigns/active

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Example request:
curl --request GET \
    --get "http://localhost/api/v1/marketing/featured-products" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/marketing/featured-products"
);

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


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

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "تمت العملية بنجاح",
    "data": [],
    "meta": []
}
 

GET api/v1/marketing/admin/banners

Example request:
curl --request GET \
    --get "http://localhost/api/v1/marketing/admin/banners" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/marketing/admin/banners"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/marketing/admin/banners

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/marketing/admin/campaigns

Example request:
curl --request GET \
    --get "http://localhost/api/v1/marketing/admin/campaigns" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/marketing/admin/campaigns"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/marketing/admin/campaigns

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Example request:
curl --request GET \
    --get "http://localhost/api/v1/marketing/admin/featured-products" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/marketing/admin/featured-products"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

POST api/v1/marketing/banners

Example request:
curl --request POST \
    "http://localhost/api/v1/marketing/banners" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"b\",
    \"image_path\": \"architecto\",
    \"link\": \"architecto\",
    \"placement\": \"n\",
    \"priority\": 84,
    \"is_active\": false,
    \"starts_at\": \"2026-06-19T03:07:42\",
    \"ends_at\": \"2052-07-12\"
}"
const url = new URL(
    "http://localhost/api/v1/marketing/banners"
);

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

let body = {
    "title": "b",
    "image_path": "architecto",
    "link": "architecto",
    "placement": "n",
    "priority": 84,
    "is_active": false,
    "starts_at": "2026-06-19T03:07:42",
    "ends_at": "2052-07-12"
};

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

Request      

POST api/v1/marketing/banners

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

title   string     

Must not be greater than 255 characters. Example: b

image_path   string     

Example: architecto

link   string  optional    

Example: architecto

placement   string     

Must not be greater than 100 characters. Example: n

priority   integer  optional    

Must be at least 0. Example: 84

is_active   boolean  optional    

Example: false

starts_at   string  optional    

Must be a valid date. Example: 2026-06-19T03:07:42

ends_at   string  optional    

Must be a valid date. Must be a date after or equal to starts_at. Example: 2052-07-12

PATCH api/v1/marketing/banners/{banner_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/marketing/banners/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"b\",
    \"image_path\": \"architecto\",
    \"link\": \"architecto\",
    \"placement\": \"n\",
    \"priority\": 84,
    \"is_active\": true,
    \"starts_at\": \"2026-06-19T03:07:42\",
    \"ends_at\": \"2052-07-12\"
}"
const url = new URL(
    "http://localhost/api/v1/marketing/banners/16"
);

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

let body = {
    "title": "b",
    "image_path": "architecto",
    "link": "architecto",
    "placement": "n",
    "priority": 84,
    "is_active": true,
    "starts_at": "2026-06-19T03:07:42",
    "ends_at": "2052-07-12"
};

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

Request      

PATCH api/v1/marketing/banners/{banner_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

banner_id   integer     

The ID of the banner. Example: 16

Body Parameters

title   string     

Must not be greater than 255 characters. Example: b

image_path   string     

Example: architecto

link   string  optional    

Example: architecto

placement   string     

Must not be greater than 100 characters. Example: n

priority   integer  optional    

Must be at least 0. Example: 84

is_active   boolean  optional    

Example: true

starts_at   string  optional    

Must be a valid date. Example: 2026-06-19T03:07:42

ends_at   string  optional    

Must be a valid date. Must be a date after or equal to starts_at. Example: 2052-07-12

DELETE api/v1/marketing/banners/{banner_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/marketing/banners/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/marketing/banners/16"
);

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


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

Request      

DELETE api/v1/marketing/banners/{banner_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

banner_id   integer     

The ID of the banner. Example: 16

POST api/v1/marketing/campaigns

Example request:
curl --request POST \
    "http://localhost/api/v1/marketing/campaigns" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"starts_at\": \"2026-06-19T03:07:42\",
    \"ends_at\": \"2052-07-12\",
    \"status\": \"active\"
}"
const url = new URL(
    "http://localhost/api/v1/marketing/campaigns"
);

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

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et.",
    "starts_at": "2026-06-19T03:07:42",
    "ends_at": "2052-07-12",
    "status": "active"
};

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

Request      

POST api/v1/marketing/campaigns

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

starts_at   string  optional    

Must be a valid date. Example: 2026-06-19T03:07:42

ends_at   string  optional    

Must be a valid date. Must be a date after or equal to starts_at. Example: 2052-07-12

status   string  optional    

Example: active

Must be one of:
  • draft
  • active
  • inactive
  • archived
product_ids   string[]  optional    

Must match an existing stored value.

PATCH api/v1/marketing/campaigns/{campaign_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/marketing/campaigns/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"starts_at\": \"2026-06-19T03:07:42\",
    \"ends_at\": \"2052-07-12\",
    \"status\": \"active\"
}"
const url = new URL(
    "http://localhost/api/v1/marketing/campaigns/16"
);

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

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et.",
    "starts_at": "2026-06-19T03:07:42",
    "ends_at": "2052-07-12",
    "status": "active"
};

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

Request      

PATCH api/v1/marketing/campaigns/{campaign_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

campaign_id   integer     

The ID of the campaign. Example: 16

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

starts_at   string  optional    

Must be a valid date. Example: 2026-06-19T03:07:42

ends_at   string  optional    

Must be a valid date. Must be a date after or equal to starts_at. Example: 2052-07-12

status   string  optional    

Example: active

Must be one of:
  • draft
  • active
  • inactive
  • archived
product_ids   string[]  optional    

Must match an existing stored value.

DELETE api/v1/marketing/campaigns/{campaign_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/marketing/campaigns/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/marketing/campaigns/16"
);

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


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

Request      

DELETE api/v1/marketing/campaigns/{campaign_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

campaign_id   integer     

The ID of the campaign. Example: 16

Example request:
curl --request POST \
    "http://localhost/api/v1/marketing/featured-products" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"architecto\",
    \"placement\": \"n\",
    \"priority\": 84,
    \"is_active\": true,
    \"starts_at\": \"2026-06-19T03:07:42\",
    \"ends_at\": \"2052-07-12\"
}"
const url = new URL(
    "http://localhost/api/v1/marketing/featured-products"
);

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

let body = {
    "product_id": "architecto",
    "placement": "n",
    "priority": 84,
    "is_active": true,
    "starts_at": "2026-06-19T03:07:42",
    "ends_at": "2052-07-12"
};

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

Example request:
curl --request PATCH \
    "http://localhost/api/v1/marketing/featured-products/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"architecto\",
    \"placement\": \"n\",
    \"priority\": 84,
    \"is_active\": true,
    \"starts_at\": \"2026-06-19T03:07:42\",
    \"ends_at\": \"2052-07-12\"
}"
const url = new URL(
    "http://localhost/api/v1/marketing/featured-products/16"
);

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

let body = {
    "product_id": "architecto",
    "placement": "n",
    "priority": 84,
    "is_active": true,
    "starts_at": "2026-06-19T03:07:42",
    "ends_at": "2052-07-12"
};

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

Example request:
curl --request DELETE \
    "http://localhost/api/v1/marketing/featured-products/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/marketing/featured-products/16"
);

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


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

GET api/v1/media

Example request:
curl --request GET \
    --get "http://localhost/api/v1/media" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/media"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/media

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/media

Example request:
curl --request POST \
    "http://localhost/api/v1/media" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "disk=b"\
    --form "collection=n"\
    --form "attachable_type=store"\
    --form "attachable_id=16"\
    --form "file=@/private/var/folders/4b/zjh6g6b16_17hb3fwzzjgn9c0000gn/T/php3jme8pvl0cp40GGAIOn" 
const url = new URL(
    "http://localhost/api/v1/media"
);

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

const body = new FormData();
body.append('disk', 'b');
body.append('collection', 'n');
body.append('attachable_type', 'store');
body.append('attachable_id', '16');
body.append('file', document.querySelector('input[name="file"]').files[0]);

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

Request      

POST api/v1/media

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

file   file     

Must be a file. Must not be greater than 10240 kilobytes. Example: /private/var/folders/4b/zjh6g6b16_17hb3fwzzjgn9c0000gn/T/php3jme8pvl0cp40GGAIOn

disk   string  optional    

Must not be greater than 50 characters. Example: b

collection   string  optional    

Must not be greater than 100 characters. Example: n

attachable_type   string  optional    

Example: store

Must be one of:
  • product
  • store
  • ticket
  • return
  • dispute
attachable_id   integer  optional    

This field is required when attachable_type is present. Example: 16

metadata   object  optional    

DELETE api/v1/media/{mediaFile_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/media/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/media/16"
);

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


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

Request      

DELETE api/v1/media/{mediaFile_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

mediaFile_id   integer     

The ID of the mediaFile. Example: 16

GET api/v1/notifications/templates

Example request:
curl --request GET \
    --get "http://localhost/api/v1/notifications/templates" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/notifications/templates"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/notifications/templates

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/notifications/templates

Example request:
curl --request POST \
    "http://localhost/api/v1/notifications/templates" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"key\": \"b\",
    \"channel\": \"whatsapp\",
    \"locale\": \"ln_CD\",
    \"name\": \"g\",
    \"subject\": \"z\",
    \"body\": \"architecto\",
    \"is_active\": true
}"
const url = new URL(
    "http://localhost/api/v1/notifications/templates"
);

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

let body = {
    "key": "b",
    "channel": "whatsapp",
    "locale": "ln_CD",
    "name": "g",
    "subject": "z",
    "body": "architecto",
    "is_active": true
};

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

Request      

POST api/v1/notifications/templates

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

key   string     

Must not be greater than 255 characters. Example: b

channel   string     

Example: whatsapp

Must be one of:
  • in_app
  • email
  • sms
  • whatsapp
  • push
locale   string  optional    

Must not be greater than 5 characters. Example: ln_CD

name   string     

Must not be greater than 255 characters. Example: g

subject   string  optional    

Must not be greater than 255 characters. Example: z

body   string     

Example: architecto

variables   object  optional    
is_active   boolean  optional    

Example: true

GET api/v1/notifications/templates/{notificationTemplate_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/notifications/templates/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/notifications/templates/16"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/notifications/templates/{notificationTemplate_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

notificationTemplate_id   integer     

The ID of the notificationTemplate. Example: 16

PATCH api/v1/notifications/templates/{notificationTemplate_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/notifications/templates/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"key\": \"b\",
    \"channel\": \"whatsapp\",
    \"locale\": \"ln_CD\",
    \"name\": \"g\",
    \"subject\": \"z\",
    \"body\": \"architecto\",
    \"is_active\": true
}"
const url = new URL(
    "http://localhost/api/v1/notifications/templates/16"
);

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

let body = {
    "key": "b",
    "channel": "whatsapp",
    "locale": "ln_CD",
    "name": "g",
    "subject": "z",
    "body": "architecto",
    "is_active": true
};

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

Request      

PATCH api/v1/notifications/templates/{notificationTemplate_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

notificationTemplate_id   integer     

The ID of the notificationTemplate. Example: 16

Body Parameters

key   string  optional    

Must not be greater than 255 characters. Example: b

channel   string  optional    

Example: whatsapp

Must be one of:
  • in_app
  • email
  • sms
  • whatsapp
  • push
locale   string  optional    

Must not be greater than 5 characters. Example: ln_CD

name   string  optional    

Must not be greater than 255 characters. Example: g

subject   string  optional    

Must not be greater than 255 characters. Example: z

body   string  optional    

Example: architecto

variables   object  optional    
is_active   boolean  optional    

Example: true

DELETE api/v1/notifications/templates/{notificationTemplate_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/notifications/templates/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/notifications/templates/16"
);

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


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

Request      

DELETE api/v1/notifications/templates/{notificationTemplate_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

notificationTemplate_id   integer     

The ID of the notificationTemplate. Example: 16

POST api/v1/notifications/send

Example request:
curl --request POST \
    "http://localhost/api/v1/notifications/send" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"general\",
    \"channel\": \"in_app\",
    \"recipient\": \"b\",
    \"template_key\": \"n\",
    \"locale\": \"kfo_CI\",
    \"title\": \"z\",
    \"subject\": \"m\",
    \"body\": \"architecto\",
    \"provider\": \"n\"
}"
const url = new URL(
    "http://localhost/api/v1/notifications/send"
);

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

let body = {
    "type": "general",
    "channel": "in_app",
    "recipient": "b",
    "template_key": "n",
    "locale": "kfo_CI",
    "title": "z",
    "subject": "m",
    "body": "architecto",
    "provider": "n"
};

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

Request      

POST api/v1/notifications/send

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

user_id   string  optional    

Must match an existing stored value.

type   string  optional    

Example: general

Must be one of:
  • general
  • auth
  • order
  • payment
  • delivery
  • driver
  • marketing
channel   string     

Example: in_app

Must be one of:
  • in_app
  • email
  • sms
  • whatsapp
  • push
recipient   string  optional    

Must not be greater than 255 characters. Example: b

template_key   string  optional    

Must not be greater than 255 characters. Example: n

locale   string  optional    

Must not be greater than 5 characters. Example: kfo_CI

variables   object  optional    
title   string  optional    

Must not be greater than 255 characters. Example: z

subject   string  optional    

Must not be greater than 255 characters. Example: m

body   string  optional    

Example: architecto

provider   string  optional    

Must not be greater than 255 characters. Example: n

payload   object  optional    

GET api/v1/notifications/logs

Example request:
curl --request GET \
    --get "http://localhost/api/v1/notifications/logs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/notifications/logs"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/notifications/logs

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/notifications/logs/{notificationLog_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/notifications/logs/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/notifications/logs/16"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/notifications/logs/{notificationLog_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

notificationLog_id   integer     

The ID of the notificationLog. Example: 16

GET api/v1/notifications/me

Example request:
curl --request GET \
    --get "http://localhost/api/v1/notifications/me" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/notifications/me"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/notifications/me

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PATCH api/v1/notifications/me/read-all

Example request:
curl --request PATCH \
    "http://localhost/api/v1/notifications/me/read-all" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/notifications/me/read-all"
);

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


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

Request      

PATCH api/v1/notifications/me/read-all

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PATCH api/v1/notifications/me/{userNotification_id}/read

Example request:
curl --request PATCH \
    "http://localhost/api/v1/notifications/me/16/read" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/notifications/me/16/read"
);

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


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

Request      

PATCH api/v1/notifications/me/{userNotification_id}/read

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

userNotification_id   integer     

The ID of the userNotification. Example: 16

GET api/v1/notifications/preferences

Example request:
curl --request GET \
    --get "http://localhost/api/v1/notifications/preferences" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/notifications/preferences"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/notifications/preferences

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PATCH api/v1/notifications/preferences

Example request:
curl --request PATCH \
    "http://localhost/api/v1/notifications/preferences" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"auth\",
    \"channel\": \"in_app\",
    \"is_enabled\": true
}"
const url = new URL(
    "http://localhost/api/v1/notifications/preferences"
);

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

let body = {
    "type": "auth",
    "channel": "in_app",
    "is_enabled": true
};

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

Request      

PATCH api/v1/notifications/preferences

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

type   string     

Example: auth

Must be one of:
  • general
  • auth
  • order
  • payment
  • delivery
  • driver
  • marketing
channel   string     

Example: in_app

Must be one of:
  • in_app
  • email
  • sms
  • whatsapp
  • push
is_enabled   boolean     

Example: true

GET api/v1/orders

Example request:
curl --request GET \
    --get "http://localhost/api/v1/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/orders"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/orders

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/orders/{order_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/orders/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/orders/16"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/orders/{order_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

order_id   integer     

The ID of the order. Example: 16

PATCH api/v1/orders/{order_id}/status

Example request:
curl --request PATCH \
    "http://localhost/api/v1/orders/16/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"ready_for_delivery\",
    \"reason\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/orders/16/status"
);

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

let body = {
    "status": "ready_for_delivery",
    "reason": "architecto"
};

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

Request      

PATCH api/v1/orders/{order_id}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

order_id   integer     

The ID of the order. Example: 16

Body Parameters

status   string     

Example: ready_for_delivery

Must be one of:
  • pending
  • confirmed
  • processing
  • ready_for_delivery
  • out_for_delivery
  • delivered
  • cancelled
  • refunded
reason   string  optional    

Example: architecto

GET api/v1/payments

Example request:
curl --request GET \
    --get "http://localhost/api/v1/payments" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/payments"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/payments

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/payments

Example request:
curl --request POST \
    "http://localhost/api/v1/payments" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order_id\": \"architecto\",
    \"gateway\": \"hyperpay\",
    \"method\": \"card\",
    \"type\": \"capture\",
    \"amount\": 39,
    \"currency\": \"g\",
    \"provider_transaction_id\": \"z\",
    \"provider_reference\": \"m\",
    \"provider_status\": \"i\"
}"
const url = new URL(
    "http://localhost/api/v1/payments"
);

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

let body = {
    "order_id": "architecto",
    "gateway": "hyperpay",
    "method": "card",
    "type": "capture",
    "amount": 39,
    "currency": "g",
    "provider_transaction_id": "z",
    "provider_reference": "m",
    "provider_status": "i"
};

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

Request      

POST api/v1/payments

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

order_id   string     

Must match an existing stored value. Example: architecto

gateway   string  optional    

Example: hyperpay

Must be one of:
  • manual
  • moyasar
  • tap
  • hyperpay
method   string  optional    

Example: card

Must be one of:
  • cash_on_delivery
  • card
  • apple_pay
  • bank_transfer
  • wallet
type   string  optional    

Example: capture

Must be one of:
  • payment
  • authorization
  • capture
amount   number  optional    

Must be at least 0.01. Example: 39

currency   string  optional    

Must not be greater than 3 characters. Example: g

provider_transaction_id   string  optional    

Must not be greater than 255 characters. Example: z

provider_reference   string  optional    

Must not be greater than 255 characters. Example: m

provider_status   string  optional    

Must not be greater than 255 characters. Example: i

request_payload   object  optional    
response_payload   object  optional    
metadata   object  optional    

GET api/v1/payments/{paymentTransaction_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/payments/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/payments/16"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/payments/{paymentTransaction_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

paymentTransaction_id   integer     

The ID of the paymentTransaction. Example: 16

POST api/v1/payments/{paymentTransaction_id}/mark-paid

Example request:
curl --request POST \
    "http://localhost/api/v1/payments/16/mark-paid" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"provider_transaction_id\": \"b\",
    \"provider_reference\": \"n\",
    \"provider_status\": \"g\"
}"
const url = new URL(
    "http://localhost/api/v1/payments/16/mark-paid"
);

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

let body = {
    "provider_transaction_id": "b",
    "provider_reference": "n",
    "provider_status": "g"
};

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

Request      

POST api/v1/payments/{paymentTransaction_id}/mark-paid

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

paymentTransaction_id   integer     

The ID of the paymentTransaction. Example: 16

Body Parameters

provider_transaction_id   string  optional    

Must not be greater than 255 characters. Example: b

provider_reference   string  optional    

Must not be greater than 255 characters. Example: n

provider_status   string  optional    

Must not be greater than 255 characters. Example: g

response_payload   object  optional    
metadata   object  optional    

POST api/v1/payments/{paymentTransaction_id}/mark-failed

Example request:
curl --request POST \
    "http://localhost/api/v1/payments/16/mark-failed" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"failure_code\": \"b\",
    \"failure_message\": \"architecto\",
    \"provider_transaction_id\": \"n\",
    \"provider_reference\": \"g\",
    \"provider_status\": \"z\"
}"
const url = new URL(
    "http://localhost/api/v1/payments/16/mark-failed"
);

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

let body = {
    "failure_code": "b",
    "failure_message": "architecto",
    "provider_transaction_id": "n",
    "provider_reference": "g",
    "provider_status": "z"
};

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

Request      

POST api/v1/payments/{paymentTransaction_id}/mark-failed

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

paymentTransaction_id   integer     

The ID of the paymentTransaction. Example: 16

Body Parameters

failure_code   string  optional    

Must not be greater than 255 characters. Example: b

failure_message   string  optional    

Example: architecto

provider_transaction_id   string  optional    

Must not be greater than 255 characters. Example: n

provider_reference   string  optional    

Must not be greater than 255 characters. Example: g

provider_status   string  optional    

Must not be greater than 255 characters. Example: z

response_payload   object  optional    
metadata   object  optional    

POST api/v1/payments/{paymentTransaction_id}/cancel

Example request:
curl --request POST \
    "http://localhost/api/v1/payments/16/cancel" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/payments/16/cancel"
);

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

let body = {
    "reason": "architecto"
};

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

Request      

POST api/v1/payments/{paymentTransaction_id}/cancel

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

paymentTransaction_id   integer     

The ID of the paymentTransaction. Example: 16

Body Parameters

reason   string  optional    

Example: architecto

POST api/v1/payments/{paymentTransaction_id}/refunds

Example request:
curl --request POST \
    "http://localhost/api/v1/payments/16/refunds" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"amount\": 27,
    \"reason\": \"architecto\",
    \"provider_refund_id\": \"n\",
    \"provider_status\": \"g\"
}"
const url = new URL(
    "http://localhost/api/v1/payments/16/refunds"
);

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

let body = {
    "amount": 27,
    "reason": "architecto",
    "provider_refund_id": "n",
    "provider_status": "g"
};

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

Request      

POST api/v1/payments/{paymentTransaction_id}/refunds

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

paymentTransaction_id   integer     

The ID of the paymentTransaction. Example: 16

Body Parameters

amount   number     

Must be at least 0.01. Example: 27

reason   string  optional    

Example: architecto

provider_refund_id   string  optional    

Must not be greater than 255 characters. Example: n

provider_status   string  optional    

Must not be greater than 255 characters. Example: g

response_payload   object  optional    
metadata   object  optional    

GET api/v1/returns

Example request:
curl --request GET \
    --get "http://localhost/api/v1/returns" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/returns"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/returns

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/returns

Example request:
curl --request POST \
    "http://localhost/api/v1/returns" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order_id\": 16,
    \"type\": \"exchange\",
    \"reason\": \"wrong_item\",
    \"description\": \"Eius et animi quos velit et.\",
    \"requested_total\": 60,
    \"currency\": \"dlj\",
    \"items\": [
        {
            \"order_item_id\": 16,
            \"product_id\": 16,
            \"product_variant_id\": 16,
            \"quantity\": 22,
            \"unit_price\": 84,
            \"requested_total\": 12,
            \"reason\": \"missing_parts\",
            \"condition\": \"used\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/returns"
);

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

let body = {
    "order_id": 16,
    "type": "exchange",
    "reason": "wrong_item",
    "description": "Eius et animi quos velit et.",
    "requested_total": 60,
    "currency": "dlj",
    "items": [
        {
            "order_item_id": 16,
            "product_id": 16,
            "product_variant_id": 16,
            "quantity": 22,
            "unit_price": 84,
            "requested_total": 12,
            "reason": "missing_parts",
            "condition": "used"
        }
    ]
};

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

Request      

POST api/v1/returns

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

order_id   integer     

Must match an existing stored value. Example: 16

type   string  optional    

Example: exchange

Must be one of:
  • return
  • refund
  • exchange
  • dispute
reason   string     

Example: wrong_item

Must be one of:
  • damaged
  • wrong_item
  • not_as_described
  • late_delivery
  • changed_mind
  • missing_parts
  • other
description   string  optional    

Example: Eius et animi quos velit et.

requested_total   number  optional    

Must be at least 0. Example: 60

currency   string  optional    

Must be 3 characters. Example: dlj

metadata   object  optional    
items   object[]  optional    
order_item_id   integer  optional    

Must match an existing stored value. Example: 16

product_id   integer  optional    

Must match an existing stored value. Example: 16

product_variant_id   integer  optional    

Must match an existing stored value. Example: 16

quantity   integer  optional    

This field is required when items is present. Must be at least 1. Example: 22

unit_price   number  optional    

Must be at least 0. Example: 84

requested_total   number  optional    

Must be at least 0. Example: 12

reason   string  optional    

Example: missing_parts

Must be one of:
  • damaged
  • wrong_item
  • not_as_described
  • late_delivery
  • changed_mind
  • missing_parts
  • other
condition   string  optional    

Example: used

Must be one of:
  • unopened
  • opened
  • used
  • damaged
  • missing_parts
metadata   object  optional    

GET api/v1/returns/{returnRequest_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/returns/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/returns/16"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/returns/{returnRequest_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

returnRequest_id   integer     

The ID of the returnRequest. Example: 16

PATCH api/v1/returns/{returnRequest_id}/status

Example request:
curl --request PATCH \
    "http://localhost/api/v1/returns/16/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"completed\",
    \"approved_total\": 27,
    \"rejection_reason\": \"architecto\",
    \"note\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/returns/16/status"
);

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

let body = {
    "status": "completed",
    "approved_total": 27,
    "rejection_reason": "architecto",
    "note": "architecto"
};

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

Request      

PATCH api/v1/returns/{returnRequest_id}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

returnRequest_id   integer     

The ID of the returnRequest. Example: 16

Body Parameters

status   string     

Example: completed

Must be one of:
  • approved
  • rejected
  • items_received
  • refunded
  • completed
  • cancelled
approved_total   number  optional    

Must be at least 0. Example: 27

rejection_reason   string  optional    

This field is required when status is rejected. Example: architecto

note   string  optional    

Example: architecto

metadata   object  optional    

DELETE api/v1/returns/{returnRequest_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/returns/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/returns/16"
);

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


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

Request      

DELETE api/v1/returns/{returnRequest_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

returnRequest_id   integer     

The ID of the returnRequest. Example: 16

POST api/v1/returns/{returnRequest_id}/messages

Example request:
curl --request POST \
    "http://localhost/api/v1/returns/16/messages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"message\": \"architecto\",
    \"attachments\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "http://localhost/api/v1/returns/16/messages"
);

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

let body = {
    "message": "architecto",
    "attachments": [
        "architecto"
    ]
};

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

Request      

POST api/v1/returns/{returnRequest_id}/messages

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

returnRequest_id   integer     

The ID of the returnRequest. Example: 16

Body Parameters

message   string     

Example: architecto

attachments   string[]  optional    

GET api/v1/reviews/reports

Example request:
curl --request GET \
    --get "http://localhost/api/v1/reviews/reports" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/reviews/reports"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/reviews/reports

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PATCH api/v1/reviews/reports/{reviewReport_id}/status

Example request:
curl --request PATCH \
    "http://localhost/api/v1/reviews/reports/16/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"dismissed\"
}"
const url = new URL(
    "http://localhost/api/v1/reviews/reports/16/status"
);

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

let body = {
    "status": "dismissed"
};

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

Request      

PATCH api/v1/reviews/reports/{reviewReport_id}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

reviewReport_id   integer     

The ID of the reviewReport. Example: 16

Body Parameters

status   string     

Example: dismissed

Must be one of:
  • reviewed
  • dismissed

GET api/v1/reviews

Example request:
curl --request GET \
    --get "http://localhost/api/v1/reviews" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/reviews"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/reviews

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/reviews

Example request:
curl --request POST \
    "http://localhost/api/v1/reviews" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reviewable_type\": \"product\",
    \"reviewable_id\": 16,
    \"rating\": 2,
    \"title\": \"g\",
    \"body\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/reviews"
);

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

let body = {
    "reviewable_type": "product",
    "reviewable_id": 16,
    "rating": 2,
    "title": "g",
    "body": "architecto"
};

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

Request      

POST api/v1/reviews

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

reviewable_type   string     

Example: product

Must be one of:
  • product
  • store
  • driver
reviewable_id   integer     

Example: 16

order_id   string  optional    

Must match an existing stored value.

rating   integer     

Must be at least 1. Must not be greater than 5. Example: 2

title   string  optional    

Must not be greater than 255 characters. Example: g

body   string  optional    

Example: architecto

metadata   object  optional    

GET api/v1/reviews/{review_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/reviews/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/reviews/16"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/reviews/{review_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

review_id   integer     

The ID of the review. Example: 16

PATCH api/v1/reviews/{review_id}/status

Example request:
curl --request PATCH \
    "http://localhost/api/v1/reviews/16/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"hidden\",
    \"rejection_reason\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/reviews/16/status"
);

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

let body = {
    "status": "hidden",
    "rejection_reason": "architecto"
};

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

Request      

PATCH api/v1/reviews/{review_id}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

review_id   integer     

The ID of the review. Example: 16

Body Parameters

status   string     

Example: hidden

Must be one of:
  • approved
  • rejected
  • hidden
rejection_reason   string  optional    

This field is required when status is rejected. Example: architecto

DELETE api/v1/reviews/{review_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/reviews/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/reviews/16"
);

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


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

Request      

DELETE api/v1/reviews/{review_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

review_id   integer     

The ID of the review. Example: 16

POST api/v1/reviews/{review_id}/replies

Example request:
curl --request POST \
    "http://localhost/api/v1/reviews/16/replies" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"body\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/reviews/16/replies"
);

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

let body = {
    "body": "architecto"
};

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

Request      

POST api/v1/reviews/{review_id}/replies

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

review_id   integer     

The ID of the review. Example: 16

Body Parameters

body   string     

Example: architecto

POST api/v1/reviews/{review_id}/votes

Example request:
curl --request POST \
    "http://localhost/api/v1/reviews/16/votes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"helpful\"
}"
const url = new URL(
    "http://localhost/api/v1/reviews/16/votes"
);

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

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

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

Request      

POST api/v1/reviews/{review_id}/votes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

review_id   integer     

The ID of the review. Example: 16

Body Parameters

type   string  optional    

Example: helpful

Must be one of:
  • helpful

POST api/v1/reviews/{review_id}/reports

Example request:
curl --request POST \
    "http://localhost/api/v1/reviews/16/reports" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"fake\",
    \"details\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/reviews/16/reports"
);

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

let body = {
    "reason": "fake",
    "details": "architecto"
};

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

Request      

POST api/v1/reviews/{review_id}/reports

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

review_id   integer     

The ID of the review. Example: 16

Body Parameters

reason   string     

Example: fake

Must be one of:
  • spam
  • offensive
  • fake
  • irrelevant
  • other
details   string  optional    

Example: architecto

GET api/v1/search/products

Example request:
curl --request GET \
    --get "http://localhost/api/v1/search/products" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"b\",
    \"category_id\": 16,
    \"brand_id\": 16,
    \"store_id\": 16,
    \"min_price\": 39,
    \"max_price\": 84,
    \"status\": \"z\",
    \"sort\": \"price_asc\",
    \"per_page\": 17
}"
const url = new URL(
    "http://localhost/api/v1/search/products"
);

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

let body = {
    "q": "b",
    "category_id": 16,
    "brand_id": 16,
    "store_id": 16,
    "min_price": 39,
    "max_price": 84,
    "status": "z",
    "sort": "price_asc",
    "per_page": 17
};

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

Example response (422):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Validation error",
    "errors": {
        "category_id": [
            "The selected category id is invalid."
        ],
        "brand_id": [
            "The selected brand id is invalid."
        ],
        "store_id": [
            "The selected store id is invalid."
        ]
    },
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/search/products

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Must not be greater than 255 characters. Example: b

category_id   integer  optional    

Must match an existing stored value. Example: 16

brand_id   integer  optional    

Must match an existing stored value. Example: 16

store_id   integer  optional    

Must match an existing stored value. Example: 16

min_price   number  optional    

Must be at least 0. Example: 39

max_price   number  optional    

Must be at least 0. Example: 84

status   string  optional    

Must not be greater than 50 characters. Example: z

sort   string  optional    

Example: price_asc

Must be one of:
  • newest
  • oldest
  • price_asc
  • price_desc
  • rating_desc
  • reviews_desc
per_page   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 17

GET api/v1/search/suggestions

Example request:
curl --request GET \
    --get "http://localhost/api/v1/search/suggestions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/search/suggestions"
);

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


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

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "تم جلب اقتراحات البحث بنجاح",
    "data": [],
    "meta": []
}
 

Request      

GET api/v1/search/suggestions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/discovery/home

Example request:
curl --request GET \
    --get "http://localhost/api/v1/discovery/home" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/discovery/home"
);

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


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

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "تم جلب بيانات الاكتشاف بنجاح",
    "data": {
        "latest_products": [],
        "top_rated_products": [],
        "featured_categories": [],
        "featured_brands": [],
        "featured_stores": []
    },
    "meta": []
}
 

Request      

GET api/v1/discovery/home

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/shipping/health

Example request:
curl --request GET \
    --get "http://localhost/api/v1/shipping/health" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/shipping/health"
);

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


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

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "Shipping module is healthy",
    "data": {
        "module": "shipping"
    }
}
 

Request      

GET api/v1/shipping/health

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/stores

Example request:
curl --request GET \
    --get "http://localhost/api/v1/stores" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/stores"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/stores

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/stores

Example request:
curl --request POST \
    "http://localhost/api/v1/stores" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"vendor_id\": 16,
    \"name\": \"n\",
    \"description\": \"Eius et animi quos velit et.\",
    \"city\": \"v\",
    \"district\": \"d\",
    \"latitude\": -89,
    \"longitude\": -179,
    \"commission_rate\": 17,
    \"is_featured\": true,
    \"translations\": [
        {
            \"locale\": \"ar\",
            \"name\": \"i\",
            \"description\": \"Eius et animi quos velit et.\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/stores"
);

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

let body = {
    "vendor_id": 16,
    "name": "n",
    "description": "Eius et animi quos velit et.",
    "city": "v",
    "district": "d",
    "latitude": -89,
    "longitude": -179,
    "commission_rate": 17,
    "is_featured": true,
    "translations": [
        {
            "locale": "ar",
            "name": "i",
            "description": "Eius et animi quos velit et."
        }
    ]
};

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

Request      

POST api/v1/stores

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

vendor_id   integer     

Must match an existing stored value. Example: 16

name   string     

Must not be greater than 255 characters. Example: n

description   string  optional    

Example: Eius et animi quos velit et.

city   string  optional    

Must not be greater than 255 characters. Example: v

district   string  optional    

Must not be greater than 255 characters. Example: d

latitude   number  optional    

Must be between -90 and 90. Example: -89

longitude   number  optional    

Must be between -180 and 180. Example: -179

commission_rate   number  optional    

Must be at least 0. Must not be greater than 100. Example: 17

is_featured   boolean  optional    

Example: true

translations   object[]  optional    
locale   string  optional    

This field is required when translations is present. Example: ar

Must be one of:
  • ar
  • en
name   string  optional    

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

description   string  optional    

Example: Eius et animi quos velit et.

GET api/v1/stores/{store_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/stores/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/stores/16"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/stores/{store_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

store_id   integer     

The ID of the store. Example: 16

PATCH api/v1/stores/{store_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/stores/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"city\": \"v\",
    \"district\": \"d\",
    \"latitude\": -89,
    \"longitude\": -179,
    \"commission_rate\": 17,
    \"is_featured\": false,
    \"translations\": [
        {
            \"locale\": \"ar\",
            \"name\": \"i\",
            \"description\": \"Eius et animi quos velit et.\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/v1/stores/16"
);

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

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et.",
    "city": "v",
    "district": "d",
    "latitude": -89,
    "longitude": -179,
    "commission_rate": 17,
    "is_featured": false,
    "translations": [
        {
            "locale": "ar",
            "name": "i",
            "description": "Eius et animi quos velit et."
        }
    ]
};

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

Request      

PATCH api/v1/stores/{store_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

store_id   integer     

The ID of the store. Example: 16

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

description   string  optional    

Example: Eius et animi quos velit et.

city   string  optional    

Must not be greater than 255 characters. Example: v

district   string  optional    

Must not be greater than 255 characters. Example: d

latitude   number  optional    

Must be between -90 and 90. Example: -89

longitude   number  optional    

Must be between -180 and 180. Example: -179

commission_rate   number  optional    

Must be at least 0. Must not be greater than 100. Example: 17

is_featured   boolean  optional    

Example: false

translations   object[]  optional    
locale   string  optional    

This field is required when translations is present. Example: ar

Must be one of:
  • ar
  • en
name   string  optional    

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

description   string  optional    

Example: Eius et animi quos velit et.

DELETE api/v1/stores/{store_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/stores/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/stores/16"
);

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


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

Request      

DELETE api/v1/stores/{store_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

store_id   integer     

The ID of the store. Example: 16

PATCH api/v1/stores/{store_id}/status

Example request:
curl --request PATCH \
    "http://localhost/api/v1/stores/16/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"rejected\",
    \"reason\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/stores/16/status"
);

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

let body = {
    "status": "rejected",
    "reason": "architecto"
};

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

Request      

PATCH api/v1/stores/{store_id}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

store_id   integer     

The ID of the store. Example: 16

Body Parameters

status   string     

Example: rejected

Must be one of:
  • pending_review
  • approved
  • rejected
  • suspended
  • closed
reason   string  optional    

Example: architecto

GET api/v1/stores/{store_id}/working-hours

Example request:
curl --request GET \
    --get "http://localhost/api/v1/stores/16/working-hours" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/stores/16/working-hours"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/stores/{store_id}/working-hours

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

store_id   integer     

The ID of the store. Example: 16

POST api/v1/stores/{store_id}/working-hours

Example request:
curl --request POST \
    "http://localhost/api/v1/stores/16/working-hours" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"day_of_week\": \"Wednesday\",
    \"opens_at\": \"03:07\",
    \"closes_at\": \"2052-07-12\",
    \"is_closed\": true
}"
const url = new URL(
    "http://localhost/api/v1/stores/16/working-hours"
);

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

let body = {
    "day_of_week": "Wednesday",
    "opens_at": "03:07",
    "closes_at": "2052-07-12",
    "is_closed": true
};

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

Request      

POST api/v1/stores/{store_id}/working-hours

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

store_id   integer     

The ID of the store. Example: 16

Body Parameters

day_of_week   string     

Example: Wednesday

Must be one of:
  • Saturday
  • Sunday
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
opens_at   string  optional    

This field is required when is_closed is false. Must be a valid date in the format H:i. Example: 03:07

closes_at   string  optional    

This field is required when is_closed is false. Must be a valid date in the format H:i. Must be a date after opens_at. Example: 2052-07-12

is_closed   boolean  optional    

Example: true

GET api/v1/support/categories

Example request:
curl --request GET \
    --get "http://localhost/api/v1/support/categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/support/categories"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/support/categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/support/categories

Example request:
curl --request POST \
    "http://localhost/api/v1/support/categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"complaint_type\": \"n\",
    \"is_active\": false
}"
const url = new URL(
    "http://localhost/api/v1/support/categories"
);

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

let body = {
    "name": "b",
    "complaint_type": "n",
    "is_active": false
};

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

Request      

POST api/v1/support/categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

complaint_type   string  optional    

Must not be greater than 100 characters. Example: n

is_active   boolean  optional    

Example: false

GET api/v1/support/tickets

Example request:
curl --request GET \
    --get "http://localhost/api/v1/support/tickets" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/support/tickets"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/support/tickets

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/support/tickets

Example request:
curl --request POST \
    "http://localhost/api/v1/support/tickets" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"subject\": \"b\",
    \"description\": \"Eius et animi quos velit et.\",
    \"priority\": \"low\"
}"
const url = new URL(
    "http://localhost/api/v1/support/tickets"
);

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

let body = {
    "subject": "b",
    "description": "Eius et animi quos velit et.",
    "priority": "low"
};

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

Request      

POST api/v1/support/tickets

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

category_id   string  optional    

Must match an existing stored value.

subject   string     

Must not be greater than 255 characters. Example: b

description   string     

Example: Eius et animi quos velit et.

priority   string  optional    

Example: low

Must be one of:
  • low
  • medium
  • high
  • urgent

GET api/v1/support/tickets/{ticket_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/support/tickets/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/support/tickets/16"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/support/tickets/{ticket_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

ticket_id   integer     

The ID of the ticket. Example: 16

POST api/v1/support/tickets/{ticket_id}/messages

Example request:
curl --request POST \
    "http://localhost/api/v1/support/tickets/16/messages" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"message\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/support/tickets/16/messages"
);

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

let body = {
    "message": "architecto"
};

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

Request      

POST api/v1/support/tickets/{ticket_id}/messages

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

ticket_id   integer     

The ID of the ticket. Example: 16

Body Parameters

message   string     

Example: architecto

attachments   object  optional    

PATCH api/v1/support/tickets/{ticket_id}/status

Example request:
curl --request PATCH \
    "http://localhost/api/v1/support/tickets/16/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"pending\",
    \"note\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/support/tickets/16/status"
);

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

let body = {
    "status": "pending",
    "note": "architecto"
};

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

Request      

PATCH api/v1/support/tickets/{ticket_id}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

ticket_id   integer     

The ID of the ticket. Example: 16

Body Parameters

status   string     

Example: pending

Must be one of:
  • open
  • pending
  • answered
  • resolved
  • closed
note   string  optional    

Example: architecto

GET api/v1/profile

Example request:
curl --request GET \
    --get "http://localhost/api/v1/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/profile"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/profile

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PATCH api/v1/profile

Example request:
curl --request PATCH \
    "http://localhost/api/v1/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"avatar\": \"n\",
    \"gender\": \"male\",
    \"birth_date\": \"2022-07-13\",
    \"language\": \"en\",
    \"timezone\": \"Asia\\/Ulaanbaatar\"
}"
const url = new URL(
    "http://localhost/api/v1/profile"
);

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

let body = {
    "name": "b",
    "avatar": "n",
    "gender": "male",
    "birth_date": "2022-07-13",
    "language": "en",
    "timezone": "Asia\/Ulaanbaatar"
};

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

Request      

PATCH api/v1/profile

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string  optional    

Must not be greater than 255 characters. Example: b

avatar   string  optional    

Must not be greater than 2048 characters. Example: n

gender   string  optional    

Example: male

Must be one of:
  • male
  • female
birth_date   string  optional    

Must be a valid date. Must be a date before today. Example: 2022-07-13

language   string  optional    

Example: en

Must be one of:
  • ar
  • en
timezone   string  optional    

Must be a valid time zone, such as Africa/Accra. Example: Asia/Ulaanbaatar

GET api/v1/addresses

Example request:
curl --request GET \
    --get "http://localhost/api/v1/addresses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/addresses"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/addresses

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/addresses

Example request:
curl --request POST \
    "http://localhost/api/v1/addresses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"b\",
    \"recipient_name\": \"n\",
    \"phone\": \"g\",
    \"city\": \"z\",
    \"district\": \"m\",
    \"street\": \"i\",
    \"building_number\": \"y\",
    \"latitude\": -89,
    \"longitude\": -179,
    \"is_default\": true
}"
const url = new URL(
    "http://localhost/api/v1/addresses"
);

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

let body = {
    "title": "b",
    "recipient_name": "n",
    "phone": "g",
    "city": "z",
    "district": "m",
    "street": "i",
    "building_number": "y",
    "latitude": -89,
    "longitude": -179,
    "is_default": true
};

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

Request      

POST api/v1/addresses

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

title   string     

Must not be greater than 100 characters. Example: b

recipient_name   string     

Must not be greater than 255 characters. Example: n

phone   string     

Must not be greater than 30 characters. Example: g

city   string     

Must not be greater than 100 characters. Example: z

district   string  optional    

Must not be greater than 100 characters. Example: m

street   string  optional    

Must not be greater than 255 characters. Example: i

building_number   string  optional    

Must not be greater than 50 characters. Example: y

latitude   number  optional    

Must be between -90 and 90. Example: -89

longitude   number  optional    

Must be between -180 and 180. Example: -179

is_default   boolean  optional    

Example: true

PATCH api/v1/addresses/{address_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/addresses/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"b\",
    \"recipient_name\": \"n\",
    \"phone\": \"g\",
    \"city\": \"z\",
    \"district\": \"m\",
    \"street\": \"i\",
    \"building_number\": \"y\",
    \"latitude\": -89,
    \"longitude\": -179,
    \"is_default\": true
}"
const url = new URL(
    "http://localhost/api/v1/addresses/16"
);

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

let body = {
    "title": "b",
    "recipient_name": "n",
    "phone": "g",
    "city": "z",
    "district": "m",
    "street": "i",
    "building_number": "y",
    "latitude": -89,
    "longitude": -179,
    "is_default": true
};

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

Request      

PATCH api/v1/addresses/{address_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

address_id   integer     

The ID of the address. Example: 16

Body Parameters

title   string  optional    

Must not be greater than 100 characters. Example: b

recipient_name   string  optional    

Must not be greater than 255 characters. Example: n

phone   string  optional    

Must not be greater than 30 characters. Example: g

city   string  optional    

Must not be greater than 100 characters. Example: z

district   string  optional    

Must not be greater than 100 characters. Example: m

street   string  optional    

Must not be greater than 255 characters. Example: i

building_number   string  optional    

Must not be greater than 50 characters. Example: y

latitude   number  optional    

Must be between -90 and 90. Example: -89

longitude   number  optional    

Must be between -180 and 180. Example: -179

is_default   boolean  optional    

Example: true

DELETE api/v1/addresses/{address_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/addresses/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/addresses/16"
);

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


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

Request      

DELETE api/v1/addresses/{address_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

address_id   integer     

The ID of the address. Example: 16

GET api/v1/vendors

Example request:
curl --request GET \
    --get "http://localhost/api/v1/vendors" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/vendors"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/vendors

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/vendors

Example request:
curl --request POST \
    "http://localhost/api/v1/vendors" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"business_name\": \"b\",
    \"commercial_registration\": \"n\",
    \"tax_number\": \"g\",
    \"default_commission_rate\": 16
}"
const url = new URL(
    "http://localhost/api/v1/vendors"
);

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

let body = {
    "business_name": "b",
    "commercial_registration": "n",
    "tax_number": "g",
    "default_commission_rate": 16
};

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

Request      

POST api/v1/vendors

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

business_name   string     

Must not be greater than 255 characters. Example: b

commercial_registration   string  optional    

Must not be greater than 255 characters. Example: n

tax_number   string  optional    

Must not be greater than 255 characters. Example: g

default_commission_rate   number  optional    

Must be at least 0. Must not be greater than 100. Example: 16

GET api/v1/vendors/{vendor_id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/vendors/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/vendors/16"
);

const headers = {
    "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,
    "message": "You must login first",
    "errors": [],
    "data": null,
    "meta": []
}
 

Request      

GET api/v1/vendors/{vendor_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

vendor_id   integer     

The ID of the vendor. Example: 16

PATCH api/v1/vendors/{vendor_id}

Example request:
curl --request PATCH \
    "http://localhost/api/v1/vendors/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"business_name\": \"b\",
    \"commercial_registration\": \"n\",
    \"tax_number\": \"g\",
    \"default_commission_rate\": 16,
    \"status\": \"suspended\"
}"
const url = new URL(
    "http://localhost/api/v1/vendors/16"
);

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

let body = {
    "business_name": "b",
    "commercial_registration": "n",
    "tax_number": "g",
    "default_commission_rate": 16,
    "status": "suspended"
};

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

Request      

PATCH api/v1/vendors/{vendor_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

vendor_id   integer     

The ID of the vendor. Example: 16

Body Parameters

business_name   string  optional    

Must not be greater than 255 characters. Example: b

commercial_registration   string  optional    

Must not be greater than 255 characters. Example: n

tax_number   string  optional    

Must not be greater than 255 characters. Example: g

default_commission_rate   number  optional    

Must be at least 0. Must not be greater than 100. Example: 16

status   string  optional    

Example: suspended

Must be one of:
  • pending_review
  • approved
  • rejected
  • suspended

DELETE api/v1/vendors/{vendor_id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/vendors/16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/vendors/16"
);

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


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

Request      

DELETE api/v1/vendors/{vendor_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

vendor_id   integer     

The ID of the vendor. Example: 16

GET api/v1/health

Example request:
curl --request GET \
    --get "http://localhost/api/v1/health" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/health"
);

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


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

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "API is working successfully",
    "data": {
        "app": "Houta Market API",
        "status": "ok",
        "locale": "en"
    },
    "meta": []
}
 

Request      

GET api/v1/health

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json