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.
Endpoints
Step 1 (Register): Validate input, stash payload in Cache, send OTP email.
Example request:
curl --request POST \
"http://localhost:8000/api/admin/request-otp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"admin_name\": \"b\",
\"admin_number\": \"architecto\",
\"email\": \"zbailey@example.net\",
\"password\": \"-0pBNvYgxw\",
\"shop_name\": \"a\",
\"shop_location\": \"y\",
\"staff_numbers\": 62,
\"shop_type\": \"architecto\"
}"
const url = new URL(
"http://localhost:8000/api/admin/request-otp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"admin_name": "b",
"admin_number": "architecto",
"email": "zbailey@example.net",
"password": "-0pBNvYgxw",
"shop_name": "a",
"shop_location": "y",
"staff_numbers": 62,
"shop_type": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Step 2 (Register): Verify OTP, fetch cached registration data, save Admin to DB.
Example request:
curl --request POST \
"http://localhost:8000/api/admin/complete-registration" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\",
\"otp\": 4326.41688
}"
const url = new URL(
"http://localhost:8000/api/admin/complete-registration"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net",
"otp": 4326.41688
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Step 1 (Login): Verify password credentials and dispatch Login OTP.
Example request:
curl --request POST \
"http://localhost:8000/api/admin/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"login\": \"architecto\",
\"password\": \"|]|{+-\"
}"
const url = new URL(
"http://localhost:8000/api/admin/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"login": "architecto",
"password": "|]|{+-"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Step 2 (Login): Verify Login OTP code and issue Sanctuam Bearer token.
Example request:
curl --request POST \
"http://localhost:8000/api/admin/complete-login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\",
\"otp\": 4326.41688
}"
const url = new URL(
"http://localhost:8000/api/admin/complete-login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net",
"otp": 4326.41688
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Step 1 (Register): Validate form and send OTP code to staff email.
Example request:
curl --request POST \
"http://localhost:8000/api/staff/request-otp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"email\": \"zbailey@example.net\",
\"staff_number\": \"i\",
\"password\": \"0pBNvYgxwmi\\/#iw\\/kX\",
\"salary\": 61,
\"age\": 7,
\"type\": \"architecto\"
}"
const url = new URL(
"http://localhost:8000/api/staff/request-otp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"email": "zbailey@example.net",
"staff_number": "i",
"password": "0pBNvYgxwmi\/#iw\/kX",
"salary": 61,
"age": 7,
"type": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Step 2 (Register): Verify OTP and create staff account with image.
Example request:
curl --request POST \
"http://localhost:8000/api/staff/complete-registration" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "email=gbailey@example.net"\
--form "otp=miyvdl"\
--form "image=@/tmp/phpaso56q" const url = new URL(
"http://localhost:8000/api/staff/complete-registration"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('email', 'gbailey@example.net');
body.append('otp', 'miyvdl');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Step 1 (Login): Validate credentials & dispatch 2FA OTP.
Example request:
curl --request POST \
"http://localhost:8000/api/staff/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"staff_number\": \"architecto\",
\"password\": \"|]|{+-\"
}"
const url = new URL(
"http://localhost:8000/api/staff/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"staff_number": "architecto",
"password": "|]|{+-"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Step 2 (Login): Verify OTP and issue token.
Example request:
curl --request POST \
"http://localhost:8000/api/staff/complete-login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"staff_number\": \"architecto\",
\"otp\": \"ngzmiy\"
}"
const url = new URL(
"http://localhost:8000/api/staff/complete-login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"staff_number": "architecto",
"otp": "ngzmiy"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Step 1 (Register): Request registration OTP code
Example request:
curl --request POST \
"http://localhost:8000/api/user/request-otp" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"email\": \"zbailey@example.net\",
\"password\": \"-0pBNvYgxw\"
}"
const url = new URL(
"http://localhost:8000/api/user/request-otp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"email": "zbailey@example.net",
"password": "-0pBNvYgxw"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Step 2 (Register): Verify OTP and create user account
Example request:
curl --request POST \
"http://localhost:8000/api/user/complete-registration" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\",
\"otp\": \"miyvdl\"
}"
const url = new URL(
"http://localhost:8000/api/user/complete-registration"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net",
"otp": "miyvdl"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Step 1 (Login): Validate credentials & send login 2FA OTP
Example request:
curl --request POST \
"http://localhost:8000/api/user/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\",
\"password\": \"|]|{+-\"
}"
const url = new URL(
"http://localhost:8000/api/user/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net",
"password": "|]|{+-"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Step 2 (Login): Verify login OTP and dispatch auth token
Example request:
curl --request POST \
"http://localhost:8000/api/user/complete-login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\",
\"otp\": \"miyvdl\"
}"
const url = new URL(
"http://localhost:8000/api/user/complete-login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net",
"otp": "miyvdl"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/user/shop-settings
Example request:
curl --request GET \
--get "http://localhost:8000/api/user/shop-settings" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/user/shop-settings"
);
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: *
{
"id": 1,
"website_name": "KM Telicom",
"tagline": "Your Website Tagline",
"shop_location": "Your Shop Location",
"website_logo": "default_logo.png",
"slider1_hero_text": "Your Website Hero Text 1",
"slider1_headline": "Your Website Headline 1",
"slider1_paragraph": "Your Website Paragraph 1",
"slider1_image": "default_slider1.png",
"slider1_button": "Your Website Button 1",
"slider2_hero_text": "Your Website Hero Text 2",
"slider2_headline": "Your Website Headline 2",
"slider2_paragraph": "Your Website Paragraph 2",
"slider2_image": "default_slider2.png",
"slider2_button": "Your Website Button 2",
"card1_headline": "Your Website Card 1 Headline",
"card1_text": "Your Website Card 1 Text",
"card2_headline": "Your Website Card 2 Headline",
"card2_text": "Your Website Card 2 Text",
"card3_headline": "Your Website Card 3 Headline",
"card3_text": "Your Website Card 3 Text",
"card4_headline": "Your Website Card 4 Headline",
"card4_text": "Your Website Card 4 Text",
"created_at": "2026-09-08T07:18:25.000000Z",
"updated_at": "2026-09-08T07:19:12.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/user/about-settings
Example request:
curl --request GET \
--get "http://localhost:8000/api/user/about-settings" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/user/about-settings"
);
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: *
{
"id": 1,
"slider_hero_text": "Your About Us Hero Text",
"slider_headline": "Your About Us Headline",
"slider_paragraph": "Your About Us Paragraph",
"slider_button": "Your About Us Button",
"why_choose_hero_text": "Why Choose Us Hero Text",
"why_choose_headline": "Why Choose Us Headline",
"why_choose_paragraph": "Why Choose Us Paragraph",
"card1_icon": "default_card1_icon.png",
"card1_header": "Card 1 Header",
"card1_title": "Card 1 Title",
"card2_icon": "default_card2_icon.png",
"card2_header": "Card 2 Header",
"card2_title": "Card 2 Title",
"card3_icon": "default_card3_icon.png",
"card3_header": "Card 3 Header",
"card3_title": "Card 3 Title",
"physical_outlets_header": "Our Outlets Header",
"physical_outlets_title": "Our Outlets Title",
"stores_location": "123 Main Street, City, Country",
"stores_google_map_location": "https://maps.google.com/?q=loc:0,0",
"working_hours": "Mon - Sat: 9:00 AM - 8:00 PM",
"hotline_number_1": "+1234567890",
"hotline_number_2": "+0987654321",
"hotmail": "support@example.com",
"our_vision_header": "Our Vision Header",
"our_vision_paragraph": "Our Vision Paragraph",
"our_vision_image": "default_vision.png",
"created_at": "2026-09-08T07:18:58.000000Z",
"updated_at": "2026-09-08T07:18:58.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/products
Example request:
curl --request GET \
--get "http://localhost:8000/api/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/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: *
[
{
"id": 2,
"category_id": 1,
"name": "uyre",
"slug": "uyre",
"sku": "ewrewr",
"quantity": 10,
"alert_quantity": 5,
"unit": "pcs",
"location": "ergret",
"buying_price": "1200.00",
"selling_price": "200.00",
"is_active": 1,
"notes": null,
"images": [
"uploads/products/1788933918_PLZcnH49VO.jpg"
],
"image": null,
"created_at": "2026-09-09T06:05:18.000000Z",
"updated_at": "2026-09-09T06:05:18.000000Z",
"deleted_at": null,
"category": {
"id": 1,
"name": "Keyboard",
"slug": "keyboard",
"description": "janina",
"is_active": 1,
"created_at": "2026-09-08T07:20:04.000000Z",
"updated_at": "2026-09-08T07:20:04.000000Z"
}
},
{
"id": 1,
"category_id": 1,
"name": "keyboard",
"slug": "keyboard",
"sku": null,
"quantity": 10,
"alert_quantity": 5,
"unit": "pcs",
"location": "kshdsgkl",
"buying_price": "250.00",
"selling_price": "350.00",
"is_active": 1,
"notes": "werewr",
"images": [
"uploads/products/1788852142_pmwa0j108o.png"
],
"image": null,
"created_at": "2026-09-08T07:22:22.000000Z",
"updated_at": "2026-09-08T07:22:22.000000Z",
"deleted_at": null,
"category": {
"id": 1,
"name": "Keyboard",
"slug": "keyboard",
"description": "janina",
"is_active": 1,
"created_at": "2026-09-08T07:20:04.000000Z",
"updated_at": "2026-09-08T07:20:04.000000Z"
}
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/products/{product}
Example request:
curl --request GET \
--get "http://localhost:8000/api/products/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/products/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "No query results for model [App\\Models\\Admin\\Product] architecto"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/admin/logout
Example request:
curl --request POST \
"http://localhost:8000/api/admin/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/admin/me
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/me" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/admin/categories
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/admin/categories
Example request:
curl --request POST \
"http://localhost:8000/api/admin/categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"description\": \"Eius et animi quos velit et.\",
\"is_active\": false
}"
const url = new URL(
"http://localhost:8000/api/admin/categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"description": "Eius et animi quos velit et.",
"is_active": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/admin/categories/{id}
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/categories/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/categories/1"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/admin/categories/{id}
Example request:
curl --request PUT \
"http://localhost:8000/api/admin/categories/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"description\": \"Eius et animi quos velit et.\",
\"is_active\": false
}"
const url = new URL(
"http://localhost:8000/api/admin/categories/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"description": "Eius et animi quos velit et.",
"is_active": false
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DELETE api/admin/categories/{id}
Example request:
curl --request DELETE \
"http://localhost:8000/api/admin/categories/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/categories/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/admin/products
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/admin/products
Example request:
curl --request POST \
"http://localhost:8000/api/admin/products" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "category_id=architecto"\
--form "name=n"\
--form "sku=g"\
--form "quantity=12"\
--form "buying_price=77"\
--form "selling_price=8"\
--form "location=y"\
--form "notes=architecto"\
--form "images[]=@/tmp/phpzJWVnv" const url = new URL(
"http://localhost:8000/api/admin/products"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('category_id', 'architecto');
body.append('name', 'n');
body.append('sku', 'g');
body.append('quantity', '12');
body.append('buying_price', '77');
body.append('selling_price', '8');
body.append('location', 'y');
body.append('notes', 'architecto');
body.append('images[]', document.querySelector('input[name="images[]"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/admin/products/{id}
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/products/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/products/1"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/admin/products/{id}
Example request:
curl --request PUT \
"http://localhost:8000/api/admin/products/1" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "category_id=architecto"\
--form "name=n"\
--form "quantity=84"\
--form "buying_price=12"\
--form "selling_price=77"\
--form "location=i"\
--form "notes=architecto"\
--form "images[]=@/tmp/phpSCqGNp" const url = new URL(
"http://localhost:8000/api/admin/products/1"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('category_id', 'architecto');
body.append('name', 'n');
body.append('quantity', '84');
body.append('buying_price', '12');
body.append('selling_price', '77');
body.append('location', 'i');
body.append('notes', 'architecto');
body.append('images[]', document.querySelector('input[name="images[]"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DELETE api/admin/products/{id}
Example request:
curl --request DELETE \
"http://localhost:8000/api/admin/products/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/products/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/admin/customers
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/customers" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/customers"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/admin/customers
Example request:
curl --request POST \
"http://localhost:8000/api/admin/customers" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"address\": \"architecto\",
\"phone\": \"ngzmiyvdljnikhwa\",
\"due\": 50
}"
const url = new URL(
"http://localhost:8000/api/admin/customers"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"address": "architecto",
"phone": "ngzmiyvdljnikhwa",
"due": 50
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/admin/customers/{id}
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/customers/16" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/customers/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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/admin/customers/{id}
Example request:
curl --request PUT \
"http://localhost:8000/api/admin/customers/16" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"address\": \"architecto\",
\"phone\": \"ngzmiyvdljnikhwa\",
\"due\": 50
}"
const url = new URL(
"http://localhost:8000/api/admin/customers/16"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"address": "architecto",
"phone": "ngzmiyvdljnikhwa",
"due": 50
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DELETE api/admin/customers/{id}
Example request:
curl --request DELETE \
"http://localhost:8000/api/admin/customers/16" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/customers/16"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/admin/staff
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/staff" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/staff"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store new staff record directly with file upload.
Example request:
curl --request POST \
"http://localhost:8000/api/admin/staff" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=b"\
--form "email=zbailey@example.net"\
--form "password=-0pBNvYgxw"\
--form "staff_number=a"\
--form "salary=50"\
--form "age=18"\
--form "type=architecto"\
--form "image=@/tmp/phpHCI4is" const url = new URL(
"http://localhost:8000/api/admin/staff"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'b');
body.append('email', 'zbailey@example.net');
body.append('password', '-0pBNvYgxw');
body.append('staff_number', 'a');
body.append('salary', '50');
body.append('age', '18');
body.append('type', 'architecto');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/admin/staff/{id}
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/staff/16" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/staff/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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update existing staff record with file upload.
Example request:
curl --request PUT \
"http://localhost:8000/api/admin/staff/16" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=b"\
--form "email=zbailey@example.net"\
--form "password=-0pBNvYgxw"\
--form "staff_number=a"\
--form "salary=50"\
--form "age=18"\
--form "image=@/tmp/php77I3mM" const url = new URL(
"http://localhost:8000/api/admin/staff/16"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'b');
body.append('email', 'zbailey@example.net');
body.append('password', '-0pBNvYgxw');
body.append('staff_number', 'a');
body.append('salary', '50');
body.append('age', '18');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DELETE api/admin/staff/{id}
Example request:
curl --request DELETE \
"http://localhost:8000/api/admin/staff/16" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/staff/16"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/admin/staff/{staff_id}/salaries
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/staff/16/salaries" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/staff/16/salaries"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/admin/staff/{staff_id}/salaries/pay
Example request:
curl --request POST \
"http://localhost:8000/api/admin/staff/16/salaries/pay" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount\": 27,
\"received_date\": \"2026-09-09T09:49:42\",
\"month_year\": \"architecto\",
\"notes\": \"architecto\"
}"
const url = new URL(
"http://localhost:8000/api/admin/staff/16/salaries/pay"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"amount": 27,
"received_date": "2026-09-09T09:49:42",
"month_year": "architecto",
"notes": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Fetch attendance records with date-range filtering for UI views.
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/attendance" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"start_date\": \"2026-09-09T09:49:42\",
\"end_date\": \"2052-10-02\",
\"filter\": \"last_month\"
}"
const url = new URL(
"http://localhost:8000/api/admin/attendance"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"start_date": "2026-09-09T09:49:42",
"end_date": "2052-10-02",
"filter": "last_month"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Bulk store or update daily attendance entries submitted from the UI.
Example request:
curl --request POST \
"http://localhost:8000/api/admin/attendance/daily" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2026-09-09\",
\"attendances\": [
{
\"staff_id\": \"architecto\",
\"status\": \"architecto\",
\"check_in\": \"architecto\",
\"check_out\": \"architecto\",
\"notes\": \"n\"
}
]
}"
const url = new URL(
"http://localhost:8000/api/admin/attendance/daily"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2026-09-09",
"attendances": [
{
"staff_id": "architecto",
"status": "architecto",
"check_in": "architecto",
"check_out": "architecto",
"notes": "n"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a single attendance log entry.
Example request:
curl --request PUT \
"http://localhost:8000/api/admin/attendance/16" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"check_in\": \"architecto\",
\"check_out\": \"architecto\",
\"notes\": \"n\"
}"
const url = new URL(
"http://localhost:8000/api/admin/attendance/16"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"check_in": "architecto",
"check_out": "architecto",
"notes": "n"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Change order status directly (pending, confirm, cancel).
Example request:
curl --request PATCH \
"http://localhost:8000/api/admin/orders/1/status" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"order_status\": \"confirm\"
}"
const url = new URL(
"http://localhost:8000/api/admin/orders/1/status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"order_status": "confirm"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display a listing of orders.
Filters: ?sell_by=name, ?order_number=ORD-..., ?search=query, ?status=pending|confirm|cancel
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store order (defaults to pending, revenue is NOT recorded until confirmed).
Example request:
curl --request POST \
"http://localhost:8000/api/admin/orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/orders"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/admin/orders/{id}
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/orders/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/orders/1"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update order details.
Example request:
curl --request PUT \
"http://localhost:8000/api/admin/orders/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/orders/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DELETE api/admin/orders/{id}
Example request:
curl --request DELETE \
"http://localhost:8000/api/admin/orders/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/orders/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/admin/inventories
Example request:
curl --request POST \
"http://localhost:8000/api/admin/inventories" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": \"architecto\",
\"added_quantity\": 22,
\"unit_cost\": 84,
\"notes\": \"architecto\"
}"
const url = new URL(
"http://localhost:8000/api/admin/inventories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": "architecto",
"added_quantity": 22,
"unit_cost": 84,
"notes": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Fetch Revenue-only reports with date filtering.
Query Params: ?period=today|this_week|this_month|this_year|custom&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/reports/revenue" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/reports/revenue"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Fetch Cost-only reports with date filtering.
Query Params: ?period=today|this_week|this_month|this_year|custom&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/reports/cost" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/reports/cost"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Fetch Net Summary (Revenue, Cost, Net Profit/Loss) with date filtering.
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/reports/summary" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/reports/summary"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/admin/shop-settings
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/shop-settings" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/shop-settings"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/admin/shop-settings
Example request:
curl --request POST \
"http://localhost:8000/api/admin/shop-settings" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"website_name\": \"architecto\",
\"tagline\": \"architecto\",
\"shop_location\": \"architecto\",
\"slider1_hero_text\": \"architecto\",
\"slider1_headline\": \"architecto\",
\"slider1_paragraph\": \"architecto\",
\"slider1_button\": \"architecto\",
\"slider2_hero_text\": \"architecto\",
\"slider2_headline\": \"architecto\",
\"slider2_paragraph\": \"architecto\",
\"slider2_button\": \"architecto\",
\"card1_headline\": \"architecto\",
\"card1_text\": \"architecto\",
\"card2_headline\": \"architecto\",
\"card2_text\": \"architecto\",
\"card3_headline\": \"architecto\",
\"card3_text\": \"architecto\",
\"card4_headline\": \"architecto\",
\"card4_text\": \"architecto\"
}"
const url = new URL(
"http://localhost:8000/api/admin/shop-settings"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"website_name": "architecto",
"tagline": "architecto",
"shop_location": "architecto",
"slider1_hero_text": "architecto",
"slider1_headline": "architecto",
"slider1_paragraph": "architecto",
"slider1_button": "architecto",
"slider2_hero_text": "architecto",
"slider2_headline": "architecto",
"slider2_paragraph": "architecto",
"slider2_button": "architecto",
"card1_headline": "architecto",
"card1_text": "architecto",
"card2_headline": "architecto",
"card2_text": "architecto",
"card3_headline": "architecto",
"card3_text": "architecto",
"card4_headline": "architecto",
"card4_text": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/admin/about-settings
Example request:
curl --request GET \
--get "http://localhost:8000/api/admin/about-settings" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/admin/about-settings"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/admin/about-settings
Example request:
curl --request POST \
"http://localhost:8000/api/admin/about-settings" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"slider_hero_text\": \"architecto\",
\"slider_headline\": \"architecto\",
\"slider_paragraph\": \"architecto\",
\"slider_button\": \"architecto\",
\"why_choose_hero_text\": \"architecto\",
\"why_choose_headline\": \"architecto\",
\"why_choose_paragraph\": \"architecto\",
\"card1_header\": \"architecto\",
\"card1_title\": \"architecto\",
\"card2_header\": \"architecto\",
\"card2_title\": \"architecto\",
\"card3_header\": \"architecto\",
\"card3_title\": \"architecto\",
\"physical_outlets_header\": \"architecto\",
\"physical_outlets_title\": \"architecto\",
\"stores_location\": \"architecto\",
\"stores_google_map_location\": \"architecto\",
\"working_hours\": \"architecto\",
\"hotline_number_1\": \"architecto\",
\"hotline_number_2\": \"architecto\",
\"hotmail\": \"zbailey@example.net\",
\"our_vision_header\": \"architecto\",
\"our_vision_paragraph\": \"architecto\"
}"
const url = new URL(
"http://localhost:8000/api/admin/about-settings"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"slider_hero_text": "architecto",
"slider_headline": "architecto",
"slider_paragraph": "architecto",
"slider_button": "architecto",
"why_choose_hero_text": "architecto",
"why_choose_headline": "architecto",
"why_choose_paragraph": "architecto",
"card1_header": "architecto",
"card1_title": "architecto",
"card2_header": "architecto",
"card2_title": "architecto",
"card3_header": "architecto",
"card3_title": "architecto",
"physical_outlets_header": "architecto",
"physical_outlets_title": "architecto",
"stores_location": "architecto",
"stores_google_map_location": "architecto",
"working_hours": "architecto",
"hotline_number_1": "architecto",
"hotline_number_2": "architecto",
"hotmail": "zbailey@example.net",
"our_vision_header": "architecto",
"our_vision_paragraph": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Logout staff session.
Example request:
curl --request POST \
"http://localhost:8000/api/staff/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/staff/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/staff/me
Example request:
curl --request GET \
--get "http://localhost:8000/api/staff/me" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/staff/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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/staff/customers
Example request:
curl --request GET \
--get "http://localhost:8000/api/staff/customers" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/staff/customers"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/staff/customers
Example request:
curl --request POST \
"http://localhost:8000/api/staff/customers" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"address\": \"architecto\",
\"phone\": \"ngzmiyvdljnikhwa\",
\"due\": 50
}"
const url = new URL(
"http://localhost:8000/api/staff/customers"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"address": "architecto",
"phone": "ngzmiyvdljnikhwa",
"due": 50
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/staff/customers/{id}
Example request:
curl --request GET \
--get "http://localhost:8000/api/staff/customers/16" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/staff/customers/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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/staff/customers/{id}
Example request:
curl --request PUT \
"http://localhost:8000/api/staff/customers/16" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"address\": \"architecto\",
\"phone\": \"ngzmiyvdljnikhwa\",
\"due\": 50
}"
const url = new URL(
"http://localhost:8000/api/staff/customers/16"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"address": "architecto",
"phone": "ngzmiyvdljnikhwa",
"due": 50
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DELETE api/staff/customers/{id}
Example request:
curl --request DELETE \
"http://localhost:8000/api/staff/customers/16" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/staff/customers/16"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/staff/sales/{staff_name}
Example request:
curl --request GET \
--get "http://localhost:8000/api/staff/sales/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/staff/sales/architecto"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Change order status directly (pending, confirm, cancel).
Example request:
curl --request PATCH \
"http://localhost:8000/api/staff/orders/1/status" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"order_status\": \"pending\"
}"
const url = new URL(
"http://localhost:8000/api/staff/orders/1/status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"order_status": "pending"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display a listing of orders.
Filters: ?sell_by=name, ?order_number=ORD-..., ?search=query, ?status=pending|confirm|cancel
Example request:
curl --request GET \
--get "http://localhost:8000/api/staff/orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/staff/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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store order (defaults to pending, revenue is NOT recorded until confirmed).
Example request:
curl --request POST \
"http://localhost:8000/api/staff/orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/staff/orders"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/staff/orders/{id}
Example request:
curl --request GET \
--get "http://localhost:8000/api/staff/orders/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/staff/orders/1"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update order details.
Example request:
curl --request PUT \
"http://localhost:8000/api/staff/orders/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/staff/orders/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DELETE api/staff/orders/{id}
Example request:
curl --request DELETE \
"http://localhost:8000/api/staff/orders/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/staff/orders/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Logout action
Example request:
curl --request POST \
"http://localhost:8000/api/user/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/user/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/user/me
Example request:
curl --request GET \
--get "http://localhost:8000/api/user/me" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/user/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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/user/orders
Example request:
curl --request GET \
--get "http://localhost:8000/api/user/orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/user/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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created website user order.
Example request:
curl --request POST \
"http://localhost:8000/api/user/orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/user/orders"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified order.
Example request:
curl --request GET \
--get "http://localhost:8000/api/user/orders/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8000/api/user/orders/1"
);
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: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT api/user/orders/{id}
Example request:
curl --request PUT \
"http://localhost:8000/api/user/orders/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"phone\": \"ngzmiyvdljnikhwa\",
\"delivery_address\": \"y\",
\"paid_by\": \"cod\",
\"order_status\": \"completed\",
\"payment_status\": \"paid\",
\"notes\": \"k\"
}"
const url = new URL(
"http://localhost:8000/api/user/orders/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"phone": "ngzmiyvdljnikhwa",
"delivery_address": "y",
"paid_by": "cod",
"order_status": "completed",
"payment_status": "paid",
"notes": "k"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.