Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
This API is not authenticated.
Endpoints
GET api/user
Example request:
curl --request GET \
--get "http://localhost/api/user" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/user"
);
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: *
set-cookie: caratx_session=NBSZCBdyKlsEydVcHfMs57GcvsPZTW09idyHVEsq; expires=Thu, 12-Jan-2023 07:35:57 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
GET api/categories-subcategories
Example request:
curl --request GET \
--get "http://localhost/api/categories-subcategories" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/categories-subcategories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (400):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
set-cookie: caratx_session=O0iYSILny4cLUQ8Dyszy7Bh19arM2POlHNN2Jhb4; expires=Thu, 12-Jan-2023 07:35:57 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"error": true,
"message": "Please add api-key in request header."
}
Received response:
Request failed with error:
GET api/product-categories
Example request:
curl --request GET \
--get "http://localhost/api/product-categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/product-categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (400):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
set-cookie: caratx_session=nEGs1BOSupY46vFWuIUZW48NRlDvj1JSufMRlyF2; expires=Thu, 12-Jan-2023 07:35:57 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"error": true,
"message": "Please add api-key in request header."
}
Received response:
Request failed with error:
GET api/search-products-by-name
Example request:
curl --request GET \
--get "http://localhost/api/search-products-by-name" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/search-products-by-name"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (400):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
access-control-allow-origin: *
set-cookie: caratx_session=YZIszxZup0nGRebWdxyoL2ooAJSafqYY5quRozbD; expires=Thu, 12-Jan-2023 07:35:57 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"error": true,
"message": "Please add api-key in request header."
}
Received response:
Request failed with error:
GET api/filter-products
Example request:
curl --request GET \
--get "http://localhost/api/filter-products" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/filter-products"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (400):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 56
access-control-allow-origin: *
set-cookie: caratx_session=nsXlw60EHTFNEunvf9jft70dfdBV85etSnDpYkit; expires=Thu, 12-Jan-2023 07:35:57 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"error": true,
"message": "Please add api-key in request header."
}
Received response:
Request failed with error:
POST api/add-to-cart
Example request:
curl --request POST \
"http://localhost/api/add-to-cart" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/add-to-cart"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
GET api/view-cart
Example request:
curl --request GET \
--get "http://localhost/api/view-cart" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/view-cart"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (400):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 55
access-control-allow-origin: *
set-cookie: caratx_session=snmI4xzKzAZijYW5PLnnOj689b5Vx5PfTyG29P28; expires=Thu, 12-Jan-2023 07:35:57 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"error": true,
"message": "Please add api-key in request header."
}
Received response:
Request failed with error:
POST api/remove-from-cart
Example request:
curl --request POST \
"http://localhost/api/remove-from-cart" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/remove-from-cart"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
GET api/clear-cart
Example request:
curl --request GET \
--get "http://localhost/api/clear-cart" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost/api/clear-cart"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (400):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 54
access-control-allow-origin: *
set-cookie: caratx_session=gnHpC4AqKp4gcaZgBPuubu0eVwIparwBaYcEh6xP; expires=Thu, 12-Jan-2023 07:35:57 GMT; Max-Age=7200; path=/; httponly; samesite=lax
{
"error": true,
"message": "Please add api-key in request header."
}
Received response:
Request failed with error: