MENU navbar-image

Introduction

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

Authenticating requests

This API is not authenticated.

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\": \"repudiandae\",
    \"last_name\": \"sed\",
    \"email\": \"aiden.stanton@example.org\",
    \"password\": \"xnGXQjmJ-iXP\",
    \"phone\": \"provident\",
    \"password_confirmation\": \"ab\"
}"
const url = new URL(
    "http://shofy.test/api/v1/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "repudiandae",
    "last_name": "sed",
    "email": "aiden.stanton@example.org",
    "password": "xnGXQjmJ-iXP",
    "phone": "provident",
    "password_confirmation": "ab"
};

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": {
        "first_name": [
            "The first name field is required."
        ],
        "last_name": [
            "The last 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   

The name of the user. Example: repudiandae

last_name   string   

The name of the user. Example: sed

email   string   

The email of the user. Example: aiden.stanton@example.org

password   string   

The password of user to create. Example: xnGXQjmJ-iXP

phone   string   

The phone of the user. Example: provident

password_confirmation   string   

The password confirmation. Example: ab

Login

Example request:
curl --request POST \
    "http://shofy.test/api/v1/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"e.g: abc@example.com\",
    \"password\": \"9$g^}56|w$r<j>9<q\",
    \"login\": \"nulla\"
}"
const url = new URL(
    "http://shofy.test/api/v1/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "e.g: abc@example.com",
    "password": "9$g^}56|w$r<j>9<q",
    "login": "nulla"
};

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   

Must be a valid email address. Example: e.g: abc@example.com

password   string   

The password of user to create. Example: 9$g^}56|w$r<j>9<q

login   string   

