Files
headroom/backend/resources/views/scribe/index.blade.php
Santhosh Janardhanan 8ed56c9f7c feat(project): Complete Project Lifecycle capability with full TDD workflow
- Implement ProjectController with CRUD, status transitions, estimate/forecast
- Add ProjectService with state machine validation
- Extract ProjectStatusService for reusable state machine logic
- Add ProjectPolicy for role-based authorization
- Create ProjectSeeder with test data
- Implement frontend project management UI with modal forms
- Add projectService API client
- Complete all 9 incomplete unit tests (ProjectModelTest, ProjectForecastTest, ProjectPolicyTest)
- Fix E2E test timing issues with loading state waits
- Add Scribe API documentation annotations
- Improve forecasted effort validation messages with detailed feedback

Test Results:
- Backend: 49 passed (182 assertions)
- Frontend Unit: 32 passed
- E2E: 134 passed (Chromium + Firefox)

Phase 3 Refactor:
- Extract ProjectStatusService for state machine
- Optimize project list query with status joins
- Improve forecasted effort validation messages

Phase 4 Document:
- Add Scribe annotations to ProjectController
- Generate API documentation
2026-02-19 02:43:05 -05:00

3360 lines
129 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="[&quot;bash&quot;,&quot;javascript&quot;]">
<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-projects" class="tocify-header">
<li class="tocify-item level-1" data-unique="projects">
<a href="#projects">Projects</a>
</li>
<ul id="tocify-subheader-projects" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="projects-GETapi-projects-types">
<a href="#projects-GETapi-projects-types">Get all project types</a>
</li>
<li class="tocify-item level-2" data-unique="projects-GETapi-projects-statuses">
<a href="#projects-GETapi-projects-statuses">Get all project statuses</a>
</li>
<li class="tocify-item level-2" data-unique="projects-GETapi-projects">
<a href="#projects-GETapi-projects">List all projects</a>
</li>
<li class="tocify-item level-2" data-unique="projects-POSTapi-projects">
<a href="#projects-POSTapi-projects">Create a new project</a>
</li>
<li class="tocify-item level-2" data-unique="projects-GETapi-projects--id-">
<a href="#projects-GETapi-projects--id-">Get a single project</a>
</li>
<li class="tocify-item level-2" data-unique="projects-PUTapi-projects--id-">
<a href="#projects-PUTapi-projects--id-">Update a project</a>
</li>
<li class="tocify-item level-2" data-unique="projects-DELETEapi-projects--id-">
<a href="#projects-DELETEapi-projects--id-">Delete a project</a>
</li>
<li class="tocify-item level-2" data-unique="projects-PUTapi-projects--project--status">
<a href="#projects-PUTapi-projects--project--status">Transition project status</a>
</li>
<li class="tocify-item level-2" data-unique="projects-PUTapi-projects--project--estimate">
<a href="#projects-PUTapi-projects--project--estimate">Set approved estimate</a>
</li>
<li class="tocify-item level-2" data-unique="projects-PUTapi-projects--project--forecast">
<a href="#projects-PUTapi-projects--project--forecast">Set forecasted effort</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.
&lt;aside&gt;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).&lt;/aside&gt;</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 =&gt; 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;">{
&quot;access_token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...&quot;,
&quot;refresh_token&quot;: &quot;abc123def456&quot;,
&quot;token_type&quot;: &quot;bearer&quot;,
&quot;expires_in&quot;: 3600,
&quot;user&quot;: {
&quot;id&quot;: &quot;550e8400-e29b-41d4-a716-446655440000&quot;,
&quot;name&quot;: &quot;Alice Johnson&quot;,
&quot;email&quot;: &quot;user@example.com&quot;,
&quot;role&quot;: &quot;manager&quot;
}
}</code>
</pre>
<blockquote>
<p>Example response (401):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Invalid credentials&quot;
}</code>
</pre>
<blockquote>
<p>Example response (403):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Account is inactive&quot;
}</code>
</pre>
<blockquote>
<p>Example response (422):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;errors&quot;: {
&quot;email&quot;: [
&quot;The email field is required.&quot;
],
&quot;password&quot;: [
&quot;The password field is required.&quot;
]
}
}</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&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;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&nbsp;&nbsp;&nbsp;
<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>&nbsp;&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<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 =&gt; 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;">{
&quot;access_token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...&quot;,
&quot;refresh_token&quot;: &quot;newtoken123&quot;,
&quot;token_type&quot;: &quot;bearer&quot;,
&quot;expires_in&quot;: 3600
}</code>
</pre>
<blockquote>
<p>Example response (401):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Invalid or expired refresh token&quot;
}</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&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;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&nbsp;&nbsp;&nbsp;
<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>&nbsp;&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<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 =&gt; 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;">{
&quot;message&quot;: &quot;Logged out successfully&quot;
}</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&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;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&nbsp;&nbsp;&nbsp;
<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>&nbsp;&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>string</small>&nbsp;
<i>optional</i> &nbsp;
&nbsp;
<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="projects">Projects</h1>
<p>Endpoints for managing projects.</p>
<h2 id="projects-GETapi-projects-types">Get all project types</h2>
<p>
<small class="badge badge-darkred">requires authentication</small>
</p>
<span id="example-requests-GETapi-projects-types">
<blockquote>Example request:</blockquote>
<div class="bash-example">
<pre><code class="language-bash">curl --request GET \
--get "http://localhost/api/projects/types" \
--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/projects/types"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response =&gt; response.json());</code></pre></div>
</span>
<span id="example-responses-GETapi-projects-types">
<blockquote>
<p>Example response (200):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">[
{
&quot;id&quot;: 1,
&quot;name&quot;: &quot;Project&quot;
},
{
&quot;id&quot;: 2,
&quot;name&quot;: &quot;Support&quot;
},
{
&quot;id&quot;: 3,
&quot;name&quot;: &quot;Engagement&quot;
}
]</code>
</pre>
</span>
<span id="execution-results-GETapi-projects-types" hidden>
<blockquote>Received response<span
id="execution-response-status-GETapi-projects-types"></span>:
</blockquote>
<pre class="json"><code id="execution-response-content-GETapi-projects-types"
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
</span>
<span id="execution-error-GETapi-projects-types" hidden>
<blockquote>Request failed with error:</blockquote>
<pre><code id="execution-error-message-GETapi-projects-types">
Tip: Check that you&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
You can check the Dev Tools console for debugging information.</code></pre>
</span>
<form id="form-GETapi-projects-types" data-method="GET"
data-path="api/projects/types"
data-authed="1"
data-hasfiles="0"
data-isarraybody="0"
autocomplete="off"
onsubmit="event.preventDefault(); executeTryOut('GETapi-projects-types', this);">
<h3>
Request&nbsp;&nbsp;&nbsp;
<button type="button"
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-tryout-GETapi-projects-types"
onclick="tryItOut('GETapi-projects-types');">Try it out ⚡
</button>
<button type="button"
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-canceltryout-GETapi-projects-types"
onclick="cancelTryOut('GETapi-projects-types');" hidden>Cancel 🛑
</button>&nbsp;&nbsp;
<button type="submit"
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-executetryout-GETapi-projects-types"
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/projects/types</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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Content-Type" data-endpoint="GETapi-projects-types"
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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Accept" data-endpoint="GETapi-projects-types"
value="application/json"
data-component="header">
<br>
<p>Example: <code>application/json</code></p>
</div>
</form>
<h2 id="projects-GETapi-projects-statuses">Get all project statuses</h2>
<p>
<small class="badge badge-darkred">requires authentication</small>
</p>
<span id="example-requests-GETapi-projects-statuses">
<blockquote>Example request:</blockquote>
<div class="bash-example">
<pre><code class="language-bash">curl --request GET \
--get "http://localhost/api/projects/statuses" \
--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/projects/statuses"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response =&gt; response.json());</code></pre></div>
</span>
<span id="example-responses-GETapi-projects-statuses">
<blockquote>
<p>Example response (200):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">[
{
&quot;id&quot;: 1,
&quot;name&quot;: &quot;Pre-sales&quot;,
&quot;order&quot;: 1
},
{
&quot;id&quot;: 2,
&quot;name&quot;: &quot;SOW Approval&quot;,
&quot;order&quot;: 2
},
{
&quot;id&quot;: 3,
&quot;name&quot;: &quot;Gathering Estimates&quot;,
&quot;order&quot;: 3
}
]</code>
</pre>
</span>
<span id="execution-results-GETapi-projects-statuses" hidden>
<blockquote>Received response<span
id="execution-response-status-GETapi-projects-statuses"></span>:
</blockquote>
<pre class="json"><code id="execution-response-content-GETapi-projects-statuses"
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
</span>
<span id="execution-error-GETapi-projects-statuses" hidden>
<blockquote>Request failed with error:</blockquote>
<pre><code id="execution-error-message-GETapi-projects-statuses">
Tip: Check that you&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
You can check the Dev Tools console for debugging information.</code></pre>
</span>
<form id="form-GETapi-projects-statuses" data-method="GET"
data-path="api/projects/statuses"
data-authed="1"
data-hasfiles="0"
data-isarraybody="0"
autocomplete="off"
onsubmit="event.preventDefault(); executeTryOut('GETapi-projects-statuses', this);">
<h3>
Request&nbsp;&nbsp;&nbsp;
<button type="button"
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-tryout-GETapi-projects-statuses"
onclick="tryItOut('GETapi-projects-statuses');">Try it out ⚡
</button>
<button type="button"
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-canceltryout-GETapi-projects-statuses"
onclick="cancelTryOut('GETapi-projects-statuses');" hidden>Cancel 🛑
</button>&nbsp;&nbsp;
<button type="submit"
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-executetryout-GETapi-projects-statuses"
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/projects/statuses</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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Content-Type" data-endpoint="GETapi-projects-statuses"
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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Accept" data-endpoint="GETapi-projects-statuses"
value="application/json"
data-component="header">
<br>
<p>Example: <code>application/json</code></p>
</div>
</form>
<h2 id="projects-GETapi-projects">List all projects</h2>
<p>
<small class="badge badge-darkred">requires authentication</small>
</p>
<p>Get a list of all projects with optional filtering by status and type.</p>
<span id="example-requests-GETapi-projects">
<blockquote>Example request:</blockquote>
<div class="bash-example">
<pre><code class="language-bash">curl --request GET \
--get "http://localhost/api/projects?status_id=1&amp;type_id=2" \
--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/projects"
);
const params = {
"status_id": "1",
"type_id": "2",
};
Object.keys(params)
.forEach(key =&gt; url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response =&gt; response.json());</code></pre></div>
</span>
<span id="example-responses-GETapi-projects">
<blockquote>
<p>Example response (200):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">[
{
&quot;id&quot;: &quot;550e8400-e29b-41d4-a716-446655440000&quot;,
&quot;code&quot;: &quot;PROJ-001&quot;,
&quot;title&quot;: &quot;Client Dashboard Redesign&quot;,
&quot;status_id&quot;: 1,
&quot;status&quot;: {
&quot;id&quot;: 1,
&quot;name&quot;: &quot;Pre-sales&quot;
},
&quot;type_id&quot;: 2,
&quot;type&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;Support&quot;
},
&quot;approved_estimate&quot;: &quot;120.00&quot;,
&quot;forecasted_effort&quot;: {
&quot;2024-02&quot;: 40,
&quot;2024-03&quot;: 60,
&quot;2024-04&quot;: 20
},
&quot;created_at&quot;: &quot;2024-01-15T10:00:00.000000Z&quot;,
&quot;updated_at&quot;: &quot;2024-01-15T10:00:00.000000Z&quot;
}
]</code>
</pre>
</span>
<span id="execution-results-GETapi-projects" hidden>
<blockquote>Received response<span
id="execution-response-status-GETapi-projects"></span>:
</blockquote>
<pre class="json"><code id="execution-response-content-GETapi-projects"
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
</span>
<span id="execution-error-GETapi-projects" hidden>
<blockquote>Request failed with error:</blockquote>
<pre><code id="execution-error-message-GETapi-projects">
Tip: Check that you&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
You can check the Dev Tools console for debugging information.</code></pre>
</span>
<form id="form-GETapi-projects" data-method="GET"
data-path="api/projects"
data-authed="1"
data-hasfiles="0"
data-isarraybody="0"
autocomplete="off"
onsubmit="event.preventDefault(); executeTryOut('GETapi-projects', this);">
<h3>
Request&nbsp;&nbsp;&nbsp;
<button type="button"
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-tryout-GETapi-projects"
onclick="tryItOut('GETapi-projects');">Try it out ⚡
</button>
<button type="button"
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-canceltryout-GETapi-projects"
onclick="cancelTryOut('GETapi-projects');" hidden>Cancel 🛑
</button>&nbsp;&nbsp;
<button type="submit"
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-executetryout-GETapi-projects"
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/projects</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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Content-Type" data-endpoint="GETapi-projects"
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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Accept" data-endpoint="GETapi-projects"
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>status_id</code></b>&nbsp;&nbsp;
<small>integer</small>&nbsp;
<i>optional</i> &nbsp;
&nbsp;
<input type="number" style="display: none"
step="any" name="status_id" data-endpoint="GETapi-projects"
value="1"
data-component="query">
<br>
<p>Filter by status ID. Example: <code>1</code></p>
</div>
<div style="padding-left: 28px; clear: unset;">
<b style="line-height: 2;"><code>type_id</code></b>&nbsp;&nbsp;
<small>integer</small>&nbsp;
<i>optional</i> &nbsp;
&nbsp;
<input type="number" style="display: none"
step="any" name="type_id" data-endpoint="GETapi-projects"
value="2"
data-component="query">
<br>
<p>Filter by type ID. Example: <code>2</code></p>
</div>
</form>
<h2 id="projects-POSTapi-projects">Create a new project</h2>
<p>
<small class="badge badge-darkred">requires authentication</small>
</p>
<p>Create a new project with code, title, and type.</p>
<span id="example-requests-POSTapi-projects">
<blockquote>Example request:</blockquote>
<div class="bash-example">
<pre><code class="language-bash">curl --request POST \
"http://localhost/api/projects" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"PROJ-001\",
\"title\": \"Client Dashboard Redesign\",
\"type_id\": 1
}"
</code></pre></div>
<div class="javascript-example">
<pre><code class="language-javascript">const url = new URL(
"http://localhost/api/projects"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "PROJ-001",
"title": "Client Dashboard Redesign",
"type_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response =&gt; response.json());</code></pre></div>
</span>
<span id="example-responses-POSTapi-projects">
<blockquote>
<p>Example response (201):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;id&quot;: &quot;550e8400-e29b-41d4-a716-446655440000&quot;,
&quot;code&quot;: &quot;PROJ-001&quot;,
&quot;title&quot;: &quot;Client Dashboard Redesign&quot;,
&quot;status_id&quot;: 1,
&quot;status&quot;: {
&quot;id&quot;: 1,
&quot;name&quot;: &quot;Pre-sales&quot;
},
&quot;type_id&quot;: 1,
&quot;type&quot;: {
&quot;id&quot;: 1,
&quot;name&quot;: &quot;Project&quot;
}
}</code>
</pre>
<blockquote>
<p>Example response (422):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Validation failed&quot;,
&quot;errors&quot;: {
&quot;code&quot;: [
&quot;Project code must be unique&quot;
],
&quot;title&quot;: [
&quot;The title field is required.&quot;
]
}
}</code>
</pre>
</span>
<span id="execution-results-POSTapi-projects" hidden>
<blockquote>Received response<span
id="execution-response-status-POSTapi-projects"></span>:
</blockquote>
<pre class="json"><code id="execution-response-content-POSTapi-projects"
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
</span>
<span id="execution-error-POSTapi-projects" hidden>
<blockquote>Request failed with error:</blockquote>
<pre><code id="execution-error-message-POSTapi-projects">
Tip: Check that you&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
You can check the Dev Tools console for debugging information.</code></pre>
</span>
<form id="form-POSTapi-projects" data-method="POST"
data-path="api/projects"
data-authed="1"
data-hasfiles="0"
data-isarraybody="0"
autocomplete="off"
onsubmit="event.preventDefault(); executeTryOut('POSTapi-projects', this);">
<h3>
Request&nbsp;&nbsp;&nbsp;
<button type="button"
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-tryout-POSTapi-projects"
onclick="tryItOut('POSTapi-projects');">Try it out ⚡
</button>
<button type="button"
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-canceltryout-POSTapi-projects"
onclick="cancelTryOut('POSTapi-projects');" hidden>Cancel 🛑
</button>&nbsp;&nbsp;
<button type="submit"
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-executetryout-POSTapi-projects"
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/projects</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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Content-Type" data-endpoint="POSTapi-projects"
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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Accept" data-endpoint="POSTapi-projects"
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>code</code></b>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="code" data-endpoint="POSTapi-projects"
value="PROJ-001"
data-component="body">
<br>
<p>Project code (must be unique). Example: <code>PROJ-001</code></p>
</div>
<div style=" padding-left: 28px; clear: unset;">
<b style="line-height: 2;"><code>title</code></b>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="title" data-endpoint="POSTapi-projects"
value="Client Dashboard Redesign"
data-component="body">
<br>
<p>Project title. Example: <code>Client Dashboard Redesign</code></p>
</div>
<div style=" padding-left: 28px; clear: unset;">
<b style="line-height: 2;"><code>type_id</code></b>&nbsp;&nbsp;
<small>integer</small>&nbsp;
&nbsp;
&nbsp;
<input type="number" style="display: none"
step="any" name="type_id" data-endpoint="POSTapi-projects"
value="1"
data-component="body">
<br>
<p>Project type ID. Example: <code>1</code></p>
</div>
</form>
<h2 id="projects-GETapi-projects--id-">Get a single project</h2>
<p>
<small class="badge badge-darkred">requires authentication</small>
</p>
<p>Get details of a specific project by ID.</p>
<span id="example-requests-GETapi-projects--id-">
<blockquote>Example request:</blockquote>
<div class="bash-example">
<pre><code class="language-bash">curl --request GET \
--get "http://localhost/api/projects/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/projects/550e8400-e29b-41d4-a716-446655440000"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response =&gt; response.json());</code></pre></div>
</span>
<span id="example-responses-GETapi-projects--id-">
<blockquote>
<p>Example response (200):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;id&quot;: &quot;550e8400-e29b-41d4-a716-446655440000&quot;,
&quot;code&quot;: &quot;PROJ-001&quot;,
&quot;title&quot;: &quot;Client Dashboard Redesign&quot;,
&quot;status&quot;: {
&quot;id&quot;: 1,
&quot;name&quot;: &quot;Pre-sales&quot;
},
&quot;type&quot;: {
&quot;id&quot;: 1,
&quot;name&quot;: &quot;Project&quot;
},
&quot;approved_estimate&quot;: &quot;120.00&quot;,
&quot;forecasted_effort&quot;: {
&quot;2024-02&quot;: 40,
&quot;2024-03&quot;: 60
}
}</code>
</pre>
<blockquote>
<p>Example response (404):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Project not found&quot;
}</code>
</pre>
</span>
<span id="execution-results-GETapi-projects--id-" hidden>
<blockquote>Received response<span
id="execution-response-status-GETapi-projects--id-"></span>:
</blockquote>
<pre class="json"><code id="execution-response-content-GETapi-projects--id-"
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
</span>
<span id="execution-error-GETapi-projects--id-" hidden>
<blockquote>Request failed with error:</blockquote>
<pre><code id="execution-error-message-GETapi-projects--id-">
Tip: Check that you&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
You can check the Dev Tools console for debugging information.</code></pre>
</span>
<form id="form-GETapi-projects--id-" data-method="GET"
data-path="api/projects/{id}"
data-authed="1"
data-hasfiles="0"
data-isarraybody="0"
autocomplete="off"
onsubmit="event.preventDefault(); executeTryOut('GETapi-projects--id-', this);">
<h3>
Request&nbsp;&nbsp;&nbsp;
<button type="button"
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-tryout-GETapi-projects--id-"
onclick="tryItOut('GETapi-projects--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-projects--id-"
onclick="cancelTryOut('GETapi-projects--id-');" hidden>Cancel 🛑
</button>&nbsp;&nbsp;
<button type="submit"
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-executetryout-GETapi-projects--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/projects/{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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Content-Type" data-endpoint="GETapi-projects--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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Accept" data-endpoint="GETapi-projects--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>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="id" data-endpoint="GETapi-projects--id-"
value="550e8400-e29b-41d4-a716-446655440000"
data-component="url">
<br>
<p>Project UUID. Example: <code>550e8400-e29b-41d4-a716-446655440000</code></p>
</div>
</form>
<h2 id="projects-PUTapi-projects--id-">Update a project</h2>
<p>
<small class="badge badge-darkred">requires authentication</small>
</p>
<p>Update details of an existing project.</p>
<span id="example-requests-PUTapi-projects--id-">
<blockquote>Example request:</blockquote>
<div class="bash-example">
<pre><code class="language-bash">curl --request PUT \
"http://localhost/api/projects/550e8400-e29b-41d4-a716-446655440000" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"PROJ-002\",
\"title\": \"Updated Title\",
\"type_id\": 2
}"
</code></pre></div>
<div class="javascript-example">
<pre><code class="language-javascript">const url = new URL(
"http://localhost/api/projects/550e8400-e29b-41d4-a716-446655440000"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "PROJ-002",
"title": "Updated Title",
"type_id": 2
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response =&gt; response.json());</code></pre></div>
</span>
<span id="example-responses-PUTapi-projects--id-">
<blockquote>
<p>Example response (200):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;id&quot;: &quot;550e8400-e29b-41d4-a716-446655440000&quot;,
&quot;code&quot;: &quot;PROJ-002&quot;,
&quot;title&quot;: &quot;Updated Title&quot;,
&quot;type_id&quot;: 2
}</code>
</pre>
<blockquote>
<p>Example response (404):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Project not found&quot;
}</code>
</pre>
<blockquote>
<p>Example response (422):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Validation failed&quot;,
&quot;errors&quot;: {
&quot;type_id&quot;: [
&quot;The selected type id is invalid.&quot;
]
}
}</code>
</pre>
</span>
<span id="execution-results-PUTapi-projects--id-" hidden>
<blockquote>Received response<span
id="execution-response-status-PUTapi-projects--id-"></span>:
</blockquote>
<pre class="json"><code id="execution-response-content-PUTapi-projects--id-"
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
</span>
<span id="execution-error-PUTapi-projects--id-" hidden>
<blockquote>Request failed with error:</blockquote>
<pre><code id="execution-error-message-PUTapi-projects--id-">
Tip: Check that you&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
You can check the Dev Tools console for debugging information.</code></pre>
</span>
<form id="form-PUTapi-projects--id-" data-method="PUT"
data-path="api/projects/{id}"
data-authed="1"
data-hasfiles="0"
data-isarraybody="0"
autocomplete="off"
onsubmit="event.preventDefault(); executeTryOut('PUTapi-projects--id-', this);">
<h3>
Request&nbsp;&nbsp;&nbsp;
<button type="button"
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-tryout-PUTapi-projects--id-"
onclick="tryItOut('PUTapi-projects--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-projects--id-"
onclick="cancelTryOut('PUTapi-projects--id-');" hidden>Cancel 🛑
</button>&nbsp;&nbsp;
<button type="submit"
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-executetryout-PUTapi-projects--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/projects/{id}</code></b>
</p>
<p>
<small class="badge badge-purple">PATCH</small>
<b><code>api/projects/{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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Content-Type" data-endpoint="PUTapi-projects--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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Accept" data-endpoint="PUTapi-projects--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>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="id" data-endpoint="PUTapi-projects--id-"
value="550e8400-e29b-41d4-a716-446655440000"
data-component="url">
<br>
<p>Project 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>code</code></b>&nbsp;&nbsp;
<small>string</small>&nbsp;
<i>optional</i> &nbsp;
&nbsp;
<input type="text" style="display: none"
name="code" data-endpoint="PUTapi-projects--id-"
value="PROJ-002"
data-component="body">
<br>
<p>Project code (must be unique). Example: <code>PROJ-002</code></p>
</div>
<div style=" padding-left: 28px; clear: unset;">
<b style="line-height: 2;"><code>title</code></b>&nbsp;&nbsp;
<small>string</small>&nbsp;
<i>optional</i> &nbsp;
&nbsp;
<input type="text" style="display: none"
name="title" data-endpoint="PUTapi-projects--id-"
value="Updated Title"
data-component="body">
<br>
<p>Project title. Example: <code>Updated Title</code></p>
</div>
<div style=" padding-left: 28px; clear: unset;">
<b style="line-height: 2;"><code>type_id</code></b>&nbsp;&nbsp;
<small>integer</small>&nbsp;
<i>optional</i> &nbsp;
&nbsp;
<input type="number" style="display: none"
step="any" name="type_id" data-endpoint="PUTapi-projects--id-"
value="2"
data-component="body">
<br>
<p>Project type ID. Example: <code>2</code></p>
</div>
</form>
<h2 id="projects-DELETEapi-projects--id-">Delete a project</h2>
<p>
<small class="badge badge-darkred">requires authentication</small>
</p>
<p>Delete a project. Cannot delete if project has allocations or actuals.</p>
<span id="example-requests-DELETEapi-projects--id-">
<blockquote>Example request:</blockquote>
<div class="bash-example">
<pre><code class="language-bash">curl --request DELETE \
"http://localhost/api/projects/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/projects/550e8400-e29b-41d4-a716-446655440000"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response =&gt; response.json());</code></pre></div>
</span>
<span id="example-responses-DELETEapi-projects--id-">
<blockquote>
<p>Example response (200):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Project deleted successfully&quot;
}</code>
</pre>
<blockquote>
<p>Example response (404):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Project not found&quot;
}</code>
</pre>
<blockquote>
<p>Example response (422):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Cannot delete project with allocations&quot;
}</code>
</pre>
</span>
<span id="execution-results-DELETEapi-projects--id-" hidden>
<blockquote>Received response<span
id="execution-response-status-DELETEapi-projects--id-"></span>:
</blockquote>
<pre class="json"><code id="execution-response-content-DELETEapi-projects--id-"
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
</span>
<span id="execution-error-DELETEapi-projects--id-" hidden>
<blockquote>Request failed with error:</blockquote>
<pre><code id="execution-error-message-DELETEapi-projects--id-">
Tip: Check that you&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
You can check the Dev Tools console for debugging information.</code></pre>
</span>
<form id="form-DELETEapi-projects--id-" data-method="DELETE"
data-path="api/projects/{id}"
data-authed="1"
data-hasfiles="0"
data-isarraybody="0"
autocomplete="off"
onsubmit="event.preventDefault(); executeTryOut('DELETEapi-projects--id-', this);">
<h3>
Request&nbsp;&nbsp;&nbsp;
<button type="button"
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-tryout-DELETEapi-projects--id-"
onclick="tryItOut('DELETEapi-projects--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-projects--id-"
onclick="cancelTryOut('DELETEapi-projects--id-');" hidden>Cancel 🛑
</button>&nbsp;&nbsp;
<button type="submit"
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-executetryout-DELETEapi-projects--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/projects/{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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Content-Type" data-endpoint="DELETEapi-projects--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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Accept" data-endpoint="DELETEapi-projects--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>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="id" data-endpoint="DELETEapi-projects--id-"
value="550e8400-e29b-41d4-a716-446655440000"
data-component="url">
<br>
<p>Project UUID. Example: <code>550e8400-e29b-41d4-a716-446655440000</code></p>
</div>
</form>
<h2 id="projects-PUTapi-projects--project--status">Transition project status</h2>
<p>
<small class="badge badge-darkred">requires authentication</small>
</p>
<p>Transition project to a new status following the state machine rules.</p>
<span id="example-requests-PUTapi-projects--project--status">
<blockquote>Example request:</blockquote>
<div class="bash-example">
<pre><code class="language-bash">curl --request PUT \
"http://localhost/api/projects/architecto/status" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"status_id\": 2
}"
</code></pre></div>
<div class="javascript-example">
<pre><code class="language-javascript">const url = new URL(
"http://localhost/api/projects/architecto/status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"status_id": 2
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response =&gt; response.json());</code></pre></div>
</span>
<span id="example-responses-PUTapi-projects--project--status">
<blockquote>
<p>Example response (200):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;id&quot;: &quot;550e8400-e29b-41d4-a716-446655440000&quot;,
&quot;status&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;SOW Approval&quot;
}
}</code>
</pre>
<blockquote>
<p>Example response (404):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Project not found&quot;
}</code>
</pre>
<blockquote>
<p>Example response (422):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Cannot transition from Pre-sales to Done&quot;
}</code>
</pre>
</span>
<span id="execution-results-PUTapi-projects--project--status" hidden>
<blockquote>Received response<span
id="execution-response-status-PUTapi-projects--project--status"></span>:
</blockquote>
<pre class="json"><code id="execution-response-content-PUTapi-projects--project--status"
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
</span>
<span id="execution-error-PUTapi-projects--project--status" hidden>
<blockquote>Request failed with error:</blockquote>
<pre><code id="execution-error-message-PUTapi-projects--project--status">
Tip: Check that you&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
You can check the Dev Tools console for debugging information.</code></pre>
</span>
<form id="form-PUTapi-projects--project--status" data-method="PUT"
data-path="api/projects/{project}/status"
data-authed="1"
data-hasfiles="0"
data-isarraybody="0"
autocomplete="off"
onsubmit="event.preventDefault(); executeTryOut('PUTapi-projects--project--status', this);">
<h3>
Request&nbsp;&nbsp;&nbsp;
<button type="button"
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-tryout-PUTapi-projects--project--status"
onclick="tryItOut('PUTapi-projects--project--status');">Try it out ⚡
</button>
<button type="button"
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-canceltryout-PUTapi-projects--project--status"
onclick="cancelTryOut('PUTapi-projects--project--status');" hidden>Cancel 🛑
</button>&nbsp;&nbsp;
<button type="submit"
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-executetryout-PUTapi-projects--project--status"
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/projects/{project}/status</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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Content-Type" data-endpoint="PUTapi-projects--project--status"
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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Accept" data-endpoint="PUTapi-projects--project--status"
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>project</code></b>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="project" data-endpoint="PUTapi-projects--project--status"
value="architecto"
data-component="url">
<br>
<p>The project. Example: <code>architecto</code></p>
</div>
<div style="padding-left: 28px; clear: unset;">
<b style="line-height: 2;"><code>id</code></b>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="id" data-endpoint="PUTapi-projects--project--status"
value="550e8400-e29b-41d4-a716-446655440000"
data-component="url">
<br>
<p>Project 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>status_id</code></b>&nbsp;&nbsp;
<small>integer</small>&nbsp;
&nbsp;
&nbsp;
<input type="number" style="display: none"
step="any" name="status_id" data-endpoint="PUTapi-projects--project--status"
value="2"
data-component="body">
<br>
<p>Target status ID. Example: <code>2</code></p>
</div>
</form>
<h2 id="projects-PUTapi-projects--project--estimate">Set approved estimate</h2>
<p>
<small class="badge badge-darkred">requires authentication</small>
</p>
<p>Set the approved billable hours estimate for a project.</p>
<span id="example-requests-PUTapi-projects--project--estimate">
<blockquote>Example request:</blockquote>
<div class="bash-example">
<pre><code class="language-bash">curl --request PUT \
"http://localhost/api/projects/architecto/estimate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"approved_estimate\": 120
}"
</code></pre></div>
<div class="javascript-example">
<pre><code class="language-javascript">const url = new URL(
"http://localhost/api/projects/architecto/estimate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"approved_estimate": 120
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response =&gt; response.json());</code></pre></div>
</span>
<span id="example-responses-PUTapi-projects--project--estimate">
<blockquote>
<p>Example response (200):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;id&quot;: &quot;550e8400-e29b-41d4-a716-446655440000&quot;,
&quot;approved_estimate&quot;: &quot;120.00&quot;
}</code>
</pre>
<blockquote>
<p>Example response (404):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Project not found&quot;
}</code>
</pre>
<blockquote>
<p>Example response (422):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Approved estimate must be greater than 0&quot;
}</code>
</pre>
</span>
<span id="execution-results-PUTapi-projects--project--estimate" hidden>
<blockquote>Received response<span
id="execution-response-status-PUTapi-projects--project--estimate"></span>:
</blockquote>
<pre class="json"><code id="execution-response-content-PUTapi-projects--project--estimate"
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
</span>
<span id="execution-error-PUTapi-projects--project--estimate" hidden>
<blockquote>Request failed with error:</blockquote>
<pre><code id="execution-error-message-PUTapi-projects--project--estimate">
Tip: Check that you&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
You can check the Dev Tools console for debugging information.</code></pre>
</span>
<form id="form-PUTapi-projects--project--estimate" data-method="PUT"
data-path="api/projects/{project}/estimate"
data-authed="1"
data-hasfiles="0"
data-isarraybody="0"
autocomplete="off"
onsubmit="event.preventDefault(); executeTryOut('PUTapi-projects--project--estimate', this);">
<h3>
Request&nbsp;&nbsp;&nbsp;
<button type="button"
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-tryout-PUTapi-projects--project--estimate"
onclick="tryItOut('PUTapi-projects--project--estimate');">Try it out ⚡
</button>
<button type="button"
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-canceltryout-PUTapi-projects--project--estimate"
onclick="cancelTryOut('PUTapi-projects--project--estimate');" hidden>Cancel 🛑
</button>&nbsp;&nbsp;
<button type="submit"
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-executetryout-PUTapi-projects--project--estimate"
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/projects/{project}/estimate</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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Content-Type" data-endpoint="PUTapi-projects--project--estimate"
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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Accept" data-endpoint="PUTapi-projects--project--estimate"
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>project</code></b>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="project" data-endpoint="PUTapi-projects--project--estimate"
value="architecto"
data-component="url">
<br>
<p>The project. Example: <code>architecto</code></p>
</div>
<div style="padding-left: 28px; clear: unset;">
<b style="line-height: 2;"><code>id</code></b>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="id" data-endpoint="PUTapi-projects--project--estimate"
value="550e8400-e29b-41d4-a716-446655440000"
data-component="url">
<br>
<p>Project 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>approved_estimate</code></b>&nbsp;&nbsp;
<small>number</small>&nbsp;
&nbsp;
&nbsp;
<input type="number" style="display: none"
step="any" name="approved_estimate" data-endpoint="PUTapi-projects--project--estimate"
value="120"
data-component="body">
<br>
<p>Approved estimate hours (must be &gt; 0). Example: <code>120</code></p>
</div>
</form>
<h2 id="projects-PUTapi-projects--project--forecast">Set forecasted effort</h2>
<p>
<small class="badge badge-darkred">requires authentication</small>
</p>
<p>Set the month-by-month forecasted effort breakdown.</p>
<span id="example-requests-PUTapi-projects--project--forecast">
<blockquote>Example request:</blockquote>
<div class="bash-example">
<pre><code class="language-bash">curl --request PUT \
"http://localhost/api/projects/architecto/forecast" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"forecasted_effort\": {
\"2024-02\": 40,
\"2024-03\": 60
}
}"
</code></pre></div>
<div class="javascript-example">
<pre><code class="language-javascript">const url = new URL(
"http://localhost/api/projects/architecto/forecast"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"forecasted_effort": {
"2024-02": 40,
"2024-03": 60
}
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response =&gt; response.json());</code></pre></div>
</span>
<span id="example-responses-PUTapi-projects--project--forecast">
<blockquote>
<p>Example response (200):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;id&quot;: &quot;550e8400-e29b-41d4-a716-446655440000&quot;,
&quot;forecasted_effort&quot;: {
&quot;2024-02&quot;: 40,
&quot;2024-03&quot;: 60
}
}</code>
</pre>
<blockquote>
<p>Example response (404):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Project not found&quot;
}</code>
</pre>
<blockquote>
<p>Example response (422):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Forecasted effort exceeds approved estimate by more than 5%&quot;
}</code>
</pre>
</span>
<span id="execution-results-PUTapi-projects--project--forecast" hidden>
<blockquote>Received response<span
id="execution-response-status-PUTapi-projects--project--forecast"></span>:
</blockquote>
<pre class="json"><code id="execution-response-content-PUTapi-projects--project--forecast"
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
</span>
<span id="execution-error-PUTapi-projects--project--forecast" hidden>
<blockquote>Request failed with error:</blockquote>
<pre><code id="execution-error-message-PUTapi-projects--project--forecast">
Tip: Check that you&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
You can check the Dev Tools console for debugging information.</code></pre>
</span>
<form id="form-PUTapi-projects--project--forecast" data-method="PUT"
data-path="api/projects/{project}/forecast"
data-authed="1"
data-hasfiles="0"
data-isarraybody="0"
autocomplete="off"
onsubmit="event.preventDefault(); executeTryOut('PUTapi-projects--project--forecast', this);">
<h3>
Request&nbsp;&nbsp;&nbsp;
<button type="button"
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-tryout-PUTapi-projects--project--forecast"
onclick="tryItOut('PUTapi-projects--project--forecast');">Try it out ⚡
</button>
<button type="button"
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-canceltryout-PUTapi-projects--project--forecast"
onclick="cancelTryOut('PUTapi-projects--project--forecast');" hidden>Cancel 🛑
</button>&nbsp;&nbsp;
<button type="submit"
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-executetryout-PUTapi-projects--project--forecast"
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/projects/{project}/forecast</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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Content-Type" data-endpoint="PUTapi-projects--project--forecast"
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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Accept" data-endpoint="PUTapi-projects--project--forecast"
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>project</code></b>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="project" data-endpoint="PUTapi-projects--project--forecast"
value="architecto"
data-component="url">
<br>
<p>The project. Example: <code>architecto</code></p>
</div>
<div style="padding-left: 28px; clear: unset;">
<b style="line-height: 2;"><code>id</code></b>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="id" data-endpoint="PUTapi-projects--project--forecast"
value="550e8400-e29b-41d4-a716-446655440000"
data-component="url">
<br>
<p>Project 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>forecasted_effort</code></b>&nbsp;&nbsp;
<small>object</small>&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="forecasted_effort" data-endpoint="PUTapi-projects--project--forecast"
value=""
data-component="body">
<br>
<p>Monthly effort breakdown.</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 =&gt; url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response =&gt; 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;">[
{
&quot;id&quot;: &quot;550e8400-e29b-41d4-a716-446655440000&quot;,
&quot;name&quot;: &quot;John Doe&quot;,
&quot;role_id&quot;: 1,
&quot;role&quot;: {
&quot;id&quot;: 1,
&quot;name&quot;: &quot;Backend Developer&quot;
},
&quot;hourly_rate&quot;: &quot;150.00&quot;,
&quot;active&quot;: true,
&quot;created_at&quot;: &quot;2024-01-15T10:00:00.000000Z&quot;,
&quot;updated_at&quot;: &quot;2024-01-15T10:00:00.000000Z&quot;
}
]</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&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;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&nbsp;&nbsp;&nbsp;
<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>&nbsp;&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>boolean</small>&nbsp;
<i>optional</i> &nbsp;
&nbsp;
<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 =&gt; 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;">{
&quot;id&quot;: &quot;550e8400-e29b-41d4-a716-446655440000&quot;,
&quot;name&quot;: &quot;John Doe&quot;,
&quot;role_id&quot;: 1,
&quot;role&quot;: {
&quot;id&quot;: 1,
&quot;name&quot;: &quot;Backend Developer&quot;
},
&quot;hourly_rate&quot;: &quot;150.00&quot;,
&quot;active&quot;: true,
&quot;created_at&quot;: &quot;2024-01-15T10:00:00.000000Z&quot;,
&quot;updated_at&quot;: &quot;2024-01-15T10:00:00.000000Z&quot;
}</code>
</pre>
<blockquote>
<p>Example response (422):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Validation failed&quot;,
&quot;errors&quot;: {
&quot;name&quot;: [
&quot;The name field is required.&quot;
],
&quot;hourly_rate&quot;: [
&quot;Hourly rate must be greater than 0&quot;
]
}
}</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&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;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&nbsp;&nbsp;&nbsp;
<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>&nbsp;&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>integer</small>&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>numeric</small>&nbsp;
&nbsp;
&nbsp;
<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 &gt; 0). Example: <code>150.00</code></p>
</div>
<div style=" padding-left: 28px; clear: unset;">
<b style="line-height: 2;"><code>active</code></b>&nbsp;&nbsp;
<small>boolean</small>&nbsp;
<i>optional</i> &nbsp;
&nbsp;
<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 =&gt; 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;">{
&quot;id&quot;: &quot;550e8400-e29b-41d4-a716-446655440000&quot;,
&quot;name&quot;: &quot;John Doe&quot;,
&quot;role_id&quot;: 1,
&quot;role&quot;: {
&quot;id&quot;: 1,
&quot;name&quot;: &quot;Backend Developer&quot;
},
&quot;hourly_rate&quot;: &quot;150.00&quot;,
&quot;active&quot;: true,
&quot;created_at&quot;: &quot;2024-01-15T10:00:00.000000Z&quot;,
&quot;updated_at&quot;: &quot;2024-01-15T10:00:00.000000Z&quot;
}</code>
</pre>
<blockquote>
<p>Example response (404):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Team member not found&quot;
}</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&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;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&nbsp;&nbsp;&nbsp;
<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>&nbsp;&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<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 =&gt; 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;">{
&quot;id&quot;: &quot;550e8400-e29b-41d4-a716-446655440000&quot;,
&quot;name&quot;: &quot;John Doe&quot;,
&quot;role_id&quot;: 1,
&quot;role&quot;: {
&quot;id&quot;: 1,
&quot;name&quot;: &quot;Backend Developer&quot;
},
&quot;hourly_rate&quot;: &quot;175.00&quot;,
&quot;active&quot;: false,
&quot;created_at&quot;: &quot;2024-01-15T10:00:00.000000Z&quot;,
&quot;updated_at&quot;: &quot;2024-01-15T11:00:00.000000Z&quot;
}</code>
</pre>
<blockquote>
<p>Example response (404):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Team member not found&quot;
}</code>
</pre>
<blockquote>
<p>Example response (422):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Validation failed&quot;,
&quot;errors&quot;: {
&quot;hourly_rate&quot;: [
&quot;Hourly rate must be greater than 0&quot;
]
}
}</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&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;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&nbsp;&nbsp;&nbsp;
<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>&nbsp;&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>string</small>&nbsp;
<i>optional</i> &nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>integer</small>&nbsp;
<i>optional</i> &nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>numeric</small>&nbsp;
<i>optional</i> &nbsp;
&nbsp;
<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 &gt; 0). Example: <code>175.00</code></p>
</div>
<div style=" padding-left: 28px; clear: unset;">
<b style="line-height: 2;"><code>active</code></b>&nbsp;&nbsp;
<small>boolean</small>&nbsp;
<i>optional</i> &nbsp;
&nbsp;
<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 =&gt; 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;">{
&quot;message&quot;: &quot;Team member deleted successfully&quot;
}</code>
</pre>
<blockquote>
<p>Example response (404):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Team member not found&quot;
}</code>
</pre>
<blockquote>
<p>Example response (422):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Cannot delete team member with active allocations&quot;,
&quot;suggestion&quot;: &quot;Consider deactivating the team member instead&quot;
}</code>
</pre>
<blockquote>
<p>Example response (422):</p>
</blockquote>
<pre>
<code class="language-json" style="max-height: 300px;">{
&quot;message&quot;: &quot;Cannot delete team member with historical data&quot;,
&quot;suggestion&quot;: &quot;Consider deactivating the team member instead&quot;
}</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&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;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&nbsp;&nbsp;&nbsp;
<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>&nbsp;&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
&nbsp;
&nbsp;
&nbsp;
<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>&nbsp;&nbsp;
<small>string</small>&nbsp;
&nbsp;
&nbsp;
<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>