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
GET api/test
Example request:
curl --request GET \
--get "http://localhost/api/test" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/test"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
content-type: text/html; charset=UTF-8
cache-control: no-cache, private
access-control-allow-origin: *
PGIMS API working
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.
Register new user and issue API token.
Registers a new user with the given name, email, and password. Returns the created user data and auth token.
Example request:
curl --request POST \
"http://localhost/api/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"John Doe\",
\"email\": \"john@example.com\",
\"password\": \"password123\",
\"password_confirmation\": \"password123\"
}"
const url = new URL(
"http://localhost/api/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "John Doe",
"email": "john@example.com",
"password": "password123",
"password_confirmation": "password123"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"user": {
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"role": "user",
"created_at": "2025-09-17T14:00:00Z",
"updated_at": "2025-09-17T14:00:00Z"
},
"token": "encrypted_api_token_here"
}
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.
Login existing user and issue API token.
Authenticates user by email and password. Returns user data and an authentication token.
Example request:
curl --request POST \
"http://localhost/api/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"john@example.com\",
\"password\": \"password123\"
}"
const url = new URL(
"http://localhost/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "john@example.com",
"password": "password123"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"user": {
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"role": "user",
"created_at": "2025-09-17T14:00:00Z",
"updated_at": "2025-09-17T14:00:00Z"
},
"token": "encrypted_api_token_here"
}
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 authenticated user by revoking current access token.
Requires authentication.
Example request:
curl --request POST \
"http://localhost/api/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Logged out successfully"
}
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
Example request:
curl --request GET \
--get "http://localhost/api/user" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/user"
);
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.
Display a listing of users.
Example request:
curl --request GET \
--get "http://localhost/api/users" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"name": "Jane Doe",
"email": "jane@example.com",
"role": "admin",
"created_at": "2025-09-19T19:29:00Z",
"updated_at": "2025-09-19T19:29:00Z"
}
]
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 user.
Example request:
curl --request POST \
"http://localhost/api/users" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Jane Doe\",
\"email\": \"jane@example.com\",
\"password\": \"password123\",
\"role\": \"admin\",
\"password_confirmation\": \"password123\"
}"
const url = new URL(
"http://localhost/api/users"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Jane Doe",
"email": "jane@example.com",
"password": "password123",
"role": "admin",
"password_confirmation": "password123"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"name": "Jane Doe",
"email": "jane@example.com",
"role": "admin",
"created_at": "2025-09-19T19:29:00Z",
"updated_at": "2025-09-19T19:29:00Z"
}
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 user.
Example request:
curl --request GET \
--get "http://localhost/api/users/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "Jane Doe",
"email": "jane@example.com",
"role": "admin",
"created_at": "2025-09-19T19:29:00Z",
"updated_at": "2025-09-19T19:29:00Z"
}
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 the specified user.
Example request:
curl --request PUT \
"http://localhost/api/users/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"email\": \"qkunze@example.com\",
\"password\": \"O[2UZ5ij-e\\/dl4m{o,\",
\"role\": \"consequatur\",
\"password_confirmation\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/users/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"email": "qkunze@example.com",
"password": "O[2UZ5ij-e\/dl4m{o,",
"role": "consequatur",
"password_confirmation": "consequatur"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "Jane Doe Updated",
"email": "jane.updated@example.com",
"role": "user",
"created_at": "2025-09-19T19:29:00Z",
"updated_at": "2025-09-19T19:45:00Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified user.
Example request:
curl --request DELETE \
"http://localhost/api/users/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 suppliers.
Example request:
curl --request GET \
--get "http://localhost/api/suppliers" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/suppliers"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"name": "Supplier A",
"contact_name": "John Doe",
"email": "contact@example.com",
"phone": "123-456-7890",
"address": "123 Supplier St.",
"description": "Preferred vendor",
"created_at": "2025-09-19T18:06:00Z",
"updated_at": "2025-09-19T18:06:00Z"
}
]
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 supplier.
Example request:
curl --request POST \
"http://localhost/api/suppliers" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Supplier A\",
\"contact_name\": \"John Doe\",
\"email\": \"contact@example.com\",
\"phone\": \"123-456-7890\",
\"address\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost/api/suppliers"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Supplier A",
"contact_name": "John Doe",
"email": "contact@example.com",
"phone": "123-456-7890",
"address": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"name": "Supplier A",
"contact_name": "John Doe",
"email": "contact@example.com",
"phone": "123-456-7890",
"address": "123 Supplier St.",
"description": "Preferred vendor",
"created_at": "2025-09-19T18:06:00Z",
"updated_at": "2025-09-19T18:06:00Z"
}
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 supplier.
Example request:
curl --request GET \
--get "http://localhost/api/suppliers/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/suppliers/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "Supplier A",
"contact_name": "John Doe",
"email": "contact@example.com",
"phone": "123-456-7890",
"address": "123 Supplier St.",
"description": "Preferred vendor",
"created_at": "2025-09-19T18:06:00Z",
"updated_at": "2025-09-19T18:06:00Z"
}
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 the specified supplier.
Example request:
curl --request PUT \
"http://localhost/api/suppliers/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"contact_name\": \"consequatur\",
\"email\": \"qkunze@example.com\",
\"phone\": \"consequatur\",
\"address\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost/api/suppliers/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"contact_name": "consequatur",
"email": "qkunze@example.com",
"phone": "consequatur",
"address": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "Supplier A Updated",
"contact_name": "Jane Smith",
"email": "contactnew@example.com",
"phone": "987-654-3210",
"address": "456 New Supplier St.",
"description": "Updated vendor info",
"created_at": "2025-09-19T18:06:00Z",
"updated_at": "2025-09-19T18:45:00Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified supplier.
Example request:
curl --request DELETE \
"http://localhost/api/suppliers/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/suppliers/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 products.
Example request:
curl --request GET \
--get "http://localhost/api/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/products"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"sku": "SKU001",
"name": "Product A",
"description": "A sample product.",
"price": 100,
"stock": 50,
"created_at": "2025-09-19T09:35:00Z",
"updated_at": "2025-09-19T09:35:00Z"
}
]
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 new product.
Example request:
curl --request POST \
"http://localhost/api/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sku\": \"SKU001\",
\"name\": \"Product A\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
\"price\": \"100.00\",
\"stock\": 50
}"
const url = new URL(
"http://localhost/api/products"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sku": "SKU001",
"name": "Product A",
"description": "Dolores dolorum amet iste laborum eius est dolor.",
"price": "100.00",
"stock": 50
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"sku": "SKU001",
"name": "Product A",
"description": "A sample product.",
"price": 100,
"stock": 50,
"created_at": "2025-09-19T09:35:00Z",
"updated_at": "2025-09-19T09:35:00Z"
}
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 an existing product.
Example request:
curl --request PUT \
"http://localhost/api/products/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sku\": \"SKU001\",
\"name\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
\"price\": \"consequatur\",
\"stock\": 17
}"
const url = new URL(
"http://localhost/api/products/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sku": "SKU001",
"name": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor.",
"price": "consequatur",
"stock": 17
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"sku": "SKU001",
"name": "Product A Updated",
"description": "Updated description.",
"price": 120,
"stock": 30,
"created_at": "2025-09-19T09:35:00Z",
"updated_at": "2025-09-19T09:50:00Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified product.
Example request:
curl --request DELETE \
"http://localhost/api/products/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/products/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 product categories.
Example request:
curl --request GET \
--get "http://localhost/api/product-categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/product-categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"name": "Beverages",
"description": "Drinks and refreshments",
"created_at": "2025-09-19T09:35:00Z",
"updated_at": "2025-09-19T09:35:00Z"
}
]
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 new product category.
Example request:
curl --request POST \
"http://localhost/api/product-categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Beverages\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost/api/product-categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Beverages",
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"name": "Beverages",
"description": "Drinks and refreshments",
"created_at": "2025-09-19T09:35:00Z",
"updated_at": "2025-09-19T09:35:00Z"
}
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 product category.
Example request:
curl --request GET \
--get "http://localhost/api/product-categories/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/product-categories/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "Beverages",
"description": "Drinks and refreshments",
"created_at": "2025-09-19T09:35:00Z",
"updated_at": "2025-09-19T09:35:00Z"
}
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 an existing product category.
Example request:
curl --request PUT \
"http://localhost/api/product-categories/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost/api/product-categories/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "Beverages Updated",
"description": "Updated description",
"created_at": "2025-09-19T09:35:00Z",
"updated_at": "2025-09-19T10:00:00Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified product category.
Example request:
curl --request DELETE \
"http://localhost/api/product-categories/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/product-categories/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 inventory items with related store and product.
Example request:
curl --request GET \
--get "http://localhost/api/inventory" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/inventory"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"store_id": 2,
"product_id": 5,
"quantity": 100,
"created_at": "2025-09-19T09:00:00Z",
"updated_at": "2025-09-19T09:00:00Z",
"store": {
"id": 2,
"name": "Main Store",
// other store fields
},
"product": {
"id": 5,
"name": "Product A",
// other product fields
}
}
]
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 inventory record.
Example request:
curl --request POST \
"http://localhost/api/inventory" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"store_id\": 2,
\"product_id\": 5,
\"quantity\": 100
}"
const url = new URL(
"http://localhost/api/inventory"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"store_id": 2,
"product_id": 5,
"quantity": 100
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"store_id": 2,
"product_id": 5,
"quantity": 100,
"created_at": "2025-09-19T09:00:00Z",
"updated_at": "2025-09-19T09:00:00Z"
}
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 inventory record with related store and product.
Example request:
curl --request GET \
--get "http://localhost/api/inventory/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/inventory/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"store_id": 2,
"product_id": 5,
"quantity": 100,
"created_at": "2025-09-19T09:00:00Z",
"updated_at": "2025-09-19T09:00:00Z",
"store": {
"id": 2,
"name": "Main Store"
},
"product": {
"id": 5,
"name": "Product A"
}
}
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 the specified inventory record.
Example request:
curl --request PUT \
"http://localhost/api/inventory/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"store_id\": 17,
\"product_id\": 17,
\"quantity\": 17
}"
const url = new URL(
"http://localhost/api/inventory/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"store_id": 17,
"product_id": 17,
"quantity": 17
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"store_id": 2,
"product_id": 5,
"quantity": 150,
"created_at": "2025-09-19T09:00:00Z",
"updated_at": "2025-09-19T10:00:00Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified inventory record.
Example request:
curl --request DELETE \
"http://localhost/api/inventory/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/inventory/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 with related items and customer.
Example request:
curl --request GET \
--get "http://localhost/api/orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/orders"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"customer_id": 1,
"total_amount": 250,
"status": "completed",
"created_at": "2025-09-19T09:00:00Z",
"updated_at": "2025-09-19T09:00:00Z",
"items": [
{
"product_id": 5,
"quantity": 2,
"unit_price": 50,
"line_total": 100,
"product": {
"id": 5,
"name": "Product A"
}
}
],
"customer": {
"id": 1,
"name": "Jane Doe"
}
}
]
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 new order including order items and stock adjustments.
Example request:
curl --request POST \
"http://localhost/api/orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer_id\": 1,
\"items\": [
\"consequatur\"
],
\"payment_method\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/orders"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer_id": 1,
"items": [
"consequatur"
],
"payment_method": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"customer_id": 1,
"payment_method": "credit_card",
"total_amount": 250.00,
"status": "completed",
"created_at": "2025-09-19T09:00:00Z",
"updated_at": "2025-09-19T09:00:00Z",
"items": [...],
"customer": {...}
}
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 with items and customer.
Example request:
curl --request GET \
--get "http://localhost/api/orders/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/orders/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"customer_id": 1,
"total_amount": 250,
"status": "completed",
"created_at": "2025-09-19T09:00:00Z",
"updated_at": "2025-09-19T09:00:00Z",
"items": [
{
"product_id": 5,
"quantity": 2,
"unit_price": 50,
"line_total": 100,
"product": {
"id": 5,
"name": "Product A"
}
}
],
"customer": {
"id": 1,
"name": "Jane Doe"
}
}
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 the specified order and manage items and stock.
Example request:
curl --request PUT \
"http://localhost/api/orders/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer_id\": 17,
\"status\": \"consequatur\",
\"notes\": \"consequatur\",
\"items\": [
\"consequatur\"
]
}"
const url = new URL(
"http://localhost/api/orders/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer_id": 17,
"status": "consequatur",
"notes": "consequatur",
"items": [
"consequatur"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"customer_id": 1,
"total_amount": 300.00,
"status": "completed",
"notes": "Updated notes",
"created_at": "2025-09-19T09:00:00Z",
"updated_at": "2025-09-19T10:00:00Z",
"items": [...],
"customer": {...}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified order and restore stock quantities.
Example request:
curl --request DELETE \
"http://localhost/api/orders/2" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/orders/2"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 order items with related products and orders.
Example request:
curl --request GET \
--get "http://localhost/api/order-items" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/order-items"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"order_id": 10,
"product_id": 5,
"quantity": 3,
"unit_price": 50,
"line_total": 150,
"created_at": "2025-09-19T09:30:00Z",
"updated_at": "2025-09-19T09:30:00Z",
"product": {
"id": 5,
"name": "Product A"
},
"order": {
"id": 10,
"customer_id": 1,
"total_amount": 500,
"status": "completed"
}
}
]
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 new order item.
Example request:
curl --request POST \
"http://localhost/api/order-items" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"order_id\": 10,
\"product_id\": 5,
\"quantity\": 3,
\"unit_price\": \"50.00\",
\"line_total\": \"150.00\"
}"
const url = new URL(
"http://localhost/api/order-items"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"order_id": 10,
"product_id": 5,
"quantity": 3,
"unit_price": "50.00",
"line_total": "150.00"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"order_id": 10,
"product_id": 5,
"quantity": 3,
"unit_price": 50,
"line_total": 150,
"created_at": "2025-09-19T09:30:00Z",
"updated_at": "2025-09-19T09:30:00Z"
}
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 item with product and order.
Example request:
curl --request GET \
--get "http://localhost/api/order-items/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/order-items/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"order_id": 10,
"product_id": 5,
"quantity": 3,
"unit_price": 50,
"line_total": 150,
"created_at": "2025-09-19T09:30:00Z",
"updated_at": "2025-09-19T09:30:00Z",
"product": {
"id": 5,
"name": "Product A"
},
"order": {
"id": 10,
"customer_id": 1,
"total_amount": 500,
"status": "completed"
}
}
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 an existing order item.
Example request:
curl --request PUT \
"http://localhost/api/order-items/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"order_id\": 17,
\"product_id\": 17,
\"quantity\": 17,
\"unit_price\": \"consequatur\",
\"line_total\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/order-items/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"order_id": 17,
"product_id": 17,
"quantity": 17,
"unit_price": "consequatur",
"line_total": "consequatur"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"order_id": 10,
"product_id": 5,
"quantity": 4,
"unit_price": 45,
"line_total": 180,
"created_at": "2025-09-19T09:30:00Z",
"updated_at": "2025-09-19T10:00:00Z"
}
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 the specified order item.
Example request:
curl --request DELETE \
"http://localhost/api/order-items/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/order-items/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 purchase orders with associated supplier.
Example request:
curl --request GET \
--get "http://localhost/api/purchase-orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/purchase-orders"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"supplier_id": 3,
"order_number": "PO-12345",
"status": "pending",
"total_amount": 1000,
"order_date": "2025-09-20",
"expected_date": "2025-09-30",
"notes": "Urgent order",
"created_at": "2025-09-19T16:40:00Z",
"updated_at": "2025-09-19T16:40:00Z",
"supplier": {
"id": 3,
"name": "Supplier Name"
}
}
]
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 purchase order.
Example request:
curl --request POST \
"http://localhost/api/purchase-orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"supplier_id\": 3,
\"order_number\": \"PO-12345\",
\"status\": \"consequatur\",
\"payment_method\": \"consequatur\",
\"total_amount\": \"1000.00\",
\"order_date\": \"2025-09-20\",
\"expected_date\": \"2025-09-30\",
\"notes\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/purchase-orders"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"supplier_id": 3,
"order_number": "PO-12345",
"status": "consequatur",
"payment_method": "consequatur",
"total_amount": "1000.00",
"order_date": "2025-09-20",
"expected_date": "2025-09-30",
"notes": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"supplier_id": 3,
"order_number": "PO-12345",
"status": "pending",
"payment_method": "cash",
"total_amount": 1000,
"order_date": "2025-09-20",
"expected_date": "2025-09-30",
"notes": "Urgent order",
"created_at": "2025-09-19T16:40:00Z",
"updated_at": "2025-09-19T16:40:00Z"
}
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 purchase order with supplier details.
Example request:
curl --request GET \
--get "http://localhost/api/purchase-orders/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/purchase-orders/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"supplier_id": 3,
"order_number": "PO-12345",
"status": "pending",
"total_amount": 1000,
"order_date": "2025-09-20",
"expected_date": "2025-09-30",
"notes": "Urgent order",
"created_at": "2025-09-19T16:40:00Z",
"updated_at": "2025-09-19T16:40:00Z",
"supplier": {
"id": 3,
"name": "Supplier Name"
}
}
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 the specified purchase order.
Example request:
curl --request PUT \
"http://localhost/api/purchase-orders/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"supplier_id\": 17,
\"order_number\": \"consequatur\",
\"status\": \"consequatur\",
\"total_amount\": \"consequatur\",
\"order_date\": \"consequatur\",
\"expected_date\": \"consequatur\",
\"notes\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/purchase-orders/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"supplier_id": 17,
"order_number": "consequatur",
"status": "consequatur",
"total_amount": "consequatur",
"order_date": "consequatur",
"expected_date": "consequatur",
"notes": "consequatur"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"supplier_id": 3,
"order_number": "PO-12346",
"status": "approved",
"total_amount": 1100,
"order_date": "2025-09-20",
"expected_date": "2025-10-01",
"notes": "Approved order",
"created_at": "2025-09-19T16:40:00Z",
"updated_at": "2025-09-19T17:00:00Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified purchase order.
Example request:
curl --request DELETE \
"http://localhost/api/purchase-orders/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/purchase-orders/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 stock requisitions with related stores, approver, and items.
Example request:
curl --request GET \
--get "http://localhost/api/stock-requisitions" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/stock-requisitions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"from_store_id": 2,
"to_store_id": 3,
"status": "pending",
"approved_by": 5,
"created_at": "2025-09-19T16:44:00Z",
"updated_at": "2025-09-19T16:44:00Z",
"fromStore": { "id": 2, "name": "Store A" },
"toStore": { "id": 3, "name": "Store B" },
"approvedBy": { "id": 5, "name": "Manager" },
"items": [
/ Array of requisition items /
]
}
]
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 stock requisition.
Example request:
curl --request POST \
"http://localhost/api/stock-requisitions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"from_store_id\": 17,
\"to_store_id\": 17,
\"status\": \"pending\",
\"approved_by\": 17
}"
const url = new URL(
"http://localhost/api/stock-requisitions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"from_store_id": 17,
"to_store_id": 17,
"status": "pending",
"approved_by": 17
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"from_store_id": 2,
"to_store_id": 3,
"status": "pending",
"approved_by": 5,
"created_at": "2025-09-19T16:44:00Z",
"updated_at": "2025-09-19T16:44:00Z"
}
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 specific stock requisition with details.
Example request:
curl --request GET \
--get "http://localhost/api/stock-requisitions/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/stock-requisitions/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"from_store_id": 2,
"to_store_id": 3,
"status": "pending",
"approved_by": 5,
"created_at": "2025-09-19T16:44:00Z",
"updated_at": "2025-09-19T16:44:00Z",
"fromStore": { "id": 2, "name": "Store A" },
"toStore": { "id": 3, "name": "Store B" },
"approvedBy": { "id": 5, "name": "Manager" },
"items": [
/ Array of requisition items /
]
}
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 the specified stock requisition.
Example request:
curl --request PUT \
"http://localhost/api/stock-requisitions/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"from_store_id\": 17,
\"to_store_id\": 17,
\"status\": \"consequatur\",
\"approved_by\": 17
}"
const url = new URL(
"http://localhost/api/stock-requisitions/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"from_store_id": 17,
"to_store_id": 17,
"status": "consequatur",
"approved_by": 17
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"from_store_id": 2,
"to_store_id": 3,
"status": "approved",
"approved_by": 5,
"created_at": "2025-09-19T16:44:00Z",
"updated_at": "2025-09-19T17:00:00Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified stock requisition.
Example request:
curl --request DELETE \
"http://localhost/api/stock-requisitions/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/stock-requisitions/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 stock requisition items with related stock requisition and product.
Example request:
curl --request GET \
--get "http://localhost/api/stock-requisition-items" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/stock-requisition-items"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"stock_requisition_id": 2,
"product_id": 5,
"quantity": 10,
"created_at": "2025-09-19T17:00:00Z",
"updated_at": "2025-09-19T17:00:00Z",
"stockRequisition": {
"id": 2,
"status": "pending",
// other stock requisition fields
},
"product": {
"id": 5,
"name": "Product A"
}
}
]
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 stock requisition item.
Example request:
curl --request POST \
"http://localhost/api/stock-requisition-items" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"stock_requisition_id\": 2,
\"product_id\": 5,
\"quantity\": 10
}"
const url = new URL(
"http://localhost/api/stock-requisition-items"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"stock_requisition_id": 2,
"product_id": 5,
"quantity": 10
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"stock_requisition_id": 2,
"product_id": 5,
"quantity": 10,
"created_at": "2025-09-19T17:00:00Z",
"updated_at": "2025-09-19T17:00:00Z"
}
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 stock requisition item with related data.
Example request:
curl --request GET \
--get "http://localhost/api/stock-requisition-items/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/stock-requisition-items/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"stock_requisition_id": 2,
"product_id": 5,
"quantity": 10,
"created_at": "2025-09-19T17:00:00Z",
"updated_at": "2025-09-19T17:00:00Z",
"stockRequisition": {
"id": 2,
"status": "pending"
},
"product": {
"id": 5,
"name": "Product A"
}
}
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 the specified stock requisition item.
Example request:
curl --request PUT \
"http://localhost/api/stock-requisition-items/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"stock_requisition_id\": 17,
\"product_id\": 17,
\"quantity\": 17
}"
const url = new URL(
"http://localhost/api/stock-requisition-items/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"stock_requisition_id": 17,
"product_id": 17,
"quantity": 17
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"stock_requisition_id": 2,
"product_id": 5,
"quantity": 15,
"created_at": "2025-09-19T17:00:00Z",
"updated_at": "2025-09-19T18:00:00Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified stock requisition item.
Example request:
curl --request DELETE \
"http://localhost/api/stock-requisition-items/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/stock-requisition-items/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 stores.
Example request:
curl --request GET \
--get "http://localhost/api/stores" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/stores"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"name": "Main Store",
"address": "123 Main Street",
"phone": "123-456-7890",
"created_at": "2025-09-19T17:03:00Z",
"updated_at": "2025-09-19T17:03:00Z"
}
]
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 store.
Example request:
curl --request POST \
"http://localhost/api/stores" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Main Store\",
\"address\": \"123 Main Street\",
\"phone\": \"123-456-7890\"
}"
const url = new URL(
"http://localhost/api/stores"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Main Store",
"address": "123 Main Street",
"phone": "123-456-7890"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"name": "Main Store",
"address": "123 Main Street",
"phone": "123-456-7890",
"created_at": "2025-09-19T17:03:00Z",
"updated_at": "2025-09-19T17:03:00Z"
}
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 store.
Example request:
curl --request GET \
--get "http://localhost/api/stores/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/stores/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "Main Store",
"address": "123 Main Street",
"phone": "123-456-7890",
"created_at": "2025-09-19T17:03:00Z",
"updated_at": "2025-09-19T17:03:00Z"
}
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 the specified store.
Example request:
curl --request PUT \
"http://localhost/api/stores/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"address\": \"consequatur\",
\"phone\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/stores/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"address": "consequatur",
"phone": "consequatur"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "Updated Store",
"address": "456 New Street",
"phone": "987-654-3210",
"created_at": "2025-09-19T17:03:00Z",
"updated_at": "2025-09-19T17:15:00Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified store.
Example request:
curl --request DELETE \
"http://localhost/api/stores/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/stores/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 daily sales summary report.
Example request:
curl --request GET \
--get "http://localhost/api/reports/daily-sales?date=consequatur&store_id[]=17" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2025-10-20T17:16:12\",
\"store_id\": [
17
]
}"
const url = new URL(
"http://localhost/api/reports/daily-sales"
);
const params = {
"date": "consequatur",
"store_id[0]": "17",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2025-10-20T17:16:12",
"store_id": [
17
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"date": "2025-09-17",
"total_orders": 100,
"total_sales": 50000.45
}
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 payment breakdown by payment method over a date range.
Example request:
curl --request GET \
--get "http://localhost/api/reports/payment-breakdown?start=consequatur&end=consequatur&store_id[]=17" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"start\": \"2025-10-20T17:16:12\",
\"end\": \"2106-11-19\",
\"store_id\": [
17
]
}"
const url = new URL(
"http://localhost/api/reports/payment-breakdown"
);
const params = {
"start": "consequatur",
"end": "consequatur",
"store_id[0]": "17",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"start": "2025-10-20T17:16:12",
"end": "2106-11-19",
"store_id": [
17
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"start_date": "2025-08-17",
"end_date": "2025-09-17",
"payment_methods": [
{
"payment_method": "cash",
"total": 20000
},
{
"payment_method": "card",
"total": 30000
}
]
}
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.
Generate profit report for a date range.
Example request:
curl --request GET \
--get "http://localhost/api/reports/profit?start=consequatur&end=consequatur&store_id[]=17" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"start\": \"2025-10-20T17:16:12\",
\"end\": \"2106-11-19\",
\"store_id\": [
17
]
}"
const url = new URL(
"http://localhost/api/reports/profit"
);
const params = {
"start": "consequatur",
"end": "consequatur",
"store_id[0]": "17",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"start": "2025-10-20T17:16:12",
"end": "2106-11-19",
"store_id": [
17
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"start_date": "2025-08-17",
"end_date": "2025-09-17",
"profit": 15000.5
}
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 inventory stock status by product and store.
Example request:
curl --request GET \
--get "http://localhost/api/reports/inventory-status?store_id=17" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"store_id\": 17
}"
const url = new URL(
"http://localhost/api/reports/inventory-status"
);
const params = {
"store_id": "17",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"store_id": 17
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"name": "Product A",
"quantity": 100,
"store_id": 2
},
{
"id": 2,
"name": "Product B",
"quantity": 50,
"store_id": 2
}
]
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 customer credit and balance report.
Example request:
curl --request GET \
--get "http://localhost/api/reports/customer-credit?customer_id=17" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer_id\": 17
}"
const url = new URL(
"http://localhost/api/reports/customer-credit"
);
const params = {
"customer_id": "17",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer_id": 17
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"name": "John Doe",
"balance": 1200,
"credit_limit": 5000
}
]
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.
Generate expense report for a date range.
Example request:
curl --request GET \
--get "http://localhost/api/reports/expense?start=consequatur&end=consequatur&store_id[]=17" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"start\": \"2025-10-20T17:16:12\",
\"end\": \"2106-11-19\",
\"store_id\": [
17
]
}"
const url = new URL(
"http://localhost/api/reports/expense"
);
const params = {
"start": "consequatur",
"end": "consequatur",
"store_id[0]": "17",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"start": "2025-10-20T17:16:12",
"end": "2106-11-19",
"store_id": [
17
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"start_date": "2025-08-17",
"end_date": "2025-09-17",
"total_expenses": 8000
}
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 customers.
Example request:
curl --request GET \
--get "http://localhost/api/customers" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/customers"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"name": "Jane Doe",
"gender": "female",
"phone": "1234567890",
"email": "jane@example.com",
"address": "123 Main St",
"birthday": "1990-05-10",
"balance": 2000,
"credit_limit": 5000,
"notes": "Loyal customer",
"created_at": "2025-09-17T12:00:00Z",
"updated_at": "2025-09-17T12:00:00Z"
}
]
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 new customer.
Example request:
curl --request POST \
"http://localhost/api/customers" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Jane Doe\",
\"gender\": \"female\",
\"phone\": \"1234567890\",
\"email\": \"jane@example.com\",
\"address\": \"consequatur\",
\"birthday\": \"1990-05-10\",
\"balance\": \"2000.00\",
\"credit_limit\": \"5000.00\",
\"notes\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/customers"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Jane Doe",
"gender": "female",
"phone": "1234567890",
"email": "jane@example.com",
"address": "consequatur",
"birthday": "1990-05-10",
"balance": "2000.00",
"credit_limit": "5000.00",
"notes": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"name": "Jane Doe",
"gender": "female",
"phone": "1234567890",
"email": "jane@example.com",
"address": "123 Main St",
"birthday": "1990-05-10",
"balance": 2000,
"credit_limit": 5000,
"notes": "Loyal customer",
"created_at": "2025-09-17T12:00:00Z",
"updated_at": "2025-09-17T12:00:00Z"
}
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 customer.
Example request:
curl --request GET \
--get "http://localhost/api/customers/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/customers/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "Jane Doe",
"gender": "female",
"phone": "1234567890",
"email": "jane@example.com",
"address": "123 Main St",
"birthday": "1990-05-10",
"balance": 2000,
"credit_limit": 5000,
"notes": "Loyal customer",
"created_at": "2025-09-17T12:00:00Z",
"updated_at": "2025-09-17T12:00:00Z"
}
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 the specified customer.
Example request:
curl --request PUT \
"http://localhost/api/customers/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"consequatur\",
\"gender\": \"consequatur\",
\"phone\": \"consequatur\",
\"email\": \"qkunze@example.com\",
\"address\": \"consequatur\",
\"birthday\": \"consequatur\",
\"balance\": \"consequatur\",
\"credit_limit\": \"consequatur\",
\"notes\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/customers/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "consequatur",
"gender": "consequatur",
"phone": "consequatur",
"email": "qkunze@example.com",
"address": "consequatur",
"birthday": "consequatur",
"balance": "consequatur",
"credit_limit": "consequatur",
"notes": "consequatur"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "Jane Doe Updated",
"gender": "female",
"phone": "0987654321",
"email": "janeupdated@example.com",
"address": "456 Another St",
"birthday": "1990-05-10",
"balance": 2500,
"credit_limit": 5500,
"notes": "Updated notes",
"created_at": "2025-09-17T12:00:00Z",
"updated_at": "2025-09-18T15:00:00Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified customer.
Example request:
curl --request DELETE \
"http://localhost/api/customers/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/customers/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 transactions with related bank accounts.
Example request:
curl --request GET \
--get "http://localhost/api/transactions" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/transactions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"bank_account_id": 2,
"type": "credit",
"amount": 1000,
"reference": "INV-12345",
"description": "Payment received",
"transaction_date": "2025-09-19",
"created_at": "2025-09-19T19:00:00Z",
"updated_at": "2025-09-19T19:00:00Z",
"bankAccount": {
"id": 2,
"bank_name": "First Bank",
"account_number": "1234567890"
}
}
]
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 new transaction inside a database transaction block.
Example request:
curl --request POST \
"http://localhost/api/transactions" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_account_id\": 2,
\"type\": \"credit\",
\"amount\": \"1000.00\",
\"reference\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
\"transaction_date\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/transactions"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_account_id": 2,
"type": "credit",
"amount": "1000.00",
"reference": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor.",
"transaction_date": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 10,
"bank_account_id": 2,
"type": "credit",
"amount": 1000,
"reference": "INV-12345",
"description": "Payment received",
"transaction_date": "2025-09-19",
"created_at": "2025-09-19T19:05:00Z",
"updated_at": "2025-09-19T19:05:00Z"
}
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 transaction with bank account details.
Example request:
curl --request GET \
--get "http://localhost/api/transactions/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/transactions/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"bank_account_id": 2,
"type": "credit",
"amount": 1000,
"reference": "INV-12345",
"description": "Payment received",
"transaction_date": "2025-09-19",
"created_at": "2025-09-19T19:00:00Z",
"updated_at": "2025-09-19T19:00:00Z",
"bankAccount": {
"id": 2,
"bank_name": "First Bank",
"account_number": "1234567890"
}
}
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 the specified transaction inside a database transaction.
Example request:
curl --request PUT \
"http://localhost/api/transactions/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_account_id\": 17,
\"type\": \"consequatur\",
\"amount\": \"consequatur\",
\"reference\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
\"transaction_date\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/transactions/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_account_id": 17,
"type": "consequatur",
"amount": "consequatur",
"reference": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor.",
"transaction_date": "consequatur"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 10,
"bank_account_id": 2,
"type": "debit",
"amount": 500,
"reference": "PAY-56789",
"description": "Payment refund",
"transaction_date": "2025-09-20",
"created_at": "2025-09-19T19:05:00Z",
"updated_at": "2025-09-20T10:00:00Z"
}
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 the specified transaction.
Example request:
curl --request DELETE \
"http://localhost/api/transactions/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/transactions/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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 payments made to banks
Retrieves all credit transactions linked to bank accounts. Optionally, you can filter results by the bank name.
Example request:
curl --request GET \
--get "http://localhost/api/paymentTobank?bank_name=First+Bank" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/paymentTobank"
);
const params = {
"bank_name": "First Bank",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Success):
[
{
"id": 1,
"bank_account_id": 1,
"amount": "1000.00",
"transaction_date": "2025-10-18",
"created_at": "2025-10-18T14:27:19.000000Z",
"bank_account": {
"id": 1,
"bank_name": "First Bank"
}
}
]
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 notifications for a given notifiable entity.
Accepts optional query parameters:
- notifiable_type: The class/type of the notifiable entity.
- notifiable_id: The ID of the notifiable entity.
Example request:
curl --request GET \
--get "http://localhost/api/notifications?notifiable_type=App%5CModels%5CUser¬ifiable_id=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/notifications"
);
const params = {
"notifiable_type": "App\Models\User",
"notifiable_id": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 5,
"type": "info",
"title": "New Update Available",
"message": "Version 2.0 is now live!",
"is_read": false,
"notifiable_type": "App\Models\User",
"notifiable_id": 1,
"created_at": "2025-09-19T09:18:00Z",
"updated_at": "2025-09-19T09:18:00Z"
}
]
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 new notification.
Example request:
curl --request POST \
"http://localhost/api/notifications" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"info\",
\"title\": \"New Update Available\",
\"message\": \"consequatur\",
\"is_read\": false,
\"notifiable_type\": \"App\\\\Models\\\\User\",
\"notifiable_id\": 1
}"
const url = new URL(
"http://localhost/api/notifications"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "info",
"title": "New Update Available",
"message": "consequatur",
"is_read": false,
"notifiable_type": "App\\Models\\User",
"notifiable_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 5,
"type": "info",
"title": "New Update Available",
"message": "Version 2.0 is now live!",
"is_read": false,
"notifiable_type": "App\Models\User",
"notifiable_id": 1,
"created_at": "2025-09-19T09:18:00Z",
"updated_at": "2025-09-19T09:18:00Z"
}
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 specific notification.
Example request:
curl --request GET \
--get "http://localhost/api/notifications/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/notifications/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 5,
"type": "info",
"title": "New Update Available",
"message": "Version 2.0 is now live!",
"is_read": false,
"notifiable_type": "App\Models\User",
"notifiable_id": 1,
"created_at": "2025-09-19T09:18:00Z",
"updated_at": "2025-09-19T09:18:00Z"
}
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 notification.
Example request:
curl --request PUT \
"http://localhost/api/notifications/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"type\": \"consequatur\",
\"title\": \"consequatur\",
\"message\": \"consequatur\",
\"is_read\": false,
\"notifiable_type\": \"consequatur\",
\"notifiable_id\": 17
}"
const url = new URL(
"http://localhost/api/notifications/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "consequatur",
"title": "consequatur",
"message": "consequatur",
"is_read": false,
"notifiable_type": "consequatur",
"notifiable_id": 17
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 5,
"type": "update",
"title": "Update Released",
"message": "Version 2.0 has been released.",
"is_read": true,
"notifiable_type": "App\Models\User",
"notifiable_id": 1,
"created_at": "2025-09-19T09:18:00Z",
"updated_at": "2025-09-19T10:00:00Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a notification.
Example request:
curl --request DELETE \
"http://localhost/api/notifications/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/notifications/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.
Deposit amount to customer's balance.
Example request:
curl --request POST \
"http://localhost/api/customers/1/deposit" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount\": \"2000\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost/api/customers/1/deposit"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"amount": "2000",
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Deposit successful",
"customer": {
"id": 1,
"balance": 3000
}
}
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 a list of all deposits made by a specific customer.
Example request:
curl --request GET \
--get "http://localhost/api/customers/17/deposits" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/customers/17/deposits"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"customer_id": 1,
"amount": 2000,
"created_at": "2025-09-17T12:00:00Z"
}
]
Example response (404):
{
"message": "Customer not found"
}
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.
List all payments
Example request:
curl --request GET \
--get "http://localhost/api/payments" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/payments"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Success):
[
{
"id": 1,
"amount": 25000,
"date": "2025-10-17",
"payment_purpose": "Office Rent",
"person_company_name": "ABC Ltd",
"posted_by": "Admin",
"location": "Lagos",
"note": "Paid by transfer"
}
]
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.
Create a new payment
Example request:
curl --request POST \
"http://localhost/api/payments" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount\": \"consequatur\",
\"date\": \"consequatur\",
\"payment_purpose\": \"consequatur\",
\"person_company_name\": \"consequatur\",
\"posted_by\": \"consequatur\",
\"location\": \"consequatur\",
\"note\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/payments"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"amount": "consequatur",
"date": "consequatur",
"payment_purpose": "consequatur",
"person_company_name": "consequatur",
"posted_by": "consequatur",
"location": "consequatur",
"note": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, Created):
{
"id": 1,
"amount": 25000,
"payment_purpose": "Office Rent",
"date": "2025-10-17"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show a specific payment
Example request:
curl --request GET \
--get "http://localhost/api/payments/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/payments/17"
);
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."
}
Example response (404, Not Found):
{
"message": "Payment not found"
}
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 an existing payment
Example request:
curl --request PUT \
"http://localhost/api/payments/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount\": \"consequatur\",
\"date\": \"consequatur\",
\"payment_purpose\": \"consequatur\",
\"person_company_name\": \"consequatur\",
\"location\": \"consequatur\",
\"note\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/payments/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"amount": "consequatur",
"date": "consequatur",
"payment_purpose": "consequatur",
"person_company_name": "consequatur",
"location": "consequatur",
"note": "consequatur"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (404, Not Found):
{
"message": "Payment not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a payment
Example request:
curl --request DELETE \
"http://localhost/api/payments/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/payments/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200, Deleted):
{
"message": "Payment deleted successfully"
}
Example response (404, Not Found):
{
"message": "Payment not found"
}
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.
List all expenses
Example request:
curl --request GET \
--get "http://localhost/api/expenses" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/expenses"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Success):
{
"id": 1,
"description": "Fuel purchase",
"category": "Transport",
"amount": 5000,
"date": "2025-10-17",
"time": "14:00",
"posted_by": "Admin",
"location": "Lagos"
}
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.
Create a new expense
Example request:
curl --request POST \
"http://localhost/api/expenses" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
\"category\": \"consequatur\",
\"amount\": \"consequatur\",
\"date\": \"consequatur\",
\"time\": \"consequatur\",
\"posted_by\": \"consequatur\",
\"location\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/expenses"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Dolores dolorum amet iste laborum eius est dolor.",
"category": "consequatur",
"amount": "consequatur",
"date": "consequatur",
"time": "consequatur",
"posted_by": "consequatur",
"location": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201, Created):
{
"id": 1,
"description": "Fuel purchase",
"amount": 5000
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show a specific expense
Example request:
curl --request GET \
--get "http://localhost/api/expenses/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/expenses/17"
);
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."
}
Example response (404, Not Found):
{
"message": "Expense not found"
}
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 an existing expense
Example request:
curl --request PUT \
"http://localhost/api/expenses/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
\"category\": \"consequatur\",
\"amount\": \"consequatur\",
\"date\": \"consequatur\",
\"time\": \"consequatur\",
\"posted_by\": \"consequatur\",
\"location\": \"consequatur\"
}"
const url = new URL(
"http://localhost/api/expenses/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"description": "Dolores dolorum amet iste laborum eius est dolor.",
"category": "consequatur",
"amount": "consequatur",
"date": "consequatur",
"time": "consequatur",
"posted_by": "consequatur",
"location": "consequatur"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (404, Not Found):
{
"message": "Expense not found"
}
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 an expense
Example request:
curl --request DELETE \
"http://localhost/api/expenses/17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/expenses/17"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200, Deleted):
{
"message": "Deleted successfully"
}
Example response (404, Not Found):
{
"message": "Expense not found"
}
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 payment analysis
Returns a payment analysis of purchased orders.
Example request:
curl --request GET \
--get "http://localhost/api/paymentAnalysis" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/paymentAnalysis"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, Success):
{
"payment_analysis": [
{
"id": 1,
"supplier_id": 1,
"order_number": "PO-12345",
"status": "pending",
"payment_method": "cash",
"total_amount": "1000.00",
"order_date": "2025-09-20",
"expected_date": "2025-09-30",
"notes": "consequatur",
"created_at": "2025-10-19T10:17:01.000000Z",
"updated_at": "2025-10-19T10:17:01.000000Z",
"supplier": {
"id": 1,
"name": "Supplier A",
"email": "contact@example.com",
"phone": "123-456-7890",
"address": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor.",
"created_at": "2025-10-19T10:16:27.000000Z",
"updated_at": "2025-10-19T10:16:27.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.
Display a listing of all bank accounts.
Example request:
curl --request GET \
--get "http://localhost/api/bank-accounts" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/bank-accounts"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"bank_name": "First Bank",
"account_number": "1234567890",
"account_name": "Business Account",
"branch": "Main Branch",
"account_type": "Savings",
"balance": 15000,
"description": "Primary business account",
"created_at": "2025-09-17T12:00:00Z",
"updated_at": "2025-09-17T12:00:00Z"
}
]
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 new bank account.
Example request:
curl --request POST \
"http://localhost/api/bank-accounts" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_name\": \"First Bank\",
\"account_number\": \"1234567890\",
\"account_name\": \"Business Account\",
\"branch\": \"Main Branch\",
\"account_type\": \"Savings\",
\"balance\": \"15000.00\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost/api/bank-accounts"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_name": "First Bank",
"account_number": "1234567890",
"account_name": "Business Account",
"branch": "Main Branch",
"account_type": "Savings",
"balance": "15000.00",
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"id": 1,
"bank_name": "First Bank",
"account_number": "1234567890",
"account_name": "Business Account",
"branch": "Main Branch",
"account_type": "Savings",
"balance": 15000,
"description": "Primary business account",
"created_at": "2025-09-17T12:00:00Z",
"updated_at": "2025-09-17T12:00:00Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show details of a specific bank account.
Example request:
curl --request GET \
--get "http://localhost/api/bank-accounts/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/bank-accounts/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"bank_name": "First Bank",
"account_number": "1234567890",
"account_name": "Business Account",
"branch": "Main Branch",
"account_type": "Savings",
"balance": 15000,
"description": "Primary business account",
"created_at": "2025-09-17T12:00:00Z",
"updated_at": "2025-09-17T12:00:00Z"
}
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 an existing bank account.
Example request:
curl --request PUT \
"http://localhost/api/bank-accounts/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"bank_name\": \"consequatur\",
\"account_number\": \"consequatur\",
\"account_name\": \"consequatur\",
\"branch\": \"consequatur\",
\"account_type\": \"consequatur\",
\"balance\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
"http://localhost/api/bank-accounts/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"bank_name": "consequatur",
"account_number": "consequatur",
"account_name": "consequatur",
"branch": "consequatur",
"account_type": "consequatur",
"balance": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor."
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 1,
"bank_name": "First Bank Updated",
"account_number": "1234567890",
"account_name": "Business Account Updated",
"branch": "Main Branch",
"account_type": "Checking",
"balance": 12000,
"description": "Updated description",
"created_at": "2025-09-17T12:00:00Z",
"updated_at": "2025-09-17T13:00:00Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a bank account.
Example request:
curl --request DELETE \
"http://localhost/api/bank-accounts/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/bank-accounts/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (204):
Empty response
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.