The email/phone of the user. Example: nulla

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\": \"angelo94@example.net\"
}"
const url = new URL(
    "http://shofy.test/api/v1/password/forgot"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "angelo94@example.net"
};

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: angelo94@example.net

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\": \"chadrick36@example.org\"
}"
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": "chadrick36@example.org"
};

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: chadrick36@example.org

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\": \"veniam\"
}"
const url = new URL(
    "http://shofy.test/api/v1/search"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "veniam"
};

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
x-ratelimit-limit: 60
x-ratelimit-remaining: 51
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
x-ratelimit-limit: 60
x-ratelimit-remaining: 50
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, with a shiver. 'I beg your pardon,' said Alice indignantly, and she hastily dried her eyes immediately met those of a muchness\"--did you ever saw. How she longed to change the subject. 'Go on.",
            "image": "http://shofy.test/storage/main/blog/post-7.jpg",
            "categories": [
                {
                    "id": 2,
                    "name": "Fashion",
                    "slug": "fashion",
                    "url": "http://shofy.test/blog/fashion",
                    "description": "Blanditiis enim et sequi necessitatibus maxime mollitia fugiat doloremque. Est soluta dolores et in ab dolores. Et porro dolor rerum tempore inventore quia dolor."
                },
                {
                    "id": 4,
                    "name": "Commercial",
                    "slug": "commercial",
                    "url": "http://shofy.test/blog/commercial",
                    "description": "Quas in id sit. Dolorem provident minima modi dolor est."
                }
            ],
            "tags": [
                {
                    "id": 1,
                    "name": "General",
                    "slug": "general",
                    "description": ""
                },
                {
                    "id": 3,
                    "name": "Fashion",
                    "slug": "fashion",
                    "description": ""
                },
                {
                    "id": 8,
                    "name": "Sunglasses",
                    "slug": "sunglasses",
                    "description": ""
                }
            ],
            "created_at": "2024-04-11T08:14:30.000000Z",
            "updated_at": "2024-04-11T08:14:30.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": "Queen of Hearts, carrying the King's crown on a little timidly, for she felt that it was growing, and she jumped up and saying, 'Thank you, sir, for your walk!\" \"Coming in a minute or two, it was.",
            "image": "http://shofy.test/storage/main/blog/post-9.jpg",
            "categories": [
                {
                    "id": 2,
                    "name": "Fashion",
                    "slug": "fashion",
                    "url": "http://shofy.test/blog/fashion",
                    "description": "Blanditiis enim et sequi necessitatibus maxime mollitia fugiat doloremque. Est soluta dolores et in ab dolores. Et porro dolor rerum tempore inventore quia dolor."
                },
                {
                    "id": 5,
                    "name": "Organic Fruits",
                    "slug": "organic-fruits",
                    "url": "http://shofy.test/blog/organic-fruits",
                    "description": "Quia aliquam quisquam est beatae vel. Optio non possimus odit animi. Laborum nihil laudantium quia sunt officia."
                }
            ],
            "tags": [
                {
                    "id": 2,
                    "name": "Design",
                    "slug": "design",
                    "description": ""
                },
                {
                    "id": 6,
                    "name": "Nature",
                    "slug": "nature",
                    "description": ""
                }
            ],
            "created_at": "2024-04-11T08:14:30.000000Z",
            "updated_at": "2024-04-11T08:14:30.000000Z"
        },
        {
            "id": 3,
            "name": "The Top 2020 Handbag Trends to Know",
            "slug": "the-top-2020-handbag-trends-to-know",
            "description": "Queen. 'Well, I shan't go, at any rate he might answer questions.--How am I to get rather sleepy, and went by without noticing her. Then followed the Knave 'Turn them over!' The Knave did so, very.",
            "image": "http://shofy.test/storage/main/blog/post-4.jpg",
            "categories": [
                {
                    "id": 2,
                    "name": "Fashion",
                    "slug": "fashion",
                    "url": "http://shofy.test/blog/fashion",
                    "description": "Blanditiis enim et sequi necessitatibus maxime mollitia fugiat doloremque. Est soluta dolores et in ab dolores. Et porro dolor rerum tempore inventore quia dolor."
                },
                {
                    "id": 5,
                    "name": "Organic Fruits",
                    "slug": "organic-fruits",
                    "url": "http://shofy.test/blog/organic-fruits",
                    "description": "Quia aliquam quisquam est beatae vel. Optio non possimus odit animi. Laborum nihil laudantium quia sunt officia."
                }
            ],
            "tags": [
                {
                    "id": 5,
                    "name": "Modern",
                    "slug": "modern",
                    "description": ""
                },
                {
                    "id": 7,
                    "name": "Vintage",
                    "slug": "vintage",
                    "description": ""
                }
            ],
            "created_at": "2024-04-11T08:14:30.000000Z",
            "updated_at": "2024-04-11T08:14:30.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": "I to do?' said Alice. The King looked anxiously round, to make out which were the two sides of it, and on both sides at once. The Dormouse had closed its eyes again, to see what I was a good deal.",
            "image": "http://shofy.test/storage/main/blog/post-3.jpg",
            "categories": [
                {
                    "id": 3,
                    "name": "Electronic",
                    "slug": "electronic",
                    "url": "http://shofy.test/blog/electronic",
                    "description": "Quis qui aspernatur in quia hic eum. Est molestias assumenda nam iusto optio voluptatem et. Repudiandae dolores quibusdam ut adipisci. Molestiae sequi reprehenderit mollitia cum non."
                },
                {
                    "id": 4,
                    "name": "Commercial",
                    "slug": "commercial",
                    "url": "http://shofy.test/blog/commercial",
                    "description": "Quas in id sit. Dolorem provident minima modi dolor est."
                }
            ],
            "tags": [
                {
                    "id": 3,
                    "name": "Fashion",
                    "slug": "fashion",
                    "description": ""
                },
                {
                    "id": 7,
                    "name": "Vintage",
                    "slug": "vintage",
                    "description": ""
                },
                {
                    "id": 8,
                    "name": "Sunglasses",
                    "slug": "sunglasses",
                    "description": ""
                }
            ],
            "created_at": "2024-04-11T08:14:30.000000Z",
            "updated_at": "2024-04-11T08:14:30.000000Z"
        },
        {
            "id": 5,
            "name": "How to Care for Leather Bags",
            "slug": "how-to-care-for-leather-bags",
            "description": "Quick, now!' And Alice was just going to begin with; and being so many lessons to learn! No, I've made up my mind about it; and while she remembered trying to make out what it was: at first was in.",
            "image": "http://shofy.test/storage/main/blog/post-7.jpg",
            "categories": [
                {
                    "id": 4,
                    "name": "Commercial",
                    "slug": "commercial",
                    "url": "http://shofy.test/blog/commercial",
                    "description": "Quas in id sit. Dolorem provident minima modi dolor est."
                },
                {
                    "id": 5,
                    "name": "Organic Fruits",
                    "slug": "organic-fruits",
                    "url": "http://shofy.test/blog/organic-fruits",
                    "description": "Quia aliquam quisquam est beatae vel. Optio non possimus odit animi. Laborum nihil laudantium quia sunt officia."
                }
            ],
            "tags": [
                {
                    "id": 2,
                    "name": "Design",
                    "slug": "design",
                    "description": ""
                },
                {
                    "id": 5,
                    "name": "Modern",
                    "slug": "modern",
                    "description": ""
                },
                {
                    "id": 6,
                    "name": "Nature",
                    "slug": "nature",
                    "description": ""
                }
            ],
            "created_at": "2024-04-11T08:14:30.000000Z",
            "updated_at": "2024-04-11T08:14:30.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": "Alice whispered, 'that it's done by everybody minding their own business!' 'Ah, well! It means much the same thing with you,' said Alice, seriously, 'I'll have nothing more to do with you. Mind.",
            "image": "http://shofy.test/storage/main/blog/post-9.jpg",
            "categories": [
                {
                    "id": 6,
                    "name": "Ecological",
                    "slug": "ecological",
                    "url": "http://shofy.test/blog/ecological",
                    "description": "Ut blanditiis incidunt adipisci numquam vel repellat consequuntur. Aut nostrum molestiae non. Omnis ut quisquam dignissimos esse. Consequuntur aliquam et et repellendus esse."
                }
            ],
            "tags": [
                {
                    "id": 2,
                    "name": "Design",
                    "slug": "design",
                    "description": ""
                },
                {
                    "id": 7,
                    "name": "Vintage",
                    "slug": "vintage",
                    "description": ""
                }
            ],
            "created_at": "2024-04-11T08:14:30.000000Z",
            "updated_at": "2024-04-11T08:14:30.000000Z"
        },
        {
            "id": 7,
            "name": "Essential Qualities of Highly Successful Music",
            "slug": "essential-qualities-of-highly-successful-music",
            "description": "Queen, who had been for some time without hearing anything more: at last it unfolded its arms, took the hookah into its eyes by this time?' she said to herself how this same little sister of hers.",
            "image": "http://shofy.test/storage/main/blog/post-7.jpg",
            "categories": [
                {
                    "id": 1,
                    "name": "Crisp Bread & Cake",
                    "slug": "crisp-bread-cake",
                    "url": "http://shofy.test/blog/crisp-bread-cake",
                    "description": "Nemo et sit consequuntur animi quae ab. Aut quo voluptas quas. Ab aliquam deleniti sunt consequatur dicta id."
                },
                {
                    "id": 6,
                    "name": "Ecological",
                    "slug": "ecological",
                    "url": "http://shofy.test/blog/ecological",
                    "description": "Ut blanditiis incidunt adipisci numquam vel repellat consequuntur. Aut nostrum molestiae non. Omnis ut quisquam dignissimos esse. Consequuntur aliquam et et repellendus esse."
                }
            ],
            "tags": [
                {
                    "id": 1,
                    "name": "General",
                    "slug": "general",
                    "description": ""
                },
                {
                    "id": 7,
                    "name": "Vintage",
                    "slug": "vintage",
                    "description": ""
                },
                {
                    "id": 8,
                    "name": "Sunglasses",
                    "slug": "sunglasses",
                    "description": ""
                }
            ],
            "created_at": "2024-04-11T08:14:30.000000Z",
            "updated_at": "2024-04-11T08:14:30.000000Z"
        },
        {
            "id": 8,
            "name": "9 Things I Love About Shaving My Head",
            "slug": "9-things-i-love-about-shaving-my-head",
            "description": "Said the mouse doesn't get out.\" Only I don't know,' he went on so long since she had wept when she got up this morning, but I shall have somebody to talk to.' 'How are you thinking of?' 'I beg your.",
            "image": "http://shofy.test/storage/main/blog/post-7.jpg",
            "categories": [
                {
                    "id": 1,
                    "name": "Crisp Bread & Cake",
                    "slug": "crisp-bread-cake",
                    "url": "http://shofy.test/blog/crisp-bread-cake",
                    "description": "Nemo et sit consequuntur animi quae ab. Aut quo voluptas quas. Ab aliquam deleniti sunt consequatur dicta id."
                },
                {
                    "id": 5,
                    "name": "Organic Fruits",
                    "slug": "organic-fruits",
                    "url": "http://shofy.test/blog/organic-fruits",
                    "description": "Quia aliquam quisquam est beatae vel. Optio non possimus odit animi. Laborum nihil laudantium quia sunt officia."
                }
            ],
            "tags": [
                {
                    "id": 5,
                    "name": "Modern",
                    "slug": "modern",
                    "description": ""
                },
                {
                    "id": 6,
                    "name": "Nature",
                    "slug": "nature",
                    "description": ""
                }
            ],
            "created_at": "2024-04-11T08:14:30.000000Z",
            "updated_at": "2024-04-11T08:14:30.000000Z"
        },
        {
            "id": 9,
            "name": "Why Teamwork Really Makes The Dream Work",
            "slug": "why-teamwork-really-makes-the-dream-work",
            "description": "Cat's head began fading away the moment he was in confusion, getting the Dormouse said--' the Hatter went on, '\"--found it advisable to go on crying in this way! Stop this moment, and fetch me a.",
            "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": "Nemo et sit consequuntur animi quae ab. Aut quo voluptas quas. Ab aliquam deleniti sunt consequatur dicta id."
                },
                {
                    "id": 5,
                    "name": "Organic Fruits",
                    "slug": "organic-fruits",
                    "url": "http://shofy.test/blog/organic-fruits",
                    "description": "Quia aliquam quisquam est beatae vel. Optio non possimus odit animi. Laborum nihil laudantium quia sunt officia."
                }
            ],
            "tags": [
                {
                    "id": 3,
                    "name": "Fashion",
                    "slug": "fashion",
                    "description": ""
                },
                {
                    "id": 5,
                    "name": "Modern",
                    "slug": "modern",
                    "description": ""
                },
                {
                    "id": 6,
                    "name": "Nature",
                    "slug": "nature",
                    "description": ""
                }
            ],
            "created_at": "2024-04-11T08:14:30.000000Z",
            "updated_at": "2024-04-11T08:14:30.000000Z"
        },
        {
            "id": 10,
            "name": "The World Caters to Average People",
            "slug": "the-world-caters-to-average-people",
            "description": "Alice, every now and then raised himself upon tiptoe, put his mouth close to her: its face to see what the flame of a tree. By the use of this rope--Will the roof bear?--Mind that loose slate--Oh.",
            "image": "http://shofy.test/storage/main/blog/post-10.jpg",
            "categories": [
                {
                    "id": 2,
                    "name": "Fashion",
                    "slug": "fashion",
                    "url": "http://shofy.test/blog/fashion",
                    "description": "Blanditiis enim et sequi necessitatibus maxime mollitia fugiat doloremque. Est soluta dolores et in ab dolores. Et porro dolor rerum tempore inventore quia dolor."
                },
                {
                    "id": 4,
                    "name": "Commercial",
                    "slug": "commercial",
                    "url": "http://shofy.test/blog/commercial",
                    "description": "Quas in id sit. Dolorem provident minima modi dolor est."
                }
            ],
            "tags": [
                {
                    "id": 2,
                    "name": "Design",
                    "slug": "design",
                    "description": ""
                },
                {
                    "id": 3,
                    "name": "Fashion",
                    "slug": "fashion",
                    "description": ""
                },
                {
                    "id": 6,
                    "name": "Nature",
                    "slug": "nature",
                    "description": ""
                }
            ],
            "created_at": "2024-04-11T08:14:30.000000Z",
            "updated_at": "2024-04-11T08:14:30.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
x-ratelimit-limit: 60
x-ratelimit-remaining: 49
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 6,
            "name": "Ecological",
            "slug": "ecological",
            "description": "Ut blanditiis incidunt adipisci numquam vel repellat consequuntur. Aut nostrum molestiae non. Omnis ut quisquam dignissimos esse. Consequuntur aliquam et et repellendus esse.",
            "children": [],
            "parent": {
                "id": null,
                "name": "",
                "slug": "",
                "url": "http://shofy.test",
                "description": ""
            }
        },
        {
            "id": 5,
            "name": "Organic Fruits",
            "slug": "organic-fruits",
            "description": "Quia aliquam quisquam est beatae vel. Optio non possimus odit animi. Laborum nihil laudantium quia sunt officia.",
            "children": [],
            "parent": {
                "id": null,
                "name": "",
                "slug": "",
                "url": "http://shofy.test",
                "description": ""
            }
        },
        {
            "id": 4,
            "name": "Commercial",
            "slug": "commercial",
            "description": "Quas in id sit. Dolorem provident minima modi dolor est.",
            "children": [],
            "parent": {
                "id": null,
                "name": "",
                "slug": "",
                "url": "http://shofy.test",
                "description": ""
            }
        },
        {
            "id": 3,
            "name": "Electronic",
            "slug": "electronic",
            "description": "Quis qui aspernatur in quia hic eum. Est molestias assumenda nam iusto optio voluptatem et. Repudiandae dolores quibusdam ut adipisci. Molestiae sequi reprehenderit mollitia cum non.",
            "children": [],
            "parent": {
                "id": null,
                "name": "",
                "slug": "",
                "url": "http://shofy.test",
                "description": ""
            }
        },
        {
            "id": 2,
            "name": "Fashion",
            "slug": "fashion",
            "description": "Blanditiis enim et sequi necessitatibus maxime mollitia fugiat doloremque. Est soluta dolores et in ab dolores. Et porro dolor rerum tempore inventore quia dolor.",
            "children": [],
            "parent": {
                "id": null,
                "name": "",
                "slug": "",
                "url": "http://shofy.test",
                "description": ""
            }
        },
        {
            "id": 1,
            "name": "Crisp Bread & Cake",
            "slug": "crisp-bread-cake",
            "description": "Nemo et sit consequuntur animi quae ab. Aut quo voluptas quas. Ab aliquam deleniti sunt consequatur dicta id.",
            "children": [],
            "parent": {
                "id": null,
                "name": "",
                "slug": "",
                "url": "http://shofy.test",
                "description": ""
            }
        }
    ],
    "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
