1. Status badge: Render HTML in DataTable cell using {@html}
2. Form alignment: Consistent horizontal layout for all fields
- Labels on left (w-28), inputs on right (flex-1)
- Added dollar sign prefix for hourly rate
- Wider modal (max-w-lg)
3. API docs: Regenerated with scribe:generate
1590 lines
61 KiB
PHP
1590 lines
61 KiB
PHP
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<title>Laravel API Documentation</title>
|
|
|
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
|
|
|
|
<link rel="stylesheet" href="{{ asset("/vendor/scribe/css/theme-default.style.css") }}" media="screen">
|
|
<link rel="stylesheet" href="{{ asset("/vendor/scribe/css/theme-default.print.css") }}" media="print">
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js"></script>
|
|
|
|
<link rel="stylesheet"
|
|
href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/obsidian.min.css">
|
|
<script src="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/highlight.min.js"></script>
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jets/0.14.1/jets.min.js"></script>
|
|
|
|
<style id="language-style">
|
|
/* starts out as display none and is replaced with js later */
|
|
body .content .bash-example code { display: none; }
|
|
body .content .javascript-example code { display: none; }
|
|
</style>
|
|
|
|
<script>
|
|
var tryItOutBaseUrl = "http://localhost";
|
|
var useCsrf = Boolean();
|
|
var csrfUrl = "/sanctum/csrf-cookie";
|
|
</script>
|
|
<script src="{{ asset("/vendor/scribe/js/tryitout-5.7.0.js") }}"></script>
|
|
|
|
<script src="{{ asset("/vendor/scribe/js/theme-default-5.7.0.js") }}"></script>
|
|
|
|
</head>
|
|
|
|
<body data-languages="["bash","javascript"]">
|
|
|
|
<a href="#" id="nav-button">
|
|
<span>
|
|
MENU
|
|
<img src="{{ asset("/vendor/scribe/images/navbar.png") }}" alt="navbar-image"/>
|
|
</span>
|
|
</a>
|
|
<div class="tocify-wrapper">
|
|
|
|
<div class="lang-selector">
|
|
<button type="button" class="lang-button" data-language-name="bash">bash</button>
|
|
<button type="button" class="lang-button" data-language-name="javascript">javascript</button>
|
|
</div>
|
|
|
|
<div class="search">
|
|
<input type="text" class="search" id="input-search" placeholder="Search">
|
|
</div>
|
|
|
|
<div id="toc">
|
|
<ul id="tocify-header-introduction" class="tocify-header">
|
|
<li class="tocify-item level-1" data-unique="introduction">
|
|
<a href="#introduction">Introduction</a>
|
|
</li>
|
|
</ul>
|
|
<ul id="tocify-header-authenticating-requests" class="tocify-header">
|
|
<li class="tocify-item level-1" data-unique="authenticating-requests">
|
|
<a href="#authenticating-requests">Authenticating requests</a>
|
|
</li>
|
|
</ul>
|
|
<ul id="tocify-header-authentication" class="tocify-header">
|
|
<li class="tocify-item level-1" data-unique="authentication">
|
|
<a href="#authentication">Authentication</a>
|
|
</li>
|
|
<ul id="tocify-subheader-authentication" class="tocify-subheader">
|
|
<li class="tocify-item level-2" data-unique="authentication-POSTapi-auth-login">
|
|
<a href="#authentication-POSTapi-auth-login">Login and get tokens</a>
|
|
</li>
|
|
<li class="tocify-item level-2" data-unique="authentication-POSTapi-auth-refresh">
|
|
<a href="#authentication-POSTapi-auth-refresh">Refresh access token</a>
|
|
</li>
|
|
<li class="tocify-item level-2" data-unique="authentication-POSTapi-auth-logout">
|
|
<a href="#authentication-POSTapi-auth-logout">Logout current session</a>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
<ul id="tocify-header-team-members" class="tocify-header">
|
|
<li class="tocify-item level-1" data-unique="team-members">
|
|
<a href="#team-members">Team Members</a>
|
|
</li>
|
|
<ul id="tocify-subheader-team-members" class="tocify-subheader">
|
|
<li class="tocify-item level-2" data-unique="team-members-GETapi-team-members">
|
|
<a href="#team-members-GETapi-team-members">List all team members</a>
|
|
</li>
|
|
<li class="tocify-item level-2" data-unique="team-members-POSTapi-team-members">
|
|
<a href="#team-members-POSTapi-team-members">Create a new team member</a>
|
|
</li>
|
|
<li class="tocify-item level-2" data-unique="team-members-GETapi-team-members--id-">
|
|
<a href="#team-members-GETapi-team-members--id-">Get a single team member</a>
|
|
</li>
|
|
<li class="tocify-item level-2" data-unique="team-members-PUTapi-team-members--id-">
|
|
<a href="#team-members-PUTapi-team-members--id-">Update a team member</a>
|
|
</li>
|
|
<li class="tocify-item level-2" data-unique="team-members-DELETEapi-team-members--id-">
|
|
<a href="#team-members-DELETEapi-team-members--id-">Delete a team member</a>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
|
|
<ul class="toc-footer" id="toc-footer">
|
|
<li style="padding-bottom: 5px;"><a href="{{ route("scribe.postman") }}">View Postman collection</a></li>
|
|
<li style="padding-bottom: 5px;"><a href="{{ route("scribe.openapi") }}">View OpenAPI spec</a></li>
|
|
<li><a href="http://github.com/knuckleswtf/scribe">Documentation powered by Scribe ✍</a></li>
|
|
</ul>
|
|
|
|
<ul class="toc-footer" id="last-updated">
|
|
<li>Last updated: February 19, 2026</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="page-wrapper">
|
|
<div class="dark-box"></div>
|
|
<div class="content">
|
|
<h1 id="introduction">Introduction</h1>
|
|
<aside>
|
|
<strong>Base URL</strong>: <code>http://localhost</code>
|
|
</aside>
|
|
<pre><code>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></code></pre>
|
|
|
|
<h1 id="authenticating-requests">Authenticating requests</h1>
|
|
<p>This API is not authenticated.</p>
|
|
|
|
<h1 id="authentication">Authentication</h1>
|
|
|
|
<p>Endpoints for JWT authentication and session lifecycle.</p>
|
|
|
|
<h2 id="authentication-POSTapi-auth-login">Login and get tokens</h2>
|
|
|
|
<p>
|
|
</p>
|
|
|
|
<p>Authenticate with email and password to receive an access token and refresh token.</p>
|
|
|
|
<span id="example-requests-POSTapi-auth-login">
|
|
<blockquote>Example request:</blockquote>
|
|
|
|
|
|
<div class="bash-example">
|
|
<pre><code class="language-bash">curl --request POST \
|
|
"http://localhost/api/auth/login" \
|
|
--header "Content-Type: application/json" \
|
|
--header "Accept: application/json" \
|
|
--data "{
|
|
\"email\": \"user@example.com\",
|
|
\"password\": \"secret123\"
|
|
}"
|
|
</code></pre></div>
|
|
|
|
|
|
<div class="javascript-example">
|
|
<pre><code class="language-javascript">const url = new URL(
|
|
"http://localhost/api/auth/login"
|
|
);
|
|
|
|
const headers = {
|
|
"Content-Type": "application/json",
|
|
"Accept": "application/json",
|
|
};
|
|
|
|
let body = {
|
|
"email": "user@example.com",
|
|
"password": "secret123"
|
|
};
|
|
|
|
fetch(url, {
|
|
method: "POST",
|
|
headers,
|
|
body: JSON.stringify(body),
|
|
}).then(response => response.json());</code></pre></div>
|
|
|
|
</span>
|
|
|
|
<span id="example-responses-POSTapi-auth-login">
|
|
<blockquote>
|
|
<p>Example response (200):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
|
|
"refresh_token": "abc123def456",
|
|
"token_type": "bearer",
|
|
"expires_in": 3600,
|
|
"user": {
|
|
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"name": "Alice Johnson",
|
|
"email": "user@example.com",
|
|
"role": "manager"
|
|
}
|
|
}</code>
|
|
</pre>
|
|
<blockquote>
|
|
<p>Example response (401):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"message": "Invalid credentials"
|
|
}</code>
|
|
</pre>
|
|
<blockquote>
|
|
<p>Example response (403):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"message": "Account is inactive"
|
|
}</code>
|
|
</pre>
|
|
<blockquote>
|
|
<p>Example response (422):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"errors": {
|
|
"email": [
|
|
"The email field is required."
|
|
],
|
|
"password": [
|
|
"The password field is required."
|
|
]
|
|
}
|
|
}</code>
|
|
</pre>
|
|
</span>
|
|
<span id="execution-results-POSTapi-auth-login" hidden>
|
|
<blockquote>Received response<span
|
|
id="execution-response-status-POSTapi-auth-login"></span>:
|
|
</blockquote>
|
|
<pre class="json"><code id="execution-response-content-POSTapi-auth-login"
|
|
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
|
|
</span>
|
|
<span id="execution-error-POSTapi-auth-login" hidden>
|
|
<blockquote>Request failed with error:</blockquote>
|
|
<pre><code id="execution-error-message-POSTapi-auth-login">
|
|
|
|
Tip: Check that you're properly connected to the network.
|
|
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
|
|
You can check the Dev Tools console for debugging information.</code></pre>
|
|
</span>
|
|
<form id="form-POSTapi-auth-login" data-method="POST"
|
|
data-path="api/auth/login"
|
|
data-authed="0"
|
|
data-hasfiles="0"
|
|
data-isarraybody="0"
|
|
autocomplete="off"
|
|
onsubmit="event.preventDefault(); executeTryOut('POSTapi-auth-login', this);">
|
|
<h3>
|
|
Request
|
|
<button type="button"
|
|
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-tryout-POSTapi-auth-login"
|
|
onclick="tryItOut('POSTapi-auth-login');">Try it out ⚡
|
|
</button>
|
|
<button type="button"
|
|
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-canceltryout-POSTapi-auth-login"
|
|
onclick="cancelTryOut('POSTapi-auth-login');" hidden>Cancel 🛑
|
|
</button>
|
|
<button type="submit"
|
|
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-executetryout-POSTapi-auth-login"
|
|
data-initial-text="Send Request 💥"
|
|
data-loading-text="⏱ Sending..."
|
|
hidden>Send Request 💥
|
|
</button>
|
|
</h3>
|
|
<p>
|
|
<small class="badge badge-black">POST</small>
|
|
<b><code>api/auth/login</code></b>
|
|
</p>
|
|
<h4 class="fancy-heading-panel"><b>Headers</b></h4>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Content-Type</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Content-Type" data-endpoint="POSTapi-auth-login"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Accept</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Accept" data-endpoint="POSTapi-auth-login"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
|
|
<div style=" padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>email</code></b>
|
|
<small>string</small>
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="email" data-endpoint="POSTapi-auth-login"
|
|
value="user@example.com"
|
|
data-component="body">
|
|
<br>
|
|
<p>User email address. Example: <code>user@example.com</code></p>
|
|
</div>
|
|
<div style=" padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>password</code></b>
|
|
<small>string</small>
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="password" data-endpoint="POSTapi-auth-login"
|
|
value="secret123"
|
|
data-component="body">
|
|
<br>
|
|
<p>User password. Example: <code>secret123</code></p>
|
|
</div>
|
|
</form>
|
|
|
|
<h2 id="authentication-POSTapi-auth-refresh">Refresh access token</h2>
|
|
|
|
<p>
|
|
<small class="badge badge-darkred">requires authentication</small>
|
|
</p>
|
|
|
|
<p>Exchange a valid refresh token for a new access token and refresh token pair.</p>
|
|
|
|
<span id="example-requests-POSTapi-auth-refresh">
|
|
<blockquote>Example request:</blockquote>
|
|
|
|
|
|
<div class="bash-example">
|
|
<pre><code class="language-bash">curl --request POST \
|
|
"http://localhost/api/auth/refresh" \
|
|
--header "Content-Type: application/json" \
|
|
--header "Accept: application/json" \
|
|
--data "{
|
|
\"refresh_token\": \"abc123def456\"
|
|
}"
|
|
</code></pre></div>
|
|
|
|
|
|
<div class="javascript-example">
|
|
<pre><code class="language-javascript">const url = new URL(
|
|
"http://localhost/api/auth/refresh"
|
|
);
|
|
|
|
const headers = {
|
|
"Content-Type": "application/json",
|
|
"Accept": "application/json",
|
|
};
|
|
|
|
let body = {
|
|
"refresh_token": "abc123def456"
|
|
};
|
|
|
|
fetch(url, {
|
|
method: "POST",
|
|
headers,
|
|
body: JSON.stringify(body),
|
|
}).then(response => response.json());</code></pre></div>
|
|
|
|
</span>
|
|
|
|
<span id="example-responses-POSTapi-auth-refresh">
|
|
<blockquote>
|
|
<p>Example response (200):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
|
|
"refresh_token": "newtoken123",
|
|
"token_type": "bearer",
|
|
"expires_in": 3600
|
|
}</code>
|
|
</pre>
|
|
<blockquote>
|
|
<p>Example response (401):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"message": "Invalid or expired refresh token"
|
|
}</code>
|
|
</pre>
|
|
</span>
|
|
<span id="execution-results-POSTapi-auth-refresh" hidden>
|
|
<blockquote>Received response<span
|
|
id="execution-response-status-POSTapi-auth-refresh"></span>:
|
|
</blockquote>
|
|
<pre class="json"><code id="execution-response-content-POSTapi-auth-refresh"
|
|
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
|
|
</span>
|
|
<span id="execution-error-POSTapi-auth-refresh" hidden>
|
|
<blockquote>Request failed with error:</blockquote>
|
|
<pre><code id="execution-error-message-POSTapi-auth-refresh">
|
|
|
|
Tip: Check that you're properly connected to the network.
|
|
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
|
|
You can check the Dev Tools console for debugging information.</code></pre>
|
|
</span>
|
|
<form id="form-POSTapi-auth-refresh" data-method="POST"
|
|
data-path="api/auth/refresh"
|
|
data-authed="1"
|
|
data-hasfiles="0"
|
|
data-isarraybody="0"
|
|
autocomplete="off"
|
|
onsubmit="event.preventDefault(); executeTryOut('POSTapi-auth-refresh', this);">
|
|
<h3>
|
|
Request
|
|
<button type="button"
|
|
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-tryout-POSTapi-auth-refresh"
|
|
onclick="tryItOut('POSTapi-auth-refresh');">Try it out ⚡
|
|
</button>
|
|
<button type="button"
|
|
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-canceltryout-POSTapi-auth-refresh"
|
|
onclick="cancelTryOut('POSTapi-auth-refresh');" hidden>Cancel 🛑
|
|
</button>
|
|
<button type="submit"
|
|
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-executetryout-POSTapi-auth-refresh"
|
|
data-initial-text="Send Request 💥"
|
|
data-loading-text="⏱ Sending..."
|
|
hidden>Send Request 💥
|
|
</button>
|
|
</h3>
|
|
<p>
|
|
<small class="badge badge-black">POST</small>
|
|
<b><code>api/auth/refresh</code></b>
|
|
</p>
|
|
<h4 class="fancy-heading-panel"><b>Headers</b></h4>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Content-Type</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Content-Type" data-endpoint="POSTapi-auth-refresh"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Accept</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Accept" data-endpoint="POSTapi-auth-refresh"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
|
|
<div style=" padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>refresh_token</code></b>
|
|
<small>string</small>
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="refresh_token" data-endpoint="POSTapi-auth-refresh"
|
|
value="abc123def456"
|
|
data-component="body">
|
|
<br>
|
|
<p>Refresh token returned by login. Example: <code>abc123def456</code></p>
|
|
</div>
|
|
</form>
|
|
|
|
<h2 id="authentication-POSTapi-auth-logout">Logout current session</h2>
|
|
|
|
<p>
|
|
<small class="badge badge-darkred">requires authentication</small>
|
|
</p>
|
|
|
|
<p>Invalidate a refresh token and end the active authenticated session.</p>
|
|
|
|
<span id="example-requests-POSTapi-auth-logout">
|
|
<blockquote>Example request:</blockquote>
|
|
|
|
|
|
<div class="bash-example">
|
|
<pre><code class="language-bash">curl --request POST \
|
|
"http://localhost/api/auth/logout" \
|
|
--header "Content-Type: application/json" \
|
|
--header "Accept: application/json" \
|
|
--data "{
|
|
\"refresh_token\": \"abc123def456\"
|
|
}"
|
|
</code></pre></div>
|
|
|
|
|
|
<div class="javascript-example">
|
|
<pre><code class="language-javascript">const url = new URL(
|
|
"http://localhost/api/auth/logout"
|
|
);
|
|
|
|
const headers = {
|
|
"Content-Type": "application/json",
|
|
"Accept": "application/json",
|
|
};
|
|
|
|
let body = {
|
|
"refresh_token": "abc123def456"
|
|
};
|
|
|
|
fetch(url, {
|
|
method: "POST",
|
|
headers,
|
|
body: JSON.stringify(body),
|
|
}).then(response => response.json());</code></pre></div>
|
|
|
|
</span>
|
|
|
|
<span id="example-responses-POSTapi-auth-logout">
|
|
<blockquote>
|
|
<p>Example response (200):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"message": "Logged out successfully"
|
|
}</code>
|
|
</pre>
|
|
</span>
|
|
<span id="execution-results-POSTapi-auth-logout" hidden>
|
|
<blockquote>Received response<span
|
|
id="execution-response-status-POSTapi-auth-logout"></span>:
|
|
</blockquote>
|
|
<pre class="json"><code id="execution-response-content-POSTapi-auth-logout"
|
|
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
|
|
</span>
|
|
<span id="execution-error-POSTapi-auth-logout" hidden>
|
|
<blockquote>Request failed with error:</blockquote>
|
|
<pre><code id="execution-error-message-POSTapi-auth-logout">
|
|
|
|
Tip: Check that you're properly connected to the network.
|
|
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
|
|
You can check the Dev Tools console for debugging information.</code></pre>
|
|
</span>
|
|
<form id="form-POSTapi-auth-logout" data-method="POST"
|
|
data-path="api/auth/logout"
|
|
data-authed="1"
|
|
data-hasfiles="0"
|
|
data-isarraybody="0"
|
|
autocomplete="off"
|
|
onsubmit="event.preventDefault(); executeTryOut('POSTapi-auth-logout', this);">
|
|
<h3>
|
|
Request
|
|
<button type="button"
|
|
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-tryout-POSTapi-auth-logout"
|
|
onclick="tryItOut('POSTapi-auth-logout');">Try it out ⚡
|
|
</button>
|
|
<button type="button"
|
|
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-canceltryout-POSTapi-auth-logout"
|
|
onclick="cancelTryOut('POSTapi-auth-logout');" hidden>Cancel 🛑
|
|
</button>
|
|
<button type="submit"
|
|
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-executetryout-POSTapi-auth-logout"
|
|
data-initial-text="Send Request 💥"
|
|
data-loading-text="⏱ Sending..."
|
|
hidden>Send Request 💥
|
|
</button>
|
|
</h3>
|
|
<p>
|
|
<small class="badge badge-black">POST</small>
|
|
<b><code>api/auth/logout</code></b>
|
|
</p>
|
|
<h4 class="fancy-heading-panel"><b>Headers</b></h4>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Content-Type</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Content-Type" data-endpoint="POSTapi-auth-logout"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Accept</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Accept" data-endpoint="POSTapi-auth-logout"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
|
|
<div style=" padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>refresh_token</code></b>
|
|
<small>string</small>
|
|
<i>optional</i>
|
|
|
|
<input type="text" style="display: none"
|
|
name="refresh_token" data-endpoint="POSTapi-auth-logout"
|
|
value="abc123def456"
|
|
data-component="body">
|
|
<br>
|
|
<p>Optional refresh token to invalidate immediately. Example: <code>abc123def456</code></p>
|
|
</div>
|
|
</form>
|
|
|
|
<h1 id="team-members">Team Members</h1>
|
|
|
|
<p>Endpoints for managing team members.</p>
|
|
|
|
<h2 id="team-members-GETapi-team-members">List all team members</h2>
|
|
|
|
<p>
|
|
<small class="badge badge-darkred">requires authentication</small>
|
|
</p>
|
|
|
|
<p>Get a list of all team members with optional filtering by active status.</p>
|
|
|
|
<span id="example-requests-GETapi-team-members">
|
|
<blockquote>Example request:</blockquote>
|
|
|
|
|
|
<div class="bash-example">
|
|
<pre><code class="language-bash">curl --request GET \
|
|
--get "http://localhost/api/team-members?active=1" \
|
|
--header "Content-Type: application/json" \
|
|
--header "Accept: application/json"</code></pre></div>
|
|
|
|
|
|
<div class="javascript-example">
|
|
<pre><code class="language-javascript">const url = new URL(
|
|
"http://localhost/api/team-members"
|
|
);
|
|
|
|
const params = {
|
|
"active": "1",
|
|
};
|
|
Object.keys(params)
|
|
.forEach(key => url.searchParams.append(key, params[key]));
|
|
|
|
const headers = {
|
|
"Content-Type": "application/json",
|
|
"Accept": "application/json",
|
|
};
|
|
|
|
fetch(url, {
|
|
method: "GET",
|
|
headers,
|
|
}).then(response => response.json());</code></pre></div>
|
|
|
|
</span>
|
|
|
|
<span id="example-responses-GETapi-team-members">
|
|
<blockquote>
|
|
<p>Example response (200):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">[
|
|
{
|
|
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"name": "John Doe",
|
|
"role_id": 1,
|
|
"role": {
|
|
"id": 1,
|
|
"name": "Backend Developer"
|
|
},
|
|
"hourly_rate": "150.00",
|
|
"active": true,
|
|
"created_at": "2024-01-15T10:00:00.000000Z",
|
|
"updated_at": "2024-01-15T10:00:00.000000Z"
|
|
}
|
|
]</code>
|
|
</pre>
|
|
</span>
|
|
<span id="execution-results-GETapi-team-members" hidden>
|
|
<blockquote>Received response<span
|
|
id="execution-response-status-GETapi-team-members"></span>:
|
|
</blockquote>
|
|
<pre class="json"><code id="execution-response-content-GETapi-team-members"
|
|
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
|
|
</span>
|
|
<span id="execution-error-GETapi-team-members" hidden>
|
|
<blockquote>Request failed with error:</blockquote>
|
|
<pre><code id="execution-error-message-GETapi-team-members">
|
|
|
|
Tip: Check that you're properly connected to the network.
|
|
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
|
|
You can check the Dev Tools console for debugging information.</code></pre>
|
|
</span>
|
|
<form id="form-GETapi-team-members" data-method="GET"
|
|
data-path="api/team-members"
|
|
data-authed="1"
|
|
data-hasfiles="0"
|
|
data-isarraybody="0"
|
|
autocomplete="off"
|
|
onsubmit="event.preventDefault(); executeTryOut('GETapi-team-members', this);">
|
|
<h3>
|
|
Request
|
|
<button type="button"
|
|
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-tryout-GETapi-team-members"
|
|
onclick="tryItOut('GETapi-team-members');">Try it out ⚡
|
|
</button>
|
|
<button type="button"
|
|
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-canceltryout-GETapi-team-members"
|
|
onclick="cancelTryOut('GETapi-team-members');" hidden>Cancel 🛑
|
|
</button>
|
|
<button type="submit"
|
|
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-executetryout-GETapi-team-members"
|
|
data-initial-text="Send Request 💥"
|
|
data-loading-text="⏱ Sending..."
|
|
hidden>Send Request 💥
|
|
</button>
|
|
</h3>
|
|
<p>
|
|
<small class="badge badge-green">GET</small>
|
|
<b><code>api/team-members</code></b>
|
|
</p>
|
|
<h4 class="fancy-heading-panel"><b>Headers</b></h4>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Content-Type</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Content-Type" data-endpoint="GETapi-team-members"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Accept</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Accept" data-endpoint="GETapi-team-members"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<h4 class="fancy-heading-panel"><b>Query Parameters</b></h4>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>active</code></b>
|
|
<small>boolean</small>
|
|
<i>optional</i>
|
|
|
|
<label data-endpoint="GETapi-team-members" style="display: none">
|
|
<input type="radio" name="active"
|
|
value="1"
|
|
data-endpoint="GETapi-team-members"
|
|
data-component="query" >
|
|
<code>true</code>
|
|
</label>
|
|
<label data-endpoint="GETapi-team-members" style="display: none">
|
|
<input type="radio" name="active"
|
|
value="0"
|
|
data-endpoint="GETapi-team-members"
|
|
data-component="query" >
|
|
<code>false</code>
|
|
</label>
|
|
<br>
|
|
<p>Filter by active status. Example: <code>true</code></p>
|
|
</div>
|
|
</form>
|
|
|
|
<h2 id="team-members-POSTapi-team-members">Create a new team member</h2>
|
|
|
|
<p>
|
|
<small class="badge badge-darkred">requires authentication</small>
|
|
</p>
|
|
|
|
<p>Create a new team member with name, role, and hourly rate.</p>
|
|
|
|
<span id="example-requests-POSTapi-team-members">
|
|
<blockquote>Example request:</blockquote>
|
|
|
|
|
|
<div class="bash-example">
|
|
<pre><code class="language-bash">curl --request POST \
|
|
"http://localhost/api/team-members" \
|
|
--header "Content-Type: application/json" \
|
|
--header "Accept: application/json" \
|
|
--data "{
|
|
\"name\": \"John Doe\",
|
|
\"role_id\": 1,
|
|
\"hourly_rate\": \"150.00\",
|
|
\"active\": true
|
|
}"
|
|
</code></pre></div>
|
|
|
|
|
|
<div class="javascript-example">
|
|
<pre><code class="language-javascript">const url = new URL(
|
|
"http://localhost/api/team-members"
|
|
);
|
|
|
|
const headers = {
|
|
"Content-Type": "application/json",
|
|
"Accept": "application/json",
|
|
};
|
|
|
|
let body = {
|
|
"name": "John Doe",
|
|
"role_id": 1,
|
|
"hourly_rate": "150.00",
|
|
"active": true
|
|
};
|
|
|
|
fetch(url, {
|
|
method: "POST",
|
|
headers,
|
|
body: JSON.stringify(body),
|
|
}).then(response => response.json());</code></pre></div>
|
|
|
|
</span>
|
|
|
|
<span id="example-responses-POSTapi-team-members">
|
|
<blockquote>
|
|
<p>Example response (201):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"name": "John Doe",
|
|
"role_id": 1,
|
|
"role": {
|
|
"id": 1,
|
|
"name": "Backend Developer"
|
|
},
|
|
"hourly_rate": "150.00",
|
|
"active": true,
|
|
"created_at": "2024-01-15T10:00:00.000000Z",
|
|
"updated_at": "2024-01-15T10:00:00.000000Z"
|
|
}</code>
|
|
</pre>
|
|
<blockquote>
|
|
<p>Example response (422):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"message": "Validation failed",
|
|
"errors": {
|
|
"name": [
|
|
"The name field is required."
|
|
],
|
|
"hourly_rate": [
|
|
"Hourly rate must be greater than 0"
|
|
]
|
|
}
|
|
}</code>
|
|
</pre>
|
|
</span>
|
|
<span id="execution-results-POSTapi-team-members" hidden>
|
|
<blockquote>Received response<span
|
|
id="execution-response-status-POSTapi-team-members"></span>:
|
|
</blockquote>
|
|
<pre class="json"><code id="execution-response-content-POSTapi-team-members"
|
|
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
|
|
</span>
|
|
<span id="execution-error-POSTapi-team-members" hidden>
|
|
<blockquote>Request failed with error:</blockquote>
|
|
<pre><code id="execution-error-message-POSTapi-team-members">
|
|
|
|
Tip: Check that you're properly connected to the network.
|
|
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
|
|
You can check the Dev Tools console for debugging information.</code></pre>
|
|
</span>
|
|
<form id="form-POSTapi-team-members" data-method="POST"
|
|
data-path="api/team-members"
|
|
data-authed="1"
|
|
data-hasfiles="0"
|
|
data-isarraybody="0"
|
|
autocomplete="off"
|
|
onsubmit="event.preventDefault(); executeTryOut('POSTapi-team-members', this);">
|
|
<h3>
|
|
Request
|
|
<button type="button"
|
|
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-tryout-POSTapi-team-members"
|
|
onclick="tryItOut('POSTapi-team-members');">Try it out ⚡
|
|
</button>
|
|
<button type="button"
|
|
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-canceltryout-POSTapi-team-members"
|
|
onclick="cancelTryOut('POSTapi-team-members');" hidden>Cancel 🛑
|
|
</button>
|
|
<button type="submit"
|
|
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-executetryout-POSTapi-team-members"
|
|
data-initial-text="Send Request 💥"
|
|
data-loading-text="⏱ Sending..."
|
|
hidden>Send Request 💥
|
|
</button>
|
|
</h3>
|
|
<p>
|
|
<small class="badge badge-black">POST</small>
|
|
<b><code>api/team-members</code></b>
|
|
</p>
|
|
<h4 class="fancy-heading-panel"><b>Headers</b></h4>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Content-Type</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Content-Type" data-endpoint="POSTapi-team-members"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Accept</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Accept" data-endpoint="POSTapi-team-members"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
|
|
<div style=" padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>name</code></b>
|
|
<small>string</small>
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="name" data-endpoint="POSTapi-team-members"
|
|
value="John Doe"
|
|
data-component="body">
|
|
<br>
|
|
<p>Team member name. Example: <code>John Doe</code></p>
|
|
</div>
|
|
<div style=" padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>role_id</code></b>
|
|
<small>integer</small>
|
|
|
|
|
|
<input type="number" style="display: none"
|
|
step="any" name="role_id" data-endpoint="POSTapi-team-members"
|
|
value="1"
|
|
data-component="body">
|
|
<br>
|
|
<p>Role ID. Example: <code>1</code></p>
|
|
</div>
|
|
<div style=" padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>hourly_rate</code></b>
|
|
<small>numeric</small>
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="hourly_rate" data-endpoint="POSTapi-team-members"
|
|
value="150.00"
|
|
data-component="body">
|
|
<br>
|
|
<p>Hourly rate (must be > 0). Example: <code>150.00</code></p>
|
|
</div>
|
|
<div style=" padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>active</code></b>
|
|
<small>boolean</small>
|
|
<i>optional</i>
|
|
|
|
<label data-endpoint="POSTapi-team-members" style="display: none">
|
|
<input type="radio" name="active"
|
|
value="true"
|
|
data-endpoint="POSTapi-team-members"
|
|
data-component="body" >
|
|
<code>true</code>
|
|
</label>
|
|
<label data-endpoint="POSTapi-team-members" style="display: none">
|
|
<input type="radio" name="active"
|
|
value="false"
|
|
data-endpoint="POSTapi-team-members"
|
|
data-component="body" >
|
|
<code>false</code>
|
|
</label>
|
|
<br>
|
|
<p>Active status (defaults to true). Example: <code>true</code></p>
|
|
</div>
|
|
</form>
|
|
|
|
<h2 id="team-members-GETapi-team-members--id-">Get a single team member</h2>
|
|
|
|
<p>
|
|
<small class="badge badge-darkred">requires authentication</small>
|
|
</p>
|
|
|
|
<p>Get details of a specific team member by ID.</p>
|
|
|
|
<span id="example-requests-GETapi-team-members--id-">
|
|
<blockquote>Example request:</blockquote>
|
|
|
|
|
|
<div class="bash-example">
|
|
<pre><code class="language-bash">curl --request GET \
|
|
--get "http://localhost/api/team-members/550e8400-e29b-41d4-a716-446655440000" \
|
|
--header "Content-Type: application/json" \
|
|
--header "Accept: application/json"</code></pre></div>
|
|
|
|
|
|
<div class="javascript-example">
|
|
<pre><code class="language-javascript">const url = new URL(
|
|
"http://localhost/api/team-members/550e8400-e29b-41d4-a716-446655440000"
|
|
);
|
|
|
|
const headers = {
|
|
"Content-Type": "application/json",
|
|
"Accept": "application/json",
|
|
};
|
|
|
|
fetch(url, {
|
|
method: "GET",
|
|
headers,
|
|
}).then(response => response.json());</code></pre></div>
|
|
|
|
</span>
|
|
|
|
<span id="example-responses-GETapi-team-members--id-">
|
|
<blockquote>
|
|
<p>Example response (200):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"name": "John Doe",
|
|
"role_id": 1,
|
|
"role": {
|
|
"id": 1,
|
|
"name": "Backend Developer"
|
|
},
|
|
"hourly_rate": "150.00",
|
|
"active": true,
|
|
"created_at": "2024-01-15T10:00:00.000000Z",
|
|
"updated_at": "2024-01-15T10:00:00.000000Z"
|
|
}</code>
|
|
</pre>
|
|
<blockquote>
|
|
<p>Example response (404):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"message": "Team member not found"
|
|
}</code>
|
|
</pre>
|
|
</span>
|
|
<span id="execution-results-GETapi-team-members--id-" hidden>
|
|
<blockquote>Received response<span
|
|
id="execution-response-status-GETapi-team-members--id-"></span>:
|
|
</blockquote>
|
|
<pre class="json"><code id="execution-response-content-GETapi-team-members--id-"
|
|
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
|
|
</span>
|
|
<span id="execution-error-GETapi-team-members--id-" hidden>
|
|
<blockquote>Request failed with error:</blockquote>
|
|
<pre><code id="execution-error-message-GETapi-team-members--id-">
|
|
|
|
Tip: Check that you're properly connected to the network.
|
|
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
|
|
You can check the Dev Tools console for debugging information.</code></pre>
|
|
</span>
|
|
<form id="form-GETapi-team-members--id-" data-method="GET"
|
|
data-path="api/team-members/{id}"
|
|
data-authed="1"
|
|
data-hasfiles="0"
|
|
data-isarraybody="0"
|
|
autocomplete="off"
|
|
onsubmit="event.preventDefault(); executeTryOut('GETapi-team-members--id-', this);">
|
|
<h3>
|
|
Request
|
|
<button type="button"
|
|
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-tryout-GETapi-team-members--id-"
|
|
onclick="tryItOut('GETapi-team-members--id-');">Try it out ⚡
|
|
</button>
|
|
<button type="button"
|
|
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-canceltryout-GETapi-team-members--id-"
|
|
onclick="cancelTryOut('GETapi-team-members--id-');" hidden>Cancel 🛑
|
|
</button>
|
|
<button type="submit"
|
|
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-executetryout-GETapi-team-members--id-"
|
|
data-initial-text="Send Request 💥"
|
|
data-loading-text="⏱ Sending..."
|
|
hidden>Send Request 💥
|
|
</button>
|
|
</h3>
|
|
<p>
|
|
<small class="badge badge-green">GET</small>
|
|
<b><code>api/team-members/{id}</code></b>
|
|
</p>
|
|
<h4 class="fancy-heading-panel"><b>Headers</b></h4>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Content-Type</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Content-Type" data-endpoint="GETapi-team-members--id-"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Accept</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Accept" data-endpoint="GETapi-team-members--id-"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>id</code></b>
|
|
<small>string</small>
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="id" data-endpoint="GETapi-team-members--id-"
|
|
value="550e8400-e29b-41d4-a716-446655440000"
|
|
data-component="url">
|
|
<br>
|
|
<p>Team member UUID. Example: <code>550e8400-e29b-41d4-a716-446655440000</code></p>
|
|
</div>
|
|
</form>
|
|
|
|
<h2 id="team-members-PUTapi-team-members--id-">Update a team member</h2>
|
|
|
|
<p>
|
|
<small class="badge badge-darkred">requires authentication</small>
|
|
</p>
|
|
|
|
<p>Update details of an existing team member.</p>
|
|
|
|
<span id="example-requests-PUTapi-team-members--id-">
|
|
<blockquote>Example request:</blockquote>
|
|
|
|
|
|
<div class="bash-example">
|
|
<pre><code class="language-bash">curl --request PUT \
|
|
"http://localhost/api/team-members/550e8400-e29b-41d4-a716-446655440000" \
|
|
--header "Content-Type: application/json" \
|
|
--header "Accept: application/json" \
|
|
--data "{
|
|
\"name\": \"John Doe\",
|
|
\"role_id\": 1,
|
|
\"hourly_rate\": \"175.00\",
|
|
\"active\": false
|
|
}"
|
|
</code></pre></div>
|
|
|
|
|
|
<div class="javascript-example">
|
|
<pre><code class="language-javascript">const url = new URL(
|
|
"http://localhost/api/team-members/550e8400-e29b-41d4-a716-446655440000"
|
|
);
|
|
|
|
const headers = {
|
|
"Content-Type": "application/json",
|
|
"Accept": "application/json",
|
|
};
|
|
|
|
let body = {
|
|
"name": "John Doe",
|
|
"role_id": 1,
|
|
"hourly_rate": "175.00",
|
|
"active": false
|
|
};
|
|
|
|
fetch(url, {
|
|
method: "PUT",
|
|
headers,
|
|
body: JSON.stringify(body),
|
|
}).then(response => response.json());</code></pre></div>
|
|
|
|
</span>
|
|
|
|
<span id="example-responses-PUTapi-team-members--id-">
|
|
<blockquote>
|
|
<p>Example response (200):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"id": "550e8400-e29b-41d4-a716-446655440000",
|
|
"name": "John Doe",
|
|
"role_id": 1,
|
|
"role": {
|
|
"id": 1,
|
|
"name": "Backend Developer"
|
|
},
|
|
"hourly_rate": "175.00",
|
|
"active": false,
|
|
"created_at": "2024-01-15T10:00:00.000000Z",
|
|
"updated_at": "2024-01-15T11:00:00.000000Z"
|
|
}</code>
|
|
</pre>
|
|
<blockquote>
|
|
<p>Example response (404):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"message": "Team member not found"
|
|
}</code>
|
|
</pre>
|
|
<blockquote>
|
|
<p>Example response (422):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"message": "Validation failed",
|
|
"errors": {
|
|
"hourly_rate": [
|
|
"Hourly rate must be greater than 0"
|
|
]
|
|
}
|
|
}</code>
|
|
</pre>
|
|
</span>
|
|
<span id="execution-results-PUTapi-team-members--id-" hidden>
|
|
<blockquote>Received response<span
|
|
id="execution-response-status-PUTapi-team-members--id-"></span>:
|
|
</blockquote>
|
|
<pre class="json"><code id="execution-response-content-PUTapi-team-members--id-"
|
|
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
|
|
</span>
|
|
<span id="execution-error-PUTapi-team-members--id-" hidden>
|
|
<blockquote>Request failed with error:</blockquote>
|
|
<pre><code id="execution-error-message-PUTapi-team-members--id-">
|
|
|
|
Tip: Check that you're properly connected to the network.
|
|
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
|
|
You can check the Dev Tools console for debugging information.</code></pre>
|
|
</span>
|
|
<form id="form-PUTapi-team-members--id-" data-method="PUT"
|
|
data-path="api/team-members/{id}"
|
|
data-authed="1"
|
|
data-hasfiles="0"
|
|
data-isarraybody="0"
|
|
autocomplete="off"
|
|
onsubmit="event.preventDefault(); executeTryOut('PUTapi-team-members--id-', this);">
|
|
<h3>
|
|
Request
|
|
<button type="button"
|
|
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-tryout-PUTapi-team-members--id-"
|
|
onclick="tryItOut('PUTapi-team-members--id-');">Try it out ⚡
|
|
</button>
|
|
<button type="button"
|
|
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-canceltryout-PUTapi-team-members--id-"
|
|
onclick="cancelTryOut('PUTapi-team-members--id-');" hidden>Cancel 🛑
|
|
</button>
|
|
<button type="submit"
|
|
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-executetryout-PUTapi-team-members--id-"
|
|
data-initial-text="Send Request 💥"
|
|
data-loading-text="⏱ Sending..."
|
|
hidden>Send Request 💥
|
|
</button>
|
|
</h3>
|
|
<p>
|
|
<small class="badge badge-darkblue">PUT</small>
|
|
<b><code>api/team-members/{id}</code></b>
|
|
</p>
|
|
<p>
|
|
<small class="badge badge-purple">PATCH</small>
|
|
<b><code>api/team-members/{id}</code></b>
|
|
</p>
|
|
<h4 class="fancy-heading-panel"><b>Headers</b></h4>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Content-Type</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Content-Type" data-endpoint="PUTapi-team-members--id-"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Accept</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Accept" data-endpoint="PUTapi-team-members--id-"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>id</code></b>
|
|
<small>string</small>
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="id" data-endpoint="PUTapi-team-members--id-"
|
|
value="550e8400-e29b-41d4-a716-446655440000"
|
|
data-component="url">
|
|
<br>
|
|
<p>Team member UUID. Example: <code>550e8400-e29b-41d4-a716-446655440000</code></p>
|
|
</div>
|
|
<h4 class="fancy-heading-panel"><b>Body Parameters</b></h4>
|
|
<div style=" padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>name</code></b>
|
|
<small>string</small>
|
|
<i>optional</i>
|
|
|
|
<input type="text" style="display: none"
|
|
name="name" data-endpoint="PUTapi-team-members--id-"
|
|
value="John Doe"
|
|
data-component="body">
|
|
<br>
|
|
<p>Team member name. Example: <code>John Doe</code></p>
|
|
</div>
|
|
<div style=" padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>role_id</code></b>
|
|
<small>integer</small>
|
|
<i>optional</i>
|
|
|
|
<input type="number" style="display: none"
|
|
step="any" name="role_id" data-endpoint="PUTapi-team-members--id-"
|
|
value="1"
|
|
data-component="body">
|
|
<br>
|
|
<p>Role ID. Example: <code>1</code></p>
|
|
</div>
|
|
<div style=" padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>hourly_rate</code></b>
|
|
<small>numeric</small>
|
|
<i>optional</i>
|
|
|
|
<input type="text" style="display: none"
|
|
name="hourly_rate" data-endpoint="PUTapi-team-members--id-"
|
|
value="175.00"
|
|
data-component="body">
|
|
<br>
|
|
<p>Hourly rate (must be > 0). Example: <code>175.00</code></p>
|
|
</div>
|
|
<div style=" padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>active</code></b>
|
|
<small>boolean</small>
|
|
<i>optional</i>
|
|
|
|
<label data-endpoint="PUTapi-team-members--id-" style="display: none">
|
|
<input type="radio" name="active"
|
|
value="true"
|
|
data-endpoint="PUTapi-team-members--id-"
|
|
data-component="body" >
|
|
<code>true</code>
|
|
</label>
|
|
<label data-endpoint="PUTapi-team-members--id-" style="display: none">
|
|
<input type="radio" name="active"
|
|
value="false"
|
|
data-endpoint="PUTapi-team-members--id-"
|
|
data-component="body" >
|
|
<code>false</code>
|
|
</label>
|
|
<br>
|
|
<p>Active status. Example: <code>false</code></p>
|
|
</div>
|
|
</form>
|
|
|
|
<h2 id="team-members-DELETEapi-team-members--id-">Delete a team member</h2>
|
|
|
|
<p>
|
|
<small class="badge badge-darkred">requires authentication</small>
|
|
</p>
|
|
|
|
<p>Delete a team member. Cannot delete if member has allocations or actuals.</p>
|
|
|
|
<span id="example-requests-DELETEapi-team-members--id-">
|
|
<blockquote>Example request:</blockquote>
|
|
|
|
|
|
<div class="bash-example">
|
|
<pre><code class="language-bash">curl --request DELETE \
|
|
"http://localhost/api/team-members/550e8400-e29b-41d4-a716-446655440000" \
|
|
--header "Content-Type: application/json" \
|
|
--header "Accept: application/json"</code></pre></div>
|
|
|
|
|
|
<div class="javascript-example">
|
|
<pre><code class="language-javascript">const url = new URL(
|
|
"http://localhost/api/team-members/550e8400-e29b-41d4-a716-446655440000"
|
|
);
|
|
|
|
const headers = {
|
|
"Content-Type": "application/json",
|
|
"Accept": "application/json",
|
|
};
|
|
|
|
fetch(url, {
|
|
method: "DELETE",
|
|
headers,
|
|
}).then(response => response.json());</code></pre></div>
|
|
|
|
</span>
|
|
|
|
<span id="example-responses-DELETEapi-team-members--id-">
|
|
<blockquote>
|
|
<p>Example response (200):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"message": "Team member deleted successfully"
|
|
}</code>
|
|
</pre>
|
|
<blockquote>
|
|
<p>Example response (404):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"message": "Team member not found"
|
|
}</code>
|
|
</pre>
|
|
<blockquote>
|
|
<p>Example response (422):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"message": "Cannot delete team member with active allocations",
|
|
"suggestion": "Consider deactivating the team member instead"
|
|
}</code>
|
|
</pre>
|
|
<blockquote>
|
|
<p>Example response (422):</p>
|
|
</blockquote>
|
|
<pre>
|
|
|
|
<code class="language-json" style="max-height: 300px;">{
|
|
"message": "Cannot delete team member with historical data",
|
|
"suggestion": "Consider deactivating the team member instead"
|
|
}</code>
|
|
</pre>
|
|
</span>
|
|
<span id="execution-results-DELETEapi-team-members--id-" hidden>
|
|
<blockquote>Received response<span
|
|
id="execution-response-status-DELETEapi-team-members--id-"></span>:
|
|
</blockquote>
|
|
<pre class="json"><code id="execution-response-content-DELETEapi-team-members--id-"
|
|
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
|
|
</span>
|
|
<span id="execution-error-DELETEapi-team-members--id-" hidden>
|
|
<blockquote>Request failed with error:</blockquote>
|
|
<pre><code id="execution-error-message-DELETEapi-team-members--id-">
|
|
|
|
Tip: Check that you're properly connected to the network.
|
|
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
|
|
You can check the Dev Tools console for debugging information.</code></pre>
|
|
</span>
|
|
<form id="form-DELETEapi-team-members--id-" data-method="DELETE"
|
|
data-path="api/team-members/{id}"
|
|
data-authed="1"
|
|
data-hasfiles="0"
|
|
data-isarraybody="0"
|
|
autocomplete="off"
|
|
onsubmit="event.preventDefault(); executeTryOut('DELETEapi-team-members--id-', this);">
|
|
<h3>
|
|
Request
|
|
<button type="button"
|
|
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-tryout-DELETEapi-team-members--id-"
|
|
onclick="tryItOut('DELETEapi-team-members--id-');">Try it out ⚡
|
|
</button>
|
|
<button type="button"
|
|
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-canceltryout-DELETEapi-team-members--id-"
|
|
onclick="cancelTryOut('DELETEapi-team-members--id-');" hidden>Cancel 🛑
|
|
</button>
|
|
<button type="submit"
|
|
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
|
|
id="btn-executetryout-DELETEapi-team-members--id-"
|
|
data-initial-text="Send Request 💥"
|
|
data-loading-text="⏱ Sending..."
|
|
hidden>Send Request 💥
|
|
</button>
|
|
</h3>
|
|
<p>
|
|
<small class="badge badge-red">DELETE</small>
|
|
<b><code>api/team-members/{id}</code></b>
|
|
</p>
|
|
<h4 class="fancy-heading-panel"><b>Headers</b></h4>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Content-Type</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Content-Type" data-endpoint="DELETEapi-team-members--id-"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>Accept</code></b>
|
|
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="Accept" data-endpoint="DELETEapi-team-members--id-"
|
|
value="application/json"
|
|
data-component="header">
|
|
<br>
|
|
<p>Example: <code>application/json</code></p>
|
|
</div>
|
|
<h4 class="fancy-heading-panel"><b>URL Parameters</b></h4>
|
|
<div style="padding-left: 28px; clear: unset;">
|
|
<b style="line-height: 2;"><code>id</code></b>
|
|
<small>string</small>
|
|
|
|
|
|
<input type="text" style="display: none"
|
|
name="id" data-endpoint="DELETEapi-team-members--id-"
|
|
value="550e8400-e29b-41d4-a716-446655440000"
|
|
data-component="url">
|
|
<br>
|
|
<p>Team member UUID. Example: <code>550e8400-e29b-41d4-a716-446655440000</code></p>
|
|
</div>
|
|
</form>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="dark-box">
|
|
<div class="lang-selector">
|
|
<button type="button" class="lang-button" data-language-name="bash">bash</button>
|
|
<button type="button" class="lang-button" data-language-name="javascript">javascript</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|