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.
Address
Get list of address by customer
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/addresses" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/addresses"
);
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: *
{
"error": true,
"data": null,
"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.
Create new address for customer
requires authentication
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/addresses" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"John Doe\",
\"email\": \"john.doe@example.com\",
\"phone\": \"0123456789\",
\"country\": \"United States or US\",
\"state\": \"California\",
\"city\": \"Los Angeles\",
\"address\": \"123 Main St\",
\"is_default\": true,
\"zip_code\": \"90001\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/addresses"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "0123456789",
"country": "United States or US",
"state": "California",
"city": "Los Angeles",
"address": "123 Main St",
"is_default": true,
"zip_code": "90001"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"data": {
"id": 1,
"name": "John Doe",
"phone": "0123456789",
"email": "john.doe@example.com",
"country": "United States",
"state": "California",
"city": "Los Angeles",
"address": "123 Main St",
"zip_code": "90001",
"is_default": true
},
"message": null
}
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 an address
requires authentication
Example request:
curl --request PUT \
"https://demo.larashop.su/api/v1/ecommerce/addresses/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"John Doe\",
\"email\": \"john.doe@example.com\",
\"phone\": \"0123456789\",
\"country\": \"United States or US\",
\"state\": \"California\",
\"city\": \"Los Angeles\",
\"address\": \"123 Main St\",
\"is_default\": true,
\"zip_code\": \"90001\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/addresses/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "0123456789",
"country": "United States or US",
"state": "California",
"city": "Los Angeles",
"address": "123 Main St",
"is_default": true,
"zip_code": "90001"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"data": {
"id": 1,
"name": "John Doe",
"phone": "0123456789",
"email": "john.doe@example.com",
"country": "United States",
"state": "California",
"city": "Los Angeles",
"address": "123 Main St",
"zip_code": "90001",
"is_default": true
},
"message": null
}
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 an address
requires authentication
Example request:
curl --request DELETE \
"https://demo.larashop.su/api/v1/ecommerce/addresses/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/addresses/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"data": null,
"message": "Address deleted successfully"
}
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 list of available countries
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/countries" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/countries"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"data": [
{
"name": "Vietnam",
"code": "VN"
}
],
"message": null
}
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.
Ads
Get ads
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ads?keys[]=homepage-banner&keys[]=sidebar-banner" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"keys\": [
\"homepage-banner\",
\"sidebar-banner\"
]
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ads"
);
const params = {
"keys[0]": "homepage-banner",
"keys[1]": "sidebar-banner",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"keys": [
"homepage-banner",
"sidebar-banner"
]
};
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": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Authentication
Register
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"first_name\": \"John\",
\"last_name\": \"Smith\",
\"name\": \"architecto\",
\"email\": \"gbailey@example.net\",
\"password\": \"|]|{+-\",
\"phone\": \"architecto\",
\"password_confirmation\": \"architecto\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"first_name": "John",
"last_name": "Smith",
"name": "architecto",
"email": "gbailey@example.net",
"password": "|]|{+-",
"phone": "architecto",
"password_confirmation": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"data": null,
"message": "Registered successfully! We emailed you to verify your account!"
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
],
"email": [
"The email field is required."
],
"password": [
"The password field is required."
]
}
}
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.
Login
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\",
\"password\": \"|]|{+-\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net",
"password": "|]|{+-"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"data": {
"token": "1|aF5s7p3xxx1lVL8hkSrPN72m4wPVpTvTs..."
},
"message": null
}
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.
Check email existing or not
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/email/check" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/email/check"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"data": {
"exists": true
},
"message": null
}
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.
Forgot password
Send a reset link to the given user.
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/password/forgot" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/password/forgot"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Resend email verification
Resend the email verification notification.
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/resend-verify-account-email" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/resend-verify-account-email"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Resend email verification
Resend the email verification notification.
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/resend-email-verification" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/resend-email-verification"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Logout
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/logout"
);
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: *
{
"error": true,
"data": null,
"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.
Blog
Search post
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/search" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"architecto\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/search"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "architecto"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"data": {
"items": [
{
"id": 1,
"title": "Sample Post",
"slug": "sample-post",
"excerpt": "This is a sample post excerpt"
}
],
"query": "sample",
"count": 1
}
}
Example response (400):
{
"error": true,
"message": "No search result"
}
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.
List posts
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/posts?per_page=16&page=16" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/posts"
);
const params = {
"per_page": "16",
"page": "16",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"data": [
{
"id": 1,
"title": "Sample Post",
"slug": "sample-post",
"excerpt": "This is a sample post excerpt",
"content": "Full post content here...",
"published_at": "2023-01-01T00:00:00.000000Z",
"author": {
"id": 1,
"name": "John Doe"
},
"categories": [],
"tags": []
}
],
"message": null
}
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.
List categories
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/categories?per_page=16&page=16" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/categories"
);
const params = {
"per_page": "16",
"page": "16",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"data": [
{
"id": 1,
"name": "Technology",
"slug": "technology",
"description": "Latest tech news and updates",
"created_at": "2023-01-01T00:00:00.000000Z"
}
],
"message": null
}
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.
List tags
Filters posts
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/posts/filters?page=16&per_page=16&search=architecto&after=architecto&author=architecto&author_exclude=architecto&before=architecto&exclude=architecto&include=architecto&order=architecto&order_by=architecto&categories=architecto&categories_exclude=architecto&tags=architecto&tags_exclude=architecto&featured=architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/posts/filters"
);
const params = {
"page": "16",
"per_page": "16",
"search": "architecto",
"after": "architecto",
"author": "architecto",
"author_exclude": "architecto",
"before": "architecto",
"exclude": "architecto",
"include": "architecto",
"order": "architecto",
"order_by": "architecto",
"categories": "architecto",
"categories_exclude": "architecto",
"tags": "architecto",
"tags_exclude": "architecto",
"featured": "architecto",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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 post by slug
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/posts/architecto?slug=architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/posts/architecto"
);
const params = {
"slug": "architecto",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Filters categories
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/categories/filters?page=16&per_page=16&search=architecto&order=architecto&order_by=architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/categories/filters"
);
const params = {
"page": "16",
"per_page": "16",
"search": "architecto",
"order": "architecto",
"order_by": "architecto",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"data": [
{
"id": 1,
"name": "Technology",
"slug": "technology",
"description": "Latest tech news and updates"
}
],
"message": null
}
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 category by slug
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/categories/architecto?slug=architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/categories/architecto"
);
const params = {
"slug": "architecto",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Brands
Get list of brands
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/brands?brands=" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"is_featured\": true
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/brands"
);
const params = {
"brands": "",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"is_featured": true
};
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": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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 brand details by slug
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/brands/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/brands/architecto"
);
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: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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 products by brand
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/brands/6/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/brands/6/products"
);
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: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Cart
Add product to cart
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/cart" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1,
\"qty\": 1
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/cart"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 1,
"qty": 1
};
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.
Add product to cart
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/cart/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1,
\"qty\": 1
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/cart/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 1,
"qty": 1
};
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 quantity of a product in cart
Example request:
curl --request PUT \
"https://demo.larashop.su/api/v1/ecommerce/cart/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1,
\"qty\": 1
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/cart/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 1,
"qty": 1
};
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.
Remove a cart item by its ID.
Example request:
curl --request DELETE \
"https://demo.larashop.su/api/v1/ecommerce/cart/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/cart/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 1
};
fetch(url, {
method: "DELETE",
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.
Get a cart item by id.
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/cart/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer_id\": 1,
\"id\": \"e70c6c88dae8344b03e39bb147eba66a\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/cart/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"customer_id": 1,
"id": "e70c6c88dae8344b03e39bb147eba66a"
};
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": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Refresh cart items
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/cart/refresh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"products\": [
\"architecto\"
]
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/cart/refresh"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"products": [
"architecto"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Calculate tax for products in cart
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/checkout/taxes/calculate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"products\": [
\"architecto\"
],
\"country\": \"US\",
\"state\": \"CA\",
\"city\": \"Los Angeles\",
\"zip_code\": \"90001\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/checkout/taxes/calculate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"products": [
"architecto"
],
"country": "US",
"state": "CA",
"city": "Los Angeles",
"zip_code": "90001"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"items": [
{
"product_id": 1,
"price": 100,
"price_formatted": "$100.00",
"quantity": 2,
"tax_rate": 10,
"tax_amount": 20,
"tax_amount_formatted": "$20.00",
"subtotal": 200,
"subtotal_formatted": "$200.00",
"total": 220,
"total_formatted": "$220.00"
}
],
"totals": {
"sub_total": 200,
"sub_total_formatted": "$200.00",
"tax_amount": 20,
"tax_amount_formatted": "$20.00",
"total": 220,
"total_formatted": "$220.00"
}
}
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.
Checkout
Process Checkout Process the checkout for a specific cart ID. This endpoint restores the cart, generates an order token, and redirects the user to the checkout page.
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/checkout/cart/12345" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/checkout/cart/12345"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (302):
{}
Example response (401):
{
"message": "Unauthenticated."
}
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
set-cookie: botble_session=eyJpdiI6IlZjMlkxMy81NVphR3hPU25jMWdnTHc9PSIsInZhbHVlIjoiNjFPQmxXdVdZL25vNkVjSExFb0VSMUxaclF0S1pEV1I5L24xYjlIbmtVWU9OekdCM0FvQUxpYms1WFVqOXdmQXduVHVpbTZaRUFreHExN2hXNlVPcmxMcVFodkhFempadGdFb0dUNFp4bnF2ZFk0RGRjTHgxUzcwZkEyV1RQM3UiLCJtYWMiOiI3MGY1MDZiM2YwNmQ5NmVhM2RiZTAxN2QzZTc1NmY0ODgxZTc4OWZjMGU3M2EyZjA0MmViMGUxNDZiYWQ2NWQ5IiwidGFnIjoiIn0%3D; expires=Wed, 25 Feb 2026 16:11:49 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
Example response (404):
{
"message": "Cart not found."
}
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.
Compare
Add product to compare
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/compare" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/compare"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 1
};
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.
Add product to compare
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/compare/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/compare/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 1
};
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.
Remove a product from compare list
Example request:
curl --request DELETE \
"https://demo.larashop.su/api/v1/ecommerce/compare/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/compare/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 1
};
fetch(url, {
method: "DELETE",
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.
Get compare items
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/compare/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"id\": \"e70c6c88dae8344b03e39bb147eba66a\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/compare/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"id": "e70c6c88dae8344b03e39bb147eba66a"
};
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": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Coupons
Get all available coupons
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/coupons?coupon_ids=1%2C2%2C3" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/coupons"
);
const params = {
"coupon_ids": "1,2,3",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Apply coupon code
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/coupon/apply" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"coupon_code\": \"DISCOUNT20\",
\"cart_id\": \"e70c6c88dae8344b03e39bb147eba66a\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/coupon/apply"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"coupon_code": "DISCOUNT20",
"cart_id": "e70c6c88dae8344b03e39bb147eba66a"
};
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.
Remove coupon code
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/coupon/remove" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"cart_id\": \"e70c6c88dae8344b03e39bb147eba66a\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/coupon/remove"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"cart_id": "e70c6c88dae8344b03e39bb147eba66a"
};
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.
Currencies
Get list of available currencies
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/currencies" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/currencies"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"data": [
{
"id": 1,
"title": "USD",
"symbol": "$",
"is_prefix_symbol": true,
"decimals": 2,
"order": 0,
"is_default": true,
"exchange_rate": 1
},
{
"id": 2,
"title": "EUR",
"symbol": "€",
"is_prefix_symbol": false,
"decimals": 2,
"order": 1,
"is_default": false,
"exchange_rate": 0.91
}
],
"message": null
}
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 current currency
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/currencies/current" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/currencies/current"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"data": {
"id": 1,
"title": "USD",
"symbol": "$",
"is_prefix_symbol": true,
"decimals": 2,
"order": 0,
"is_default": true,
"exchange_rate": 1
},
"message": null
}
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.
Device Tokens
Register or update device token
Register a new device token or update an existing one for push notifications.
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/device-tokens" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"token\": \"architecto\",
\"platform\": \"architecto\",
\"app_version\": \"architecto\",
\"device_id\": \"architecto\",
\"user_type\": \"architecto\",
\"user_id\": 16
}"
const url = new URL(
"https://demo.larashop.su/api/v1/device-tokens"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "architecto",
"platform": "architecto",
"app_version": "architecto",
"device_id": "architecto",
"user_type": "architecto",
"user_id": 16
};
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.
Get user's device tokens
Retrieve all device tokens for the authenticated user.
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/device-tokens" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/device-tokens"
);
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: *
{
"error": true,
"data": null,
"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 device token
Update an existing device token.
Example request:
curl --request PUT \
"https://demo.larashop.su/api/v1/device-tokens/564" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"platform\": \"architecto\",
\"app_version\": \"architecto\",
\"device_id\": \"architecto\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/device-tokens/564"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"platform": "architecto",
"app_version": "architecto",
"device_id": "architecto"
};
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 device token by token value
Delete a device token using the token value.
Example request:
curl --request DELETE \
"https://demo.larashop.su/api/v1/device-tokens/by-token" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"token\": \"architecto\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/device-tokens/by-token"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "architecto"
};
fetch(url, {
method: "DELETE",
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 device token
Delete a device token to stop receiving push notifications.
Example request:
curl --request DELETE \
"https://demo.larashop.su/api/v1/device-tokens/564" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/device-tokens/564"
);
const headers = {
"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.
Deactivate device token
Deactivate a device token without deleting it.
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/device-tokens/564/deactivate" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/device-tokens/564/deactivate"
);
const headers = {
"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.
Downloads
Get list of digital products available for download
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/downloads" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/downloads"
);
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: *
{
"error": true,
"data": null,
"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.
Download a digital product
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/downloads/564" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/downloads/564"
);
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: *
{
"error": true,
"data": null,
"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.
Endpoints
Download a file using a token
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/download/architecto/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/download/architecto/architecto"
);
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: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Download a proof file using a token
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/orders/download-proof/architecto/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/orders/download-proof/architecto/architecto"
);
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: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Filters
Get filter data for products
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/filters" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/filters"
);
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: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Flash Sale
Get flash sales
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/flash-sales?keys=&thumbnail_size=architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"keys\": null
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/flash-sales"
);
const params = {
"keys": "",
"thumbnail_size": "architecto",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"keys": null
};
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": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Notifications
Get user notifications
Retrieve notifications for the authenticated user.
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/notifications?page=1&per_page=20&unread_only=&type=general" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/notifications"
);
const params = {
"page": "1",
"per_page": "20",
"unread_only": "0",
"type": "general",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": true,
"data": null,
"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 notification statistics
Get notification statistics for the authenticated user.
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/notifications/stats" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/notifications/stats"
);
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: *
{
"error": true,
"data": null,
"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.
Mark all notifications as read
Mark all notifications as read for the authenticated user.
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/notifications/mark-all-read" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/notifications/mark-all-read"
);
const headers = {
"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.
Mark notification as read
Mark a specific notification as read for the authenticated user.
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/notifications/564/read" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/notifications/564/read"
);
const headers = {
"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.
Mark notification as clicked
Mark a notification as clicked when user taps on it.
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/notifications/564/clicked" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/notifications/564/clicked"
);
const headers = {
"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.
Delete notification
Delete a notification from user's list.
Example request:
curl --request DELETE \
"https://demo.larashop.su/api/v1/notifications/564" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/notifications/564"
);
const headers = {
"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.
Order Returns
Get list of order return requests for the current user
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/order-returns" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/order-returns"
);
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: *
{
"error": true,
"data": null,
"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 detail of an order return request
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/order-returns/564" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/order-returns/564"
);
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: *
{
"error": true,
"data": null,
"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.
Submit a new order return request
requires authentication
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/order-returns" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"order_id\": 1,
\"return_items\": [
\"architecto\"
],
\"reason\": \"DAMAGED_PRODUCT\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/order-returns"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"order_id": 1,
"return_items": [
"architecto"
],
"reason": "DAMAGED_PRODUCT"
};
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.
Get order information for return request
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/orders/564/returns" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/orders/564/returns"
);
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: *
{
"error": true,
"data": null,
"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.
Orders
APIs for order tracking
Get list of orders by customer
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/orders?status=completed&shipping_status=delivered&payment_status=completed&per_page=10" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/orders"
);
const params = {
"status": "completed",
"shipping_status": "delivered",
"payment_status": "completed",
"per_page": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": true,
"data": null,
"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 order detail
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/orders/564" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/orders/564"
);
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: *
{
"error": true,
"data": null,
"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.
Cancel an order
requires authentication
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/orders/564/cancel" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"cancellation_reason\": \"OTHER\",
\"cancellation_reason_description\": \"I found a better deal elsewhere\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/orders/564/cancel"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"cancellation_reason": "OTHER",
"cancellation_reason_description": "I found a better deal elsewhere"
};
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.
Print an order invoice
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/orders/564/invoice?type=download&format=architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/orders/564/invoice"
);
const params = {
"type": "download",
"format": "architecto",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": true,
"data": null,
"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.
Upload payment proof for an order
requires authentication
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/orders/564/upload-proof" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "file=@/tmp/phpu8raen8gvcrqeXTkPZe" const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/orders/564/upload-proof"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Download payment proof for an order
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/orders/564/download-proof" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/orders/564/download-proof"
);
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: *
{
"error": true,
"data": null,
"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.
Confirm delivery of an order
requires authentication
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/orders/564/confirm-delivery" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/orders/564/confirm-delivery"
);
const headers = {
"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.
Track an order
Track an order by order code and email/phone
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/orders/tracking" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"code\": \"ORD-12345\",
\"email\": \"customer@example.com\",
\"phone\": \"+1234567890\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/orders/tracking"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"code": "ORD-12345",
"email": "customer@example.com",
"phone": "+1234567890"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Order found successfully",
"data": {
"order": {
"id": 1,
"code": "ORD-12345",
"status": "completed",
"amount": 100,
"shipping_amount": 10,
"payment_fee": 5,
"tax_amount": 5,
"sub_total": 90,
"discount_amount": 0,
"payment_id": 1,
"user_id": 1,
"created_at": "2023-08-10T12:34:56.000000Z",
"updated_at": "2023-08-10T12:34:56.000000Z",
"address": {
"id": 1,
"name": "John Doe",
"email": "customer@example.com",
"phone": "+1234567890",
"address": "123 Main St",
"city": "New York",
"state": "NY",
"country": "US",
"zip_code": "10001"
},
"products": [
{
"id": 1,
"name": "Product 1",
"price": 90,
"qty": 1
}
],
"histories": [
{
"id": 1,
"action": "create_order",
"description": "Order was created",
"created_at": "2023-08-10T12:34:56.000000Z"
}
],
"shipment": {
"id": 1,
"status": "delivered",
"tracking_id": "SHIP-12345",
"tracking_link": "https://example.com/tracking/SHIP-12345"
},
"payment": {
"id": 1,
"status": "completed",
"payment_channel": "stripe",
"amount": 100
}
}
}
}
Example response (404):
{
"error": true,
"message": "Order not found",
"code": 404
}
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.
Page
List pages
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/pages?per_page=16&page=16" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/pages"
);
const params = {
"per_page": "16",
"page": "16",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"data": [
{
"id": 1,
"title": "About Us",
"slug": "about-us",
"content": "This is the about us page content...",
"published_at": "2023-01-01T00:00:00.000000Z"
}
],
"message": null
}
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 page by ID
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/pages/16" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/pages/16"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"data": {
"id": 1,
"title": "About Us",
"slug": "about-us",
"content": "This is the about us page content...",
"published_at": "2023-01-01T00:00:00.000000Z"
},
"message": null
}
Example response (404):
{
"error": true,
"message": "Not found"
}
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.
Product Categories
Get list of product categories
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/product-categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"is_featured\": true
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/product-categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"is_featured": true
};
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": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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 product category details by slug
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/product-categories/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/product-categories/architecto"
);
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: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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 products by category
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/product-categories/564/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/product-categories/564/products"
);
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: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Products
Get list of products
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/products?sort_by=architecto&price_ranges=%5B%7B%22from%22%3A10%2C%22to%22%3A20%7D%2C%7B%22from%22%3A30%2C%22to%22%3A40%7D%5D&attributes=%5B%7B%22id%22%3A1%2C%22value%22%3A1%7D%2C%7B%22id%22%3A2%2C%22value%22%3A2%7D%5D&thumbnail_size=architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/products"
);
const params = {
"sort_by": "architecto",
"price_ranges": "[{"from":10,"to":20},{"from":30,"to":40}]",
"attributes": "[{"id":1,"value":1},{"id":2,"value":2}]",
"thumbnail_size": "architecto",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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 product details by slug
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/products/architecto?thumbnail_size=architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/products/architecto"
);
const params = {
"thumbnail_size": "architecto",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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 related products
Get cross-sale products for a product
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/products/architecto/cross-sale" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/products/architecto/cross-sale"
);
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: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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 product's reviews
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/products/architecto/reviews" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/products/architecto/reviews"
);
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: *
{
"message": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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 product variation by attributes
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/product-variation/564?attributes=" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reference_product\": \"architecto\",
\"attributes\": [
\"architecto\"
]
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/product-variation/564"
);
const params = {
"attributes": "",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"reference_product": "architecto",
"attributes": [
"architecto"
]
};
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": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Profile
Get the user profile information.
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/me" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/me"
);
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: *
{
"error": true,
"data": null,
"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 profile
requires authentication
Example request:
curl --request PUT \
"https://demo.larashop.su/api/v1/me" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"first_name\": \"bngz\",
\"last_name\": \"miyv\",
\"name\": \"architecto\",
\"phone\": \"architecto\",
\"dob\": \"architecto\",
\"gender\": \"architecto\",
\"description\": \"Eius et animi quos velit et.\",
\"email\": \"gbailey@example.net\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/me"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"first_name": "bngz",
"last_name": "miyv",
"name": "architecto",
"phone": "architecto",
"dob": "architecto",
"gender": "architecto",
"description": "Eius et animi quos velit et.",
"email": "gbailey@example.net"
};
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.
Update Avatar
requires authentication
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/update/avatar" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "avatar=@/tmp/phpbp9kj15sho4k5mDUZjA" const url = new URL(
"https://demo.larashop.su/api/v1/update/avatar"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('avatar', document.querySelector('input[name="avatar"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update password
requires authentication
Example request:
curl --request PUT \
"https://demo.larashop.su/api/v1/update/password" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"password\": \"|]|{+-\",
\"old_password\": \"architecto\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/update/password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"password": "|]|{+-",
"old_password": "architecto"
};
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.
Get user settings
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/settings" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/settings"
);
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: *
{
"error": true,
"data": null,
"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 user settings
requires authentication
Example request:
curl --request PUT \
"https://demo.larashop.su/api/v1/settings" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"biometric_enabled\": false,
\"notification_enabled\": false,
\"language\": \"architecto\",
\"currency\": \"architecto\",
\"theme\": \"architecto\",
\"timezone\": \"Asia\\/Yekaterinburg\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/settings"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"biometric_enabled": false,
"notification_enabled": false,
"language": "architecto",
"currency": "architecto",
"theme": "architecto",
"timezone": "Asia\/Yekaterinburg"
};
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.
Reviews
Get list of reviews for the current user
requires authentication
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/reviews" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/reviews"
);
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: *
{
"error": true,
"data": null,
"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.
Create a new review
requires authentication
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/reviews" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1,
\"star\": 5,
\"comment\": \"This is a great product! I highly recommend it.\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/reviews"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 1,
"star": 5,
"comment": "This is a great product! I highly recommend it."
};
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.
Delete a review
requires authentication
Example request:
curl --request DELETE \
"https://demo.larashop.su/api/v1/ecommerce/reviews/564" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/reviews/564"
);
const headers = {
"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.
Simple Slider
Get sliders
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/simple-sliders?keys[]=home-slider&keys[]=product-slider" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"keys\": [
\"home-slider\",
\"product-slider\"
]
}"
const url = new URL(
"https://demo.larashop.su/api/v1/simple-sliders"
);
const params = {
"keys[0]": "home-slider",
"keys[1]": "product-slider",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"keys": [
"home-slider",
"product-slider"
]
};
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": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.
Social Login
Apple login
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/auth/apple" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"identityToken\": \"architecto\",
\"guard\": \"architecto\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/auth/apple"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"identityToken": "architecto",
"guard": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"data": {
"token": "1|abc123def456...",
"user": {
"id": 1,
"name": "John Doe",
"email": "john@example.com"
}
},
"message": "Login successful"
}
Example response (400):
{
"error": true,
"message": "Invalid Apple token"
}
Example response (400):
{
"error": true,
"message": "Cannot login, no email or Apple ID provided!"
}
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.
Google login
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/auth/google" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"identityToken\": \"architecto\",
\"guard\": \"architecto\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/auth/google"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"identityToken": "architecto",
"guard": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"data": {
"token": "1|abc123def456...",
"user": {
"id": 1,
"name": "John Doe",
"email": "john@example.com"
}
},
"message": "Login successful"
}
Example response (400):
{
"error": true,
"message": "Invalid Google token"
}
Example response (400):
{
"error": true,
"message": "Google authentication is not properly configured"
}
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.
Facebook login
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/auth/facebook" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"accessToken\": \"architecto\",
\"guard\": \"architecto\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/auth/facebook"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"accessToken": "architecto",
"guard": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"data": {
"token": "1|abc123def456...",
"user": {
"id": 1,
"name": "John Doe",
"email": "john@example.com"
}
},
"message": "Login successful"
}
Example response (400):
{
"error": true,
"message": "Invalid Facebook token"
}
Example response (400):
{
"error": true,
"message": "Facebook authentication is not properly configured"
}
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.
X (Twitter) login
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/auth/x" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"accessToken\": \"architecto\",
\"guard\": \"architecto\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/auth/x"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"accessToken": "architecto",
"guard": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"data": {
"token": "1|abc123def456...",
"user": {
"id": 1,
"name": "John Doe",
"email": "john@example.com"
}
},
"message": "Login successful"
}
Example response (400):
{
"error": true,
"message": "Invalid X (Twitter) token"
}
Example response (400):
{
"error": true,
"message": "X (Twitter) authentication is not properly configured"
}
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.
Wishlist
Add product to wishlist
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/wishlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/wishlist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 1
};
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.
Add product to wishlist
Example request:
curl --request POST \
"https://demo.larashop.su/api/v1/ecommerce/wishlist/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/wishlist/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 1
};
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.
Remove a product from wishlist
Example request:
curl --request DELETE \
"https://demo.larashop.su/api/v1/ecommerce/wishlist/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/wishlist/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"product_id": 1
};
fetch(url, {
method: "DELETE",
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.
Get wishlist items
Example request:
curl --request GET \
--get "https://demo.larashop.su/api/v1/ecommerce/wishlist/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"id\": \"e70c6c88dae8344b03e39bb147eba66a\"
}"
const url = new URL(
"https://demo.larashop.su/api/v1/ecommerce/wishlist/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"id": "e70c6c88dae8344b03e39bb147eba66a"
};
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": "Invalid or missing API key. Please provide a valid X-API-KEY header.",
"error": "Unauthorized"
}
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.