x-ratelimit-limit: 60
x-ratelimit-remaining: 48
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 1,
            "name": "General",
            "slug": "general",
            "description": ""
        },
        {
            "id": 2,
            "name": "Design",
            "slug": "design",
            "description": ""
        },
        {
            "id": 3,
            "name": "Fashion",
            "slug": "fashion",
            "description": ""
        },
        {
            "id": 4,
            "name": "Branding",
            "slug": "branding",
            "description": ""
        },
        {
            "id": 5,
            "name": "Modern",
            "slug": "modern",
            "description": ""
        },
        {
            "id": 6,
            "name": "Nature",
            "slug": "nature",
            "description": ""
        },
        {
            "id": 7,
            "name": "Vintage",
            "slug": "vintage",
            "description": ""
        },
        {
            "id": 8,
            "name": "Sunglasses",
            "slug": "sunglasses",
            "description": ""
        }
    ],
    "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=15&per_page=17&search=laboriosam&after=rerum&author=aut&author_exclude=quo&before=soluta&exclude=minima&include=vero&order=magnam&order_by=aliquam&categories=non&categories_exclude=aperiam&tags=ut&tags_exclude=odit&featured=fuga" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://shofy.test/api/v1/posts/filters"
);

const params = {
    "page": "15",
    "per_page": "17",
    "search": "laboriosam",
    "after": "rerum",
    "author": "aut",
    "author_exclude": "quo",
    "before": "soluta",
    "exclude": "minima",
    "include": "vero",
    "order": "magnam",
    "order_by": "aliquam",
    "categories": "non",
    "categories_exclude": "aperiam",
    "tags": "ut",
    "tags_exclude": "odit",
    "featured": "fuga",
};
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
x-ratelimit-limit: 60
x-ratelimit-remaining: 47
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=14",
        "next": null
    },
    "meta": {
        "current_page": 15,
        "from": null,
        "last_page": 1,
        "links": [
            {
                "url": "http://shofy.test/api/v1/posts/filters?page=14",
                "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: 15

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: laboriosam

after   string  optional  

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

author   string  optional  

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

author_exclude   string  optional  

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

before   string  optional  

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

exclude   string  optional  

Ensure result set excludes specific IDs. Example: minima

include   string  optional  

Limit result set to specific IDs. Example: vero

order   string  optional  

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

order_by   string  optional  

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

categories   string  optional  

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

categories_exclude   string  optional  

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

tags   string  optional  

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

tags_exclude   string  optional  

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

featured   string  optional  

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

Get post by slug

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

const params = {
    "slug": "dicta",
};
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
x-ratelimit-limit: 60
x-ratelimit-remaining: 46
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: voluptatem

Query Parameters

slug   string  optional  

Find by slug of post. Example: dicta

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
x-ratelimit-limit: 60
x-ratelimit-remaining: 45
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 5,
            "name": "Organic Fruits",
            "slug": "organic-fruits",
            "url": "http://shofy.test/blog/organic-fruits",
            "description": "Quia aliquam quisquam est beatae vel. Optio non possimus odit animi. Laborum nihil laudantium quia sunt officia."
        },
        {
            "id": 2,
            "name": "Fashion",
            "slug": "fashion",
            "url": "http://shofy.test/blog/fashion",
            "description": "Blanditiis enim et sequi necessitatibus maxime mollitia fugiat doloremque. Est soluta dolores et in ab dolores. Et porro dolor rerum tempore inventore quia dolor."
        },
        {
            "id": 3,
            "name": "Electronic",
            "slug": "electronic",
            "url": "http://shofy.test/blog/electronic",
            "description": "Quis qui aspernatur in quia hic eum. Est molestias assumenda nam iusto optio voluptatem et. Repudiandae dolores quibusdam ut adipisci. Molestiae sequi reprehenderit mollitia cum non."
        },
        {
            "id": 6,
            "name": "Ecological",
            "slug": "ecological",
            "url": "http://shofy.test/blog/ecological",
            "description": "Ut blanditiis incidunt adipisci numquam vel repellat consequuntur. Aut nostrum molestiae non. Omnis ut quisquam dignissimos esse. Consequuntur aliquam et et repellendus esse."
        },
        {
            "id": 1,
            "name": "Crisp Bread & Cake",
            "slug": "crisp-bread-cake",
            "url": "http://shofy.test/blog/crisp-bread-cake",
            "description": "Nemo et sit consequuntur animi quae ab. Aut quo voluptas quas. Ab aliquam deleniti sunt consequatur dicta id."
        },
        {
            "id": 4,
            "name": "Commercial",
            "slug": "commercial",
            "url": "http://shofy.test/blog/commercial",
            "description": "Quas in id sit. Dolorem provident minima modi dolor est."
        }
    ],
    "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/reiciendis?slug=nesciunt" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://shofy.test/api/v1/categories/reiciendis"
);

