MENU navbar-image

Introduction

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

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

Authenticating requests

This API is not authenticated.

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."
}
 

Request      

GET api/v1/ecommerce/addresses

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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
}
 

Request      

POST api/v1/ecommerce/addresses

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

The name of the address owner. Example: John Doe

email   string   

The email address. Example: john.doe@example.com

phone   string   

The phone number. Example: 0123456789

country   string  optional  

The country name or country code. Example: United States or US

state   string  optional  

The state/province name. Example: California

city   string  optional  

The city name. Example: Los Angeles

address   string  optional  

The street address. Example: 123 Main St

is_default   boolean  optional  

Set as default address. Example: true

zip_code   string  optional  

The postal/zip code. Example: 90001

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
}
 

Request      

PUT api/v1/ecommerce/addresses/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the address. Example: 1

Body Parameters

name   string   

The name of the address owner. Example: John Doe

email   string   

The email address. Example: john.doe@example.com

phone   string   

The phone number. Example: 0123456789

country   string  optional  

The country name or country code. Example: United States or US

state   string   

The state/province name. Example: California

city   string   

The city name. Example: Los Angeles

address   string   

The street address. Example: 123 Main St

is_default   boolean  optional  

Set as default address. Example: true

zip_code   string  optional  

The postal/zip code. Example: 90001

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"
}
 

Request      

DELETE api/v1/ecommerce/addresses/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the address. Example: 1

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
}
 

Request      

GET api/v1/ecommerce/countries

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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
}
 

Request      

GET api/v1/ads

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

keys   string[]  optional  

Array of ad keys to filter by.

Body Parameters

keys   string[]  optional  

Array of ad keys to filter by.

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."
        ]
    }
}
 

Request      

POST api/v1/register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

first_name   string  optional  

The first name of the user. This field is required when name is not present. Must not be greater than 120 characters. Must be at least 2 characters. Example: John

last_name   string  optional  

The last name of the user. This field is required when name is not present. Must not be greater than 120 characters. Must be at least 2 characters. Example: Smith

name   string   

The name of the user. Example: consequatur

email   string   

The email of the user. Example: qkunze@example.com

password   string   

The password of user to create. Example: O[2UZ5ij-e/dl4m{o,

phone   string   

The phone of the user. Example: consequatur

password_confirmation   string   

The password confirmation. Example: consequatur

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
}
 

Request      

POST api/v1/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email of the user. Example: qkunze@example.com

password   string   

The password of user to create. Example: O[2UZ5ij-e/dl4m{o,

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
}
 

Request      

POST api/v1/email/check

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email of the user. Example: qkunze@example.com

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());

Request      

POST api/v1/password/forgot

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email of the user. Example: qkunze@example.com

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());

Request      

POST api/v1/resend-verify-account-email

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email of the user. Example: qkunze@example.com

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."
}
 

Request      

GET api/v1/logout

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Blog

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."
}
 

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": "&laquo; 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 &raquo;",
                "active": false
            }
        ],
        "path": "http://shofy.test/api/v1/posts",
        "per_page": 10,
        "to": 10,
        "total": 18
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/posts

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://shofy.test/api/v1/categories?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://shofy.test/api/v1/categories",
        "per_page": 10,
        "to": 6,
        "total": 6
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/categories

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

List tags

Example request:
curl --request GET \
    --get "http://shofy.test/api/v1/tags" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://shofy.test/api/v1/tags"
);

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": "General",
            "slug": "general",
            "description": null
        },
        {
            "id": 2,
            "name": "Design",
            "slug": "design",
            "description": null
        },
        {
            "id": 3,
            "name": "Fashion",
            "slug": "fashion",
            "description": null
        },
        {
            "id": 4,
            "name": "Branding",
            "slug": "branding",
            "description": null
        },
        {
            "id": 5,
            "name": "Modern",
            "slug": "modern",
            "description": null
        },
        {
            "id": 6,
            "name": "Nature",
            "slug": "nature",
            "description": null
        },
        {
            "id": 7,
            "name": "Vintage",
            "slug": "vintage",
            "description": null
        },
        {
            "id": 8,
            "name": "Sunglasses",
            "slug": "sunglasses",
            "description": null
        }
    ],
    "links": {
        "first": "http://shofy.test/api/v1/tags?page=1",
        "last": "http://shofy.test/api/v1/tags?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://shofy.test/api/v1/tags?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://shofy.test/api/v1/tags",
        "per_page": 10,
        "to": 8,
        "total": 8
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/tags

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://shofy.test/api/v1/posts/filters?page=1",
                "label": "1",
                "active": false
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://shofy.test/api/v1/posts/filters",
        "per_page": 17,
        "to": null,
        "total": 0
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/posts/filters

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

Current page of the collection. Default: 1 Example: 17

per_page   integer  optional  

Maximum number of items to be returned in result set.Default: 10 Example: 17

search   string  optional  

Limit results to those matching a string. Example: consequatur

after   string  optional  

Limit response to posts published after a given ISO8601 compliant date. Example: consequatur

author   string  optional  

Limit result set to posts assigned to specific authors. Example: consequatur

author_exclude   string  optional  

Ensure result set excludes posts assigned to specific authors. Example: consequatur

before   string  optional  

Limit response to posts published before a given ISO8601 compliant date. Example: consequatur

exclude   string  optional  

Ensure result set excludes specific IDs. Example: consequatur

include   string  optional  

Limit result set to specific IDs. Example: consequatur

order   string  optional  

Order sort attribute ascending or descending. Default: desc .One of: asc, desc Example: consequatur

order_by   string  optional  

Sort collection by object attribute. Default: updated_at. One of: author, created_at, updated_at, id, slug, title Example: consequatur

categories   string  optional  

Limit result set to all items that have the specified term assigned in the categories taxonomy. Example: consequatur

categories_exclude   string  optional  

Limit result set to all items except those that have the specified term assigned in the categories taxonomy. Example: consequatur

tags   string  optional  

Limit result set to all items that have the specified term assigned in the tags taxonomy. Example: consequatur

tags_exclude   string  optional  

Limit result set to all items except those that have the specified term assigned in the tags taxonomy. Example: consequatur

featured   string  optional  

Limit result set to items that are sticky. Example: consequatur

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"
}
 

Request      

GET api/v1/posts/{slug}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the post. Example: consequatur

Query Parameters

slug   string  optional  

Find by slug of post. Example: consequatur

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": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://shofy.test/api/v1/categories/filters?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://shofy.test/api/v1/categories/filters",
        "per_page": 10,
        "to": 6,
        "total": 6
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/categories/filters

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

GET api/v1/categories/{slug}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the category. Example: consequatur

Query Parameters

slug   string  optional  

Find by slug of category. Example: consequatur

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": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://shofy.test/api/v1/ecommerce/brands?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://shofy.test/api/v1/ecommerce/brands",
        "per_page": 16,
        "to": null,
        "total": 0
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/ecommerce/brands

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

brands   string[]  optional  

List of brand IDs if you need filter by brands.

page   integer  optional  

Page number. Default: 1.

per_page   integer  optional  

Number of items per page. Default: 16.

Body Parameters

brands   string[]  optional  

The id of an existing record in the ec_product_brands table.

is_featured   boolean  optional  

Filter by featured status. Example: false

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": ""
}
 

Request      

GET api/v1/ecommerce/brands/{slug}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the brand. Example: consequatur

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": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://shofy.test/api/v1/ecommerce/brands/1/products?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://shofy.test/api/v1/ecommerce/brands/1/products",
        "per_page": 24,
        "to": 1,
        "total": 1
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/ecommerce/brands/{id}/products

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the brand. Example: 1

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());

Request      

POST api/v1/ecommerce/cart

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

product_id   integer   

ID of the product. Example: 1

qty   integer   

Quantity of the product. Default: 1. Example: 1

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());

Request      

POST api/v1/ecommerce/cart/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the cart. Example: consequatur

Body Parameters

product_id   integer   

ID of the product. Example: 1

qty   integer   

Quantity of the product. Default: 1. Example: 1

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());

Request      

PUT api/v1/ecommerce/cart/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the cart. Example: consequatur

Body Parameters

product_id   integer   

ID of the product. Example: 1

qty   integer   

Quantity of the product. Example: 1

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());

Request      

DELETE api/v1/ecommerce/cart/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the cart. Example: consequatur

Body Parameters

product_id   string   

The ID of the product to remove from the cart. The id of an existing record in the ec_products table. Example: 1

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"
}
 

Request      

GET api/v1/ecommerce/cart/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the cart. Example: consequatur

Body Parameters

customer_id   integer  optional  

is ID of the customer. Example: 1

id   string   

ID of the cart item. Example: e70c6c88dae8344b03e39bb147eba66a

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());

Request      

POST api/v1/ecommerce/cart/refresh

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

products   string[]   

List of products with product_id and quantity.

product_id   integer   

The ID of the product. The id of an existing record in the ec_products table. Example: 1

quantity   integer   

The quantity of the product. Must be at least 1. Example: 2

*   object  optional  
product_id   integer   

ID of the product. Example: 1

quantity   integer   

