Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
Endpoints
GET api/user
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/user" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/user"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/login
requires authentication
Example request:
curl --request POST \
"http://localhost/api/login" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"yritchie@example.org\",
\"password\": \"a*K%91\"
}"
const url = new URL(
"http://localhost/api/login"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "yritchie@example.org",
"password": "a*K%91"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Destroy an authenticated session.
requires authentication
Example request:
curl --request POST \
"http://localhost/api/logout" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/logout"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/brands Paginated list of brands.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/brands?all=1%2A&page=2&per_page=20&first_letter=A" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/brands"
);
const params = {
"all": "1*",
"page": "2",
"per_page": "20",
"first_letter": "A",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified brand from slug.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/brands/slug/aksel-ketner" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/brands/slug/aksel-ketner"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/brands/{code} Display the specified brand by code.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/brands/AK" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/brands/AK"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET all cart items for the user or session.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/carts/error?currency_code=DKK" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/carts/error"
);
const params = {
"currency_code": "DKK",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST a new cart item.
requires authentication
It will be registered for the user if logged in, otherwise it will be registered for the session.
Example request:
curl --request POST \
"http://localhost/api/carts" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"part_id\": 19,
\"quantity\": 7462047.7
}"
const url = new URL(
"http://localhost/api/carts"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"part_id": 19,
"quantity": 7462047.7
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PUT cart item.
requires authentication
It will be updated for the user if logged in, otherwise it will be updated for the session.
Example request:
curl --request PUT \
"http://localhost/api/carts/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"part_id\": 16,
\"quantity\": 150731250.5,
\"session_id\": \"4a53b7f5-1945-32b3-8563-7f0b50f098b8\"
}"
const url = new URL(
"http://localhost/api/carts/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"part_id": 16,
"quantity": 150731250.5,
"session_id": "4a53b7f5-1945-32b3-8563-7f0b50f098b8"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
DELETE cart item if the item belongs to the user.
requires authentication
Example request:
curl --request DELETE \
"http://localhost/api/carts/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/carts/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Paginated list of countries.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/countries?page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/countries"
);
const params = {
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified country.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/countries/ae" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/countries/ae"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display a listing of the resource.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/companies" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/companies"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified resource.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/companies/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/companies/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display a listing of the resource.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/currencies" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/currencies"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET all inquiries for the authenticated user (customer) Filters by status[] (optional) and paginates.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/inquiries/1?sort_field=molestiae&sort_direction=omnis" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"user_id\": 15,
\"status\": [
\"pending\"
],
\"archived\": false,
\"sort_field\": \"created_at\",
\"sort_direction\": \"desc\",
\"page\": 17,
\"per_page\": 20
}"
const url = new URL(
"http://localhost/api/inquiries/1"
);
const params = {
"sort_field": "molestiae",
"sort_direction": "omnis",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"user_id": 15,
"status": [
"pending"
],
"archived": false,
"sort_field": "created_at",
"sort_direction": "desc",
"page": 17,
"per_page": 20
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET all inquiries and related inquiry_parts for all users of the current users company Filter by status and user
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/inquiries/retailer/1?retailer_id=40&status%5B%5D[]=voluptatem&archived=1&user_id=9843&sort_field=created_at&sort_direction=asc&page=1&per_page=10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"user_id\": 19,
\"status\": [
\"pending\"
],
\"archived\": false,
\"sort_field\": \"retailer_title\",
\"sort_direction\": \"asc\",
\"page\": 10,
\"per_page\": 16
}"
const url = new URL(
"http://localhost/api/inquiries/retailer/1"
);
const params = {
"retailer_id": "40",
"status[][0]": "voluptatem",
"archived": "1",
"user_id": "9843",
"sort_field": "created_at",
"sort_direction": "asc",
"page": "1",
"per_page": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"user_id": 19,
"status": [
"pending"
],
"archived": false,
"sort_field": "retailer_title",
"sort_direction": "asc",
"page": 10,
"per_page": 16
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST Inquiry
requires authentication
Example request:
curl --request POST \
"http://localhost/api/inquiries?retailer_id=40&from_company_id=928&from_email=johndoe%40example.com&from_name=John+Doe&to_email=janedoe%40example.com&to_name=Jane+Doe&subject=Inquiry+about+parts¤cy_code=DKK&generated_message=Part+number%3A+12345%2C+Quantity%3A+10&user_message=Hi.+How+much+is+shipping+to+Denmark+for+these+parts%3F&send_copy_to_email=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"retailer_id\": 42,
\"from_company_id\": 7,
\"from_email\": \"alice@example.com\",
\"from_name\": \"Alice Sender\",
\"to_email\": \"bob@retailer.com\",
\"to_name\": \"Bob Retailer\",
\"subject\": \"Request for quote\",
\"currency_code\": \"USD\",
\"generated_message\": \"Hello, I would like to request a quote for the following parts…\",
\"user_message\": \"Please prioritize delivery by next week if possible.\",
\"send_copy_to_email\": false,
\"parts\": [
{
\"part_id\": 1001,
\"quantity\": 2,
\"price\": 49.95
},
{
\"part_id\": 1002,
\"quantity\": 5,
\"price\": 19.5
}
]
}"
const url = new URL(
"http://localhost/api/inquiries"
);
const params = {
"retailer_id": "40",
"from_company_id": "928",
"from_email": "johndoe@example.com",
"from_name": "John Doe",
"to_email": "janedoe@example.com",
"to_name": "Jane Doe",
"subject": "Inquiry about parts",
"currency_code": "DKK",
"generated_message": "Part number: 12345, Quantity: 10",
"user_message": "Hi. How much is shipping to Denmark for these parts?",
"send_copy_to_email": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"retailer_id": 42,
"from_company_id": 7,
"from_email": "alice@example.com",
"from_name": "Alice Sender",
"to_email": "bob@retailer.com",
"to_name": "Bob Retailer",
"subject": "Request for quote",
"currency_code": "USD",
"generated_message": "Hello, I would like to request a quote for the following parts…",
"user_message": "Please prioritize delivery by next week if possible.",
"send_copy_to_email": false,
"parts": [
{
"part_id": 1001,
"quantity": 2,
"price": 49.95
},
{
"part_id": 1002,
"quantity": 5,
"price": 19.5
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"http://localhost/api/inquiries/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"archived\": true,
\"status\": \"pending\",
\"user_message\": \"esse\"
}"
const url = new URL(
"http://localhost/api/inquiries/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"archived": true,
"status": "pending",
"user_message": "esse"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Paginated list of parts.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/parts?retailer_id=7&brand_code=cl&brand_slug=claas&country_code=dk&sort_field=manufacturer_part_number&sort_direction=asc&no_of_items=10&page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/parts"
);
const params = {
"retailer_id": "7",
"brand_code": "cl",
"brand_slug": "claas",
"country_code": "dk",
"sort_field": "manufacturer_part_number",
"sort_direction": "asc",
"no_of_items": "10",
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified parts.
requires authentication
Include parts that match the manufacturer_part_number Include parts that do not have a manufacturer_part_number but match the part_number
Example request:
curl --request GET \
--get "http://localhost/api/parts/minima?sort_field=price&sort_direction=asc" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"sort_field\": \"part_number\",
\"sort_direction\": \"asc\"
}"
const url = new URL(
"http://localhost/api/parts/minima"
);
const params = {
"sort_field": "price",
"sort_direction": "asc",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"sort_field": "part_number",
"sort_direction": "asc"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display a listing of parts matching the search query and filters.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/parts/search/error?brand_slug=john-deere&country_code=DK&sort_field=part_number&sort_direction=asc&page=1&per_page=10¤cy_code=EUR" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"searchQuery\": \"uiffsspwrrjefg\",
\"brandSlug\": \"quegrvwmoo\",
\"page\": 57,
\"sort_field\": \"part_number\",
\"sort_direction\": \"desc\",
\"country_code\": \"ns\",
\"currency_code\": \"joo\"
}"
const url = new URL(
"http://localhost/api/parts/search/error"
);
const params = {
"brand_slug": "john-deere",
"country_code": "DK",
"sort_field": "part_number",
"sort_direction": "asc",
"page": "1",
"per_page": "10",
"currency_code": "EUR",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"searchQuery": "uiffsspwrrjefg",
"brandSlug": "quegrvwmoo",
"page": 57,
"sort_field": "part_number",
"sort_direction": "desc",
"country_code": "ns",
"currency_code": "joo"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display a listing of parts with the specified brand_slug filtered by optional search query.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/parts/brand/search/doloremque/tempora?country_code=DK&sort_field=part_number&sort_direction=asc&page=1&per_page=10¤cy_code=EUR" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"searchQuery\": \"s\",
\"brandSlug\": \"iasxuouesdahdpyxeex\",
\"page\": 76,
\"sort_field\": \"inventory\",
\"sort_direction\": \"asc\",
\"country_code\": \"fe\",
\"currency_code\": \"row\"
}"
const url = new URL(
"http://localhost/api/parts/brand/search/doloremque/tempora"
);
const params = {
"country_code": "DK",
"sort_field": "part_number",
"sort_direction": "asc",
"page": "1",
"per_page": "10",
"currency_code": "EUR",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"searchQuery": "s",
"brandSlug": "iasxuouesdahdpyxeex",
"page": 76,
"sort_field": "inventory",
"sort_direction": "asc",
"country_code": "fe",
"currency_code": "row"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display a listing of parts with the specified brand_slug filtered by optional search query.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/parts/brand/search/nisi?country_code=DK&sort_field=part_number&sort_direction=asc&page=1&per_page=10¤cy_code=EUR" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"searchQuery\": \"mddfwptklgetpowhrnur\",
\"brandSlug\": \"joywnkssclbwbgl\",
\"page\": 42,
\"sort_field\": \"brand\",
\"sort_direction\": \"desc\",
\"country_code\": \"gc\",
\"currency_code\": \"xhc\"
}"
const url = new URL(
"http://localhost/api/parts/brand/search/nisi"
);
const params = {
"country_code": "DK",
"sort_field": "part_number",
"sort_direction": "asc",
"page": "1",
"per_page": "10",
"currency_code": "EUR",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"searchQuery": "mddfwptklgetpowhrnur",
"brandSlug": "joywnkssclbwbgl",
"page": 42,
"sort_field": "brand",
"sort_direction": "desc",
"country_code": "gc",
"currency_code": "xhc"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET retailers (Company model) by geolocation.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/retailer" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/retailer"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/events/callback
requires authentication
Example request:
curl --request POST \
"http://localhost/api/events/callback" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/events/callback"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/events/{topic}
requires authentication
Example request:
curl --request POST \
"http://localhost/api/events/sed" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/events/sed"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create an Admin user (role_id = 1).
requires authentication
Only admins may create admin users.
Example request:
curl --request POST \
"http://localhost/api/users/admin" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users/admin"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Paginated list of users. Only allowed for admin users.
requires authentication
Search across name, email, and related company name.
Example request:
curl --request GET \
--get "http://localhost/api/users?sort_field=name&sort_direction=asc&no_of_items=10&page=1&query=aage" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users"
);
const params = {
"sort_field": "name",
"sort_direction": "asc",
"no_of_items": "10",
"page": "1",
"query": "aage",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Paginated list of users related to a specific company. Only allowed for admin users or users connected to the company.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/users/company/1?sort_field=name&sort_direction=asc&no_of_items=10&page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users/company/1"
);
const params = {
"sort_field": "name",
"sort_direction": "asc",
"no_of_items": "10",
"page": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"http://localhost/api/users/41" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"qrmawrnuj\",
\"email\": \"ltillman@example.com\",
\"password\": \"\\\\\\\\k\\/d1mnI&\",
\"role_id\": \"1\",
\"selected_company_id\": 3,
\"status\": \"pending\",
\"language_code\": \"wd\",
\"get_part_requests\": true
}"
const url = new URL(
"http://localhost/api/users/41"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "qrmawrnuj",
"email": "ltillman@example.com",
"password": "\\\\k\/d1mnI&",
"role_id": "1",
"selected_company_id": 3,
"status": "pending",
"language_code": "wd",
"get_part_requests": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified resource.
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/users/41" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users/41"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Allow an admin to switch/impersonate an existing Retailer or Customer user.
requires authentication
Example request:
curl --request POST \
"http://localhost/api/users/switch/41" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users/switch/41"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a Retailer user (role_id = 2) and its required company.
requires authentication
Example request:
curl --request POST \
"http://localhost/api/users/retailer" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users/retailer"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a Customer user (role_id = 3). Company is optional.
requires authentication
Example request:
curl --request POST \
"http://localhost/api/users/customer" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/users/customer"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/events/test
requires authentication
Example request:
curl --request GET \
--get "http://localhost/api/events/test" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/events/test"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
This is a test
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.