Introduction
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
This API is not authenticated.
Endpoints
Handles the API request and renders the Swagger documentation view.
Example request:
curl --request GET \
--get "http://localhost:8000/api/documentation" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}"const url = new URL(
"http://localhost:8000/api/documentation"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"state": false,
"code": 500,
"message": "Operation failed. Please try again later."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Handles the OAuth2 callback and retrieves the required file for the redirect.
Example request:
curl --request GET \
--get "http://localhost:8000/api/oauth2-callback" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}"const url = new URL(
"http://localhost:8000/api/oauth2-callback"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
content-type: text/html; charset=utf-8
cache-control: no-cache, private
access-control-allow-origin: *
<!doctype html>
<html lang="en-US">
<body>
<script src="oauth2-redirect.js"></script>
</body>
</html>
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/register
Example request:
curl --request POST \
"http://localhost:8000/api/register" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}" \
--data "{
\"name\": \"b\",
\"email\": \"zbailey@example.net\",
\"password\": \"-0pBNvYgxw\",
\"image_id\": 4326.41688,
\"country_code\": \"m\",
\"iso_code\": \"i\",
\"type\": \"entrepreneur\",
\"number\": \"architecto\",
\"region_id\": \"architecto\",
\"gender\": \"female\"
}"
const url = new URL(
"http://localhost:8000/api/register"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
let body = {
"name": "b",
"email": "zbailey@example.net",
"password": "-0pBNvYgxw",
"image_id": 4326.41688,
"country_code": "m",
"iso_code": "i",
"type": "entrepreneur",
"number": "architecto",
"region_id": "architecto",
"gender": "female"
};
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.
POST api/verify-otp
Example request:
curl --request POST \
"http://localhost:8000/api/verify-otp" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}" \
--data "{
\"email\": \"gbailey@example.net\",
\"otp\": 4326.41688
}"
const url = new URL(
"http://localhost:8000/api/verify-otp"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
let body = {
"email": "gbailey@example.net",
"otp": 4326.41688
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/resend-otp
Example request:
curl --request POST \
"http://localhost:8000/api/resend-otp" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}" \
--data "{
\"email\": \"architecto\"
}"
const url = new URL(
"http://localhost:8000/api/resend-otp"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
let body = {
"email": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/login
Example request:
curl --request POST \
"http://localhost:8000/api/login" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}" \
--data "{
\"identifier\": \"architecto\",
\"password\": \"]|{+-0pBNvYg\"
}"
const url = new URL(
"http://localhost:8000/api/login"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
let body = {
"identifier": "architecto",
"password": "]|{+-0pBNvYg"
};
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.
POST api/refresh
Example request:
curl --request POST \
"http://localhost:8000/api/refresh" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}"const url = new URL(
"http://localhost:8000/api/refresh"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
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.
POST api/logout
Example request:
curl --request POST \
"http://localhost:8000/api/logout" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}"const url = new URL(
"http://localhost:8000/api/logout"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
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.
PUT api/profile/update
Example request:
curl --request PUT \
"http://localhost:8000/api/profile/update" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}" \
--data "{
\"name\": \"b\",
\"image_id\": 4326.41688,
\"vendor_name\": \"m\",
\"vendor_address\": \"i\"
}"
const url = new URL(
"http://localhost:8000/api/profile/update"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
let body = {
"name": "b",
"image_id": 4326.41688,
"vendor_name": "m",
"vendor_address": "i"
};
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.
POST api/send-otp
Example request:
curl --request POST \
"http://localhost:8000/api/send-otp" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}" \
--data "{
\"email\": \"gbailey@example.net\"
}"
const url = new URL(
"http://localhost:8000/api/send-otp"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
let body = {
"email": "gbailey@example.net"
};
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.
POST api/confirm-otp
Example request:
curl --request POST \
"http://localhost:8000/api/confirm-otp" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}" \
--data "{
\"email\": \"gbailey@example.net\",
\"otp\": \"architecto\"
}"
const url = new URL(
"http://localhost:8000/api/confirm-otp"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
let body = {
"email": "gbailey@example.net",
"otp": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/reset-password
Example request:
curl --request POST \
"http://localhost:8000/api/reset-password" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}" \
--data "{
\"email\": \"gbailey@example.net\",
\"password\": \"+-0pBNvYgxwmi\\/#iw\"
}"
const url = new URL(
"http://localhost:8000/api/reset-password"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
let body = {
"email": "gbailey@example.net",
"password": "+-0pBNvYgxwmi\/#iw"
};
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.
POST api/resend-password-otp
Example request:
curl --request POST \
"http://localhost:8000/api/resend-password-otp" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}" \
--data "{
\"email\": \"gbailey@example.net\",
\"password\": \"+-0pBNvYgxwmi\\/#iw\"
}"
const url = new URL(
"http://localhost:8000/api/resend-password-otp"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
let body = {
"email": "gbailey@example.net",
"password": "+-0pBNvYgxwmi\/#iw"
};
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.
POST api/upload-file/{folder}
Example request:
curl --request POST \
"http://localhost:8000/api/upload-file/architecto" \
--header "Accept: application/json" \
--header "Content-Type: multipart/form-data" \
--header "Authorization: Bearer {TOKEN}" \
--form "file=@C:\Users\ASUS\AppData\Local\Temp\php6DFE.tmp" const url = new URL(
"http://localhost:8000/api/upload-file/architecto"
);
const headers = {
"Accept": "application/json",
"Content-Type": "multipart/form-data",
"Authorization": "Bearer {TOKEN}",
};
const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').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.
POST api/upload-files/{folder}
Example request:
curl --request POST \
"http://localhost:8000/api/upload-files/architecto" \
--header "Accept: application/json" \
--header "Content-Type: multipart/form-data" \
--header "Authorization: Bearer {TOKEN}" \
--form "files[]=@C:\Users\ASUS\AppData\Local\Temp\php6E0E.tmp" const url = new URL(
"http://localhost:8000/api/upload-files/architecto"
);
const headers = {
"Accept": "application/json",
"Content-Type": "multipart/form-data",
"Authorization": "Bearer {TOKEN}",
};
const body = new FormData();
body.append('files[]', document.querySelector('input[name="files[]"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/regions
Example request:
curl --request GET \
--get "http://localhost:8000/api/regions" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}"const url = new URL(
"http://localhost:8000/api/regions"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"state": false,
"code": 500,
"message": "Operation failed. Please try again later."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/entrepreneur/profile-setup
Example request:
curl --request POST \
"http://localhost:8000/api/entrepreneur/profile-setup" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}"const url = new URL(
"http://localhost:8000/api/entrepreneur/profile-setup"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
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.
POST api/investor/profile-setup
Example request:
curl --request POST \
"http://localhost:8000/api/investor/profile-setup" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {TOKEN}"const url = new URL(
"http://localhost:8000/api/investor/profile-setup"
);
const headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {TOKEN}",
};
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.