Quantity of the product. Example: 1

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"
    }
}
 

Request      

POST api/v1/ecommerce/checkout/taxes/calculate

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

products   string[]   

List of products with id and quantity.

id   string   

The ID of the product. The id of an existing record in the ec_products table. Example: 1

quantity   integer   

The quantity of the product. Must be at least 1. Example: 2

*   object  optional  
id   integer   

Product ID. Example: 1

quantity   integer   

Product quantity. Example: 2

country   string  optional  

Country code. Example: US

state   string  optional  

State code. Example: CA

city   string  optional  

City name. Example: Los Angeles

zip_code   string  optional  

ZIP code. Example: 90001

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."
}
 

Request      

GET api/v1/ecommerce/checkout/cart/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the cart to process. Example: 12345

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());

Request      

POST api/v1/ecommerce/compare

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

product_id   integer   

ID of the product. Example: 1

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());

Request      

POST api/v1/ecommerce/compare/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the compare. Example: consequatur

Body Parameters

product_id   integer   

ID of the product. Example: 1

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());

Request      

DELETE api/v1/ecommerce/compare/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the compare. Example: consequatur

Body Parameters

product_id   string   

The ID of the product to remove from the compare list. The id of an existing record in the ec_products table. Example: 1

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": []
    }
}
 

Request      

GET api/v1/ecommerce/compare/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the compare. Example: consequatur

Body Parameters

id   string   

ID of the compare list. Example: e70c6c88dae8344b03e39bb147eba66a

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());

Request      

POST api/v1/ecommerce/coupon/apply

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

coupon_code   string   

The coupon code. Example: DISCOUNT20

cart_id   string   

ID of the cart to apply coupon to. Example: e70c6c88dae8344b03e39bb147eba66a

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());

Request      

POST api/v1/ecommerce/coupon/remove

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

cart_id   string  optional  

ID of the cart to remove coupon from. Example: e70c6c88dae8344b03e39bb147eba66a

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
}
 

Request      

GET api/v1/ecommerce/currencies

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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
}
 

Request      

GET api/v1/ecommerce/currencies/current

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

POST api/v1/device-tokens

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

token   string   

The FCM device token. Example: consequatur

platform   string  optional  

The device platform (android, ios). Example: consequatur

app_version   string  optional  

The app version. Example: consequatur

device_id   string  optional  

The unique device identifier. Example: consequatur

user_type   string  optional  

The user type (customer, admin). Example: consequatur

user_id   integer  optional  

The user ID. Example: 17

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."
}
 

Request      

GET api/v1/device-tokens

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

PUT api/v1/device-tokens/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the device token. Example: consequatur

Body Parameters

platform   string  optional  

The device platform (android, ios). Example: consequatur

app_version   string  optional  

The app version. Example: consequatur

device_id   string  optional  

The unique device identifier. Example: consequatur

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());

Request      

DELETE api/v1/device-tokens/by-token

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

token   string   

The FCM device token to delete. Example: consequatur

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());

Request      

DELETE api/v1/device-tokens/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the device token. Example: consequatur

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());

Request      

POST api/v1/device-tokens/{id}/deactivate

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the device token. Example: consequatur

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."
}
 

Request      

GET api/v1/ecommerce/downloads

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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."
}
 

Request      

GET api/v1/ecommerce/downloads/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the download. Example: 1562

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": ""
}
 

Request      

GET api/v1/ecommerce/download/{token}/{filename}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

token   string   

Example: consequatur

filename   string   

Example: consequatur

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": ""
}
 

Request      

GET api/v1/ecommerce/orders/download-proof/{token}/{filename}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

token   string   

Example: consequatur

filename   string   

Example: consequatur

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());

Request      

POST api/v1/auth/apple

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

POST api/v1/auth/google

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

POST api/v1/auth/facebook

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

POST api/v1/auth/x

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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
}
 

Request      

GET api/v1/ecommerce/filters

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

category   integer  optional  

Category ID to get filter data for a specific category.

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."
}
 

Request      

GET api/v1/ecommerce/flash-sales

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

keys   string[]  optional  

Array of flash sale keys to filter by.

Body Parameters

keys   string[]  optional  

Array of flash sale keys to filter by.

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
}
 

Request      

GET api/v1/languages

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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
}
 

Request      

GET api/v1/languages/current

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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."
}
 

Request      

GET api/v1/notifications

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

Page number for pagination. Example: 1

per_page   integer  optional  

Number of notifications per page (max 50). Example: 20

unread_only   boolean  optional  

Filter to show only unread notifications. Example: false

type   string  optional  

Filter by notification type. Example: general

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."
}
 

