Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by login with your email and password.
Both API's
Notification API'S
Get My All Notifications API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/notification';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'is_read' => '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/notification"
);
const params = {
"is_read": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Send Chat Notification API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/notification/chat';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'company_id' => 1,
'body' => 'Some Random Message',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/notification/chat"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"company_id": 1,
"body": "Some Random Message"
};
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.
Role API'S
Company User Roles API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/roles';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/roles"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sample Priority API'S
Get Sample Priorities API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/sample-priority';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/sample-priority"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sample Status API'S
Get Sample Statuses API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/sample-statuses';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/sample-statuses"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Chat API'S
Get Chat History API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/chat/distinctio';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/chat/distinctio"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Purchase Order Status API'S
Get Purchase Order Statuses API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/purchase-order-statuses';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/purchase-order-statuses"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Purchase Order API'S
Purchase Order Get API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/purchase-order';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'purchase_order_status_id' => '1',
'search_type' => 'name',
'search_value' => 'Purchase Order',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/purchase-order"
);
const params = {
"purchase_order_status_id": "1",
"search_type": "name",
"search_value": "Purchase Order",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Single Purchase Order API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/purchase-order/18';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/purchase-order/18"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sample API'S
Sample Get API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/sample';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'sample_status_id' => '1',
'sample_priority_id' => '1',
'search_type' => 'name',
'search_value' => 'Sample',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/sample"
);
const params = {
"sample_status_id": "1",
"sample_priority_id": "1",
"search_type": "name",
"search_value": "Sample",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Single Sample API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/sample/20';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/sample/20"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sample Store API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/sample/create';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Sample 1',
'quantity' => 5.0,
'description' => 'Sample 1 description',
'sample_priority_id' => 2,
'company_id' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/sample/create"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Sample 1",
"quantity": 5,
"description": "Sample 1 description",
"sample_priority_id": 2,
"company_id": 1
};
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.
Email Change Process API'S
Admin Send OTP On Change Email API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/change-email/send';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'email' => 'test@test.com',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/change-email/send"
);
const params = {
"email": "test@test.com",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
validate OTP On Change Email API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/change-email/validate-otp';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'test@test.com',
'otp' => 123456,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/change-email/validate-otp"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "test@test.com",
"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.
Forget Password API'S
Send OTP API
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/forget-password/send';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'type' => 'admin',
'email' => 'test@test.com',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/forget-password/send"
);
const params = {
"type": "admin",
"email": "test@test.com",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (422):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 55
access-control-allow-origin: *
{
"status_code": 422,
"errors": [
"Email is invalid"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Resend OTP API
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/forget-password/resend';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'type' => 'admin',
'email' => 'test@test.com',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/forget-password/resend"
);
const params = {
"type": "admin",
"email": "test@test.com",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (422):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 54
access-control-allow-origin: *
{
"status_code": 422,
"errors": [
"Email is invalid"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
validate OTP API
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/forget-password/validate-otp';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'type' => 'admin',
'email' => 'test@test.com',
'otp' => 123456,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/forget-password/validate-otp"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "admin",
"email": "test@test.com",
"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.
Reset Passowrd API
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/reset-password';
$response = $client->put(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'type' => 'admin',
'email' => 'test@test.com',
'otp' => 123456,
'password' => 'Ab@12345',
'password_confirmation' => 'Ab@12345',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/reset-password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"type": "admin",
"email": "test@test.com",
"otp": 123456,
"password": "Ab@12345",
"password_confirmation": "Ab@12345"
};
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.
File Management API's
Save Image API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/file/image';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'image',
'contents' => fopen('/tmp/phpcJjS7q', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/file/image"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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.
Providers API's
Auth API'S
Admin Login API
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/auth/login';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'username' => 'mk2896',
'password' => 'Ab@12345',
'device_token' => '123124hnasdiasn1n23i12312b3n12',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"username": "mk2896",
"password": "Ab@12345",
"device_token": "123124hnasdiasn1n23i12312b3n12"
};
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.
Admin Change Password First Time API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/auth/change-password';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'password' => 'Ab@12345',
'password_confirmation' => 'Ab@12345',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/auth/change-password"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"password": "Ab@12345",
"password_confirmation": "Ab@12345"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Admin Update Profile API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/auth/profile/update';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Ali',
'email' => 'md@gmail.com',
'phone' => '090078601',
'profile_picture' => '',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/auth/profile/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Ali",
"email": "md@gmail.com",
"phone": "090078601",
"profile_picture": ""
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Admin Change Password API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/auth/profile/change-password';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'current_password' => 'Ab@12345',
'password' => 'Ab@12345',
'password_confirmation' => 'Ab@12345',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/auth/profile/change-password"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"current_password": "Ab@12345",
"password": "Ab@12345",
"password_confirmation": "Ab@12345"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Admin Get Profile API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/auth/profile';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/auth/profile"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Admin Logout API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/auth/logout';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/auth/logout"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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.
Event API'S
Get Events API
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/event';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/event"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
{
"status_code": 200,
"message": [
"Events response"
],
"data": {
"total": 0,
"total_pages": 1,
"page": 1,
"data": []
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Event Store API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/event/create';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'Event 1',
'description' => 'Some random description to be put',
'image' => 'images/169219527022180996488.png',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/event/create"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Event 1",
"description": "Some random description to be put",
"image": "images\/169219527022180996488.png"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Single Event API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/event/20';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/event/20"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Event API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/event/2/update';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'title' => 'Event 1',
'description' => 'Some random description to be put',
'image' => 'images/169219527022180996488.png',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/event/2/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Event 1",
"description": "Some random description to be put",
"image": "images\/169219527022180996488.png"
};
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 Event API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/event/18/delete';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/event/18/delete"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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.
Team API'S
Get Teams API
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/team';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/team"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
{
"status_code": 200,
"message": [
"Teams response"
],
"data": {
"total": 0,
"total_pages": 1,
"page": 1,
"data": []
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Team Store API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/team/create';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Saad',
'role' => 'Sale Person',
'profile_picture' => 'images/169219527022180996488.png',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/team/create"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Saad",
"role": "Sale Person",
"profile_picture": "images\/169219527022180996488.png"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Single Team API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/team/16';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/team/16"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Team API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/team/10/update';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Saad',
'role' => 'Sale Person',
'profile_picture' => 'images/169219527022180996488.png',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/team/10/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Saad",
"role": "Sale Person",
"profile_picture": "images\/169219527022180996488.png"
};
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 Team API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/team/5/delete';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/team/5/delete"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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.
Display Products API'S
Get Display Products API
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/display-product';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/display-product"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
access-control-allow-origin: *
{
"status_code": 200,
"message": [
"Products response"
],
"data": {
"total": 0,
"total_pages": 1,
"page": 1,
"data": []
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Single Display Product API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/display-product/12';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/display-product/12"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (422):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 56
access-control-allow-origin: *
{
"status_code": 422,
"errors": [
"Product not found"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Product Store API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/display-product/create';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Product 1',
'description' => 'Some random description to be put',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/display-product/create"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Product 1",
"description": "Some random description to be put"
};
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 Display Product API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/display-product/11/update';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Product 1',
'description' => 'Some random description to be put',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/display-product/11/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Product 1",
"description": "Some random description to be put"
};
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 Display Product API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/display-product/15/delete';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/display-product/15/delete"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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.
Dashboard API'S
Admin API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/dashboard';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/dashboard"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Order Status API'S
Get Product Order Statuses API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/product-order-statuses';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/product-order-statuses"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Provider Management API'S
Admin Store API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/user/create';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Ali',
'username' => 'mk2896',
'email' => 'md@gmail.com',
'phone' => '090078601',
'profile_picture' => '',
'role_id' => 2,
'salary' => 2000.0,
'commission' => '2000',
'percentage' => '29%',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/user/create"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Ali",
"username": "mk2896",
"email": "md@gmail.com",
"phone": "090078601",
"profile_picture": "",
"role_id": 2,
"salary": 2000,
"commission": "2000",
"percentage": "29%"
};
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.
Admin Resend Email API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/user/1/resend-email';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/user/1/resend-email"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Admins API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/user';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'role_id' => '1',
'search_type' => 'username',
'search_value' => 'mk2896',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/user"
);
const params = {
"role_id": "1",
"search_type": "username",
"search_value": "mk2896",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Single Admin API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/user/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/user/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Admin API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/user/1/update';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Ali',
'status' => 'active',
'phone' => '090078601',
'profile_picture' => '',
'role_id' => 2,
'salary' => 2000.0,
'percentage' => 29.0,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/user/1/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Ali",
"status": "active",
"phone": "090078601",
"profile_picture": "",
"role_id": 2,
"salary": 2000,
"percentage": 29
};
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.
Update Seeker status API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/seeker/8/status';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'status' => 'active',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/seeker/8/status"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"status": "active"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create New Seeker Admin API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/seeker/store';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Ali',
'username' => 'mk2896',
'email' => 'md@gmail.com',
'phone' => '090078601',
'profile_picture' => '',
'company_id' => 2,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/seeker/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Ali",
"username": "mk2896",
"email": "md@gmail.com",
"phone": "090078601",
"profile_picture": "",
"company_id": 2
};
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.
Material API'S
Material Get API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'search_type' => 'name',
'search_value' => 'Sample',
'order_by' => 'name',
'below_min_quantity' => '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material"
);
const params = {
"search_type": "name",
"search_value": "Sample",
"order_by": "name",
"below_min_quantity": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Material Store API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material/create';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Material 1',
'min_quantity' => 14,
'supplier_id' => 2,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material/create"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Material 1",
"min_quantity": 14,
"supplier_id": 2
};
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.
Material Update API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material/1';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Material 1',
'min_quantity' => 14,
'supplier_id' => 2,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Material 1",
"min_quantity": 14,
"supplier_id": 2
};
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.
Material Request API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material/request/low_inventory|admin_store_request';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'materials' => [
'id' => 1,
'quantity' => 2,
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material/request/low_inventory|admin_store_request"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"materials": {
"id": 1,
"quantity": 2
}
};
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 Material Request API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material/request/ab/update';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'quantity' => 2.0,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material/request/ab/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 2
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Material Request To Submitted API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material/request/status/submit';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material/request/status/submit"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
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 Material Request API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material/request/et/delete';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material/request/et/delete"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Material Request API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material/request/low_inventory|admin_store_request';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'material' => 'Material',
'status' => '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material/request/low_inventory|admin_store_request"
);
const params = {
"material": "Material",
"status": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 404,
"errors": [
"Invalid URL"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Product Order API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material/product_order';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'search_type' => 'name',
'search_value' => 'Sample',
'product_order_status_id[0]' => 'omnis',
'supplier_id' => '2',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material/product_order"
);
const params = {
"search_type": "name",
"search_value": "Sample",
"product_order_status_id[0]": "omnis",
"supplier_id": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Product Order Details API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material/product_order/details';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'material' => 'Material',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material/product_order/details"
);
const params = {
"material": "Material",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Product Order Detail API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material/product_order/non/delete';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material/product_order/non/delete"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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.
Update Product Order Detail Quantity Or Price API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material/product_order/doloribus/update';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'quantity' => 2.0,
'price' => 20.0,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material/product_order/doloribus/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 2,
"price": 20
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Product Order Status To Pending API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material/product_order/status/pending';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material/product_order/status/pending"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
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.
Material Create Product Order API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/material/product_order';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'supplier_id' => 1,
'material_id' => 1,
'price' => 100.0,
'quantity' => 12.0,
'material_request_id' => 1,
'product_id' => 3,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/material/product_order"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"supplier_id": 1,
"material_id": 1,
"price": 100,
"quantity": 12,
"material_request_id": 1,
"product_id": 3
};
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 Product Status To Pending After Disapproved API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/product/4/pending';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/product/4/pending"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
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.
Update Product Status To Admin Approved/Disapprove API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/product/2/admin/approve-disapprove';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'product_order_status_id' => 2,
'product_order_status_reason' => 'Some Reason',
'product_order_detail_ids' => [
'nulla',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/product/2/admin/approve-disapprove"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_order_status_id": 2,
"product_order_status_reason": "Some Reason",
"product_order_detail_ids": [
"nulla"
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Product Status To Accountatnt Approved/OnHold API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/product/19/accountant/approve-onhold';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'product_order_status_id' => 4,
'product_order_status_reason' => 'Some Reason',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/product/19/accountant/approve-onhold"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_order_status_id": 4,
"product_order_status_reason": "Some Reason"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Product Status To Purchased API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/product/7/purchase';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/product/7/purchase"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
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.
Update Product Status To Recieved API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/product/18/recieve';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/product/18/recieve"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
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.
Update Product Status To QC Approved/Disapprove API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/product/13/qc/approve-disapprove';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'product_order_status_id' => 8,
'product_order_status_reason' => 'Some Reason',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/product/13/qc/approve-disapprove"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_order_status_id": 8,
"product_order_status_reason": "Some Reason"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Product Status To Release Payment API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/product/2/release-payment';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/product/2/release-payment"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Product Supplier For Releasing Payment API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/product/10/release-payment';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/product/10/release-payment"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Product Status To Return Product API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/product/7/return';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/product/7/return"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
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 API'S
Get Companies API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/company';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'search_type' => 'name',
'search_value' => 'test',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/company"
);
const params = {
"search_type": "name",
"search_value": "test",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Companies For Sale Person API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/company/for-sale-person';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'visit_status_id' => '1',
'sale_person_id' => '26',
'search_type' => 'name',
'search_value' => 'test',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/company/for-sale-person"
);
const params = {
"visit_status_id": "1",
"sale_person_id": "26",
"search_type": "name",
"search_value": "test",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Store API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/company/create';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Ali',
'username' => 'mk2896',
'email' => 'doyle.sofia@example.org',
'profile_picture' => '',
'company' => [
'logo' => '',
'name' => 'Company name',
'email' => 'md@test.com',
'phone' => '090078601',
'address' => 'Company address',
'sale_person_id' => 1,
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/company/create"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Ali",
"username": "mk2896",
"email": "doyle.sofia@example.org",
"profile_picture": "",
"company": {
"logo": "",
"name": "Company name",
"email": "md@test.com",
"phone": "090078601",
"address": "Company address",
"sale_person_id": 1
}
};
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.
Company Resend Email API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/company/6/resend-email';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/company/6/resend-email"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Single Company API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/company/4';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'extra_details' => '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/company/4"
);
const params = {
"extra_details": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remaining PO Dues of Company API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/company/1/remaining-dues';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/company/1/remaining-dues"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Company Users API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/company/10/users';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'role_id' => '1',
'search_type' => 'username',
'search_value' => 'mk2896',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/company/10/users"
);
const params = {
"role_id": "1",
"search_type": "username",
"search_value": "mk2896",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Company User API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/company/1/users/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/company/1/users/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 User API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/company/1/users/1/update';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Ali',
'status' => 'active',
'phone' => '090078601',
'profile_picture' => '',
'role_id' => 2,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/company/1/users/1/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Ali",
"status": "active",
"phone": "090078601",
"profile_picture": "",
"role_id": 2
};
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.
Update Company API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/company/6/update';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'logo' => '',
'name' => 'Company name',
'email' => 'md@test.com',
'phone' => '09008601',
'address' => 'Company address',
'sale_person_id' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/company/6/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"logo": "",
"name": "Company name",
"email": "md@test.com",
"phone": "09008601",
"address": "Company address",
"sale_person_id": 1
};
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.
Update Company Status API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/company/1/update/status';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'status' => '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/company/1/update/status"
);
const params = {
"status": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update Company Visit Status API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/company/9/update/visit-status';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'visit_status_id' => 2,
'visit_remark' => 'Closed',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/company/9/update/visit-status"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"visit_status_id": 2,
"visit_remark": "Closed"
};
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.
Get Single Company API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/company/details';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'extra_details' => '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/company/details"
);
const params = {
"extra_details": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sample API'S
Get Sample Materials API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/sample/nemo/get-materials';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/sample/nemo/get-materials"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sample Approve/Disapprove By Admin API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/sample/6/approve-disapprove';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'sample_status_id' => 2,
'sample_status_remarks' => 'Some Remarks',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/sample/6/approve-disapprove"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sample_status_id": 2,
"sample_status_remarks": "Some Remarks"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sample Dispatched By Store Person API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/sample/19/dispatch';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'tracking_number' => '1312312312',
'images' => [
'debitis',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/sample/19/dispatch"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"tracking_number": "1312312312",
"images": [
"debitis"
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mark Sample As In Dispatch API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/sample/9/in-dispatch';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'product_name' => 'Sample Product Name',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/sample/9/in-dispatch"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_name": "Sample Product Name"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Attach Material To Sample API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/sample/20/attach/1';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'quantity' => 3.0,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/sample/20/attach/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 3
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Detach Material To Sample API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/sample/12/detach/1';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/sample/12/detach/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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.
Update Material To Sample API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/sample/15/update/1';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'quantity' => 3.0,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/sample/15/update/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 3
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Send Quotation API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/sample/8/send-quotation';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'quotation' => 1000.0,
'quotation_description' => 'Some Random Description',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/sample/8/send-quotation"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quotation": 1000,
"quotation_description": "Some Random Description"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Edit Quotation API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/sample/17/edit-quotation';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'quotation' => 1000.0,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/sample/17/edit-quotation"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quotation": 1000
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Supplier API'S
Supplier Store API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/supplier/create';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Supplier 1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/supplier/create"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Supplier 1"
};
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.
Supplier Update API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/supplier/18/update';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Supplier 1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/supplier/18/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Supplier 1"
};
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.
Supplier Get All API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/supplier';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'search_type' => 'name',
'search_value' => 'Supplier',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/supplier"
);
const params = {
"search_type": "name",
"search_value": "Supplier",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Supplier All Materials History API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/supplier/4/material-history';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/supplier/4/material-history"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Supplier Get API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/supplier/18';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/supplier/18"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Supplier Delete API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/supplier/19';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/supplier/19"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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.
Role API'S
Admin Roles API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/roles';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/roles"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Visit Status API'S
Company Visit Statuses Get API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/visit-statuses';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'after_visit' => '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/visit-statuses"
);
const params = {
"after_visit": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Purchase Order API'S
Approve/Disapprove Purchase Order API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/purchase-order/8/approve-disapprove';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'purchase_order_status_id' => 3,
'purchase_order_status_remarks' => 'Some Remarks',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/purchase-order/8/approve-disapprove"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"purchase_order_status_id": 3,
"purchase_order_status_remarks": "Some Remarks"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Set Estimate For Purchase Order API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/purchase-order/2/set-estimate';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'estimated_production_date' => '2024-12-10',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/purchase-order/2/set-estimate"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"estimated_production_date": "2024-12-10"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Done Production For Purchase Order API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/purchase-order/15/done-production';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/purchase-order/15/done-production"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
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.
In Production For Purchase Order API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/purchase-order/5/in-production';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/purchase-order/5/in-production"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
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.
QC Approve/Disapprove Purchase Order API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/purchase-order/6/approve-disapprove/qc';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'purchase_order_status_id' => 6,
'purchase_order_status_remarks' => 'Some Remarks',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/purchase-order/6/approve-disapprove/qc"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"purchase_order_status_id": 6,
"purchase_order_status_remarks": "Some Remarks"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Dispatch Purchase Order API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/purchase-order/3/dispatch';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'tracking_number' => '1312312312',
'images' => [
'fugiat',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/purchase-order/3/dispatch"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"tracking_number": "1312312312",
"images": [
"fugiat"
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Payment Confirmation Purchase Order API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/purchase-order/5/pay/confirm';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'purchase_order_status_id' => 10,
'commission_to_sale_person' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/purchase-order/5/pay/confirm"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"purchase_order_status_id": 10,
"commission_to_sale_person": false
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Purchase Order Materials API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/purchase-order/9/materials';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/purchase-order/9/materials"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Salary API'S
Get All Salaried Users For Accountant API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/salaries';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'year' => '2023',
'month' => '11',
'status' => 'unpaid',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/salaries"
);
const params = {
"year": "2023",
"month": "11",
"status": "unpaid",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Salary API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/salaries/1';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'year' => '2023',
'month' => '11',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/salaries/1"
);
const params = {
"year": "2023",
"month": "11",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Salary Details Of User API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/salaries/show/dolore';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'year' => '2023',
'month' => '11',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/salaries/show/dolore"
);
const params = {
"year": "2023",
"month": "11",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Unpaid Salary Details Of User API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/salaries/show/1/unpaid';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'year' => '2023',
'month' => '11',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/salaries/show/1/unpaid"
);
const params = {
"year": "2023",
"month": "11",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 My All Salaries API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/salaries/paid|pending/rerum';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/salaries/paid|pending/rerum"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 404,
"errors": [
"Invalid URL"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Receive My Salary API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/admin/salaries/receive/1';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'signature' => 'images/169219527022180996488.png',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/admin/salaries/receive/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"signature": "images\/169219527022180996488.png"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Seeker API's
Auth API'S
Seeker Login API
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/auth/login';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'username' => 'test1234',
'password' => 'Ab@12345',
'device_token' => 'Abasdas12123123314sdadasfasf5',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"username": "test1234",
"password": "Ab@12345",
"device_token": "Abasdas12123123314sdadasfasf5"
};
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.
Seeker Change Password First Time API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/auth/change-password';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'password' => 'Ab@12345',
'password_confirmation' => 'Ab@12345',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/auth/change-password"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"password": "Ab@12345",
"password_confirmation": "Ab@12345"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Seeker Update Profile API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/auth/profile/update';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Ali',
'email' => 'md@gmail.com',
'phone' => '090078601',
'profile_picture' => '',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/auth/profile/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Ali",
"email": "md@gmail.com",
"phone": "090078601",
"profile_picture": ""
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Seeker Change Password API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/auth/profile/change-password';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'current_password' => 'Ab@12345',
'password' => 'Ab@12345',
'password_confirmation' => 'Ab@12345',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/auth/profile/change-password"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"current_password": "Ab@12345",
"password": "Ab@12345",
"password_confirmation": "Ab@12345"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Seeker Get Profile API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/auth/profile';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/auth/profile"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Seeker Logout API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/auth/logout';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/auth/logout"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"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.
Dashboard API'S
Seeker API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/dashboard';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/dashboard"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Seeker Management API'S
Seeker Store API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/user/create';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Ali',
'username' => 'mk2896',
'email' => 'md@gmail.com',
'phone' => '090078601',
'profile_picture' => '',
'role_id' => 2,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/user/create"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Ali",
"username": "mk2896",
"email": "md@gmail.com",
"phone": "090078601",
"profile_picture": "",
"role_id": 2
};
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.
Seeker Resend Email API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/user/8/resend-email';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/user/8/resend-email"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get All Seekers API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/user';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'role_id' => '1',
'search_type' => 'username',
'search_value' => 'mk2896',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/user"
);
const params = {
"role_id": "1",
"search_type": "username",
"search_value": "mk2896",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Single Seeker API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/user/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/user/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"errors": [
"User unauthorized"
],
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer 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 Seeker API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/user/1/update';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'Ali',
'status' => 'active',
'phone' => '090078601',
'profile_picture' => '',
'role_id' => 2,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/user/1/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "Ali",
"status": "active",
"phone": "090078601",
"profile_picture": "",
"role_id": 2
};
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.
Sample API'S
Sample Approve/Disapprove Dispatched By Seeker API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/sample/3/approve-disapprove/dispatch';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'sample_status_id' => 6,
'sample_status_remarks' => 'Some Remarks',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/sample/3/approve-disapprove/dispatch"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sample_status_id": 6,
"sample_status_remarks": "Some Remarks"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Approve/Disapprove Quotation API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/sample/10/approve-disapprove/quotation';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'sample_status_id' => 9,
'sample_status_remarks' => 'Some Remarks',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/sample/10/approve-disapprove/quotation"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sample_status_id": 9,
"sample_status_remarks": "Some Remarks"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Ask Quotation API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/sample/3/ask/quotation';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/sample/3/ask/quotation"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
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.
Sample Resubmit Disapproved By Seeker API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/sample/18/re-submit';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/sample/18/re-submit"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
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.
Purchase Order API'S
Purchase Order Store API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/purchase-order/2/store';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'quantity' => 14.0,
'description' => 'Some description',
'image' => 'images/169219527022180996488.png',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/purchase-order/2/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"quantity": 14,
"description": "Some description",
"image": "images\/169219527022180996488.png"
};
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.
Buyer QC Approve/Disapprove Purchase Order API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/purchase-order/6/approve-disapprove/qc';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'purchase_order_status_id' => 9,
'purchase_order_status_remarks' => 'Some Remarks',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/purchase-order/6/approve-disapprove/qc"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"purchase_order_status_id": 9,
"purchase_order_status_remarks": "Some Remarks"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Buyer Pay Purchase Order API
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://be.mdelighttraders.com/api/seeker/purchase-order/10/pay';
$response = $client->patch(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));const url = new URL(
"https://be.mdelighttraders.com/api/seeker/purchase-order/10/pay"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PATCH",
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.