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 "http://shofy.test/api/v1/ecommerce/addresses" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 \
"http://shofy.test/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(
"http://shofy.test/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 \
"http://shofy.test/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(
"http://shofy.test/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 \
"http://shofy.test/api/v1/ecommerce/addresses/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 "http://shofy.test/api/v1/ecommerce/countries" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 "http://shofy.test/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(
"http://shofy.test/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 (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": false,
"data": [],
"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.
Authentication
Register
Example request:
curl --request POST \
"http://shofy.test/api/v1/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"first_name\": \"John\",
\"last_name\": \"Smith\",
\"name\": \"consequatur\",
\"email\": \"qkunze@example.com\",
\"password\": \"O[2UZ5ij-e\\/dl4m{o,\",
\"phone\": \"consequatur\",
\"password_confirmation\": \"consequatur\"
}"
const url = new URL(
"http://shofy.test/api/v1/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"first_name": "John",
"last_name": "Smith",
"name": "consequatur",
"email": "qkunze@example.com",
"password": "O[2UZ5ij-e\/dl4m{o,",
"phone": "consequatur",
"password_confirmation": "consequatur"
};
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 \
"http://shofy.test/api/v1/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"qkunze@example.com\",
\"password\": \"O[2UZ5ij-e\\/dl4m{o,\"
}"
const url = new URL(
"http://shofy.test/api/v1/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "qkunze@example.com",
"password": "O[2UZ5ij-e\/dl4m{o,"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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 \
"http://shofy.test/api/v1/email/check" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"qkunze@example.com\"
}"
const url = new URL(
"http://shofy.test/api/v1/email/check"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "qkunze@example.com"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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 \
"http://shofy.test/api/v1/password/forgot" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"qkunze@example.com\"
}"
const url = new URL(
"http://shofy.test/api/v1/password/forgot"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "qkunze@example.com"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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 \
"http://shofy.test/api/v1/resend-verify-account-email" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"qkunze@example.com\"
}"
const url = new URL(
"http://shofy.test/api/v1/resend-verify-account-email"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "qkunze@example.com"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());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 "http://shofy.test/api/v1/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 "http://shofy.test/api/v1/search" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"q\": \"consequatur\"
}"
const url = new URL(
"http://shofy.test/api/v1/search"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"q": "consequatur"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": true,
"data": null,
"message": "No results found, please try with different keywords."
}
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 "http://shofy.test/api/v1/posts" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/posts"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [
{
"id": 1,
"name": "4 Expert Tips On How To Choose The Right Men’s Wallet",
"slug": "4-expert-tips-on-how-to-choose-the-right-mens-wallet",
"description": "Alice's, and they sat down at her as hard as it can talk: at any rate I'll never go THERE again!' said Alice to herself, 'to be going messages for a minute or two, which gave the Pigeon in a.",
"image": "http://shofy.test/storage/main/blog/post-6.jpg",
"categories": [
{
"id": 5,
"name": "Organic Fruits",
"slug": "organic-fruits",
"url": "http://shofy.test/blog/organic-fruits",
"description": "Quae in praesentium quae dignissimos ratione et aliquid. Architecto maiores nisi quisquam consequuntur veniam sapiente. Voluptatum voluptates fugiat ut molestiae."
}
],
"tags": [
{
"id": 5,
"name": "Modern",
"slug": "modern",
"description": null
},
{
"id": 7,
"name": "Vintage",
"slug": "vintage",
"description": null
}
],
"created_at": "2025-06-25T01:43:37.000000Z",
"updated_at": "2025-06-25T01:43:37.000000Z"
},
{
"id": 2,
"name": "Sexy Clutches: How to Buy & Wear a Designer Clutch Bag",
"slug": "sexy-clutches-how-to-buy-wear-a-designer-clutch-bag",
"description": "Mock Turtle said: 'advance twice, set to work nibbling at the proposal. 'Then the Dormouse into the garden with one eye, How the Owl and the two creatures, who had got to go from here?' 'That.",
"image": "http://shofy.test/storage/main/blog/post-3.jpg",
"categories": [
{
"id": 2,
"name": "Fashion",
"slug": "fashion",
"url": "http://shofy.test/blog/fashion",
"description": "Consequatur magni suscipit veniam labore optio modi minus. Cum neque rerum id natus non placeat rerum. Iure vel recusandae quia voluptatem omnis ratione tempora quia."
},
{
"id": 6,
"name": "Ecological",
"slug": "ecological",
"url": "http://shofy.test/blog/ecological",
"description": "Reprehenderit voluptas excepturi qui sunt. Consequatur quia consequatur consequuntur consequatur. Et adipisci error voluptatem vitae amet repellendus sit. Possimus omnis fugiat recusandae quod."
}
],
"tags": [
{
"id": 2,
"name": "Design",
"slug": "design",
"description": null
},
{
"id": 6,
"name": "Nature",
"slug": "nature",
"description": null
},
{
"id": 7,
"name": "Vintage",
"slug": "vintage",
"description": null
}
],
"created_at": "2025-06-25T01:43:37.000000Z",
"updated_at": "2025-06-25T01:43:37.000000Z"
},
{
"id": 3,
"name": "The Top 2020 Handbag Trends to Know",
"slug": "the-top-2020-handbag-trends-to-know",
"description": "White Rabbit, 'and that's why. Pig!' She said it to be Involved in this way! Stop this moment, and fetch me a pair of gloves and the baby violently up and saying, 'Thank you, sir, for your.",
"image": "http://shofy.test/storage/main/blog/post-2.jpg",
"categories": [
{
"id": 5,
"name": "Organic Fruits",
"slug": "organic-fruits",
"url": "http://shofy.test/blog/organic-fruits",
"description": "Quae in praesentium quae dignissimos ratione et aliquid. Architecto maiores nisi quisquam consequuntur veniam sapiente. Voluptatum voluptates fugiat ut molestiae."
}
],
"tags": [
{
"id": 2,
"name": "Design",
"slug": "design",
"description": null
},
{
"id": 4,
"name": "Branding",
"slug": "branding",
"description": null
},
{
"id": 7,
"name": "Vintage",
"slug": "vintage",
"description": null
}
],
"created_at": "2025-06-25T01:43:37.000000Z",
"updated_at": "2025-06-25T01:43:37.000000Z"
},
{
"id": 4,
"name": "How to Match the Color of Your Handbag With an Outfit",
"slug": "how-to-match-the-color-of-your-handbag-with-an-outfit",
"description": "Alice could speak again. In a little girl she'll think me for asking! No, it'll never do to ask: perhaps I shall have to ask his neighbour to tell him. 'A nice muddle their slates'll be in a hurry.",
"image": "http://shofy.test/storage/main/blog/post-2.jpg",
"categories": [
{
"id": 2,
"name": "Fashion",
"slug": "fashion",
"url": "http://shofy.test/blog/fashion",
"description": "Consequatur magni suscipit veniam labore optio modi minus. Cum neque rerum id natus non placeat rerum. Iure vel recusandae quia voluptatem omnis ratione tempora quia."
},
{
"id": 6,
"name": "Ecological",
"slug": "ecological",
"url": "http://shofy.test/blog/ecological",
"description": "Reprehenderit voluptas excepturi qui sunt. Consequatur quia consequatur consequuntur consequatur. Et adipisci error voluptatem vitae amet repellendus sit. Possimus omnis fugiat recusandae quod."
}
],
"tags": [
{
"id": 1,
"name": "General",
"slug": "general",
"description": null
},
{
"id": 3,
"name": "Fashion",
"slug": "fashion",
"description": null
},
{
"id": 7,
"name": "Vintage",
"slug": "vintage",
"description": null
}
],
"created_at": "2025-06-25T01:43:37.000000Z",
"updated_at": "2025-06-25T01:43:37.000000Z"
},
{
"id": 5,
"name": "How to Care for Leather Bags",
"slug": "how-to-care-for-leather-bags",
"description": "She had not got into it), and handed them round as prizes. There was no label this time she heard a little of her sharp little chin. 'I've a right to grow larger again, and Alice called out as loud.",
"image": "http://shofy.test/storage/main/blog/post-5.jpg",
"categories": [
{
"id": 1,
"name": "Crisp Bread & Cake",
"slug": "crisp-bread-cake",
"url": "http://shofy.test/blog/crisp-bread-cake",
"description": "Et magni blanditiis quos optio delectus animi possimus. Repudiandae expedita alias ipsam. Magnam quas ipsam autem ipsam."
},
{
"id": 6,
"name": "Ecological",
"slug": "ecological",
"url": "http://shofy.test/blog/ecological",
"description": "Reprehenderit voluptas excepturi qui sunt. Consequatur quia consequatur consequuntur consequatur. Et adipisci error voluptatem vitae amet repellendus sit. Possimus omnis fugiat recusandae quod."
}
],
"tags": [
{
"id": 4,
"name": "Branding",
"slug": "branding",
"description": null
},
{
"id": 5,
"name": "Modern",
"slug": "modern",
"description": null
},
{
"id": 8,
"name": "Sunglasses",
"slug": "sunglasses",
"description": null
}
],
"created_at": "2025-06-25T01:43:37.000000Z",
"updated_at": "2025-06-25T01:43:37.000000Z"
},
{
"id": 6,
"name": "We're Crushing Hard on Summer's 10 Biggest Bag Trends",
"slug": "were-crushing-hard-on-summers-10-biggest-bag-trends",
"description": "Duchess began in a very respectful tone, but frowning and making faces at him as he could go. Alice took up the fan she was now only ten inches high, and her eyes to see that queer little toss of.",
"image": "http://shofy.test/storage/main/blog/post-10.jpg",
"categories": [
{
"id": 4,
"name": "Commercial",
"slug": "commercial",
"url": "http://shofy.test/blog/commercial",
"description": "Optio incidunt delectus ut adipisci ea neque et aliquid. Alias iure ratione omnis consequatur. Dolor sequi natus sit iste aut."
},
{
"id": 6,
"name": "Ecological",
"slug": "ecological",
"url": "http://shofy.test/blog/ecological",
"description": "Reprehenderit voluptas excepturi qui sunt. Consequatur quia consequatur consequuntur consequatur. Et adipisci error voluptatem vitae amet repellendus sit. Possimus omnis fugiat recusandae quod."
}
],
"tags": [
{
"id": 6,
"name": "Nature",
"slug": "nature",
"description": null
},
{
"id": 8,
"name": "Sunglasses",
"slug": "sunglasses",
"description": null
}
],
"created_at": "2025-06-25T01:43:37.000000Z",
"updated_at": "2025-06-25T01:43:37.000000Z"
},
{
"id": 7,
"name": "Essential Qualities of Highly Successful Music",
"slug": "essential-qualities-of-highly-successful-music",
"description": "He looked at Two. Two began in a very short time the Mouse was speaking, so that her flamingo was gone across to the rose-tree, she went on for some time with great curiosity. 'Soles and eels, of.",
"image": "http://shofy.test/storage/main/blog/post-12.jpg",
"categories": [
{
"id": 6,
"name": "Ecological",
"slug": "ecological",
"url": "http://shofy.test/blog/ecological",
"description": "Reprehenderit voluptas excepturi qui sunt. Consequatur quia consequatur consequuntur consequatur. Et adipisci error voluptatem vitae amet repellendus sit. Possimus omnis fugiat recusandae quod."
}
],
"tags": [
{
"id": 1,
"name": "General",
"slug": "general",
"description": null
},
{
"id": 2,
"name": "Design",
"slug": "design",
"description": null
},
{
"id": 7,
"name": "Vintage",
"slug": "vintage",
"description": null
}
],
"created_at": "2025-06-25T01:43:37.000000Z",
"updated_at": "2025-06-25T01:43:37.000000Z"
},
{
"id": 8,
"name": "9 Things I Love About Shaving My Head",
"slug": "9-things-i-love-about-shaving-my-head",
"description": "White Rabbit; 'in fact, there's nothing written on the trumpet, and called out, 'First witness!' The first thing I've got to grow to my right size: the next moment she quite forgot you didn't like.",
"image": "http://shofy.test/storage/main/blog/post-6.jpg",
"categories": [
{
"id": 2,
"name": "Fashion",
"slug": "fashion",
"url": "http://shofy.test/blog/fashion",
"description": "Consequatur magni suscipit veniam labore optio modi minus. Cum neque rerum id natus non placeat rerum. Iure vel recusandae quia voluptatem omnis ratione tempora quia."
},
{
"id": 3,
"name": "Electronic",
"slug": "electronic",
"url": "http://shofy.test/blog/electronic",
"description": "Culpa quia voluptas sint aut maiores minus debitis. Et dolor occaecati ullam qui. Perspiciatis natus rerum officia veniam cum odio molestias. Omnis laudantium ipsam ut voluptatum."
}
],
"tags": [
{
"id": 5,
"name": "Modern",
"slug": "modern",
"description": null
},
{
"id": 8,
"name": "Sunglasses",
"slug": "sunglasses",
"description": null
}
],
"created_at": "2025-06-25T01:43:37.000000Z",
"updated_at": "2025-06-25T01:43:37.000000Z"
},
{
"id": 9,
"name": "Why Teamwork Really Makes The Dream Work",
"slug": "why-teamwork-really-makes-the-dream-work",
"description": "I've kept her eyes immediately met those of a well--' 'What did they live at the cook, and a scroll of parchment in the world! Oh, my dear paws! Oh my dear paws! Oh my fur and whiskers! She'll get.",
"image": "http://shofy.test/storage/main/blog/post-1.jpg",
"categories": [
{
"id": 1,
"name": "Crisp Bread & Cake",
"slug": "crisp-bread-cake",
"url": "http://shofy.test/blog/crisp-bread-cake",
"description": "Et magni blanditiis quos optio delectus animi possimus. Repudiandae expedita alias ipsam. Magnam quas ipsam autem ipsam."
},
{
"id": 5,
"name": "Organic Fruits",
"slug": "organic-fruits",
"url": "http://shofy.test/blog/organic-fruits",
"description": "Quae in praesentium quae dignissimos ratione et aliquid. Architecto maiores nisi quisquam consequuntur veniam sapiente. Voluptatum voluptates fugiat ut molestiae."
}
],
"tags": [
{
"id": 3,
"name": "Fashion",
"slug": "fashion",
"description": null
},
{
"id": 4,
"name": "Branding",
"slug": "branding",
"description": null
},
{
"id": 5,
"name": "Modern",
"slug": "modern",
"description": null
}
],
"created_at": "2025-06-25T01:43:37.000000Z",
"updated_at": "2025-06-25T01:43:37.000000Z"
},
{
"id": 10,
"name": "The World Caters to Average People",
"slug": "the-world-caters-to-average-people",
"description": "Jack-in-the-box, and up I goes like a stalk out of its mouth open, gazing up into the air off all its feet at once, in a voice sometimes choked with sobs, to sing \"Twinkle, twinkle, little bat! How.",
"image": "http://shofy.test/storage/main/blog/post-8.jpg",
"categories": [
{
"id": 4,
"name": "Commercial",
"slug": "commercial",
"url": "http://shofy.test/blog/commercial",
"description": "Optio incidunt delectus ut adipisci ea neque et aliquid. Alias iure ratione omnis consequatur. Dolor sequi natus sit iste aut."
},
{
"id": 5,
"name": "Organic Fruits",
"slug": "organic-fruits",
"url": "http://shofy.test/blog/organic-fruits",
"description": "Quae in praesentium quae dignissimos ratione et aliquid. Architecto maiores nisi quisquam consequuntur veniam sapiente. Voluptatum voluptates fugiat ut molestiae."
}
],
"tags": [
{
"id": 2,
"name": "Design",
"slug": "design",
"description": null
},
{
"id": 6,
"name": "Nature",
"slug": "nature",
"description": null
},
{
"id": 8,
"name": "Sunglasses",
"slug": "sunglasses",
"description": null
}
],
"created_at": "2025-06-25T01:43:37.000000Z",
"updated_at": "2025-06-25T01:43:37.000000Z"
}
],
"links": {
"first": "http://shofy.test/api/v1/posts?page=1",
"last": "http://shofy.test/api/v1/posts?page=2",
"prev": null,
"next": "http://shofy.test/api/v1/posts?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://shofy.test/api/v1/posts?page=1",
"label": "1",
"active": true
},
{
"url": "http://shofy.test/api/v1/posts?page=2",
"label": "2",
"active": false
},
{
"url": "http://shofy.test/api/v1/posts?page=2",
"label": "Next »",
"active": false
}
],
"path": "http://shofy.test/api/v1/posts",
"per_page": 10,
"to": 10,
"total": 18
},
"error": false,
"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 "http://shofy.test/api/v1/categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [
{
"id": 6,
"name": "Ecological",
"slug": "ecological",
"description": "Reprehenderit voluptas excepturi qui sunt. Consequatur quia consequatur consequuntur consequatur. Et adipisci error voluptatem vitae amet repellendus sit. Possimus omnis fugiat recusandae quod.",
"children": [],
"parent": {
"id": null,
"name": null,
"slug": "",
"url": "http://shofy.test",
"description": null
}
},
{
"id": 5,
"name": "Organic Fruits",
"slug": "organic-fruits",
"description": "Quae in praesentium quae dignissimos ratione et aliquid. Architecto maiores nisi quisquam consequuntur veniam sapiente. Voluptatum voluptates fugiat ut molestiae.",
"children": [],
"parent": {
"id": null,
"name": null,
"slug": "",
"url": "http://shofy.test",
"description": null
}
},
{
"id": 4,
"name": "Commercial",
"slug": "commercial",
"description": "Optio incidunt delectus ut adipisci ea neque et aliquid. Alias iure ratione omnis consequatur. Dolor sequi natus sit iste aut.",
"children": [],
"parent": {
"id": null,
"name": null,
"slug": "",
"url": "http://shofy.test",
"description": null
}
},
{
"id": 3,
"name": "Electronic",
"slug": "electronic",
"description": "Culpa quia voluptas sint aut maiores minus debitis. Et dolor occaecati ullam qui. Perspiciatis natus rerum officia veniam cum odio molestias. Omnis laudantium ipsam ut voluptatum.",
"children": [],
"parent": {
"id": null,
"name": null,
"slug": "",
"url": "http://shofy.test",
"description": null
}
},
{
"id": 2,
"name": "Fashion",
"slug": "fashion",
"description": "Consequatur magni suscipit veniam labore optio modi minus. Cum neque rerum id natus non placeat rerum. Iure vel recusandae quia voluptatem omnis ratione tempora quia.",
"children": [],
"parent": {
"id": null,
"name": null,
"slug": "",
"url": "http://shofy.test",
"description": null
}
},
{
"id": 1,
"name": "Crisp Bread & Cake",
"slug": "crisp-bread-cake",
"description": "Et magni blanditiis quos optio delectus animi possimus. Repudiandae expedita alias ipsam. Magnam quas ipsam autem ipsam.",
"children": [],
"parent": {
"id": null,
"name": null,
"slug": "",
"url": "http://shofy.test",
"description": null
}
}
],
"links": {
"first": "http://shofy.test/api/v1/categories?page=1",
"last": "http://shofy.test/api/v1/categories?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://shofy.test/api/v1/categories?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "http://shofy.test/api/v1/categories",
"per_page": 10,
"to": 6,
"total": 6
},
"error": false,
"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 "http://shofy.test/api/v1/posts/filters?page=17&per_page=17&search=consequatur&after=consequatur&author=consequatur&author_exclude=consequatur&before=consequatur&exclude=consequatur&include=consequatur&order=consequatur&order_by=consequatur&categories=consequatur&categories_exclude=consequatur&tags=consequatur&tags_exclude=consequatur&featured=consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/posts/filters"
);
const params = {
"page": "17",
"per_page": "17",
"search": "consequatur",
"after": "consequatur",
"author": "consequatur",
"author_exclude": "consequatur",
"before": "consequatur",
"exclude": "consequatur",
"include": "consequatur",
"order": "consequatur",
"order_by": "consequatur",
"categories": "consequatur",
"categories_exclude": "consequatur",
"tags": "consequatur",
"tags_exclude": "consequatur",
"featured": "consequatur",
};
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):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [],
"links": {
"first": "http://shofy.test/api/v1/posts/filters?page=1",
"last": "http://shofy.test/api/v1/posts/filters?page=1",
"prev": "http://shofy.test/api/v1/posts/filters?page=16",
"next": null
},
"meta": {
"current_page": 17,
"from": null,
"last_page": 1,
"links": [
{
"url": "http://shofy.test/api/v1/posts/filters?page=16",
"label": "« Previous",
"active": false
},
{
"url": "http://shofy.test/api/v1/posts/filters?page=1",
"label": "1",
"active": false
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "http://shofy.test/api/v1/posts/filters",
"per_page": 17,
"to": null,
"total": 0
},
"error": false,
"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 post by slug
Example request:
curl --request GET \
--get "http://shofy.test/api/v1/posts/consequatur?slug=consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/posts/consequatur"
);
const params = {
"slug": "consequatur",
};
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 (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": true,
"data": null,
"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.
Filters categories
Example request:
curl --request GET \
--get "http://shofy.test/api/v1/categories/filters" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/categories/filters"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [
{
"id": 5,
"name": "Organic Fruits",
"slug": "organic-fruits",
"url": "http://shofy.test/blog/organic-fruits",
"description": "Quae in praesentium quae dignissimos ratione et aliquid. Architecto maiores nisi quisquam consequuntur veniam sapiente. Voluptatum voluptates fugiat ut molestiae."
},
{
"id": 2,
"name": "Fashion",
"slug": "fashion",
"url": "http://shofy.test/blog/fashion",
"description": "Consequatur magni suscipit veniam labore optio modi minus. Cum neque rerum id natus non placeat rerum. Iure vel recusandae quia voluptatem omnis ratione tempora quia."
},
{
"id": 3,
"name": "Electronic",
"slug": "electronic",
"url": "http://shofy.test/blog/electronic",
"description": "Culpa quia voluptas sint aut maiores minus debitis. Et dolor occaecati ullam qui. Perspiciatis natus rerum officia veniam cum odio molestias. Omnis laudantium ipsam ut voluptatum."
},
{
"id": 6,
"name": "Ecological",
"slug": "ecological",
"url": "http://shofy.test/blog/ecological",
"description": "Reprehenderit voluptas excepturi qui sunt. Consequatur quia consequatur consequuntur consequatur. Et adipisci error voluptatem vitae amet repellendus sit. Possimus omnis fugiat recusandae quod."
},
{
"id": 1,
"name": "Crisp Bread & Cake",
"slug": "crisp-bread-cake",
"url": "http://shofy.test/blog/crisp-bread-cake",
"description": "Et magni blanditiis quos optio delectus animi possimus. Repudiandae expedita alias ipsam. Magnam quas ipsam autem ipsam."
},
{
"id": 4,
"name": "Commercial",
"slug": "commercial",
"url": "http://shofy.test/blog/commercial",
"description": "Optio incidunt delectus ut adipisci ea neque et aliquid. Alias iure ratione omnis consequatur. Dolor sequi natus sit iste aut."
}
],
"links": {
"first": "http://shofy.test/api/v1/categories/filters?page=1",
"last": "http://shofy.test/api/v1/categories/filters?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://shofy.test/api/v1/categories/filters?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "http://shofy.test/api/v1/categories/filters",
"per_page": 10,
"to": 6,
"total": 6
},
"error": false,
"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 "http://shofy.test/api/v1/categories/consequatur?slug=consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/categories/consequatur"
);
const params = {
"slug": "consequatur",
};
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 (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": true,
"data": null,
"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.
Brands
Get list of brands
Example request:
curl --request GET \
--get "http://shofy.test/api/v1/ecommerce/brands?brands=" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"is_featured\": false
}"
const url = new URL(
"http://shofy.test/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": false
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [],
"links": {
"first": "http://shofy.test/api/v1/ecommerce/brands?page=1",
"last": "http://shofy.test/api/v1/ecommerce/brands?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": null,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://shofy.test/api/v1/ecommerce/brands?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "http://shofy.test/api/v1/ecommerce/brands",
"per_page": 16,
"to": null,
"total": 0
},
"error": false,
"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 brand details by slug
Example request:
curl --request GET \
--get "http://shofy.test/api/v1/ecommerce/brands/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/brands/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": ""
}
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 "http://shofy.test/api/v1/ecommerce/brands/1/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/brands/1/products"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [
{
"id": 126,
"slug": "testing",
"url": "http://shofy.test/products/testing",
"name": "Testing",
"sku": "SF-2443-GZIR",
"description": "",
"content": "",
"quantity": 0,
"is_out_of_stock": false,
"stock_status_label": "In stock",
"stock_status_html": "<span class=\"text-success\">In stock</span>",
"price": 0,
"price_formatted": "$0.00",
"original_price": 0,
"original_price_formatted": "$0.00",
"reviews_avg": null,
"reviews_count": 0,
"images": [],
"images_thumb": [],
"image_with_sizes": null,
"weight": 0,
"height": 0,
"wide": 0,
"length": 0,
"image_url": "http://shofy.test/vendor/core/core/base/images/placeholder.png",
"product_options": [],
"store": {
"id": null,
"slug": null,
"name": null
}
}
],
"links": {
"first": "http://shofy.test/api/v1/ecommerce/brands/1/products?page=1",
"last": "http://shofy.test/api/v1/ecommerce/brands/1/products?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://shofy.test/api/v1/ecommerce/brands/1/products?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "http://shofy.test/api/v1/ecommerce/brands/1/products",
"per_page": 24,
"to": 1,
"total": 1
},
"error": false,
"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.
Cart
Add product to cart
Example request:
curl --request POST \
"http://shofy.test/api/v1/ecommerce/cart" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1,
\"qty\": 1
}"
const url = new URL(
"http://shofy.test/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 \
"http://shofy.test/api/v1/ecommerce/cart/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1,
\"qty\": 1
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/cart/consequatur"
);
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 \
"http://shofy.test/api/v1/ecommerce/cart/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1,
\"qty\": 1
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/cart/consequatur"
);
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 \
"http://shofy.test/api/v1/ecommerce/cart/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/cart/consequatur"
);
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 "http://shofy.test/api/v1/ecommerce/cart/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"customer_id\": 1,
\"id\": \"e70c6c88dae8344b03e39bb147eba66a\"
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/cart/consequatur"
);
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 (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"id": "consequatur",
"cart_items": [],
"count": 0,
"raw_total": 0,
"raw_total_formatted": "$0.00",
"sub_total": 0,
"sub_total_formatted": "$0.00",
"tax_amount": 0,
"tax_amount_formatted": "$0.00",
"promotion_discount_amount": 0,
"promotion_discount_amount_formatted": "$0.00",
"coupon_discount_amount": 0,
"coupon_discount_amount_formatted": "$0.00",
"applied_coupon_code": null,
"order_total": 0,
"order_total_formatted": "$0.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.
Refresh cart items
Example request:
curl --request POST \
"http://shofy.test/api/v1/ecommerce/cart/refresh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"products\": [
\"consequatur\"
]
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/cart/refresh"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"products": [
"consequatur"
]
};
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 \
"http://shofy.test/api/v1/ecommerce/checkout/taxes/calculate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"products\": [
\"consequatur\"
],
\"country\": \"US\",
\"state\": \"CA\",
\"city\": \"Los Angeles\",
\"zip_code\": \"90001\"
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/checkout/taxes/calculate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"products": [
"consequatur"
],
"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 "http://shofy.test/api/v1/ecommerce/checkout/cart/12345" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 (302):
Show headers
cache-control: no-cache, private
location: http://shofy.test/checkout/a06413fc7d168726c17294fd3f0a87fe
content-type: text/html; charset=utf-8
access-control-allow-origin: *
set-cookie: XSRF-TOKEN=eyJpdiI6ImQrck0vdGlNZW9zWGNDT2s5UEt5MEE9PSIsInZhbHVlIjoiUTk4VTdEUUVRcDcrRmNnYUh6ekNFaEpqSXNiM3pETldHMGR0MVpKbm9Fb0hjZHFjQVR5NHM0ZjAxanVNdnJtR1lTSzZOU21CUHlkTldvQ0x0YUVpOTBVbDh5ZlduczY0SEx2d0lBaEgrMmlpZkI5c2FqSFFxY2Zld0ZmdUtwek8iLCJtYWMiOiJkMDRiODM0Y2VkZWMwNzI0MjI5MWZiM2MyYzEyNGQ1ZDUxOWI0ZDgyYjA2NTNjZGI4ODU3YmQ4MDUwNmY2ZjNlIiwidGFnIjoiIn0%3D; expires=Wed, 25 Jun 2025 05:17:21 GMT; Max-Age=7200; path=/; samesite=lax; botble_session=eyJpdiI6Ik9NdzBDbXJsTzhtVmVmVXVFRE9oMGc9PSIsInZhbHVlIjoielVwbHJJeHp6UHJrRFJuZ1VqNE10WCtreE9MbCtlVTM0VCtRMDNUZDlYZHBTKytabSthMmFyOVhrSEhyaFdHQXpibHAxT3MzSXJ1dmFPZHFZdHl3SlJoZHQyNG9DbWdIbHhYbjZKd1RTL0QyVzBPRDVVeEowVytyWGcyS2Q2YW0iLCJtYWMiOiI1ZTEyOTJmNDQ4ODI1NDU1YjJhZDM1MThkMTFlMjY5ODMwMDU2MGJmY2M0MjEzZWNkODUyMTBiNTIyYTAwZjM3IiwidGFnIjoiIn0%3D; expires=Wed, 25 Jun 2025 05:17:21 GMT; Max-Age=7200; path=/; httponly; samesite=lax; botble_footprints_cookie=eyJpdiI6InpxNUdEclM2WnVaeG5HWkJoZzRtQWc9PSIsInZhbHVlIjoiK0tjdk9nY2kwTENOWm1mZVAvUVZUTmFIZWF5Njh4cjl2Mmh0elNNb0JCS25uNE12WUhTRkpkQWY5VTgrZWdob0ltNXJWRi9XUzJua2ZqMFFLR1ZJYkYyb3gzRlFpa0I0YzJzZXJGdjhCWXF0ZVcyLzNVMjl2Z2U3MEZtSnNzbUUiLCJtYWMiOiIxMWI0ZmE3MmE4MzE5NWUxMzViNDZjMmFlMWRkN2U0MGQzMTQ3ZTJkM2NkZGYxMWNiODlhNDVlYzRhMDdlNGI3IiwidGFnIjoiIn0%3D; expires=Wed, 19 Aug 2026 03:17:21 GMT; Max-Age=36288000; path=/; httponly; samesite=lax; botble_footprints_cookie_data=eyJpdiI6Ik5OZWovUWdCZ2UrbW12M1RldnhOR0E9PSIsInZhbHVlIjoiUkQ0SXdFeHk4RnhjaTQrSGV6eXFwTnFUM2d1QVBFU3FTdW9raGpNVzlKWjQ3K3BMSHQrY1ExSVZiRDBWdWFSUk8rajQzTjUwMXpuakRNWE9rTVJVanNEK3B3eHZNRVhQaWM3eGF5eU9uUmsyNXgzSzZ5Z29vYUFpTkZjZDJaRXorNUxvZ2xZeUxvVjBuRFZUbXVwQnJXVlc5VlNvRFA3Z1hpakFYUVZhMW1pWU9IMFFveE5VU3dVZTVOVkVjQzNhaXlOYm1IMmwwSmFBVGJjWnJ5bENRRFFOZ01CTUhsUjFnc015UTc4NTUySlp0cGZZazR1RGdZZm4xcWNzMnp5NTUzdnhDQUt6aCtTb0d3ellZcmJJdGJPYzlYL090dVU2VUdmZ0dTRGtoTE1QUS9yWlU1TnJUbHEydktJWmJ2TTdBcUFOUUxKVGFVSStMUSsybXhIQzBkeWdldG8vdU5hbzJTaVA1elpQb2cycHBnN0FXdDd1Y0Z1QmtyK1J0MHhneVhqRW40Rit5V05UeURxMEVYVzlHUVk1ZGRRK2YzTnErRkJORm1sWExLdndldmJDb3JZM3daa0s2ZFdpUnVvYWZEZVMzV3lGRWlrYktKYmFPbENINk5VemtEZzlreHVTNFJZS0thSHB4d01QWGxSVHdCMlRHKzU2Y1VNZStXcXJCbUxMc1RZZUtxNTZPa2xuV2dub01qMjZZSjhqMDllYXBnTEE1ai9xdDYwPSIsIm1hYyI6IjI2MDc0Njk2YTI2MDU0NWRiOWFhYzI4YTY5YzMzYTA4ZWQ0MDM5MmYxYjE2MmQzNzUxZDhhNzBmODVmN2M5NDYiLCJ0YWciOiIifQ%3D%3D; expires=Wed, 19 Aug 2026 03:17:21 GMT; Max-Age=36288000; path=/; httponly; samesite=lax
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='http://shofy.test/checkout/a06413fc7d168726c17294fd3f0a87fe'" />
<title>Redirecting to http://shofy.test/checkout/a06413fc7d168726c17294fd3f0a87fe</title>
</head>
<body>
Redirecting to <a href="http://shofy.test/checkout/a06413fc7d168726c17294fd3f0a87fe">http://shofy.test/checkout/a06413fc7d168726c17294fd3f0a87fe</a>.
</body>
</html>
Example response (401):
{
"message": "Unauthenticated."
}
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 \
"http://shofy.test/api/v1/ecommerce/compare" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"http://shofy.test/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 \
"http://shofy.test/api/v1/ecommerce/compare/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/compare/consequatur"
);
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 \
"http://shofy.test/api/v1/ecommerce/compare/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/compare/consequatur"
);
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 "http://shofy.test/api/v1/ecommerce/compare/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"id\": \"e70c6c88dae8344b03e39bb147eba66a\"
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/compare/consequatur"
);
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 (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"id": "consequatur",
"data": {
"count": 0,
"items": []
}
}
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
Apply coupon code
Example request:
curl --request POST \
"http://shofy.test/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(
"http://shofy.test/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 \
"http://shofy.test/api/v1/ecommerce/coupon/remove" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"cart_id\": \"e70c6c88dae8344b03e39bb147eba66a\"
}"
const url = new URL(
"http://shofy.test/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 "http://shofy.test/api/v1/ecommerce/currencies" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 "http://shofy.test/api/v1/ecommerce/currencies/current" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 \
"http://shofy.test/api/v1/device-tokens" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"token\": \"consequatur\",
\"platform\": \"consequatur\",
\"app_version\": \"consequatur\",
\"device_id\": \"consequatur\",
\"user_type\": \"consequatur\",
\"user_id\": 17
}"
const url = new URL(
"http://shofy.test/api/v1/device-tokens"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "consequatur",
"platform": "consequatur",
"app_version": "consequatur",
"device_id": "consequatur",
"user_type": "consequatur",
"user_id": 17
};
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 "http://shofy.test/api/v1/device-tokens" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 \
"http://shofy.test/api/v1/device-tokens/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"platform\": \"consequatur\",
\"app_version\": \"consequatur\",
\"device_id\": \"consequatur\"
}"
const url = new URL(
"http://shofy.test/api/v1/device-tokens/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"platform": "consequatur",
"app_version": "consequatur",
"device_id": "consequatur"
};
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 \
"http://shofy.test/api/v1/device-tokens/by-token" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"token\": \"consequatur\"
}"
const url = new URL(
"http://shofy.test/api/v1/device-tokens/by-token"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"token": "consequatur"
};
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 \
"http://shofy.test/api/v1/device-tokens/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/device-tokens/consequatur"
);
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 \
"http://shofy.test/api/v1/device-tokens/consequatur/deactivate" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/device-tokens/consequatur/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 "http://shofy.test/api/v1/ecommerce/downloads" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 "http://shofy.test/api/v1/ecommerce/downloads/1562" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/downloads/1562"
);
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 "http://shofy.test/api/v1/ecommerce/download/consequatur/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/download/consequatur/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": ""
}
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 "http://shofy.test/api/v1/ecommerce/orders/download-proof/consequatur/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/orders/download-proof/consequatur/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": ""
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
POST api/v1/auth/apple
Example request:
curl --request POST \
"http://shofy.test/api/v1/auth/apple" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/auth/apple"
);
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.
POST api/v1/auth/google
Example request:
curl --request POST \
"http://shofy.test/api/v1/auth/google" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/auth/google"
);
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.
POST api/v1/auth/facebook
Example request:
curl --request POST \
"http://shofy.test/api/v1/auth/facebook" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/auth/facebook"
);
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.
POST api/v1/auth/x
Example request:
curl --request POST \
"http://shofy.test/api/v1/auth/x" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/auth/x"
);
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.
Filters
Get filter data for products
Example request:
curl --request GET \
--get "http://shofy.test/api/v1/ecommerce/filters" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/filters"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": {
"categories": [
{
"id": 1,
"name": "New Arrivals",
"slug": "new-arrivals",
"url": "product-categories/new-arrivals",
"parent_id": 0
},
{
"id": 2,
"name": "Electronics",
"slug": "electronics",
"url": "product-categories/electronics",
"parent_id": 0
},
{
"id": 19,
"name": "Gifts",
"slug": "gifts",
"url": "product-categories/gifts",
"parent_id": 0
},
{
"id": 20,
"name": "Computers",
"slug": "computers",
"url": "product-categories/computers",
"parent_id": 0
},
{
"id": 25,
"name": "Smartphones & Tablets",
"slug": "smartphones-tablets",
"url": "product-categories/smartphones-tablets",
"parent_id": 0
},
{
"id": 26,
"name": "TV,\n Video & Music",
"slug": "tv-video-music",
"url": "product-categories/tv-video-music",
"parent_id": 0
},
{
"id": 27,
"name": "Cameras",
"slug": "cameras",
"url": "product-categories/cameras",
"parent_id": 0
},
{
"id": 28,
"name": "Cooking",
"slug": "cooking",
"url": "product-categories/cooking",
"parent_id": 0
},
{
"id": 29,
"name": "Accessories",
"slug": "accessories",
"url": "product-categories/accessories",
"parent_id": 0
},
{
"id": 31,
"name": "Sports",
"slug": "sports",
"url": "product-categories/sports",
"parent_id": 0
},
{
"id": 32,
"name": "Electronics Gadgets",
"slug": "electronics-gadgets",
"url": "product-categories/electronics-gadgets",
"parent_id": 0
},
{
"id": 3,
"name": "Featured",
"slug": "featured",
"url": "product-categories/featured",
"parent_id": 2
},
{
"id": 7,
"name": "Computers & Laptops",
"slug": "computers-laptops",
"url": "product-categories/computers-laptops",
"parent_id": 2
},
{
"id": 12,
"name": "Accessories",
"slug": "accessories",
"url": "product-categories/accessories",
"parent_id": 2
},
{
"id": 17,
"name": "Gaming Console",
"slug": "gaming-console",
"url": "product-categories/gaming-console",
"parent_id": 2
},
{
"id": 18,
"name": "Playstation",
"slug": "playstation",
"url": "product-categories/playstation",
"parent_id": 2
},
{
"id": 4,
"name": "New Arrivals",
"slug": "new-arrivals",
"url": "product-categories/new-arrivals",
"parent_id": 3
},
{
"id": 5,
"name": "Best Sellers",
"slug": "best-sellers",
"url": "product-categories/best-sellers",
"parent_id": 3
},
{
"id": 6,
"name": "Mobile Phone",
"slug": "mobile-phone",
"url": "product-categories/mobile-phone",
"parent_id": 3
},
{
"id": 8,
"name": "Top Brands",
"slug": "top-brands",
"url": "product-categories/top-brands",
"parent_id": 7
},
{
"id": 9,
"name": "Weekly Best Selling",
"slug": "weekly-best-selling",
"url": "product-categories/weekly-best-selling",
"parent_id": 7
},
{
"id": 10,
"name": "CPU Heat Pipes",
"slug": "cpu-heat-pipes",
"url": "product-categories/cpu-heat-pipes",
"parent_id": 7
},
{
"id": 11,
"name": "CPU Coolers",
"slug": "cpu-coolers",
"url": "product-categories/cpu-coolers",
"parent_id": 7
},
{
"id": 13,
"name": "Headphones",
"slug": "headphones",
"url": "product-categories/headphones",
"parent_id": 12
},
{
"id": 14,
"name": "Wireless Headphones",
"slug": "wireless-headphones",
"url": "product-categories/wireless-headphones",
"parent_id": 12
},
{
"id": 15,
"name": "TWS Earphones",
"slug": "tws-earphones",
"url": "product-categories/tws-earphones",
"parent_id": 12
},
{
"id": 16,
"name": "Smart Watch",
"slug": "smart-watch",
"url": "product-categories/smart-watch",
"parent_id": 12
},
{
"id": 21,
"name": "Desktop",
"slug": "desktop",
"url": "product-categories/desktop",
"parent_id": 20
},
{
"id": 22,
"name": "Laptop",
"slug": "laptop",
"url": "product-categories/laptop",
"parent_id": 20
},
{
"id": 23,
"name": "Tablet",
"slug": "tablet",
"url": "product-categories/tablet",
"parent_id": 20
},
{
"id": 24,
"name": "Accessories",
"slug": "accessories",
"url": "product-categories/accessories",
"parent_id": 20
},
{
"id": 30,
"name": "With Bluetooth",
"slug": "with-bluetooth",
"url": "product-categories/with-bluetooth",
"parent_id": 29
},
{
"id": 33,
"name": "Micrscope",
"slug": "micrscope",
"url": "product-categories/micrscope",
"parent_id": 32
},
{
"id": 34,
"name": "Remote Control",
"slug": "remote-control",
"url": "product-categories/remote-control",
"parent_id": 32
},
{
"id": 35,
"name": "Monitor",
"slug": "monitor",
"url": "product-categories/monitor",
"parent_id": 32
},
{
"id": 36,
"name": "Thermometer",
"slug": "thermometer",
"url": "product-categories/thermometer",
"parent_id": 32
},
{
"id": 37,
"name": "Backpack",
"slug": "backpack",
"url": "product-categories/backpack",
"parent_id": 32
},
{
"id": 38,
"name": "Headphones",
"slug": "headphones",
"url": "product-categories/headphones",
"parent_id": 32
}
],
"brands": [],
"tags": [],
"price_ranges": [],
"max_price": 0,
"current_category_id": 0,
"current_filter_categories": [],
"attributes": [
{
"id": 1,
"title": "Color",
"slug": "color",
"display_layout": "visual",
"attributes": []
},
{
"id": 3,
"title": "Weight",
"slug": "weight",
"display_layout": "text",
"attributes": []
},
{
"id": 2,
"title": "Size",
"slug": "size",
"display_layout": "text",
"attributes": []
},
{
"id": 4,
"title": "Boxes",
"slug": "boxes",
"display_layout": "text",
"attributes": []
}
]
},
"error": false,
"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.
Flash Sale
Get flash sales
Example request:
curl --request GET \
--get "http://shofy.test/api/v1/ecommerce/flash-sales?keys=" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"keys\": null
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/flash-sales"
);
const params = {
"keys": "",
};
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 (422):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": true,
"data": null,
"message": "The keys 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.
Languages
Get list of available languages
Example request:
curl --request GET \
--get "http://shofy.test/api/v1/languages" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/languages"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"data": [
{
"lang_id": 1,
"lang_name": "English",
"lang_locale": "en",
"lang_code": "en_US",
"lang_flag": "<svg ...>",
"lang_is_default": true,
"lang_is_rtl": false,
"lang_order": 0
},
{
"lang_id": 2,
"lang_name": "Vietnamese",
"lang_locale": "vi",
"lang_code": "vi",
"lang_flag": "<svg ...>",
"lang_is_default": false,
"lang_is_rtl": false,
"lang_order": 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.
Get current language
Example request:
curl --request GET \
--get "http://shofy.test/api/v1/languages/current" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/languages/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": {
"lang_id": 1,
"lang_name": "English",
"lang_locale": "en",
"lang_code": "en_US",
"lang_flag": "us",
"lang_is_default": true,
"lang_is_rtl": false,
"lang_order": 0
},
"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.
Notifications
Get user notifications
Retrieve notifications for the authenticated user.
Example request:
curl --request GET \
--get "http://shofy.test/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(
"http://shofy.test/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 "http://shofy.test/api/v1/notifications/stats" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 \
"http://shofy.test/api/v1/notifications/mark-all-read" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 \
"http://shofy.test/api/v1/notifications/consequatur/read" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/notifications/consequatur/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 \
"http://shofy.test/api/v1/notifications/consequatur/clicked" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/notifications/consequatur/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 \
"http://shofy.test/api/v1/notifications/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/notifications/consequatur"
);
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 "http://shofy.test/api/v1/ecommerce/order-returns" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 "http://shofy.test/api/v1/ecommerce/order-returns/1562" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/order-returns/1562"
);
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 \
"http://shofy.test/api/v1/ecommerce/order-returns" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"order_id\": 1,
\"return_items\": [
\"consequatur\"
],
\"reason\": \"DAMAGED_PRODUCT\"
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/order-returns"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"order_id": 1,
"return_items": [
"consequatur"
],
"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 "http://shofy.test/api/v1/ecommerce/orders/1562/returns" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/orders/1562/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 "http://shofy.test/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(
"http://shofy.test/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 "http://shofy.test/api/v1/ecommerce/orders/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/orders/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"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 \
"http://shofy.test/api/v1/ecommerce/orders/consequatur/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(
"http://shofy.test/api/v1/ecommerce/orders/consequatur/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 "http://shofy.test/api/v1/ecommerce/orders/consequatur/invoice?type=download" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/orders/consequatur/invoice"
);
const params = {
"type": "download",
};
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 \
"http://shofy.test/api/v1/ecommerce/orders/consequatur/upload-proof" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "file=@/private/var/folders/pv/8ss1l0s14ylczgg_279blg680000gn/T/phpw90V7N" const url = new URL(
"http://shofy.test/api/v1/ecommerce/orders/consequatur/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 "http://shofy.test/api/v1/ecommerce/orders/consequatur/download-proof" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/orders/consequatur/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 \
"http://shofy.test/api/v1/ecommerce/orders/consequatur/confirm-delivery" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/orders/consequatur/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 \
"http://shofy.test/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(
"http://shofy.test/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 "http://shofy.test/api/v1/pages" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/pages"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [
{
"id": 1,
"name": "Home",
"slug": "home",
"description": null,
"image": null,
"template": "full-width",
"status": {
"value": "published",
"label": "Published"
},
"created_at": "2025-06-25T01:43:45.000000Z",
"updated_at": "2025-06-25T01:43:45.000000Z"
},
{
"id": 2,
"name": "Categories",
"slug": "categories",
"description": null,
"image": null,
"template": "full-width",
"status": {
"value": "published",
"label": "Published"
},
"created_at": "2025-06-25T01:43:45.000000Z",
"updated_at": "2025-06-25T01:43:45.000000Z"
},
{
"id": 3,
"name": "Brands",
"slug": "brands",
"description": null,
"image": null,
"template": null,
"status": {
"value": "published",
"label": "Published"
},
"created_at": "2025-06-25T01:43:45.000000Z",
"updated_at": "2025-06-25T01:43:45.000000Z"
},
{
"id": 4,
"name": "Coupons",
"slug": "coupons",
"description": null,
"image": null,
"template": "full-width",
"status": {
"value": "published",
"label": "Published"
},
"created_at": "2025-06-25T01:43:45.000000Z",
"updated_at": "2025-06-25T01:43:45.000000Z"
},
{
"id": 5,
"name": "Blog",
"slug": "blog",
"description": null,
"image": null,
"template": "full-width",
"status": {
"value": "published",
"label": "Published"
},
"created_at": "2025-06-25T01:43:45.000000Z",
"updated_at": "2025-06-25T01:43:45.000000Z"
},
{
"id": 6,
"name": "Contact",
"slug": "contact",
"description": null,
"image": null,
"template": "full-width",
"status": {
"value": "published",
"label": "Published"
},
"created_at": "2025-06-25T01:43:45.000000Z",
"updated_at": "2025-06-25T01:43:45.000000Z"
},
{
"id": 7,
"name": "FAQs",
"slug": "faqs",
"description": null,
"image": null,
"template": null,
"status": {
"value": "published",
"label": "Published"
},
"created_at": "2025-06-25T01:43:45.000000Z",
"updated_at": "2025-06-25T01:43:45.000000Z"
},
{
"id": 8,
"name": "Cookie Policy",
"slug": "cookie-policy",
"description": null,
"image": null,
"template": null,
"status": {
"value": "published",
"label": "Published"
},
"created_at": "2025-06-25T01:43:45.000000Z",
"updated_at": "2025-06-25T01:43:45.000000Z"
},
{
"id": 9,
"name": "Our Story",
"slug": "our-story",
"description": null,
"image": null,
"template": null,
"status": {
"value": "published",
"label": "Published"
},
"created_at": "2025-06-25T01:43:45.000000Z",
"updated_at": "2025-06-25T01:43:45.000000Z"
},
{
"id": 10,
"name": "Careers",
"slug": "careers",
"description": null,
"image": null,
"template": null,
"status": {
"value": "published",
"label": "Published"
},
"created_at": "2025-06-25T01:43:45.000000Z",
"updated_at": "2025-06-25T01:43:45.000000Z"
}
],
"links": {
"first": "http://shofy.test/api/v1/pages?page=1",
"last": "http://shofy.test/api/v1/pages?page=2",
"prev": null,
"next": "http://shofy.test/api/v1/pages?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://shofy.test/api/v1/pages?page=1",
"label": "1",
"active": true
},
{
"url": "http://shofy.test/api/v1/pages?page=2",
"label": "2",
"active": false
},
{
"url": "http://shofy.test/api/v1/pages?page=2",
"label": "Next »",
"active": false
}
],
"path": "http://shofy.test/api/v1/pages",
"per_page": 10,
"to": 10,
"total": 13
},
"error": false,
"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 "http://shofy.test/api/v1/pages/consequatur?id=17" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/pages/consequatur"
);
const params = {
"id": "17",
};
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 (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": true,
"data": null,
"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 "http://shofy.test/api/v1/ecommerce/product-categories" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"is_featured\": false
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/product-categories"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"is_featured": false
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"data": [
{
"id": 21,
"name": "Desktop",
"icon": "ti ti-device-desktop",
"icon_image": null,
"is_featured": 0,
"parent_id": 20,
"slug": "desktop",
"image_with_sizes": {
"origin": "http://shofy.test/storage/main/product-categories/category-thumb-5-600x600.jpg",
"thumb": "http://shofy.test/storage/main/product-categories/category-thumb-5-150x150.jpg",
"medium": "http://shofy.test/storage/main/product-categories/category-thumb-5-600x600.jpg",
"rectangle": "http://shofy.test/storage/main/product-categories/category-thumb-5-420x270.jpg"
}
},
{
"id": 33,
"name": "Micrscope",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 32,
"slug": "micrscope",
"image_with_sizes": null
},
{
"id": 3,
"name": "Featured",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 2,
"slug": "featured",
"image_with_sizes": {
"origin": "http://shofy.test/storage/main/product-categories/menu-1-600x600.jpg",
"thumb": "http://shofy.test/storage/main/product-categories/menu-1-150x150.jpg",
"medium": "http://shofy.test/storage/main/product-categories/menu-1-600x600.jpg",
"rectangle": "http://shofy.test/storage/main/product-categories/menu-1-420x270.jpg"
}
},
{
"id": 4,
"name": "New Arrivals",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 3,
"slug": "new-arrivals",
"image_with_sizes": null
},
{
"id": 1,
"name": "New Arrivals",
"icon": "ti ti-home",
"icon_image": null,
"is_featured": 0,
"parent_id": 0,
"slug": "new-arrivals",
"image_with_sizes": null
},
{
"id": 8,
"name": "Top Brands",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 7,
"slug": "top-brands",
"image_with_sizes": null
},
{
"id": 22,
"name": "Laptop",
"icon": "ti ti-device-laptop",
"icon_image": null,
"is_featured": 0,
"parent_id": 20,
"slug": "laptop",
"image_with_sizes": {
"origin": "http://shofy.test/storage/main/product-categories/category-thumb-3-600x600.jpg",
"thumb": "http://shofy.test/storage/main/product-categories/category-thumb-3-150x150.jpg",
"medium": "http://shofy.test/storage/main/product-categories/category-thumb-3-600x600.jpg",
"rectangle": "http://shofy.test/storage/main/product-categories/category-thumb-3-420x270.jpg"
}
},
{
"id": 2,
"name": "Electronics",
"icon": "ti ti-device-tv",
"icon_image": null,
"is_featured": 0,
"parent_id": 0,
"slug": "electronics",
"image_with_sizes": null
},
{
"id": 14,
"name": "Wireless Headphones",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 12,
"slug": "wireless-headphones",
"image_with_sizes": {
"origin": "http://shofy.test/storage/main/product-categories/category-thumb-1-600x600.jpg",
"thumb": "http://shofy.test/storage/main/product-categories/category-thumb-1-150x150.jpg",
"medium": "http://shofy.test/storage/main/product-categories/category-thumb-1-600x600.jpg",
"rectangle": "http://shofy.test/storage/main/product-categories/category-thumb-1-420x270.jpg"
}
},
{
"id": 9,
"name": "Weekly Best Selling",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 7,
"slug": "weekly-best-selling",
"image_with_sizes": null
},
{
"id": 5,
"name": "Best Sellers",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 3,
"slug": "best-sellers",
"image_with_sizes": null
},
{
"id": 34,
"name": "Remote Control",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 32,
"slug": "remote-control",
"image_with_sizes": null
},
{
"id": 12,
"name": "Accessories",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 2,
"slug": "accessories",
"image_with_sizes": {
"origin": "http://shofy.test/storage/main/product-categories/menu-3-600x600.jpg",
"thumb": "http://shofy.test/storage/main/product-categories/menu-3-150x150.jpg",
"medium": "http://shofy.test/storage/main/product-categories/menu-3-600x600.jpg",
"rectangle": "http://shofy.test/storage/main/product-categories/menu-3-420x270.jpg"
}
},
{
"id": 15,
"name": "TWS Earphones",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 12,
"slug": "tws-earphones",
"image_with_sizes": {
"origin": "http://shofy.test/storage/main/product-categories/category-thumb-6-600x600.jpg",
"thumb": "http://shofy.test/storage/main/product-categories/category-thumb-6-150x150.jpg",
"medium": "http://shofy.test/storage/main/product-categories/category-thumb-6-600x600.jpg",
"rectangle": "http://shofy.test/storage/main/product-categories/category-thumb-6-420x270.jpg"
}
},
{
"id": 19,
"name": "Gifts",
"icon": "ti ti-gift",
"icon_image": null,
"is_featured": 0,
"parent_id": 0,
"slug": "gifts",
"image_with_sizes": null
},
{
"id": 23,
"name": "Tablet",
"icon": "ti ti-device-tablet",
"icon_image": null,
"is_featured": 0,
"parent_id": 20,
"slug": "tablet",
"image_with_sizes": {
"origin": "http://shofy.test/storage/main/product-categories/category-thumb-4-600x600.jpg",
"thumb": "http://shofy.test/storage/main/product-categories/category-thumb-4-150x150.jpg",
"medium": "http://shofy.test/storage/main/product-categories/category-thumb-4-600x600.jpg",
"rectangle": "http://shofy.test/storage/main/product-categories/category-thumb-4-420x270.jpg"
}
},
{
"id": 35,
"name": "Monitor",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 32,
"slug": "monitor",
"image_with_sizes": null
},
{
"id": 17,
"name": "Gaming Console",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 2,
"slug": "gaming-console",
"image_with_sizes": {
"origin": "http://shofy.test/storage/main/product-categories/category-thumb-8-600x600.jpg",
"thumb": "http://shofy.test/storage/main/product-categories/category-thumb-8-150x150.jpg",
"medium": "http://shofy.test/storage/main/product-categories/category-thumb-8-600x600.jpg",
"rectangle": "http://shofy.test/storage/main/product-categories/category-thumb-8-420x270.jpg"
}
},
{
"id": 36,
"name": "Thermometer",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 32,
"slug": "thermometer",
"image_with_sizes": null
},
{
"id": 20,
"name": "Computers",
"icon": "ti ti-device-laptop",
"icon_image": null,
"is_featured": 0,
"parent_id": 0,
"slug": "computers",
"image_with_sizes": null
},
{
"id": 24,
"name": "Accessories",
"icon": "ti ti-keyboard",
"icon_image": null,
"is_featured": 0,
"parent_id": 20,
"slug": "accessories",
"image_with_sizes": null
},
{
"id": 11,
"name": "CPU Coolers",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 7,
"slug": "cpu-coolers",
"image_with_sizes": {
"origin": "http://shofy.test/storage/main/product-categories/category-thumb-9-600x600.jpg",
"thumb": "http://shofy.test/storage/main/product-categories/category-thumb-9-150x150.jpg",
"medium": "http://shofy.test/storage/main/product-categories/category-thumb-9-600x600.jpg",
"rectangle": "http://shofy.test/storage/main/product-categories/category-thumb-9-420x270.jpg"
}
},
{
"id": 25,
"name": "Smartphones & Tablets",
"icon": "ti ti-device-mobile",
"icon_image": null,
"is_featured": 0,
"parent_id": 0,
"slug": "smartphones-tablets",
"image_with_sizes": {
"origin": "http://shofy.test/storage/main/product-categories/category-thumb-10-600x600.jpg",
"thumb": "http://shofy.test/storage/main/product-categories/category-thumb-10-150x150.jpg",
"medium": "http://shofy.test/storage/main/product-categories/category-thumb-10-600x600.jpg",
"rectangle": "http://shofy.test/storage/main/product-categories/category-thumb-10-420x270.jpg"
}
},
{
"id": 18,
"name": "Playstation",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 2,
"slug": "playstation",
"image_with_sizes": {
"origin": "http://shofy.test/storage/main/product-categories/category-thumb-12-600x600.jpg",
"thumb": "http://shofy.test/storage/main/product-categories/category-thumb-12-150x150.jpg",
"medium": "http://shofy.test/storage/main/product-categories/category-thumb-12-600x600.jpg",
"rectangle": "http://shofy.test/storage/main/product-categories/category-thumb-12-420x270.jpg"
}
},
{
"id": 37,
"name": "Backpack",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 32,
"slug": "backpack",
"image_with_sizes": null
},
{
"id": 26,
"name": "TV,\n Video & Music",
"icon": "ti ti-device-tv",
"icon_image": null,
"is_featured": 0,
"parent_id": 0,
"slug": "tv-video-music",
"image_with_sizes": null
},
{
"id": 38,
"name": "Headphones",
"icon": null,
"icon_image": null,
"is_featured": 0,
"parent_id": 32,
"slug": "headphones",
"image_with_sizes": {
"origin": "http://shofy.test/storage/main/product-categories/category-thumb-1-600x600.jpg",
"thumb": "http://shofy.test/storage/main/product-categories/category-thumb-1-150x150.jpg",
"medium": "http://shofy.test/storage/main/product-categories/category-thumb-1-600x600.jpg",
"rectangle": "http://shofy.test/storage/main/product-categories/category-thumb-1-420x270.jpg"
}
},
{
"id": 27,
"name": "Cameras",
"icon": "ti ti-camera",
"icon_image": null,
"is_featured": 0,
"parent_id": 0,
"slug": "cameras",
"image_with_sizes": null
},
{
"id": 28,
"name": "Cooking",
"icon": "ti ti-grill-spatula",
"icon_image": null,
"is_featured": 0,
"parent_id": 0,
"slug": "cooking",
"image_with_sizes": null
},
{
"id": 29,
"name": "Accessories",
"icon": "ti ti-building-store",
"icon_image": null,
"is_featured": 0,
"parent_id": 0,
"slug": "accessories",
"image_with_sizes": null
},
{
"id": 31,
"name": "Sports",
"icon": "ti ti-ball-football",
"icon_image": null,
"is_featured": 0,
"parent_id": 0,
"slug": "sports",
"image_with_sizes": null
},
{
"id": 32,
"name": "Electronics Gadgets",
"icon": "ti ti-cpu-2",
"icon_image": null,
"is_featured": 0,
"parent_id": 0,
"slug": "electronics-gadgets",
"image_with_sizes": null
}
],
"error": false,
"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 product category details by slug
Example request:
curl --request GET \
--get "http://shofy.test/api/v1/ecommerce/product-categories/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/product-categories/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": ""
}
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 "http://shofy.test/api/v1/ecommerce/product-categories/consequatur/products" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/product-categories/consequatur/products"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "No query results for model [Botble\\Ecommerce\\Models\\ProductCategory] consequatur"
}
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 "http://shofy.test/api/v1/ecommerce/products?sort_by=consequatur&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" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/products"
);
const params = {
"sort_by": "consequatur",
"price_ranges": "[{"from":10,"to":20},{"from":30,"to":40}]",
"attributes": "[{"id":1,"value":1},{"id":2,"value":2}]",
};
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 (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Server Error"
}
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 "http://shofy.test/api/v1/ecommerce/products/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/products/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": ""
}
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 "http://shofy.test/api/v1/ecommerce/products/consequatur/cross-sale" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/products/consequatur/cross-sale"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": ""
}
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 "http://shofy.test/api/v1/ecommerce/products/consequatur/reviews" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/products/consequatur/reviews"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": ""
}
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 "http://shofy.test/api/v1/ecommerce/product-variation/1562?attributes=" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"reference_product\": \"consequatur\",
\"attributes\": [
\"consequatur\"
]
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/product-variation/1562"
);
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": "consequatur",
"attributes": [
"consequatur"
]
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": true,
"data": null,
"message": "Not available"
}
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 "http://shofy.test/api/v1/me" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 \
"http://shofy.test/api/v1/me" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"first_name\": \"vmqeopfuudtdsufvyvddqamniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjur\",
\"last_name\": \"yvojcybzvrbyickznkygloigmkwxphlvazjrcnfbaqywuxhgjjmzuxjubqouzswiwxtrkimfca\",
\"name\": \"consequatur\",
\"phone\": \"consequatur\",
\"dob\": \"consequatur\",
\"gender\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
\"email\": \"qkunze@example.com\"
}"
const url = new URL(
"http://shofy.test/api/v1/me"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"first_name": "vmqeopfuudtdsufvyvddqamniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjur",
"last_name": "yvojcybzvrbyickznkygloigmkwxphlvazjrcnfbaqywuxhgjjmzuxjubqouzswiwxtrkimfca",
"name": "consequatur",
"phone": "consequatur",
"dob": "consequatur",
"gender": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor.",
"email": "qkunze@example.com"
};
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 \
"http://shofy.test/api/v1/update/avatar" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "avatar=@/private/var/folders/pv/8ss1l0s14ylczgg_279blg680000gn/T/phptbOjbw" const url = new URL(
"http://shofy.test/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 \
"http://shofy.test/api/v1/update/password" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"password\": \"O[2UZ5ij-e\\/dl4m{o,\",
\"old_password\": \"consequatur\"
}"
const url = new URL(
"http://shofy.test/api/v1/update/password"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"password": "O[2UZ5ij-e\/dl4m{o,",
"old_password": "consequatur"
};
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 "http://shofy.test/api/v1/ecommerce/reviews" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/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 \
"http://shofy.test/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(
"http://shofy.test/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 \
"http://shofy.test/api/v1/ecommerce/reviews/1562" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://shofy.test/api/v1/ecommerce/reviews/1562"
);
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 "http://shofy.test/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(
"http://shofy.test/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 (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"error": false,
"data": [
{
"id": 1,
"name": "Home slider",
"key": "home-slider",
"description": "The main slider on homepage",
"items": [
{
"id": 1,
"title": "The best tablet Collection 2023",
"description": "Exclusive offer <span>-35%</span> off this week",
"image": "http://shofy.test/storage/main/sliders/slider-1.png",
"link": "/products",
"order": 0,
"background_color": "#115061",
"is_light": 0,
"subtitle": "Starting at <b>$274.00</b>",
"button_label": "Shop Now"
},
{
"id": 2,
"title": "The best note book collection 2023",
"description": "Exclusive offer <span>-10%</span> off this week",
"image": "http://shofy.test/storage/main/sliders/slider-3.png",
"link": "/products",
"order": 1,
"background_color": "#115061",
"is_light": 0,
"subtitle": "Starting at <b>$999.00</b>",
"button_label": "Shop Now"
},
{
"id": 3,
"title": "The best phone collection 2023",
"description": "Exclusive offer <span>-10%</span> off this week",
"image": "http://shofy.test/storage/main/sliders/slider-2.png",
"link": "/products",
"order": 2,
"background_color": "#E3EDF6",
"is_light": 1,
"subtitle": "Starting at <b>$999.00</b>",
"button_label": "Shop Now"
}
]
}
],
"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.
Wishlist
Add product to wishlist
Example request:
curl --request POST \
"http://shofy.test/api/v1/ecommerce/wishlist" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"http://shofy.test/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 \
"http://shofy.test/api/v1/ecommerce/wishlist/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/wishlist/consequatur"
);
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 \
"http://shofy.test/api/v1/ecommerce/wishlist/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"product_id\": 1
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/wishlist/consequatur"
);
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 "http://shofy.test/api/v1/ecommerce/wishlist/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"id\": \"e70c6c88dae8344b03e39bb147eba66a\"
}"
const url = new URL(
"http://shofy.test/api/v1/ecommerce/wishlist/consequatur"
);
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 (200):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"id": "consequatur",
"data": {
"count": 0,
"items": []
}
}
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.