Request      

GET api/v1/notifications/stats

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

POST api/v1/notifications/mark-all-read

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

POST api/v1/notifications/{id}/read

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the notification. Example: consequatur

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());

Request      

POST api/v1/notifications/{id}/clicked

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the notification. Example: consequatur

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());

Request      

DELETE api/v1/notifications/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the notification. Example: consequatur

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."
}
 

Request      

GET api/v1/ecommerce/order-returns

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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."
}
 

Request      

GET api/v1/ecommerce/order-returns/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the order return. Example: 1562

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());

Request      

POST api/v1/ecommerce/order-returns

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

order_id   integer   

The ID of the order to return. Example: 1

return_items   string[]   

The items to return with order_item_id, is_return, and qty.

is_return   string  optional  

Whether this item should be returned. Example: true

order_item_id   number  optional  

The ID of the order item to return. This field is required when return_items.*.is_return or checked is present. The id of an existing record in the ec_order_product table. Example: 1

qty   number  optional  

The quantity to return. Must be at least 1. Example: 2

*   object  optional  
order_item_id   integer   

The ID of the order item. Example: 1

is_return   boolean   

Whether to return this item. Example: true

qty   integer  optional  

The quantity to return (required if partial return is enabled). Example: 1

reason   string  optional  

The reason for returning this item (required if partial return is enabled). Example: DAMAGED_PRODUCT

reason   string   

The reason for the return. Example: DAMAGED_PRODUCT

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."
}
 

Request      

GET api/v1/ecommerce/orders/{order_id}/returns

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

order_id   string   

The ID of the order. Example: 1562

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."
}
 

Request      

GET api/v1/ecommerce/orders

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

status   string  optional  

Filter orders by status (pending, processing, completed, canceled). Example: completed

shipping_status   string  optional  

Filter orders by shipping status (not_shipped, delivering, delivered, canceled). Example: delivered

payment_status   string  optional  

Filter orders by payment status (pending, completed, refunding, refunded, canceled). Example: completed

per_page   integer  optional  

Number of orders per page. Example: 10

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."
}
 

Request      

GET api/v1/ecommerce/orders/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the order. Example: consequatur

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());

Request      

POST api/v1/ecommerce/orders/{id}/cancel

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the order. Example: consequatur

Body Parameters

cancellation_reason   string   

The reason for cancellation. Example: OTHER

cancellation_reason_description   string  optional  

The description of the cancellation reason (required if cancellation_reason is OTHER). Example: I found a better deal elsewhere

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."
}
 

Request      

GET api/v1/ecommerce/orders/{id}/invoice

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the order. Example: consequatur

Query Parameters

type   string  optional  

Type of response (print or download). Example: download

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());

Request      

POST api/v1/ecommerce/orders/{id}/upload-proof

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the order. Example: consequatur

Body Parameters

file   file   

The payment proof file (jpeg, jpg, png, pdf, max 2MB). Example: /private/var/folders/pv/8ss1l0s14ylczgg_279blg680000gn/T/phpw90V7N

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."
}
 

Request      

GET api/v1/ecommerce/orders/{id}/download-proof

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the order. Example: consequatur

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());

Request      

POST api/v1/ecommerce/orders/{id}/confirm-delivery

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the order. Example: consequatur

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
}
 

Request      

POST api/v1/ecommerce/orders/tracking

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

code   string   

The order code. Example: ORD-12345

email   string   

if phone not provided The email associated with the order. Example: customer@example.com

phone   string   

if email not provided The phone number associated with the order. Example: +1234567890

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": "&laquo; 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 &raquo;",
                "active": false
            }
        ],
        "path": "http://shofy.test/api/v1/pages",
        "per_page": 10,
        "to": 10,
        "total": 13
    },
    "error": false,
    "message": null
}
 

Request      

GET api/v1/pages

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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"
}
 

Request      

GET api/v1/pages/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the page. Example: consequatur

Query Parameters

id   integer  optional  

Find by ID of page. Example: 17

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
}
 

Request      

GET api/v1/ecommerce/product-categories

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

categories   string  optional  

nullable array List of category IDs if you need filter by categories, (e.g. [1,2,3]).

page   integer  optional  

Page number. Default: 1.

per_page   integer  optional  

Number of items per page. Default: 16.

Body Parameters

categories   string[]  optional  

The id of an existing record in the ec_product_categories table.

is_featured   boolean  optional  

Filter by featured status. Example: false

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": ""
}
 

Request      

GET api/v1/ecommerce/product-categories/{slug}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the product category. Example: consequatur

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"
}
 

Request      

