Introduction
Start (and never finish) side projects with this API.
This documentation will provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by using the Authentication > Login API Endpoint.
Authentication
* Our APIs uses the bearer tokens to authorize and authenticate calls. It provides secure access to protect resources thereby reducing the hassle of asking for a username and password everytime a user logs in.
Register a new user
Once the user is registered, a welcome email is sent to the user. They can now login to the system using login API.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"Ahsan Zaman\",
\"email\": \"jerde.abdullah@example.net\",
\"password\": \"Test1234\",
\"password_confirmation\": \"Test1234\",
\"training_activate\": false,
\"country\": \"SA\",
\"phone\": \"+966571708606\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Ahsan Zaman",
"email": "jerde.abdullah@example.net",
"password": "Test1234",
"password_confirmation": "Test1234",
"training_activate": false,
"country": "SA",
"phone": "+966571708606"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Login a user
This API is used to login a user. It returns a token that can be used to access protected resources.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"ahsan.web.ml@gmail.com\",
\"password\": \"Test1234\",
\"device_name\": \"My Laptop\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "ahsan.web.ml@gmail.com",
"password": "Test1234",
"device_name": "My Laptop"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Logout a user
requires authentication
This API is used to logout the current user. And revoke the access token.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/logout" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/logout"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Branch
Permissions
Display a list of available permssions.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/permissions?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/permissions"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [
{
"name": "view.invoice",
"updated_at": "2025-07-13",
"created_at": "2025-07-13"
},
{
"name": "create.invoice",
"updated_at": "2025-07-13",
"created_at": "2025-07-13"
},
{
"name": "share.invoice",
"updated_at": "2025-07-13",
"created_at": "2025-07-13"
},
{
"name": "view.credit-note",
"updated_at": "2025-07-13",
"created_at": "2025-07-13"
},
{
"name": "create.credit-note",
"updated_at": "2025-07-13",
"created_at": "2025-07-13"
},
{
"name": "share.credit-note",
"updated_at": "2025-07-13",
"created_at": "2025-07-13"
},
{
"name": "view.debit-note",
"updated_at": "2025-07-13",
"created_at": "2025-07-13"
},
{
"name": "create.debit-note",
"updated_at": "2025-07-13",
"created_at": "2025-07-13"
},
{
"name": "share.debit-note",
"updated_at": "2025-07-13",
"created_at": "2025-07-13"
},
{
"name": "view.dashboard",
"updated_at": "2025-07-13",
"created_at": "2025-07-13"
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": "http://127.0.0.1:8000/api/permissions?cursor=eyJwZXJtaXNzaW9ucy5pZCI6MTAsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
},
"meta": {
"path": "http://127.0.0.1:8000/api/permissions",
"per_page": 10,
"next_cursor": "eyJwZXJtaXNzaW9ucy5pZCI6MTAsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Temp Files
Save a temporary file.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/temp-files/upload" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "image=@C:\Users\Ahsan\AppData\Local\Temp\php30C7.tmp" const url = new URL(
"http://127.0.0.1:8000/api/temp-files/upload"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a temporary file.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/temp-files/delete" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/temp-files/delete"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a media file.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/temp-files/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/temp-files/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reports
Branch Dashboard
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/dashboard" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/dashboard"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Dashboard Data",
"chart1": {
"label": [],
"data": [],
"limit": "Unlimited",
"used": 0,
"remaining": "Unlimited"
},
"chart2": {
"label": [],
"data": [],
"limit": 0,
"used": 0,
"remaining": 0
},
"chart3": {
"label": [],
"data": [],
"limit": "Unlimited",
"used": 0,
"remaining": "Unlimited"
},
"totalSales": 0,
"totalVat": 0,
"totalCredit": 0,
"totalCreditVat": 0,
"chartSales": {
"label": [],
"data": [],
"limit": 1000,
"used": 0
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Settings
Display invoice settings for specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/invoice-settings" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/invoice-settings"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "This action is unauthorized."
}
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 invoice settings for the specified branch.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/invoice-settings" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"invoice\": true,
\"credit_note\": false,
\"debit_note\": false,
\"auto_sms\": false,
\"auto_email\": true,
\"currency\": \"rqglgntfd\",
\"frac_unit\": \"wfriqawp\",
\"qty_label\": \"bdbmtqcyuopfhougegxfvalb\",
\"qty_label_ar\": \"ubrpnp\",
\"qty2_label\": \"oruielmoii\",
\"qty2_label_ar\": \"wwmswfk\",
\"quotation_title_en\": \"turithp\",
\"quotation_title_ar\": \"fwznfuyaobhbjkwyz\",
\"show_qty2\": true,
\"show_product_id\": false,
\"total_qty\": false,
\"show_word_amount\": true,
\"show_word_amount_ar\": true,
\"show_word_payable\": false,
\"show_word_payable_ar\": true,
\"show_name_en\": true,
\"show_payment_method\": false,
\"show_credit_days\": false,
\"disable_credit_sales\": false,
\"show_created_by\": false,
\"customer_email\": false,
\"customer_phone\": true,
\"customer_additional_id\": true,
\"customer_credit_limit\": false,
\"add_to_inventory\": true,
\"strict_inventory\": true,
\"adjust_inventory\": false,
\"pos_payment_required\": false,
\"auto_print\": false,
\"size\": 41,
\"show_email\": true,
\"show_phone\": true,
\"use_min_max\": false,
\"latest_price\": false,
\"new_entry\": true,
\"customer_in_simplified\": false,
\"product_id_required\": false,
\"total_qty_form\": false,
\"reverse_invoice_items\": true,
\"show_all_fields\": true,
\"show_calc\": true,
\"bank_must\": true,
\"branch_bank_id\": 14,
\"round_line_items\": true,
\"negative_price\": true,
\"format_amount\": false,
\"rounding\": \"Downward Rounding\",
\"tax_template_id\": 20,
\"simplified_template_id\": 20,
\"stamp\": \"fccamoxyktrabqdwnp\",
\"auto_starting_balance\": false,
\"attach_supplier_to_customer\": true,
\"supplier_on_rv\": true,
\"daily_sales_no\": false,
\"tax_filing\": \"Monthly\",
\"bank_on_rv\": true,
\"optional_supplier_on_purchases\": false,
\"purchase_sequence\": false,
\"extras\": [
{
\"label\": \"kj\",
\"value\": \"jmxsfzzqqtztksdvqaa\"
}
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/invoice-settings"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"invoice": true,
"credit_note": false,
"debit_note": false,
"auto_sms": false,
"auto_email": true,
"currency": "rqglgntfd",
"frac_unit": "wfriqawp",
"qty_label": "bdbmtqcyuopfhougegxfvalb",
"qty_label_ar": "ubrpnp",
"qty2_label": "oruielmoii",
"qty2_label_ar": "wwmswfk",
"quotation_title_en": "turithp",
"quotation_title_ar": "fwznfuyaobhbjkwyz",
"show_qty2": true,
"show_product_id": false,
"total_qty": false,
"show_word_amount": true,
"show_word_amount_ar": true,
"show_word_payable": false,
"show_word_payable_ar": true,
"show_name_en": true,
"show_payment_method": false,
"show_credit_days": false,
"disable_credit_sales": false,
"show_created_by": false,
"customer_email": false,
"customer_phone": true,
"customer_additional_id": true,
"customer_credit_limit": false,
"add_to_inventory": true,
"strict_inventory": true,
"adjust_inventory": false,
"pos_payment_required": false,
"auto_print": false,
"size": 41,
"show_email": true,
"show_phone": true,
"use_min_max": false,
"latest_price": false,
"new_entry": true,
"customer_in_simplified": false,
"product_id_required": false,
"total_qty_form": false,
"reverse_invoice_items": true,
"show_all_fields": true,
"show_calc": true,
"bank_must": true,
"branch_bank_id": 14,
"round_line_items": true,
"negative_price": true,
"format_amount": false,
"rounding": "Downward Rounding",
"tax_template_id": 20,
"simplified_template_id": 20,
"stamp": "fccamoxyktrabqdwnp",
"auto_starting_balance": false,
"attach_supplier_to_customer": true,
"supplier_on_rv": true,
"daily_sales_no": false,
"tax_filing": "Monthly",
"bank_on_rv": true,
"optional_supplier_on_purchases": false,
"purchase_sequence": false,
"extras": [
{
"label": "kj",
"value": "jmxsfzzqqtztksdvqaa"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Login with Google. Use Gmail account.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-emails/login-with-google" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-emails/login-with-google"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Redirect user to the following URL to initiate the login process",
"data": "https://accounts.google.com/o/oauth2/v2/auth?response_type=code&access_type=offline&client_id=449339483187-o1qidqhqu3kulg47ta8psgru5dkcmaum.apps.googleusercontent.com&redirect_uri=http%3A%2F%2F127.0.0.1%3A8000%2Fapi%2Fcompanies%2F10000%2Fbranches%2F1000%2Fbranch-emails%2Flogin-with-google%2Fcallback&state=1000&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.send&approval_prompt=auto"
}
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 with Google. Callback URL.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-emails/login-with-google/callback" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"est\",
\"state\": \"enim\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-emails/login-with-google/callback"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "est",
"state": "enim"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Access Denied"
}
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 with Google. Disconnect Gmail account.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-emails/login-with-google/disconnect" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-emails/login-with-google/disconnect"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Your company does not have any email configs."
}
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.
Custom email settings for the specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-emails" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-emails"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "This action is unauthorized."
}
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 resource in storage.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-emails" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"server\": \"gdixbn\",
\"port\": 9,
\"from\": \"lcyetohqzozp\",
\"username\": \"bwiwefopnimalmmerpdrzfnjl\",
\"password\": \"`2#Nd4zE%:@wuT-c!\",
\"encryption\": \"ssl\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-emails"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"server": "gdixbn",
"port": 9,
"from": "lcyetohqzozp",
"username": "bwiwefopnimalmmerpdrzfnjl",
"password": "`2#Nd4zE%:@wuT-c!",
"encryption": "ssl"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-emails/4" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-emails/4"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Printer Client Download
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/printers/download" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/printers/download"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Server Error"
}
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 current printer for the specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/printers" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/printers"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [
{
"id": 2,
"created_at": "2025-07-19 02:26:26",
"updated_at": "2025-07-19 02:26:26",
"name": "Dell",
"api_token": "Wy1EAfK4gzyUsXEBnF25GHRVD4GkrWkhlCXKTgLV"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add a new printer for the specified branch.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/printers" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"lfg\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/printers"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "lfg"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified printer from the specified branch.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/printers/2" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/printers/2"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List of custom fields for the specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/custom-fields?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/custom-fields"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Server Error"
}
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 resource in storage.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/custom-fields" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"myilsqudsqhy\",
\"name_ar\": \"qlhp\",
\"type\": \"select\",
\"options\": [
\"hkcoueabpxkvcefhx\"
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/custom-fields"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "myilsqudsqhy",
"name_ar": "qlhp",
"type": "select",
"options": [
"hkcoueabpxkvcefhx"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/custom-fields/7" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"name_ar\": \"mjygivaaeay\",
\"type\": \"text\",
\"options\": [
\"tyex\"
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/custom-fields/7"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "b",
"name_ar": "mjygivaaeay",
"type": "text",
"options": [
"tyex"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/custom-fields/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/custom-fields/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List of product custom fields for the specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/product-custom-fields?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-custom-fields"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/product-custom-fields",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new product custom field for the specified branch.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-custom-fields" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"mjkniboenxrjleayiftxmlvnd\",
\"name_ar\": \"mopuijsqolgav\",
\"type\": \"select\",
\"options\": [
\"aiupmshmlxqtbrvxwu\"
],
\"calculative\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-custom-fields"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "mjkniboenxrjleayiftxmlvnd",
"name_ar": "mopuijsqolgav",
"type": "select",
"options": [
"aiupmshmlxqtbrvxwu"
],
"calculative": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the product custom field for the specified branch.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-custom-fields/18" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"whzzshga\",
\"name_ar\": \"xhnlbgqlexopuavrlgcognj\",
\"type\": \"number\",
\"options\": [
\"ljqqdvkczlugwbdvcjfeoh\"
],
\"calculative\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-custom-fields/18"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "whzzshga",
"name_ar": "xhnlbgqlexopuavrlgcognj",
"type": "number",
"options": [
"ljqqdvkczlugwbdvcjfeoh"
],
"calculative": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete the product custom field.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-custom-fields/6" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-custom-fields/6"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List of customer custom fields for the specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-custom-fields?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-custom-fields"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Server Error"
}
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 customer custom field for the specified branch.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-custom-fields" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"icizgfkuleuomrgascmrkwjjs\",
\"name_ar\": \"tzjtkenqmajntiiktosg\",
\"type\": \"number\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-custom-fields"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "icizgfkuleuomrgascmrkwjjs",
"name_ar": "tzjtkenqmajntiiktosg",
"type": "number"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-custom-fields/13" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"juslpyszuxjtjuubeormyhpm\",
\"name_ar\": \"eijt\",
\"type\": \"date\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-custom-fields/13"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "juslpyszuxjtjuubeormyhpm",
"name_ar": "eijt",
"type": "date"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete the customer custom field from the specified branch.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-custom-fields/3" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-custom-fields/3"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Setting Sales Groups
List of customers for the specified sales group.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups/1/customers?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups/1/customers"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Server Error"
}
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 PDF of customers for the specified sales group.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups/1/customers/export/pdf?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups/1/customers/export/pdf"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Server Error"
}
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.
Transfer customers from one sales person to another.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups/1/customers/transfer" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customers\": [
15
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups/1/customers/transfer"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customers": [
15
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Customers transferred 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.
List of sales groups for the specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [
{
"id": 1,
"created_at": "2025-07-19 23:32:45",
"updated_at": "2025-07-19 23:32:45",
"deleted_at": null,
"code": "SG001",
"name": "Sales Group TEST 1",
"name_en": null,
"phone": null,
"email": null,
"country": null,
"address": null,
"branch_id": 1000,
"user_id": null,
"invoice_template_id": null,
"customer_type_id": null,
"type": "B2B Sales",
"route_planning": 0,
"name_locale": "Sales Group TEST 1"
},
{
"id": 2,
"created_at": "2025-07-19 23:32:56",
"updated_at": "2025-07-19 23:48:33",
"deleted_at": null,
"code": "SG002",
"name": "No-example",
"name_en": null,
"phone": null,
"email": null,
"country": null,
"address": null,
"branch_id": 1000,
"user_id": null,
"invoice_template_id": null,
"customer_type_id": null,
"type": "B2B Sales",
"route_planning": 0,
"name_locale": "No-example"
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new sales group for the specified branch.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"SG001\",
\"name\": \"No-example\",
\"type\": \"B2B Sales\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "SG001",
"name": "No-example",
"type": "B2B Sales"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the sales group for the specified branch.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"SG001\",
\"name\": \"No-example\",
\"type\": \"B2B Sales\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "SG001",
"name": "No-example",
"type": "B2B Sales"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete the sales group
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Roles
List of the roles available for the specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/roles?per_page=10&with_disabled=&with_permissions=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"with_permissions\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/roles"
);
const params = {
"per_page": "10",
"with_disabled": "0",
"with_permissions": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"with_permissions": true
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/roles",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new role for the specified branch.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/roles" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"New Role\",
\"permissions\": [
\"uftdqkceyrm\"
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/roles"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "New Role",
"permissions": [
"uftdqkceyrm"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update A Role.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/roles/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"New Role\",
\"permissions\": [
\"fjnebiszmxuhyjhbidrldxf\"
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/roles/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "New Role",
"permissions": [
"fjnebiszmxuhyjhbidrldxf"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a Role.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/roles/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/roles/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Branch Users
Recalculate the user cash in hand balance.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users/1/recalculate-balance" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users/1/recalculate-balance"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enable or disable OTP authentication for a user.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users/1/toggle-otp" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users/1/toggle-otp"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display a listing of the users in the current branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [
{
"id": 1,
"name": "Ahsan Zaman",
"email": "ahsan.web.ml@gmail.com",
"email_verified": true,
"phone": "+966571708606",
"user_type": null,
"default_payment_status": null,
"default_payment_method": "cash",
"profile_photo": null,
"created_at": "2025-07-13 18:12:08",
"updated_at": "2025-07-13 18:12:08",
"role": "Admin",
"inventory_location_id": "",
"cash_in_hand": 0,
"cash_in_hand_limit": ""
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add a new user to the branch.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"zzeewjerxfxbuxoodtbhmmp\",
\"email\": \"pfeffer.levi@example.net\",
\"password\": \"3|dlq,al4JHO$\",
\"country\": \"pe\",
\"phone\": \"est\",
\"role_id\": 13,
\"role\": \"Custom User\",
\"cash_in_hand_limit\": 32115.9504536,
\"permissions\": [
\"pdybrakjvxlqtrrifvpcv\"
],
\"location_id\": 7,
\"sales_person_id\": 20,
\"locale\": \"ar\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "zzeewjerxfxbuxoodtbhmmp",
"email": "pfeffer.levi@example.net",
"password": "3|dlq,al4JHO$",
"country": "pe",
"phone": "est",
"role_id": 13,
"role": "Custom User",
"cash_in_hand_limit": 32115.9504536,
"permissions": [
"pdybrakjvxlqtrrifvpcv"
],
"location_id": 7,
"sales_person_id": 20,
"locale": "ar"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update settings for a user in the branch.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"dokfe\",
\"email\": \"bhegmann@example.com\",
\"password\": \"L:9}FoQF]oNl=#eD#x\",
\"country\": \"vk\",
\"phone\": \"enim\",
\"role_id\": 6,
\"role\": \"Sales\",
\"cash_in_hand_limit\": 311.7,
\"permissions\": [
\"gusblldrkhlzhkhvnmglpkhk\"
],
\"location_id\": 14,
\"sales_person_id\": 15,
\"locale\": \"ar\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "dokfe",
"email": "bhegmann@example.com",
"password": "L:9}FoQF]oNl=#eD#x",
"country": "vk",
"phone": "enim",
"role_id": 6,
"role": "Sales",
"cash_in_hand_limit": 311.7,
"permissions": [
"gusblldrkhlzhkhvnmglpkhk"
],
"location_id": 14,
"sales_person_id": 15,
"locale": "ar"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove a user from the branch.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
API Tokens
Display a listing of the user tokens.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/api-tokens?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/api-tokens"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [
{
"id": 1004,
"branch_id": null,
"name": "My Laptop",
"last_used_ago": "1 week ago"
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/api-tokens",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new token.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/api-tokens" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"tjsyioqfssszorp\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/api-tokens"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "tjsyioqfssszorp"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a specific token.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/api-tokens/1004" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/api-tokens/1004"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Customer Types
Display a listing of the customer Types for the specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-types?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-types"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [
{
"id": 1,
"created_at": "2025-07-23 20:14:50",
"updated_at": "2025-07-23 20:14:50",
"is_active": true,
"no": "RT",
"name": "Retail",
"starting_no": "RT-00001",
"auto_no": 1,
"rounding": 1,
"customers_count": 0
},
{
"id": 2,
"created_at": "2025-07-23 20:15:09",
"updated_at": "2025-07-23 20:15:09",
"is_active": true,
"no": "B2B",
"name": "Back Office",
"starting_no": null,
"auto_no": 0,
"rounding": 1,
"customers_count": 0
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-types",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a new Customer Type.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-types" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"no\": \"RT\",
\"name\": \"Retail\",
\"auto_no\": false,
\"starting_no\": \"RT-00001\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-types"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"no": "RT",
"name": "Retail",
"auto_no": false,
"starting_no": "RT-00001"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified Customer Type.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-types/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"no\": \"RT\",
\"name\": \"Retail\",
\"auto_no\": false,
\"starting_no\": \"RT-00001\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-types/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"no": "RT",
"name": "Retail",
"auto_no": false,
"starting_no": "RT-00001"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified Customer Type.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-types/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-types/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Customer Regions
Display a listing of the regions for the specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/regions?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/regions"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [
{
"id": 1,
"name": "North Region",
"updated_at": "2025-07-23 20:28:38",
"created_at": "2025-07-23 20:28:38",
"is_active": true
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/regions",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a new region.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/regions" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"North Region\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/regions"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "North Region"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified region.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/regions/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"North Region\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/regions/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "North Region"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified region.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/regions/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/regions/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Customers
POST api/companies/{company_id}/branches/{branch_id}/customers/{customer_id}/calculate-balance
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customers/7/calculate-balance" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customers/7/calculate-balance"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Export customers to Excel.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/customers/8/export/excel" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sortBy\": \"customer_no\",
\"customer\": \"owoypmjwwaoagx\",
\"customer_no\": \"dhzgxlix\",
\"customer_phone\": \"akvoqzpbaghxfo\",
\"cr_no\": \"sr\",
\"vat_no\": \"sg\",
\"additional_id\": \"uanulunmwe\",
\"customer_id\": 12,
\"customer_type_id\": 12,
\"sp\": 7,
\"sg\": 9,
\"approved_by\": 9
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customers/8/export/excel"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sortBy": "customer_no",
"customer": "owoypmjwwaoagx",
"customer_no": "dhzgxlix",
"customer_phone": "akvoqzpbaghxfo",
"cr_no": "sr",
"vat_no": "sg",
"additional_id": "uanulunmwe",
"customer_id": 12,
"customer_type_id": 12,
"sp": 7,
"sg": 9,
"approved_by": 9
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
Show headers
cache-control: public
content-disposition: attachment; filename="2025-07-30 23:30:22-customers.xlsx"
content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
accept-ranges: bytes
vary: Origin
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 PDF for customers.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/customers/7/export/pdf" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sortBy\": \"customer_no\",
\"customer\": \"xiqavndwdhla\",
\"customer_no\": \"yfjuaxohbiqzppmmyh\",
\"customer_phone\": \"arktztrocaoztm\",
\"cr_no\": \"py\",
\"vat_no\": \"cbtxx\",
\"additional_id\": \"xhggzfengajm\",
\"customer_id\": 20,
\"customer_type_id\": 12,
\"sp\": 5,
\"sg\": 1,
\"approved_by\": 6
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customers/7/export/pdf"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sortBy": "customer_no",
"customer": "xiqavndwdhla",
"customer_no": "yfjuaxohbiqzppmmyh",
"customer_phone": "arktztrocaoztm",
"cr_no": "py",
"vat_no": "cbtxx",
"additional_id": "xhggzfengajm",
"customer_id": 20,
"customer_type_id": 12,
"sp": 5,
"sg": 1,
"approved_by": 6
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Server Error"
}
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 the customers for the specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/customers?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sortBy\": \"customer_no\",
\"customer\": \"picmg\",
\"customer_no\": \"gmits\",
\"customer_phone\": \"xr\",
\"cr_no\": \"ugfakz\",
\"vat_no\": \"diunlzenblqflhq\",
\"additional_id\": \"hakrnzwsjjctn\",
\"customer_id\": 20,
\"customer_type_id\": 15,
\"region_id\": 6,
\"sp\": 17,
\"sg\": 5,
\"approved_by\": 12
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customers"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sortBy": "customer_no",
"customer": "picmg",
"customer_no": "gmits",
"customer_phone": "xr",
"cr_no": "ugfakz",
"vat_no": "diunlzenblqflhq",
"additional_id": "hakrnzwsjjctn",
"customer_id": 20,
"customer_type_id": 15,
"region_id": 6,
"sp": 17,
"sg": 5,
"approved_by": 12
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/customers",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created resource in storage.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customers" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer_no\": \"CUST-001\",
\"customer_type\": \"c\",
\"customer_type_id\": 1,
\"customer_name\": \"جون دو\",
\"customer_name_en\": \"John Doe\",
\"address\": \"123 Main St, Riyadh\",
\"country\": \"SA\",
\"phone\": \"+966500000000\",
\"sales_person_id\": 1,
\"customer_visit_plan_id\": 1,
\"balance\": 1000,
\"region\": \"Riyadh\",
\"region_id\": 1,
\"google_maps\": \"https:\\/\\/maps.google.com\\/?q=24.7136,46.6753\",
\"credit_limit\": 5000,
\"max_credit_days\": 30,
\"short_address\": \"RAHA3443\",
\"building_no\": \"٢٩٢٩\",
\"street_address\": \"ريحانة بنت زيد\",
\"secondary_no\": \"٨١١٨\",
\"district_name\": \"حي العارض\",
\"city\": \"الرياض\",
\"zip_code\": \"١٣٣٣٧\",
\"short_address_en\": \"RAHA3443\",
\"building_no_en\": \"2929\",
\"street_address_en\": \"Raihan Bint Zaid\",
\"secondary_no_en\": \"8118\",
\"district_name_en\": \"Al Arid\",
\"city_en\": \"Riyadh\",
\"zip_code_en\": \"13337\",
\"contacts\": [
{
\"name\": \"Jane Doe\",
\"phone\": \"+966500000001\"
}
],
\"cfs\": [
{
\"id\": 17,
\"value\": \"ungryoqp\"
}
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customers"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer_no": "CUST-001",
"customer_type": "c",
"customer_type_id": 1,
"customer_name": "جون دو",
"customer_name_en": "John Doe",
"address": "123 Main St, Riyadh",
"country": "SA",
"phone": "+966500000000",
"sales_person_id": 1,
"customer_visit_plan_id": 1,
"balance": 1000,
"region": "Riyadh",
"region_id": 1,
"google_maps": "https:\/\/maps.google.com\/?q=24.7136,46.6753",
"credit_limit": 5000,
"max_credit_days": 30,
"short_address": "RAHA3443",
"building_no": "٢٩٢٩",
"street_address": "ريحانة بنت زيد",
"secondary_no": "٨١١٨",
"district_name": "حي العارض",
"city": "الرياض",
"zip_code": "١٣٣٣٧",
"short_address_en": "RAHA3443",
"building_no_en": "2929",
"street_address_en": "Raihan Bint Zaid",
"secondary_no_en": "8118",
"district_name_en": "Al Arid",
"city_en": "Riyadh",
"zip_code_en": "13337",
"contacts": [
{
"name": "Jane Doe",
"phone": "+966500000001"
}
],
"cfs": [
{
"id": 17,
"value": "ungryoqp"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customers/4" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer_no\": \"CUST-001\",
\"customer_type\": \"c\",
\"customer_type_id\": 1,
\"customer_name\": \"جون دو\",
\"customer_name_en\": \"John Doe\",
\"address\": \"123 Main St, Riyadh\",
\"country\": \"SA\",
\"phone\": \"+966500000000\",
\"sales_person_id\": 1,
\"customer_visit_plan_id\": 1,
\"balance\": 1000,
\"region\": \"Riyadh\",
\"region_id\": 1,
\"google_maps\": \"https:\\/\\/maps.google.com\\/?q=24.7136,46.6753\",
\"credit_limit\": 5000,
\"max_credit_days\": 30,
\"short_address\": \"RAHA3443\",
\"building_no\": \"٢٩٢٩\",
\"street_address\": \"ريحانة بنت زيد\",
\"secondary_no\": \"٨١١٨\",
\"district_name\": \"حي العارض\",
\"city\": \"الرياض\",
\"zip_code\": \"١٣٣٣٧\",
\"short_address_en\": \"RAHA3443\",
\"building_no_en\": \"2929\",
\"street_address_en\": \"Raihan Bint Zaid\",
\"secondary_no_en\": \"8118\",
\"district_name_en\": \"Al Arid\",
\"city_en\": \"Riyadh\",
\"zip_code_en\": \"13337\",
\"contacts\": [
{
\"name\": \"Jane Doe\",
\"phone\": \"+966500000001\"
}
],
\"cfs\": [
{
\"id\": 8,
\"value\": \"yyooukvlezujwvmiamjafqo\"
}
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customers/4"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer_no": "CUST-001",
"customer_type": "c",
"customer_type_id": 1,
"customer_name": "جون دو",
"customer_name_en": "John Doe",
"address": "123 Main St, Riyadh",
"country": "SA",
"phone": "+966500000000",
"sales_person_id": 1,
"customer_visit_plan_id": 1,
"balance": 1000,
"region": "Riyadh",
"region_id": 1,
"google_maps": "https:\/\/maps.google.com\/?q=24.7136,46.6753",
"credit_limit": 5000,
"max_credit_days": 30,
"short_address": "RAHA3443",
"building_no": "٢٩٢٩",
"street_address": "ريحانة بنت زيد",
"secondary_no": "٨١١٨",
"district_name": "حي العارض",
"city": "الرياض",
"zip_code": "١٣٣٣٧",
"short_address_en": "RAHA3443",
"building_no_en": "2929",
"street_address_en": "Raihan Bint Zaid",
"secondary_no_en": "8118",
"district_name_en": "Al Arid",
"city_en": "Riyadh",
"zip_code_en": "13337",
"contacts": [
{
"name": "Jane Doe",
"phone": "+966500000001"
}
],
"cfs": [
{
"id": 8,
"value": "yyooukvlezujwvmiamjafqo"
}
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customers/3" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/customers/3"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Category
Display a listing of the product categories.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/categories?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/categories"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/categories",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created resource in storage.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/categories" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"fnrbuxrkskgtnupjnb\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/categories"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "fnrbuxrkskgtnupjnb"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/categories/17" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"rjqgndseftcah\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/categories/17"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "rjqgndseftcah"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/categories/8" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/categories/8"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Product Tags
Display a listing of the branch product tags.
requires authentication
Store a newly created resource in storage.
requires authentication
Update the specified resource in storage.
requires authentication
Remove the specified resource from storage.
requires authentication
Product SKUs
Display a listing of the resource.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/product-skus?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-skus"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/product-skus",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created resource in storage.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-skus" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sku\": \"zzbcjadgnbrowddxkafwdtunp\",
\"base_unit\": 58931.904251949,
\"label_ar\": \"fugiat\",
\"label_en\": \"consequatur\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-skus"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sku": "zzbcjadgnbrowddxkafwdtunp",
"base_unit": 58931.904251949,
"label_ar": "fugiat",
"label_en": "consequatur"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-skus/7" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sku\": \"dexx\",
\"base_unit\": 391,
\"label_ar\": \"porro\",
\"label_en\": \"repellat\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-skus/7"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sku": "dexx",
"base_unit": 391,
"label_ar": "porro",
"label_en": "repellat"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-skus/9" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/product-skus/9"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Products
Remove the specified resource from storage.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/products/20/enable" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/products/20/enable"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a media file.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/products/export/excel" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"lrzbrxmmruaaaiwq\",
\"product_id\": \"ywekrslnjphemnyswnwceea\",
\"product\": 18,
\"category_id\": 18,
\"product_sku_id\": 8,
\"exclude_zero_stock\": false
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/products/export/excel"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "lrzbrxmmruaaaiwq",
"product_id": "ywekrslnjphemnyswnwceea",
"product": 18,
"category_id": 18,
"product_sku_id": 8,
"exclude_zero_stock": false
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
Show headers
cache-control: public
content-disposition: attachment; filename="2025-07-30 23:30:22products.xlsx"
content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
accept-ranges: bytes
vary: Origin
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 the products in the specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/products?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"z\",
\"product_id\": \"iloyzahsrmrxcygzjyk\",
\"product\": 6,
\"category_id\": 8,
\"product_sku_id\": 9,
\"exclude_zero_stock\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/products"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "z",
"product_id": "iloyzahsrmrxcygzjyk",
"product": 6,
"category_id": 8,
"product_sku_id": 9,
"exclude_zero_stock": true
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/products",
"per_page": 15,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a newly created resource in storage.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/products" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "product_name=uwpkffhajutaa"\
--form "narration=nwzvuzgpl"\
--form "product_id=jtnsizphmqwalhlcpnpuyvy"\
--form "vat_rate=5"\
--form "tax_code=e"\
--form "min_price=55077.47369"\
--form "max_price=68.521315972"\
--form "price=2008.586"\
--form "cost_price=20417.65000155"\
--form "supplier_price=77309.1514867"\
--form "model_no=ig"\
--form "category_id=17"\
--form "product_sku_id=6"\
--form "type=service"\
--form "barcode=hmmtohxujhrql"\
--form "cash_sales_only="\
--form "cfs[][id]=16"\
--form "cfs[][value]=edxyhebnzpa"\
--form "image=@C:\Users\Ahsan\AppData\Local\Temp\php3994.tmp" const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/products"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('product_name', 'uwpkffhajutaa');
body.append('narration', 'nwzvuzgpl');
body.append('product_id', 'jtnsizphmqwalhlcpnpuyvy');
body.append('vat_rate', '5');
body.append('tax_code', 'e');
body.append('min_price', '55077.47369');
body.append('max_price', '68.521315972');
body.append('price', '2008.586');
body.append('cost_price', '20417.65000155');
body.append('supplier_price', '77309.1514867');
body.append('model_no', 'ig');
body.append('category_id', '17');
body.append('product_sku_id', '6');
body.append('type', 'service');
body.append('barcode', 'hmmtohxujhrql');
body.append('cash_sales_only', '');
body.append('cfs[][id]', '16');
body.append('cfs[][value]', 'edxyhebnzpa');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/products/19" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "product_name=qcsoyirudmfd"\
--form "narration=efqxwwlxtpvchdl"\
--form "product_id=aorbwjfhhzambnogady"\
--form "vat_rate=5"\
--form "tax_code=z"\
--form "min_price=120.1816223"\
--form "max_price=1.846916411"\
--form "price=32.770459585"\
--form "cost_price=24"\
--form "supplier_price=495"\
--form "model_no=chhjnnbfaqgxkexcmxnpvzoa"\
--form "category_id=7"\
--form "product_sku_id=2"\
--form "type=service"\
--form "barcode=xpkknhitcflxpwmrlqkeiit"\
--form "cash_sales_only=1"\
--form "cfs[][id]=15"\
--form "cfs[][value]=nocirmtzt"\
--form "image=@C:\Users\Ahsan\AppData\Local\Temp\php39A4.tmp" const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/products/19"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('product_name', 'qcsoyirudmfd');
body.append('narration', 'efqxwwlxtpvchdl');
body.append('product_id', 'aorbwjfhhzambnogady');
body.append('vat_rate', '5');
body.append('tax_code', 'z');
body.append('min_price', '120.1816223');
body.append('max_price', '1.846916411');
body.append('price', '32.770459585');
body.append('cost_price', '24');
body.append('supplier_price', '495');
body.append('model_no', 'chhjnnbfaqgxkexcmxnpvzoa');
body.append('category_id', '7');
body.append('product_sku_id', '2');
body.append('type', 'service');
body.append('barcode', 'xpkknhitcflxpwmrlqkeiit');
body.append('cash_sales_only', '1');
body.append('cfs[][id]', '15');
body.append('cfs[][value]', 'nocirmtzt');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/products/12" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/products/12"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Inventory Location
Export Inventory Location products to Excel.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations/export/excel" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"exzhopoponspkudcp\",
\"product_id\": \"vecakyvnwlcbhzqeojbezeeq\",
\"product\": 2,
\"category_id\": 14
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations/export/excel"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "exzhopoponspkudcp",
"product_id": "vecakyvnwlcbhzqeojbezeeq",
"product": 2,
"category_id": 14
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Server Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Add Product to Inventory Location
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations/5/add-products" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"inventory_location_id\": 8,
\"product_id\": 15,
\"quantity\": 17
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations/5/add-products"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"inventory_location_id": 8,
"product_id": 15,
"quantity": 17
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove Product to Inventory Location
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations/14/remove-products" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 16,
\"quantity\": 2
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations/14/remove-products"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 16,
"quantity": 2
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List of the Inventory Locations for the specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations",
"per_page": 15,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new Inventory Location.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"location_id\": \"praesentium\",
\"name\": \"bbescydfabktwqnnhdokjj\",
\"customer_id\": 17
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"location_id": "praesentium",
"name": "bbescydfabktwqnnhdokjj",
"customer_id": 17
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an Inventory Location.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations/20" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"location_id\": \"temporibus\",
\"name\": \"uwtopwfydozwx\",
\"customer_id\": 6
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations/20"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"location_id": "temporibus",
"name": "uwtopwfydozwx",
"customer_id": 6
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Disable an Inventory Location.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations/17" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations/17"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Stock Transfer Notes
Export to PDF
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-notes/10/export/pdf" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-notes/10/export/pdf"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (302):
Show headers
cache-control: no-cache, private
location: http://127.0.0.1:8000/docs
content-type: text/html; charset=utf-8
vary: Origin
set-cookie: XSRF-TOKEN=eyJpdiI6IkkvaTJROGlWM2s0QjUxSVBsT2NrRHc9PSIsInZhbHVlIjoiSExRajg3RUtKR0pzV0NmaFV6RUQvZHVnMVg3alNvc2pleGdkZ3BYd1hsRUFjbDNra3ZTdlZsOTdnT29HaXQ4TmRhOHpPQ1ZPN0luREhSOWdaRzFjejJXQlduTkt4MWxWR1Z6Y29keEliSUpVM1NCamQ4anpPTC8vek5TYnR4Y0QiLCJtYWMiOiJhOGNjMjAyNjZhYTIyMDc4ZWQ5ZjhhMjRlYmQ2MTVhZDA3MzM1ODg3MjUyYTU1ODc1MmM5ZDkyYzAwNGJhOTQwIiwidGFnIjoiIn0%3D; expires=Wed, 30 Jul 2025 22:30:23 GMT; Max-Age=7200; path=/; domain=127.0.0.1; samesite=lax; einvoiceme_session=eyJpdiI6ImVwak1FNkNJZ0FIU1JzZWU0dWVQb0E9PSIsInZhbHVlIjoidzJvcXNUbjRTRVRJRFlqbUpKY1hzTnV3L0toT1ZtYk9IY1BTNXFodm1pZFdLNTRWRDE0ZGEwM05CbHE5cE84eG04R1AvQkNoWnM2M3g5SC9XRUg4NjA0YXVwd2c4MGQ2SXVmdFNVWnduOXhaQnVYcnFtOUV1ZUlBWHRTTTFSSVQiLCJtYWMiOiJmNmY2NDNhZjQ5MjBkODkzNzM3NzQ2NzFiMGM1YjFhN2FjMGJjNWNkYzgxNTBjNjg2NDFhOWQ4MzYwMjQ0NTFkIiwidGFnIjoiIn0%3D; expires=Wed, 30 Jul 2025 22:30:23 GMT; Max-Age=7200; path=/; domain=127.0.0.1; httponly; samesite=lax
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://127.0.0.1:8000/docs'" />
<title>Redirecting to http://127.0.0.1:8000/docs</title>
</head>
<body>
Redirecting to <a href="http://127.0.0.1:8000/docs">http://127.0.0.1:8000/docs</a>.
</body>
</html>
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 list of stock transfer notes for the specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-notes?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"from_location\": 1,
\"to_location\": 6,
\"from\": \"2025-07-30\",
\"to\": \"2025-07-30\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-notes"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"from_location": 1,
"to_location": 6,
"from": "2025-07-30",
"to": "2025-07-30"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-notes",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new stock transfer note or convert from stock transfer request.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-notes" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"stock_transfer_request_id\": 9,
\"date\": \"2025-07-30\",
\"all_products\": false,
\"items\": [
{
\"id\": 2,
\"quantity\": 2260255.2
}
],
\"remarks\": \"wbvintvjjq\",
\"from_location_id\": 9,
\"to_location_id\": 15
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-notes"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"stock_transfer_request_id": 9,
"date": "2025-07-30",
"all_products": false,
"items": [
{
"id": 2,
"quantity": 2260255.2
}
],
"remarks": "wbvintvjjq",
"from_location_id": 9,
"to_location_id": 15
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a stock transfer note.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-notes/16" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"stock_transfer_request_id\": 12,
\"date\": \"2025-07-30\",
\"all_products\": true,
\"items\": [
{
\"id\": 6,
\"quantity\": 3.4
}
],
\"remarks\": \"tnawflglpharldlctpobe\",
\"from_location_id\": 12,
\"to_location_id\": 5
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-notes/16"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"stock_transfer_request_id": 12,
"date": "2025-07-30",
"all_products": true,
"items": [
{
"id": 6,
"quantity": 3.4
}
],
"remarks": "tnawflglpharldlctpobe",
"from_location_id": 12,
"to_location_id": 5
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a stock transfer note.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-notes/17" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-notes/17"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Stock Transfer Requests
Display a list of the STRs for specified branch.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-requests?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-requests"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-requests",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new STR.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-requests" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2025-07-30\",
\"from_location_id\": 20,
\"to_location_id\": 18,
\"items\": [
{
\"id\": 9,
\"quantity\": 7.7,
\"cac\": 12348791.9
}
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-requests"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2025-07-30",
"from_location_id": 20,
"to_location_id": 18,
"items": [
{
"id": 9,
"quantity": 7.7,
"cac": 12348791.9
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update/Approve a STR.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-requests/20" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"date\": \"2025-07-30\",
\"from_location_id\": 14,
\"to_location_id\": 14,
\"items\": [
{
\"id\": 11,
\"quantity\": 8390161.413778106,
\"cac\": 567
}
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-requests/20"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"date": "2025-07-30",
"from_location_id": 14,
"to_location_id": 14,
"items": [
{
"id": 11,
"quantity": 8390161.413778106,
"cac": 567
}
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cancel a STR.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-requests/14" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-requests/14"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Inventory Adjustments
Export inventory adjustments to aa excel file.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-adjustments/export/excel" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quarter\": \"voluptatem\",
\"from\": \"molestias\",
\"to\": \"2025-07-30\",
\"product\": \"ux\",
\"product_id\": \"rynisqhhutk\",
\"location_id\": 17,
\"type\": \"returned\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-adjustments/export/excel"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quarter": "voluptatem",
"from": "molestias",
"to": "2025-07-30",
"product": "ux",
"product_id": "rynisqhhutk",
"location_id": 17,
"type": "returned"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
Show headers
cache-control: public
content-disposition: attachment; filename=inventory-adjustment-export.xlsx
content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
accept-ranges: bytes
vary: Origin
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 list of the adjustments log.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-adjustments?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"quarter\": \"fugiat\",
\"to\": \"2025-07-30\",
\"product\": \"sripkvjaackcssm\",
\"product_id\": \"cjyavu\",
\"location_id\": 9,
\"type\": \"transfer\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-adjustments"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quarter": "fugiat",
"to": "2025-07-30",
"product": "sripkvjaackcssm",
"product_id": "cjyavu",
"location_id": 9,
"type": "transfer"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (422):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "The to field must be a date after .",
"errors": {
"to": [
"The to field must be a date after ."
]
}
}
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 resource in storage.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-adjustments" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 10,
\"location_id\": 1,
\"product2_id\": 18,
\"location2_id\": 4,
\"quantity\": -9999999999,
\"type\": \"received\",
\"reason\": \"mmavwoejdkic\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-adjustments"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 10,
"location_id": 1,
"product2_id": 18,
"location2_id": 4,
"quantity": -9999999999,
"type": "received",
"reason": "mmavwoejdkic"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an adjustment.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-adjustments/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 7,
\"location_id\": 3,
\"product2_id\": 6,
\"location2_id\": 2,
\"quantity\": -9999999999,
\"type\": \"returned\",
\"reason\": \"tkvj\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-adjustments/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 7,
"location_id": 3,
"product2_id": 6,
"location2_id": 2,
"quantity": -9999999999,
"type": "returned",
"reason": "tkvj"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete an adjustment.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-adjustments/10" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-adjustments/10"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Landed Costs
Post Landed Cost.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/landed-costs/18/post" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/landed-costs/18/post"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display a list of the landed costs.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches/1000/landed-costs?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/landed-costs"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Server Error"
}
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 landed cost.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/landed-costs" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"no\": \"pcodqswcdvxkzgkf\",
\"date\": \"2025-07-30\",
\"purchase_order_id\": 20,
\"purchase_id\": 17,
\"xr\": 43024024.912977,
\"currency\": \"moq\",
\"items\": [
{
\"type\": \"Warehouse Expenses\",
\"method\": \"Equal\",
\"amount\": 545.909
}
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/landed-costs"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"no": "pcodqswcdvxkzgkf",
"date": "2025-07-30",
"purchase_order_id": 20,
"purchase_id": 17,
"xr": 43024024.912977,
"currency": "moq",
"items": [
{
"type": "Warehouse Expenses",
"method": "Equal",
"amount": 545.909
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing landed cost.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/landed-costs/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"no\": \"flcwpaqqiim\",
\"date\": \"2025-07-30\",
\"purchase_order_id\": 13,
\"purchase_id\": 11,
\"xr\": 26,
\"currency\": \"nzk\",
\"items\": [
{
\"type\": \"Clearance\",
\"method\": \"By Quantity\",
\"amount\": 332097591.5298673
}
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/landed-costs/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"no": "flcwpaqqiim",
"date": "2025-07-30",
"purchase_order_id": 13,
"purchase_id": 11,
"xr": 26,
"currency": "nzk",
"items": [
{
"type": "Clearance",
"method": "By Quantity",
"amount": 332097591.5298673
}
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a landed cost.
requires authentication
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000/landed-costs/12" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000/landed-costs/12"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Manage Companies
* Create & Manage Companies for the user.
List of Companies
requires authentication
This endpoint retrieves a list of companies associated with the authenticated user.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [
{
"id": 10000,
"created_at": "2025-07-13 18:12:08",
"updated_at": "2025-07-17 01:30:38",
"name": "شركة محدودة",
"name_ar": "My Company Ltd",
"vat_no": "312378945600003",
"id_type": "cr",
"cr": "4030101010",
"enable_issue": false,
"branch_limit": 0,
"status": "Disabled",
"type": "Main",
"un": "7007000077",
"status_color": "red-700",
"name_locale": "My Company Ltd",
"branches": [
{
"id": 1000,
"created_at": "2025-07-13 18:12:08",
"updated_at": "2025-07-13 18:12:08",
"branch_name": "Jeddah Branch",
"logo": "/branch_logo/16310998641000.png",
"country": null,
"phone": null,
"email": "ahsan@ahsan-web.ml",
"website": null,
"short_address": null,
"building_no": null,
"street_name": "Al Ahd Al Jadid",
"secondary_no": null,
"district": "Ar Ruwais",
"city": "Jeddah",
"postal_code": null,
"allow_webhook": false,
"allow_api": true,
"short_address_en": null,
"building_no_en": null,
"street_name_en": null,
"secondary_no_en": null,
"district_en": null,
"city_en": null,
"postal_code_en": null,
"role": "Admin",
"logo_url": "/storage//branch_logo/16310998641000.png",
"full_address_ar": "- Al Ahd Al Jadid- Ar Ruwais-Jeddah ",
"full_address_en": ""
}
]
},
{
"id": 10003,
"created_at": "2025-07-16 00:24:56",
"updated_at": "2025-07-16 00:24:56",
"name": "شركة محدودة",
"name_ar": "My Company Ltd",
"vat_no": "312345678900003",
"id_type": "cr",
"cr": "4030123456",
"enable_issue": true,
"branch_limit": 1,
"status": "Active",
"type": "Main",
"un": "7001234567",
"status_color": "green-700",
"name_locale": "My Company Ltd",
"branches": [
{
"id": 1010,
"created_at": "2025-07-16 19:54:01",
"updated_at": "2025-07-16 20:18:04",
"branch_name": "Main Branch",
"logo": null,
"country": "SA",
"phone": "+966500000000",
"email": "test@test.com",
"website": null,
"short_address": "RAHA3443",
"building_no": "٢٩٢٩",
"street_name": "ريحانة بنت زيد",
"secondary_no": "٨١١٨",
"district": "حي العارض",
"city": "nlfwerknss",
"postal_code": "١٣٣٣٧",
"allow_webhook": false,
"allow_api": true,
"short_address_en": "RAHA3443",
"building_no_en": "2929",
"street_name_en": "Raihan Bint Zaid",
"secondary_no_en": "8118",
"district_en": "Al Arid",
"city_en": "Riyadh",
"postal_code_en": "13337",
"role": "Admin",
"logo_url": "https://cdn-einvme.fra1.cdn.digitaloceanspaces.com/eInvoiceMe/7/conversions/Picture1-logo.jpg",
"full_address_ar": "RAHA3443-٢٩٢٩ ريحانة بنت زيد-٨١١٨ حي العارض-nlfwerknss ١٣٣٣٧",
"full_address_en": "RAHA3443-2929 Raihan Bint Zaid-8118 Al Arid-Riyadh 13337"
}
]
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new Company
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"شركة محدودة\",
\"name_en\": \"My Company Ltd\",
\"cr\": \"4030123456\",
\"un\": \"700*******\",
\"vat_no\": \"3*********00003\",
\"id_type\": \"cr\",
\"sequence_start\": 100001
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "شركة محدودة",
"name_en": "My Company Ltd",
"cr": "4030123456",
"un": "700*******",
"vat_no": "3*********00003",
"id_type": "cr",
"sequence_start": 100001
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified Company.
requires authentication
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"شركة محدودة\",
\"name_en\": \"My Company Ltd\",
\"cr\": \"4030123456\",
\"un\": \"700*******\",
\"vat_no\": \"3*********00003\",
\"id_type\": \"cr\",
\"sequence_start\": 100001
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "شركة محدودة",
"name_en": "My Company Ltd",
"cr": "4030123456",
"un": "700*******",
"vat_no": "3*********00003",
"id_type": "cr",
"sequence_start": 100001
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Settings
View Company Settings
requires authentication
This endpoint retrieves the settings of a specific company associated with the authenticated user.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/settings" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/settings"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Company settings retrieved successfully.",
"data": {
"created_at": "2025-07-18 01:12:14",
"updated_at": "2025-07-18 01:12:14",
"unified_inventory": false,
"unified_customers": false,
"unified_suppliers": false,
"enable_zatca": false,
"integration_phase_acknowledged": false,
"unified_templates": false,
"internal_search": false
}
}
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 Company Settings
requires authentication
This endpoint updates the settings of a specific company associated with the authenticated user.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/settings" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"unified_inventory\": false,
\"unified_customers\": false,
\"unified_suppliers\": false,
\"unified_templates\": false,
\"internal_search\": false
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/settings"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"unified_inventory": false,
"unified_customers": false,
"unified_suppliers": false,
"unified_templates": false,
"internal_search": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List Sequences
requires authentication
This endpoint retrieves all sequences for a specific company associated with the authenticated user.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/sequences" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/sequences"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [
{
"id": 1,
"created_at": "2025-07-16 02:22:48",
"updated_at": "2025-07-16 02:22:48",
"ref": "2023",
"prefix": "INV-",
"first": "INV-2023",
"last": null
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/sequences",
"per_page": 2,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Sequence
requires authentication
This endpoint allows the authenticated user to create a new sequence for a specific company.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/sequences" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"prefix\": \"INV-\",
\"ref\": \"2023\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/sequences"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"prefix": "INV-",
"ref": "2023"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Sequence
requires authentication
This endpoint allows the authenticated user to update an existing sequence for a specific company.
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/sequences/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"prefix\": \"INV-\",
\"ref\": \"2023\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/sequences/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"prefix": "INV-",
"ref": "2023"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Sequence
requires authentication
This endpoint allows the authenticated user to delete an existing sequence for a specific company.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/sequences/1" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/sequences/1"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Branches
List Branches
requires authentication
This endpoint retrieves all branches for a specific company associated with the authenticated user.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/branches?per_page=10&with_disabled=" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches"
);
const params = {
"per_page": "10",
"with_disabled": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [
{
"id": 1000,
"created_at": "2025-07-13 18:12:08",
"updated_at": "2025-07-13 18:12:08",
"branch_name": "Jeddah Branch",
"logo": "/branch_logo/16310998641000.png",
"country": null,
"phone": null,
"email": "ahsan@ahsan-web.ml",
"website": null,
"short_address": null,
"building_no": null,
"street_name": "Al Ahd Al Jadid",
"secondary_no": null,
"district": "Ar Ruwais",
"city": "Jeddah",
"postal_code": null,
"allow_webhook": false,
"allow_api": true,
"short_address_en": null,
"building_no_en": null,
"street_name_en": null,
"secondary_no_en": null,
"district_en": null,
"city_en": null,
"postal_code_en": null,
"role": null,
"logo_url": "/storage//branch_logo/16310998641000.png",
"full_address_ar": "- Al Ahd Al Jadid- Ar Ruwais-Jeddah ",
"full_address_en": ""
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/branches",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Branch
requires authentication
This endpoint allows the authenticated user to create a new branch for a specific company.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/branches" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "branch_name=Main Branch"\
--form "short_address=RAHA3443"\
--form "building_no=٢٩٢٩"\
--form "street_name=ريحانة بنت زيد"\
--form "secondary_no=٨١١٨"\
--form "district=حي العارض"\
--form "postal_code=١٣٣٣٧"\
--form "city=uvchuw"\
--form "short_address_en=RAHA3443"\
--form "building_no_en=2929"\
--form "street_name_en=Raihan Bint Zaid"\
--form "secondary_no_en=8118"\
--form "district_en=Al Arid"\
--form "postal_code_en=13337"\
--form "city_en=Riyadh"\
--form "email=test@test.com"\
--form "phone=+966500000000"\
--form "country=SA"\
--form "logo=@C:\Users\Ahsan\AppData\Local\Temp\php3220.tmp" const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('branch_name', 'Main Branch');
body.append('short_address', 'RAHA3443');
body.append('building_no', '٢٩٢٩');
body.append('street_name', 'ريحانة بنت زيد');
body.append('secondary_no', '٨١١٨');
body.append('district', 'حي العارض');
body.append('postal_code', '١٣٣٣٧');
body.append('city', 'uvchuw');
body.append('short_address_en', 'RAHA3443');
body.append('building_no_en', '2929');
body.append('street_name_en', 'Raihan Bint Zaid');
body.append('secondary_no_en', '8118');
body.append('district_en', 'Al Arid');
body.append('postal_code_en', '13337');
body.append('city_en', 'Riyadh');
body.append('email', 'test@test.com');
body.append('phone', '+966500000000');
body.append('country', 'SA');
body.append('logo', document.querySelector('input[name="logo"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Branch
requires authentication
This endpoint allows the authenticated user to update an existing branch for a specific company.
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/companies/10000/branches/1000" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "branch_name=Main Branch"\
--form "short_address=RAHA3443"\
--form "building_no=٢٩٢٩"\
--form "street_name=ريحانة بنت زيد"\
--form "secondary_no=٨١١٨"\
--form "district=حي العارض"\
--form "postal_code=١٣٣٣٧"\
--form "city=gtqnhyo"\
--form "short_address_en=RAHA3443"\
--form "building_no_en=2929"\
--form "street_name_en=Raihan Bint Zaid"\
--form "secondary_no_en=8118"\
--form "district_en=Al Arid"\
--form "postal_code_en=13337"\
--form "city_en=Riyadh"\
--form "email=test@test.com"\
--form "phone=+966500000000"\
--form "country=SA"\
--form "logo=@C:\Users\Ahsan\AppData\Local\Temp\php3230.tmp" const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('branch_name', 'Main Branch');
body.append('short_address', 'RAHA3443');
body.append('building_no', '٢٩٢٩');
body.append('street_name', 'ريحانة بنت زيد');
body.append('secondary_no', '٨١١٨');
body.append('district', 'حي العارض');
body.append('postal_code', '١٣٣٣٧');
body.append('city', 'gtqnhyo');
body.append('short_address_en', 'RAHA3443');
body.append('building_no_en', '2929');
body.append('street_name_en', 'Raihan Bint Zaid');
body.append('secondary_no_en', '8118');
body.append('district_en', 'Al Arid');
body.append('postal_code_en', '13337');
body.append('city_en', 'Riyadh');
body.append('email', 'test@test.com');
body.append('phone', '+966500000000');
body.append('country', 'SA');
body.append('logo', document.querySelector('input[name="logo"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Branch
requires authentication
This endpoint allows the authenticated user to delete an existing branch for a specific company.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/companies/10000/branches/1000" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/branches/1000"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
ZATCA
Display the ZATCA settings for a company.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/zatcaSettings" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/zatcaSettings"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Server Error"
}
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 or update the ZATCA settings for a company.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/zatcaSettings" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"common_name\": \"Company Name\",
\"egs_serial_number\": \"1-eInvoiceMe|2-v1.0.0|3-10001\",
\"organization_unit_name\": \"Finance Department\",
\"organization_name\": \"My Company Name\",
\"country_name\": \"SA\",
\"invoice_type\": \"1100\",
\"location\": \"Riyadh, Saudi Arabia\",
\"industry\": \"Information Technology\",
\"is_live\": false,
\"otp\": \"123456\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/zatcaSettings"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"common_name": "Company Name",
"egs_serial_number": "1-eInvoiceMe|2-v1.0.0|3-10001",
"organization_unit_name": "Finance Department",
"organization_name": "My Company Name",
"country_name": "SA",
"invoice_type": "1100",
"location": "Riyadh, Saudi Arabia",
"industry": "Information Technology",
"is_live": false,
"otp": "123456"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Enable/Disable ZATCA Auto Post
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/zatca/auto-post" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"auto\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/zatca/auto-post"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"auto": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the ZATCA dashboard for a company.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/zatca/dashboard?irn=1234567890" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/zatca/dashboard"
);
const params = {
"irn": "1234567890",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/zatca/dashboard",
"per_page": 15,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Report document to ZATCA for a specific invoice sequence.
requires authentication
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/companies/10000/invoice-sequences/7/report" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/invoice-sequences/7/report"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Company Reports
Compnay Transactions Report
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/transactions?from=2025-07-01&to=2025-07-31" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/transactions"
);
const params = {
"from": "2025-07-01",
"to": "2025-07-31",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"data": [],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "http://127.0.0.1:8000/api/companies/10000/transactions",
"per_page": 10,
"next_cursor": null,
"prev_cursor": null
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Company VAT Sales Report
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/vat-sales?from=2025-07-01&to=2025-07-31" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/vat-sales"
);
const params = {
"from": "2025-07-01",
"to": "2025-07-31",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "VAT Sales Report",
"data": {
"transactions": [],
"sales_vat": 0,
"open_vat": 0,
"debit_vat": 0,
"adjusted_vat": 0
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Company VAT Purchases Report
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/companies/10000/vat-purchases?from=2025-07-01&to=2025-07-31" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/companies/10000/vat-purchases"
);
const params = {
"from": "2025-07-01",
"to": "2025-07-31",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Company VAT Purchases Report",
"transactions": [],
"total_sales": 0,
"total_sales_vat": 0,
"total_debit_notes": 0,
"total_debit_notes_vat": 0,
"total_credit_notes": 0,
"total_credit_notes_vat": 0
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Manage Profile
This controller handles the management of user profiles, including viewing and updating profile information.
Current User profile.
requires authentication
This method retrieves the authenticated user's profile information
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/my-profile" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/my-profile"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "User profile retrieved successfully",
"data": {
"id": 1,
"name": "Ahsan Zaman",
"email": "ahsan.web.ml@gmail.com",
"email_verified": true,
"phone": "+966571708606",
"user_type": "User",
"default_payment_status": "open",
"default_payment_method": "cash",
"profile_photo": {
"id": 1,
"model_type": "App\\Models\\User",
"model_id": 1,
"uuid": "b7eb9ee0-a30c-4285-af35-267b0752cb0d",
"collection_name": "profile_photo",
"name": "logo",
"file_name": "logo.jpeg",
"mime_type": "image/jpeg",
"disk": "public",
"conversions_disk": "public",
"size": 6488,
"manipulations": [],
"custom_properties": {
"custom_headers": {
"visibility": "public"
}
},
"generated_conversions": [],
"responsive_images": [],
"order_column": 1,
"created_at": "2025-07-13T19:53:22.000000Z",
"updated_at": "2025-07-13T19:53:22.000000Z",
"original_url": "http://127.0.0.1:8000/storage/eInvoiceMe/1/logo.jpeg",
"preview_url": ""
}
}
}
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 Current User profile.
requires authentication
This method updates the authenticated user's profile information
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/update-my-profile" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=Ahsan Zaman"\
--form "email=jerde.quincy@example.net"\
--form "country=SA"\
--form "phone=+966571708606"\
--form "invoice_type=1"\
--form "customer_type=1"\
--form "payment_status=1"\
--form "payment_method=cash"\
--form "photo=@C:\Users\Ahsan\AppData\Local\Temp\php2FCC.tmp" const url = new URL(
"http://127.0.0.1:8000/api/update-my-profile"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'Ahsan Zaman');
body.append('email', 'jerde.quincy@example.net');
body.append('country', 'SA');
body.append('phone', '+966571708606');
body.append('invoice_type', '1');
body.append('customer_type', '1');
body.append('payment_status', '1');
body.append('payment_method', 'cash');
body.append('photo', document.querySelector('input[name="photo"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Current User Bills.
requires authentication
This method retrieves the authenticated user's bills & Subscription payments
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/billing" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/billing"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Server Error"
}
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.
Verify Phone Number
requires authentication
This method verifies the user's phone number by sending an OTP. If the phone number is already verified, it returns a message indicating that.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/verify-phone" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://127.0.0.1:8000/api/verify-phone"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Verify Phone Number OTP
requires authentication
This method verifies the user's phone number by checking the provided OTP.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/verify-phone-otp" \
--header "Authorization: Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"otp\": \"123456\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/verify-phone-otp"
);
const headers = {
"Authorization": "Bearer ApYZSQUg570EUAiPjWM3tsRzoENrulCLt0heXJuJ",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"otp": "123456"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.