const params = {
    "slug": "nesciunt",
};
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
x-ratelimit-limit: 60
x-ratelimit-remaining: 44
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: reiciendis

Query Parameters

slug   string  optional  

Find by slug of category. Example: nesciunt

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\": \"et\",
    \"last_name\": \"delectus\",
    \"phone\": \"ad\",
    \"dob\": \"facere\",
    \"gender\": \"at\",
    \"description\": \"Expedita eveniet aliquam ducimus ab itaque.\",
    \"email\": \"willms.asia@example.net\"
}"
const url = new URL(
    "http://shofy.test/api/v1/me"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "et",
    "last_name": "delectus",
    "phone": "ad",
    "dob": "facere",
    "gender": "at",
    "description": "Expedita eveniet aliquam ducimus ab itaque.",
    "email": "willms.asia@example.net"
};

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   

First name. Example: et

last_name   string   

Last name. Example: delectus

phone   string   

Phone. Example: ad

dob   string   

Date of birth. Example: facere

gender   string  optional  

Gender Example: at

description   string  optional  

Description Example: Expedita eveniet aliquam ducimus ab itaque.

email   string  optional  

Email. Example: willms.asia@example.net

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/h4/7j56n3vs11179mptv1t37ld40000gn/T/phpha67zy" 
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/h4/7j56n3vs11179mptv1t37ld40000gn/T/phpha67zy

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\": \"\\\\$IfQ]*C[Gj\\\"\"
}"
const url = new URL(
    "http://shofy.test/api/v1/update/password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "password": "\\$IfQ]*C[Gj\""
};

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: \$IfQ]*C[Gj"