GET api/v1/ecommerce/product-categories/{id}/products

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the product category. Example: consequatur

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"
}
 

Request      

GET api/v1/ecommerce/products

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

categories   string[]  optional  

Filter by category IDs.

brands   string[]  optional  

Filter by brand IDs.

collections   string[]  optional  

Filter by collection IDs.

q   string  optional  

Search term.

sort_by   string  optional  

Sort field. Value: default_sorting, date_asc, date_desc, price_asc, price_desc, name_asc, name_desc, rating_asc, rating_desc Example: consequatur

page   integer  optional  

The current page.

per_page   integer  optional  

Number of items per page.

discounted_only   boolean  optional  

Filter by discounted only.

min_price   integer  optional  

Minimum price.

max_price   integer  optional  

Maximum price.

price_ranges   string  optional  

Price ranges as JSON string. Example: [{"from":10,"to":20},{"from":30,"to":40}]

attributes   string  optional  

Attributes as JSON string. Example: [{"id":1,"value":1},{"id":2,"value":2}]

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": ""
}
 

Request      

GET api/v1/ecommerce/products/{slug}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the product. Example: consequatur

Example request:
curl --request GET \
    --get "http://shofy.test/api/v1/ecommerce/products/consequatur/related" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://shofy.test/api/v1/ecommerce/products/consequatur/related"
);

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": ""
}
 

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": ""
}
 

Request      

GET api/v1/ecommerce/products/{slug}/cross-sale

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the product. Example: consequatur

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": ""
}
 

Request      

GET api/v1/ecommerce/products/{slug}/reviews

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the product. Example: consequatur

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"
}
 

Request      

GET api/v1/ecommerce/product-variation/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the product variation. Example: 1562

Query Parameters

attributes   string[]  optional  

Array of attribute IDs.

reference_product   string  optional  

Reference product slug.

Body Parameters

reference_product   string   

Example: consequatur

attributes   string[]   

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."
}
 

Request      

GET api/v1/me

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

PUT api/v1/me

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

first_name   string  optional  

This field is required when name is not present. Must not be greater than 120 characters. Must be at least 2 characters. Example: vmqeopfuudtdsufvyvddqamniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsjur

last_name   string  optional  

This field is required when name is not present. Must not be greater than 120 characters. Must be at least 2 characters. Example: yvojcybzvrbyickznkygloigmkwxphlvazjrcnfbaqywuxhgjjmzuxjubqouzswiwxtrkimfca

name   string   

Name. Example: consequatur

phone   string   

Phone. Example: consequatur

dob   date  optional  

nullable Date of birth (format: Y-m-d). Example: consequatur

gender   string  optional  

Gender (male, female, other). Example: consequatur

description   string  optional  

Description Example: Dolores dolorum amet iste laborum eius est dolor.

email   string  optional  

Email. Example: qkunze@example.com

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());

Request      

POST api/v1/update/avatar

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

avatar   file   

Avatar file. Example: /private/var/folders/pv/8ss1l0s14ylczgg_279blg680000gn/T/phptbOjbw

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());

Request      

PUT api/v1/update/password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

password   string   

The new password of user. Example: O[2UZ5ij-e/dl4m{o,

old_password   string   

The current password of user. Example: consequatur

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."
}
 

Request      

GET api/v1/ecommerce/reviews

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

POST api/v1/ecommerce/reviews

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

product_id   integer   

The ID of the product to review. Example: 1

star   integer   

The rating from 1 to 5 stars. Example: 5

comment   string   

The review comment. Example: This is a great product! I highly recommend it.

images   string[]  optional  

Array of images for the review (optional).

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());

Request      

DELETE api/v1/ecommerce/reviews/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the review. Example: 1562

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
}
 

Request      

GET api/v1/simple-sliders

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

keys   string[]  optional  

Array of slider keys to filter by.

Body Parameters

keys   string[]  optional  

Array of slider keys to filter by.

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());

Request      

POST api/v1/ecommerce/wishlist

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

product_id   integer   

ID of the product. Example: 1

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());

Request      

POST api/v1/ecommerce/wishlist/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the wishlist. Example: consequatur

Body Parameters

product_id   integer   

ID of the product. Example: 1

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());

Request      

DELETE api/v1/ecommerce/wishlist/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the wishlist. Example: consequatur

Body Parameters

product_id   string   

The ID of the product to remove from the wishlist. The id of an existing record in the ec_products table. Example: 1

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": []
    }
}
 

Request      

GET api/v1/ecommerce/wishlist/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the wishlist. Example: consequatur

Body Parameters

id   string   

ID of the wishlist. Example: e70c6c88dae8344b03e39bb147eba66a