MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

This API is not authenticated.

Endpoints

GET api/profile

Example request:
curl --request GET \
    --get "http://localhost:8000/api/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/profile"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/profile

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Handle an incoming registration request.

Example request:
curl --request POST \
    "http://localhost:8000/api/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"email\": \"kunde.eloisa@example.com\",
    \"role\": \"consequatur\",
    \"password\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "email": "kunde.eloisa@example.com",
    "role": "consequatur",
    "password": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

email   string     

Must be a valid email address. Must not be greater than 255 characters. Example: kunde.eloisa@example.com

role   string     

The name of an existing record in the roles table. Example: consequatur

password   string     

Example: consequatur

Handle an incoming authentication request.

Example request:
curl --request POST \
    "http://localhost:8000/api/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\",
    \"password\": \"O[2UZ5ij-e\\/dl4m{o,\"
}"
const url = new URL(
    "http://localhost:8000/api/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qkunze@example.com",
    "password": "O[2UZ5ij-e\/dl4m{o,"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: qkunze@example.com

password   string     

Example: O[2UZ5ij-e/dl4m{o,

Handle an incoming password reset link request.

Example request:
curl --request POST \
    "http://localhost:8000/api/forgot-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\"
}"
const url = new URL(
    "http://localhost:8000/api/forgot-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qkunze@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/forgot-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: qkunze@example.com

Handle an incoming new password request.

Example request:
curl --request POST \
    "http://localhost:8000/api/reset-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"consequatur\",
    \"email\": \"carolyne.luettgen@example.org\",
    \"password\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/reset-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "consequatur",
    "email": "carolyne.luettgen@example.org",
    "password": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/reset-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

token   string     

Example: consequatur

email   string     

Must be a valid email address. Example: carolyne.luettgen@example.org

password   string     

Example: consequatur

Mark the authenticated user's email address as verified.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/verify-email/consequatur/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/verify-email/consequatur/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (403):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 6
x-ratelimit-remaining: 5
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Invalid signature."
}
 

Request      

GET api/verify-email/{id}/{hash}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the verify email. Example: consequatur

hash   string     

Example: consequatur

Send a new email verification notification.

Example request:
curl --request POST \
    "http://localhost:8000/api/email/verification-notification" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/email/verification-notification"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/email/verification-notification

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Destroy an authenticated session.

Example request:
curl --request POST \
    "http://localhost:8000/api/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/logout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/customers/search" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/customers/search"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

GET api/dashboard/customers/filter

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/customers/filter" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/customers/filter"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/customers/filter

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/dashboard/customers/{id}/ban

Example request:
curl --request POST \
    "http://localhost:8000/api/dashboard/customers/consequatur/ban" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/customers/consequatur/ban"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/dashboard/customers/{id}/ban

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the customer. Example: consequatur

GET api/dashboard/customers

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/customers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/customers"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/customers

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/dashboard/customers

Example request:
curl --request POST \
    "http://localhost:8000/api/dashboard/customers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"email\": \"kunde.eloisa@example.com\",
    \"phone\": \"consequatur\",
    \"phone_alt\": \"consequatur\",
    \"note\": \"consequatur\",
    \"address\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/customers"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "email": "kunde.eloisa@example.com",
    "phone": "consequatur",
    "phone_alt": "consequatur",
    "note": "consequatur",
    "address": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/dashboard/customers

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

email   string  optional    

Must be a valid email address. Example: kunde.eloisa@example.com

phone   string     

Example: consequatur

phone_alt   string  optional    

Example: consequatur

note   string  optional    

Example: consequatur

address   string  optional    

Example: consequatur

GET api/dashboard/customers/{id}

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/customers/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/customers/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/customers/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the customer. Example: consequatur

PUT api/dashboard/customers/{id}

Example request:
curl --request PUT \
    "http://localhost:8000/api/dashboard/customers/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"vmqeopfuudtds\",
    \"address\": \"ufvyvddqamniihfqcoynl\"
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/customers/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "phone": "vmqeopfuudtds",
    "address": "ufvyvddqamniihfqcoynl"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/dashboard/customers/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the customer. Example: consequatur

Body Parameters

phone   string     

Must not be greater than 15 characters. Example: vmqeopfuudtds

address   string  optional    

Must not be greater than 255 characters. Example: ufvyvddqamniihfqcoynl

DELETE api/dashboard/customers/{id}

Example request:
curl --request DELETE \
    "http://localhost:8000/api/dashboard/customers/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/customers/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/dashboard/customers/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the customer. Example: consequatur

Display a listing of the resource.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/category" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/category"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/category

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost:8000/api/dashboard/category" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"code\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/category"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "code": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/dashboard/category

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Example: consequatur

code   string  optional    

Example: consequatur

Display the specified resource.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/category/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/category/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the category. Example: consequatur

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost:8000/api/dashboard/category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"code\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "code": "consequatur"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/dashboard/category/{id}

PATCH api/dashboard/category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the category. Example: 1

Body Parameters

name   string  optional    

Example: consequatur

code   string  optional    

Example: consequatur

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/dashboard/category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/dashboard/category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the category. Example: 1

Display a listing of the resource.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/repair-order" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/repair-order"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/repair-order

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost:8000/api/dashboard/repair-order" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"customer_id\": \"consequatur\",
    \"device_id\": \"consequatur\",
    \"accessories\": \"consequatur\",
    \"complaint\": \"consequatur\",
    \"estimated_cost\": 11613.31890586,
    \"total\": 11613.31890586,
    \"status\": \"diagnosing\"
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/repair-order"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "customer_id": "consequatur",
    "device_id": "consequatur",
    "accessories": "consequatur",
    "complaint": "consequatur",
    "estimated_cost": 11613.31890586,
    "total": 11613.31890586,
    "status": "diagnosing"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/dashboard/repair-order

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

customer_id   string     

The id of an existing record in the customers table. Example: consequatur

device_id   string     

The id of an existing record in the devices table. Example: consequatur

accessories   string  optional    

Example: consequatur

complaint   string  optional    

Example: consequatur

product_id   string  optional    

The id of an existing record in the products table.

estimated_cost   number  optional    

Example: 11613.31890586

total   number  optional    

Example: 11613.31890586

status   string     

Example: diagnosing

Must be one of:
  • received
  • diagnosing
  • waiting_customer_approval
  • in_repair
  • ready_for_pickup
  • delivered
  • rejected_by_customer
  • not_repairable
  • cancelled

Display the specified resource.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/repair-order/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/repair-order/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/repair-order/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the repair order. Example: consequatur

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost:8000/api/dashboard/repair-order/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/repair-order/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/dashboard/repair-order/{id}

PATCH api/dashboard/repair-order/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the repair order. Example: consequatur

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/dashboard/repair-order/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/repair-order/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/dashboard/repair-order/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the repair order. Example: consequatur

POST api/dashboard/repair-order/{repairOrder_id}/item

Example request:
curl --request POST \
    "http://localhost:8000/api/dashboard/repair-order/1/item" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"consequatur\",
    \"description\": \"Dolorum amet iste laborum eius est dolor.\",
    \"qty\": 12,
    \"total\": 66,
    \"warranty_days\": 13
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/repair-order/1/item"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "consequatur",
    "description": "Dolorum amet iste laborum eius est dolor.",
    "qty": 12,
    "total": 66,
    "warranty_days": 13
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/dashboard/repair-order/{repairOrder_id}/item

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

repairOrder_id   integer     

The ID of the repairOrder. Example: 1

Body Parameters

product_id   string     

The id of an existing record in the products table. Example: consequatur

description   string  optional    

This field is required when product_id is not present. Must not be greater than 200 characters. Example: Dolorum amet iste laborum eius est dolor.

qty   number     

Must be at least 0.01. Example: 12

total   number     

Must be at least 0. Example: 66

warranty_days   integer  optional    

Must be at least 0. Example: 13

DELETE api/dashboard/repair-order/{repairOrder_id}/item/{item_id}

Example request:
curl --request DELETE \
    "http://localhost:8000/api/dashboard/repair-order/1/item/4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/repair-order/1/item/4"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/dashboard/repair-order/{repairOrder_id}/item/{item_id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

repairOrder_id   integer     

The ID of the repairOrder. Example: 1

item_id   integer     

The ID of the item. Example: 4

POST api/dashboard/repair-order/{repairOrder_id}/changeStatus

Example request:
curl --request POST \
    "http://localhost:8000/api/dashboard/repair-order/1/changeStatus" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"total\": 73,
    \"discount\": 45,
    \"status\": \"received\"
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/repair-order/1/changeStatus"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "total": 73,
    "discount": 45,
    "status": "received"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/dashboard/repair-order/{repairOrder_id}/changeStatus

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

repairOrder_id   integer     

The ID of the repairOrder. Example: 1

Body Parameters

total   number  optional    

This field is required when status is waiting_customer_approval. Must be at least 0. Example: 73

discount   number  optional    

This field is required when status is in_repair. Must be at least 0. Example: 45

status   string     

Example: received

Must be one of:
  • received
  • diagnosing
  • waiting_customer_approval
  • in_repair
  • ready_for_pickup
  • delivered
  • rejected_by_customer
  • not_repairable
  • cancelled

POST api/dashboard/repair-order/{repairOrder}/addLoss

Example request:
curl --request POST \
    "http://localhost:8000/api/dashboard/repair-order/1/addLoss" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"consequatur\",
    \"qty\": 45,
    \"note\": \"qeopfuudtdsufvyvddqam\"
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/repair-order/1/addLoss"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "consequatur",
    "qty": 45,
    "note": "qeopfuudtdsufvyvddqam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/dashboard/repair-order/{repairOrder}/addLoss

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

repairOrder   integer     

Example: 1

Body Parameters

product_id   string     

The id of an existing record in the products table. Example: consequatur

qty   number     

Must be at least 0.01. Example: 45

note   string  optional    

Must not be greater than 255 characters. Example: qeopfuudtdsufvyvddqam

Display a listing of the resource.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/device" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/device"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/device

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost:8000/api/dashboard/device" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"model\": \"amniihfqcoynlazghdtqt\",
    \"serial_number\": \"qxbajwbpilpmufinllwlo\",
    \"imei\": \"auydlsmsjuryv\",
    \"imei2\": \"ojcybzvrbyick\",
    \"color\": \"znkygloigmkwxphlvazjr\"
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/device"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "model": "amniihfqcoynlazghdtqt",
    "serial_number": "qxbajwbpilpmufinllwlo",
    "imei": "auydlsmsjuryv",
    "imei2": "ojcybzvrbyick",
    "color": "znkygloigmkwxphlvazjr"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/dashboard/device

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 100 characters. Example: vmqeopfuudtdsufvyvddq

model   string     

Must not be greater than 100 characters. Example: amniihfqcoynlazghdtqt

serial_number   string     

Must not be greater than 100 characters. Example: qxbajwbpilpmufinllwlo

imei   string  optional    

Must not be greater than 15 characters. Example: auydlsmsjuryv

imei2   string  optional    

Must not be greater than 15 characters. Example: ojcybzvrbyick

color   string  optional    

Must not be greater than 50 characters. Example: znkygloigmkwxphlvazjr

Display the specified resource.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/device/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/device/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/device/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the device. Example: consequatur

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost:8000/api/dashboard/device/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"model\": \"amniihfqcoynlazghdtqt\",
    \"serial_number\": 16,
    \"imei\": 14,
    \"imei2\": 2,
    \"color\": \"ajwbpilpmufinllwloauy\"
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/device/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "model": "amniihfqcoynlazghdtqt",
    "serial_number": 16,
    "imei": 14,
    "imei2": 2,
    "color": "ajwbpilpmufinllwloauy"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/dashboard/device/{id}

PATCH api/dashboard/device/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the device. Example: consequatur

Body Parameters

name   string     

Must not be greater than 100 characters. Example: vmqeopfuudtdsufvyvddq

model   string     

Must not be greater than 100 characters. Example: amniihfqcoynlazghdtqt

serial_number   number     

Must not be greater than 100. Example: 16

imei   number  optional    

Must not be greater than 15. Example: 14

imei2   number  optional    

Must not be greater than 15. Example: 2

color   string  optional    

Must not be greater than 50 characters. Example: ajwbpilpmufinllwloauy

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/dashboard/device/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/device/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/dashboard/device/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the device. Example: 1

Display a listing of the resource.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/sell" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/sell"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/sell

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost:8000/api/dashboard/sell" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"vmqeopfuudtdsufvyvddq\",
    \"account_id\": \"consequatur\",
    \"customer_id\": \"consequatur\",
    \"payment_method\": \"mqeopfuudtdsufvyvddqa\",
    \"notes\": \"consequatur\",
    \"discount\": 45,
    \"items\": [
        {
            \"product_id\": \"consequatur\",
            \"qty\": 45,
            \"sell_price\": 56
        }
    ]
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/sell"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "vmqeopfuudtdsufvyvddq",
    "account_id": "consequatur",
    "customer_id": "consequatur",
    "payment_method": "mqeopfuudtdsufvyvddqa",
    "notes": "consequatur",
    "discount": 45,
    "items": [
        {
            "product_id": "consequatur",
            "qty": 45,
            "sell_price": 56
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/dashboard/sell

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Must not be greater than 30 characters. Example: vmqeopfuudtdsufvyvddq

account_id   string     

The id of an existing record in the accounts table. Example: consequatur

customer_id   string     

The id of an existing record in the customers table. Example: consequatur

payment_method   string  optional    

Must not be greater than 30 characters. Example: mqeopfuudtdsufvyvddqa

notes   string  optional    

Example: consequatur

discount   number  optional    

Must be at least 0. Example: 45

items   object[]     

Must have at least 1 items.

product_id   string     

The id of an existing record in the products table. Example: consequatur

qty   number     

Must be at least 0.01. Example: 45

sell_price   number  optional    

Must be at least 0. Example: 56

GET api/dashboard/sell/{id}

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/sell/17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/sell/17"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/sell/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sell. Example: 17

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost:8000/api/dashboard/sell/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/sell/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/dashboard/sell/{id}

PATCH api/dashboard/sell/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the sell. Example: consequatur

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/dashboard/sell/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/sell/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/dashboard/sell/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the sell. Example: consequatur

Display a listing of the resource.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/purchase" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/purchase"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/purchase

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost:8000/api/dashboard/purchase" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"notes\": \"consequatur\",
    \"items\": [
        {
            \"product_id\": \"consequatur\",
            \"qty\": 45,
            \"cost_price\": 56
        }
    ]
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/purchase"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "notes": "consequatur",
    "items": [
        {
            "product_id": "consequatur",
            "qty": 45,
            "cost_price": 56
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/dashboard/purchase

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

supplier_id   string  optional    

The id of an existing record in the suppliers table.

notes   string  optional    

Example: consequatur

items   object[]     

Must have at least 1 items.

product_id   string     

The id of an existing record in the products table. Example: consequatur

qty   number     

Must be at least 0.01. Example: 45

cost_price   number     

Must be at least 0. Example: 56

Display the specified resource.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/purchase/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/purchase/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/purchase/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the purchase. Example: 1

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost:8000/api/dashboard/purchase/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/purchase/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/dashboard/purchase/{id}

PATCH api/dashboard/purchase/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the purchase. Example: 1

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/dashboard/purchase/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/purchase/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/dashboard/purchase/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the purchase. Example: 1

Display a listing of the resource.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/supplier" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/supplier"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/supplier

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost:8000/api/dashboard/supplier" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"phone\": \"amniihfqcoynlazghdtqt\",
    \"email\": \"andreanne00@example.org\",
    \"address\": \"wbpilpmufinllwloauydl\",
    \"notes\": \"smsjuryvojcybzvrbyick\"
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/supplier"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "phone": "amniihfqcoynlazghdtqt",
    "email": "andreanne00@example.org",
    "address": "wbpilpmufinllwloauydl",
    "notes": "smsjuryvojcybzvrbyick"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/dashboard/supplier

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

phone   string     

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

email   string  optional    

Must not be greater than 255 characters. Example: andreanne00@example.org

address   string  optional    

Must not be greater than 255 characters. Example: wbpilpmufinllwloauydl

notes   string  optional    

Must not be greater than 255 characters. Example: smsjuryvojcybzvrbyick

Display the specified resource.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/supplier/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/supplier/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/dashboard/supplier/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the supplier. Example: 1

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost:8000/api/dashboard/supplier/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"phone\": \"amniihfqcoynlazghdtqt\",
    \"email\": \"andreanne00@example.org\",
    \"address\": \"wbpilpmufinllwloauydl\",
    \"notes\": \"smsjuryvojcybzvrbyick\"
}"
const url = new URL(
    "http://localhost:8000/api/dashboard/supplier/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "phone": "amniihfqcoynlazghdtqt",
    "email": "andreanne00@example.org",
    "address": "wbpilpmufinllwloauydl",
    "notes": "smsjuryvojcybzvrbyick"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/dashboard/supplier/{id}

PATCH api/dashboard/supplier/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the supplier. Example: 1

Body Parameters

name   string     

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

phone   string     

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

email   string  optional    

Must not be greater than 255 characters. Example: andreanne00@example.org

address   string  optional    

Must not be greater than 255 characters. Example: wbpilpmufinllwloauydl

notes   string  optional    

Must not be greater than 255 characters. Example: smsjuryvojcybzvrbyick

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/dashboard/supplier/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/dashboard/supplier/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/dashboard/supplier/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the supplier. Example: 1

Display a listing of the resource.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/inventory/product" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/inventory/product"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inventory/product

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost:8000/api/inventory/product" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"category_id\": \"consequatur\",
    \"sell_price\": 45,
    \"avg_cost\": 56,
    \"unit\": \"bottle\",
    \"track_serial\": true,
    \"model\": \"eopfuudtdsufvyvddqamn\",
    \"current_qty\": 28
}"
const url = new URL(
    "http://localhost:8000/api/inventory/product"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "category_id": "consequatur",
    "sell_price": 45,
    "avg_cost": 56,
    "unit": "bottle",
    "track_serial": true,
    "model": "eopfuudtdsufvyvddqamn",
    "current_qty": 28
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/inventory/product

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 150 characters. Example: vmqeopfuudtdsufvyvddq

category_id   string     

The id of an existing record in the categories table. Example: consequatur

sell_price   number     

Must be at least 0. Example: 45

avg_cost   number  optional    

Must be at least 0. Example: 56

unit   string     

Example: bottle

Must be one of:
  • piece
  • pack
  • box
  • set
  • pair
  • unit
  • gram
  • meter
  • roll
  • bottle
  • tube
  • container
track_serial   boolean  optional    

Example: true

model   string     

Must not be greater than 150 characters. Example: eopfuudtdsufvyvddqamn

current_qty   number  optional    

Must be at least 0. Example: 28

Display the specified resource.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/inventory/product/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/inventory/product/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: http://localhost:3000
access-control-allow-credentials: true
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/inventory/product/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the product. Example: 1

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost:8000/api/inventory/product/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/inventory/product/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/inventory/product/{id}

PATCH api/inventory/product/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the product. Example: 1

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/inventory/product/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/inventory/product/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/inventory/product/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the product. Example: 1