NAV
bash javascript

# Introduction

Welcome to our Laravel Starter API documentation!

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), and you can switch the programming language of the examples with the tabs in the top right (or from the nav menu at the top left on mobile).

# Authenticating requests

This API is authenticated by sending an `Authorization` header with the value `"Bearer {your-token}"`.

You can retrieve your token by visiting your dashboard and clicking Generate API token.

# Authentication

Class AuthController

Fullfills all aspects related to authenticate a user.

## Attempt to login the user.

If login is successfull, you get an api_token in response. Use that api_token to authenticate yourself for further api calls.

> Example request:

    curl -X POST \
        "/api/v1/auth/login" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"email":"\"user@test.com\"","password":"\"abc@123_4\""}'

    const url = new URL(
        "/api/v1/auth/login"
    );

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

    let body = {
        "email": "\"user@test.com\"",
        "password": "\"abc@123_4\""
    }

    fetch(url, {
        method: "POST",
        headers: headers,
        body: body
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "message": "Login Successfull.",
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiMTc1YjM0YmQ2Y2U5OWE3YTIwMTcxODY4NDcyNjJlOTRiOGYzZTExNTNjN2RhMzA0YzgwM2Q0NmY3YWVmMzRkMDFhZGIxY2JlY2M1YWZjNjUiLCJpYXQiOjE1OTQxOTA5MjksIm5iZiI6MTU5NDE5MDkyOSwiZXhwIjoxNjI1NzI2OTI5LCJzdWIiOiIxIiwic2NvcGVzIjpbXX0. "
    }

### Request

POST `api/v1/auth/login`

#### Body Parameters

`email` string
Your email id.

`password` string
Your Password.

## Attempt to logout the user.

After successfull logut the token get invalidated and can not be used further.

> Example request:

    curl -X POST \
        "/api/v1/auth/logout" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/auth/logout"
    );

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

    fetch(url, {
        method: "POST",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "message": "Successfully logged out."
    }

### Request

POST `api/v1/auth/logout`

## Get the authenticated User.

> Example request:

    curl -X GET \
        -G "/api/v1/auth/me" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/auth/me"
    );

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

    fetch(url, {
        method: "GET",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "id": 1,
        "uuid": "f62b88c6-36a4-4fbf-b7f3-03a62749ddd7",
        "first_name": "Viral",
        "last_name": "Solani",
        "email": "admin@admin.com",
        "avatar_type": "gravatar",
        "avatar_location": null,
        "password_changed_at": null,
        "active": true,
        "confirmation_code": "0ad265176572464826b6a61aaf98c4e0",
        "confirmed": true,
        "timezone": "America\/New_York",
        "last_login_at": "2020-07-07 14:46:43",
        "last_login_ip": "127.0.0.1",
        "to_be_logged_out": false,
        "status": 1,
        "created_by": 1,
        "updated_by": null,
        "is_term_accept": 0,
        "created_at": "2020-07-06 13:54:13",
        "updated_at": "2020-07-07 14:46:43",
        "deleted_at": null,
        "full_name": "Viral Solani"
    }

### Request

GET `api/v1/auth/me`

# Blog Categories Management

Class BlogCategoriesController

APIs for Blog Categories Management

## Get all Blog Categories

requires authentication

This endpoint provides a paginated list of all blog categories. You can customize how many records you want in each returned response as well as sort records based on a key in specific order.

> Example request:

    curl -X GET \
        -G "/api/v1/blog-categories?page=12&per_page=20&order_by=created_at&order=asc" \
        -H "Authorization: Bearer d16cZ5hvD8ba43P6eagEVkf" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/blog-categories"
    );

    let params = {
        "page": "12",
        "per_page": "20",
        "order_by": "created_at",
        "order": "asc",
    };
    Object.keys(params)
        .forEach(key => url.searchParams.append(key, params[key]));

    let headers = {
        "Authorization": "Bearer d16cZ5hvD8ba43P6eagEVkf",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, API token not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": [
            {
                "id": 9,
                "name": "ipsum reiciendis ut",
                "status": false,
                "display_status": "InActive",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 10,
                "name": "possimus et omnis",
                "status": true,
                "display_status": "Active",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 1,
                "name": "harum quas vel",
                "status": false,
                "display_status": "InActive",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 8,
                "name": "sunt ducimus recusandae",
                "status": false,
                "display_status": "InActive",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 7,
                "name": "aut voluptates veritatis",
                "status": false,
                "display_status": "InActive",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 6,
                "name": "fugit impedit quia",
                "status": true,
                "display_status": "Active",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 5,
                "name": "et et in",
                "status": true,
                "display_status": "Active",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 4,
                "name": "sapiente hic ad",
                "status": true,
                "display_status": "Active",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 3,
                "name": "ut rerum voluptate",
                "status": false,
                "display_status": "InActive",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 2,
                "name": "quia ut optio",
                "status": true,
                "display_status": "Active",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            }
        ],
        "links": {
            "first": "http:\/\/laravel-starter.local\/\/api\/v1\/blog-categories?page=1",
            "last": "http:\/\/laravel-starter.local\/\/api\/v1\/blog-categories?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "path": "http:\/\/laravel-starter.local\/\/api\/v1\/blog-categories",
            "per_page": 20,
            "to": 10,
            "total": 10
        }
    }

### Request

GET `api/v1/blog-categories`

#### Query Parameters

`page` optional
Which page to show.

`per_page` optional
Number of records per page. (use -1 to retrieve all)

`order_by` optional
Order by database column.

`order` optional
Order direction ascending (asc) or descending (desc).

## Create a new Blog Category

requires authentication

This endpoint lets you create new Blog Category

> Example request:

    curl -X POST \
        "/api/v1/blog-categories" \
        -H "Authorization: Bearer aD6E8d3g1baek64c5fZVhvP" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"name":"Software","status":true}'

    const url = new URL(
        "/api/v1/blog-categories"
    );

    let headers = {
        "Authorization": "Bearer aD6E8d3g1baek64c5fZVhvP",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "name": "Software",
        "status": true
    }

    fetch(url, {
        method: "POST",
        headers: headers,
        body: body
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, API token not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (201):

    {
        "data": {
            "id": 1,
            "name": "ipsum reiciendis ut",
            "status": false,
            "display_status": "InActive",
            "created_at": "2020-10-15 10:35:08",
            "created_by": "Gaylord Grimes",
            "updated_at": "2020-10-15 10:35:08",
            "updated_by": null
        }
    }

### Request

POST `api/v1/blog-categories`

#### Body Parameters

`name` string
Name of the category.

`status` boolean optional
Status of the category.

## Gives a specific Blog Category

requires authentication

This endpoint provides you a single Blog Category The Blog Category is identified based on the ID provided as url parameter.

> Example request:

    curl -X GET \
        -G "/api/v1/blog-categories/1" \
        -H "Authorization: Bearer D36keP1cVfbda54haEgZv86" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/blog-categories/1"
    );

    let headers = {
        "Authorization": "Bearer D36keP1cVfbda54haEgZv86",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, API token not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": {
            "id": 1,
            "name": "ipsum reiciendis ut",
            "status": false,
            "display_status": "InActive",
            "created_at": "2020-10-15 10:35:08",
            "created_by": "Gaylord Grimes",
            "updated_at": "2020-10-15 10:35:08",
            "updated_by": null
        }
    }

### Request

GET `api/v1/blog-categories/{blog_category}`

#### URL Parameters

`id`
The ID of the Blog Category

## Update Blog Category

requires authentication

This endpoint allows you to update existing Blog Category with new data. The Blog Category to be updated is identified based on the ID provided as url parameter.

> Example request:

    curl -X PUT \
        "/api/v1/blog-categories/1" \
        -H "Authorization: Bearer vEba3D86ce46PZakd5f1gVh" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"name":"Software","status":true}'

    const url = new URL(
        "/api/v1/blog-categories/1"
    );

    let headers = {
        "Authorization": "Bearer vEba3D86ce46PZakd5f1gVh",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "name": "Software",
        "status": true
    }

    fetch(url, {
        method: "PUT",
        headers: headers,
        body: body
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, API token not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": {
            "id": 1,
            "name": "ipsum reiciendis ut",
            "status": true,
            "display_status": "Active",
            "created_at": "2020-10-15 10:35:08",
            "created_by": "Gaylord Grimes",
            "updated_at": "2020-10-15 10:38:02",
            "updated_by": null
        }
    }

### Request

PUT `api/v1/blog-categories/{blog_category}`

PATCH `api/v1/blog-categories/{blog_category}`

#### URL Parameters

`id`
The ID of the Blog Category

#### Body Parameters

`name` string
Name of the category.

`status` boolean optional
Status of the category.

## Delete Blog Category

requires authentication

This endpoint allows you to delete a Blog Category The Blog Category to be deleted is identified based on the ID provided as url parameter.

> Example request:

    curl -X DELETE \
        "/api/v1/blog-categories/1" \
        -H "Authorization: Bearer a64P5E6cdbfkaDV13Zgh8ve" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/blog-categories/1"
    );

    let headers = {
        "Authorization": "Bearer a64P5E6cdbfkaDV13Zgh8ve",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, API token not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (204, When the record is deleted):

    <Empty response>

### Request

DELETE `api/v1/blog-categories/{blog_category}`

#### URL Parameters

`id`
The ID of the Blog Category

# Blog Management

Class BlogsController

APIs for Blog Management

## Get all Blogs

requires authentication

This endpoint provides a paginated list of all blogs. You can customize how many records you want in each returned response as well as sort records based on a key in specific order.

> Example request:

    curl -X GET \
        -G "/api/v1/blogs?page=12&per_page=20&order_by=created_at&order=asc" \
        -H "Authorization: Bearer Zga3b51D6EkaPf4eh6v8cVd" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/blogs"
    );

    let params = {
        "page": "12",
        "per_page": "20",
        "order_by": "created_at",
        "order": "asc",
    };
    Object.keys(params)
        .forEach(key => url.searchParams.append(key, params[key]));

    let headers = {
        "Authorization": "Bearer Zga3b51D6EkaPf4eh6v8cVd",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": [
            {
                "id": 16,
                "name": "Chantale Pope Abc",
                "publish_datetime": "23\/10\/2020 12:53 PM",
                "content": "<p>Et est, perferendis .<\/p>",
                "meta_title": "Hic vero eius expedi",
                "cannonical_link": "https:\/\/www.google.com",
                "meta_keywords": "Qui aspernatur velit",
                "meta_description": "<p>Quae lorem rem in ea.<\/p>",
                "status": 2,
                "display_status": "Draft",
                "categories": [
                    {
                        "id": 2,
                        "name": "quia ut optio",
                        "status": true,
                        "display_status": "Active",
                        "created_at": "2020-10-15 10:35:08",
                        "created_by": "Gaylord Grimes",
                        "updated_at": "2020-10-15 10:35:08",
                        "updated_by": null
                    },
                    {
                        "id": 6,
                        "name": "fugit impedit quia",
                        "status": true,
                        "display_status": "Active",
                        "created_at": "2020-10-15 10:35:08",
                        "created_by": "Gaylord Grimes",
                        "updated_at": "2020-10-15 10:35:08",
                        "updated_by": null
                    }
                ],
                "tags": [
                    {
                        "id": 2,
                        "name": "sed",
                        "status": true,
                        "display_status": "Active",
                        "created_at": "2020-10-15 10:35:08",
                        "created_by": "Gaylord Grimes",
                        "updated_at": "2020-10-15 10:35:08",
                        "updated_by": null
                    }
                ],
                "created_at": "2020-10-16",
                "created_by": "Alan Whitmore",
                "updated_at": "2020-10-16 07:42:41",
                "updated_by": "Alan Whitmore"
            }
        ],
        "links": {
            "first": "http:\/\/laravel-starter.local\/\/api\/v1\/blogs?page=1",
            "last": "http:\/\/laravel-starter.local\/\/api\/v1\/blogs?page=15",
            "prev": null,
            "next": "http:\/\/laravel-starter.local\/\/api\/v1\/blogs?page=2"
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 15,
            "path": "http:\/\/laravel-starter.local\/\/api\/v1\/blogs",
            "per_page": 1,
            "to": 1,
            "total": 15
        }
    }

### Request

GET `api/v1/blogs`

#### Query Parameters

`page` optional
Which page to show.

`per_page` optional
Number of records per page. (use -1 to retrieve all)

`order_by` optional
Order by database column.

`order` optional
Order direction ascending (asc) or descending (desc).

## Create a new Blog

requires authentication

This endpoint lets you create new Blog

> Example request:

    curl -X POST \
        "/api/v1/blogs" \
        -H "Authorization: Bearer 1Va38DZeakEc6db65hg4Pfv" \
        -H "Content-Type: multipart/form-data" \
        -H "Accept: application/json" \
        -F "name=a" \
        -F "publish_datetime=2020-10-19T10:21:17+0000" \
        -F "content=pariatur" \
        -F "categories[]=veritatis" \
        -F "tags[]=voluptates" \
        -F "status=14" \
        -F "meta_title=reprehenderit" \
        -F "cannonical_link=http://oberbrunner.com/odio-inventore-ea-qui-nihil-est-unde" \
        -F "meta_keywords=illum" \
        -F "meta_description=culpa" \
        -F "featured_image=@/tmp/phplFpFJg"

    const url = new URL(
        "/api/v1/blogs"
    );

    let headers = {
        "Authorization": "Bearer 1Va38DZeakEc6db65hg4Pfv",
        "Content-Type": "multipart/form-data",
        "Accept": "application/json",
    };

    const body = new FormData();
    body.append('name', 'a');
    body.append('publish_datetime', '2020-10-19T10:21:17+0000');
    body.append('content', 'pariatur');
    body.append('categories[]', 'veritatis');
    body.append('tags[]', 'voluptates');
    body.append('status', '14');
    body.append('meta_title', 'reprehenderit');
    body.append('cannonical_link', 'http://oberbrunner.com/odio-inventore-ea-qui-nihil-est-unde');
    body.append('meta_keywords', 'illum');
    body.append('meta_description', 'culpa');
    body.append('featured_image', document.querySelector('input[name="featured_image"]').files[0]);

    fetch(url, {
        method: "POST",
        headers: headers,
        body: body
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (201):

    {
        "data": {
            "id": 16,
            "name": "Chantale Pope Abc",
            "publish_datetime": "23\/10\/2020 12:53 PM",
            "content": "<p>Et est, perferendis .<\/p>",
            "meta_title": "Hic vero eius expedi",
            "cannonical_link": "https:\/\/www.google.com",
            "meta_keywords": "Qui aspernatur velit",
            "meta_description": "<p>Quae lorem rem in ea.<\/p>",
            "status": 2,
            "display_status": "Draft",
            "categories": [
                {
                    "id": 2,
                    "name": "quia ut optio",
                    "status": true,
                    "display_status": "Active",
                    "created_at": "2020-10-15 10:35:08",
                    "created_by": "Gaylord Grimes",
                    "updated_at": "2020-10-15 10:35:08",
                    "updated_by": null
                },
                {
                    "id": 6,
                    "name": "fugit impedit quia",
                    "status": true,
                    "display_status": "Active",
                    "created_at": "2020-10-15 10:35:08",
                    "created_by": "Gaylord Grimes",
                    "updated_at": "2020-10-15 10:35:08",
                    "updated_by": null
                }
            ],
            "tags": [
                {
                    "id": 2,
                    "name": "sed",
                    "status": true,
                    "display_status": "Active",
                    "created_at": "2020-10-15 10:35:08",
                    "created_by": "Gaylord Grimes",
                    "updated_at": "2020-10-15 10:35:08",
                    "updated_by": null
                }
            ],
            "created_at": "2020-10-16",
            "created_by": "Alan Whitmore",
            "updated_at": "2020-10-16 07:42:41",
            "updated_by": "Alan Whitmore"
        }
    }

### Request

POST `api/v1/blogs`

#### Body Parameters

`name` string

`publish_datetime` string
The value must be a valid date.

`content` string

`categories` array

`tags` array

`status` integer optional

`meta_title` string optional

`cannonical_link` string optional
The value must be a valid URL.

`meta_keywords` string optional

`meta_description` string optional

`featured_image` file optional
The value must be an image.

`categories.*` string optional

`tags.*` string optional

## Gives a specific Blog

requires authentication

This endpoint provides you a single Blog The Blog is identified based on the ID provided as url parameter.

> Example request:

    curl -X GET \
        -G "/api/v1/blogs/1" \
        -H "Authorization: Bearer e6kdfv86aPg53EaD1cVhb4Z" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/blogs/1"
    );

    let headers = {
        "Authorization": "Bearer e6kdfv86aPg53EaD1cVhb4Z",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": {
            "id": 16,
            "name": "Chantale Pope Abc",
            "publish_datetime": "23\/10\/2020 12:53 PM",
            "content": "<p>Et est, perferendis .<\/p>",
            "meta_title": "Hic vero eius expedi",
            "cannonical_link": "https:\/\/www.google.com",
            "meta_keywords": "Qui aspernatur velit",
            "meta_description": "<p>Quae lorem rem in ea.<\/p>",
            "status": 2,
            "display_status": "Draft",
            "categories": [
                {
                    "id": 2,
                    "name": "quia ut optio",
                    "status": true,
                    "display_status": "Active",
                    "created_at": "2020-10-15 10:35:08",
                    "created_by": "Gaylord Grimes",
                    "updated_at": "2020-10-15 10:35:08",
                    "updated_by": null
                },
                {
                    "id": 6,
                    "name": "fugit impedit quia",
                    "status": true,
                    "display_status": "Active",
                    "created_at": "2020-10-15 10:35:08",
                    "created_by": "Gaylord Grimes",
                    "updated_at": "2020-10-15 10:35:08",
                    "updated_by": null
                }
            ],
            "tags": [
                {
                    "id": 2,
                    "name": "sed",
                    "status": true,
                    "display_status": "Active",
                    "created_at": "2020-10-15 10:35:08",
                    "created_by": "Gaylord Grimes",
                    "updated_at": "2020-10-15 10:35:08",
                    "updated_by": null
                }
            ],
            "created_at": "2020-10-16",
            "created_by": "Alan Whitmore",
            "updated_at": "2020-10-16 07:42:41",
            "updated_by": "Alan Whitmore"
        }
    }

### Request

GET `api/v1/blogs/{blog}`

#### URL Parameters

`id`
The ID of the Blog

## Update Blog

requires authentication

This endpoint allows you to update existing Blog with new data. The Blog to be updated is identified based on the ID provided as url parameter.

> Example request:

    curl -X PUT \
        "/api/v1/blogs/1" \
        -H "Authorization: Bearer 6vckV8fbheZ5E4PaD63ad1g" \
        -H "Content-Type: multipart/form-data" \
        -H "Accept: application/json" \
        -F "name=excepturi" \
        -F "publish_datetime=2020-10-19T10:21:17+0000" \
        -F "content=dolores" \
        -F "categories[]=atque" \
        -F "tags[]=ut" \
        -F "status=18" \
        -F "meta_title=sint" \
        -F "cannonical_link=http://armstrong.com/aut-quia-asperiores-doloribus-ipsum-quae-numquam-in-tenetur" \
        -F "meta_keywords=qui" \
        -F "meta_description=quisquam" \
        -F "featured_image=@/tmp/phpVrZBcA"

    const url = new URL(
        "/api/v1/blogs/1"
    );

    let headers = {
        "Authorization": "Bearer 6vckV8fbheZ5E4PaD63ad1g",
        "Content-Type": "multipart/form-data",
        "Accept": "application/json",
    };

    const body = new FormData();
    body.append('name', 'excepturi');
    body.append('publish_datetime', '2020-10-19T10:21:17+0000');
    body.append('content', 'dolores');
    body.append('categories[]', 'atque');
    body.append('tags[]', 'ut');
    body.append('status', '18');
    body.append('meta_title', 'sint');
    body.append('cannonical_link', 'http://armstrong.com/aut-quia-asperiores-doloribus-ipsum-quae-numquam-in-tenetur');
    body.append('meta_keywords', 'qui');
    body.append('meta_description', 'quisquam');
    body.append('featured_image', document.querySelector('input[name="featured_image"]').files[0]);

    fetch(url, {
        method: "PUT",
        headers: headers,
        body: body
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": {
            "id": 16,
            "name": "Chantale Pope Abc",
            "publish_datetime": "23\/10\/2020 12:53 PM",
            "content": "<p>Et est, perferendis .<\/p>",
            "meta_title": "Hic vero eius expedi",
            "cannonical_link": "https:\/\/www.google.com",
            "meta_keywords": "Qui aspernatur velit",
            "meta_description": "<p>Quae lorem rem in ea.<\/p>",
            "status": 2,
            "display_status": "Draft",
            "categories": [
                {
                    "id": 2,
                    "name": "quia ut optio",
                    "status": true,
                    "display_status": "Active",
                    "created_at": "2020-10-15 10:35:08",
                    "created_by": "Gaylord Grimes",
                    "updated_at": "2020-10-15 10:35:08",
                    "updated_by": null
                },
                {
                    "id": 6,
                    "name": "fugit impedit quia",
                    "status": true,
                    "display_status": "Active",
                    "created_at": "2020-10-15 10:35:08",
                    "created_by": "Gaylord Grimes",
                    "updated_at": "2020-10-15 10:35:08",
                    "updated_by": null
                }
            ],
            "tags": [
                {
                    "id": 2,
                    "name": "sed",
                    "status": true,
                    "display_status": "Active",
                    "created_at": "2020-10-15 10:35:08",
                    "created_by": "Gaylord Grimes",
                    "updated_at": "2020-10-15 10:35:08",
                    "updated_by": null
                }
            ],
            "created_at": "2020-10-16",
            "created_by": "Alan Whitmore",
            "updated_at": "2020-10-16 07:42:41",
            "updated_by": "Alan Whitmore"
        }
    }

### Request

PUT `api/v1/blogs/{blog}`

PATCH `api/v1/blogs/{blog}`

#### URL Parameters

`id`
The ID of the Blog

#### Body Parameters

`name` string

`publish_datetime` string
The value must be a valid date.

`content` string

`categories` array

`tags` array

`status` integer optional

`meta_title` string optional

`cannonical_link` string optional
The value must be a valid URL.

`meta_keywords` string optional

`meta_description` string optional

`featured_image` file optional
The value must be an image.

`categories.*` string optional

`tags.*` string optional

## Delete Blog

requires authentication

This endpoint allows you to delete a Blog The Blog to be deleted is identified based on the ID provided as url parameter.

> Example request:

    curl -X DELETE \
        "/api/v1/blogs/1" \
        -H "Authorization: Bearer bVe5c3hPkd8gD6aaZ64vEf1" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/blogs/1"
    );

    let headers = {
        "Authorization": "Bearer bVe5c3hPkd8gD6aaZ64vEf1",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (204, When the record is deleted):

    <Empty response>

### Request

DELETE `api/v1/blogs/{blog}`

#### URL Parameters

`id`
The ID of the Blog

# Blog Tag Management

Class BlogTagsController

APIs for Blog Tag Management

## Get all Blog Tags

requires authentication

This endpoint provides a paginated list of all blog tags. You can customize how many records you want in each returned response as well as sort records based on a key in specific order.

> Example request:

    curl -X GET \
        -G "/api/v1/blog-tags?page=12&per_page=20&order_by=created_at&order=asc" \
        -H "Authorization: Bearer V5Ea6D8f63Pghda4vceZbk1" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/blog-tags"
    );

    let params = {
        "page": "12",
        "per_page": "20",
        "order_by": "created_at",
        "order": "asc",
    };
    Object.keys(params)
        .forEach(key => url.searchParams.append(key, params[key]));

    let headers = {
        "Authorization": "Bearer V5Ea6D8f63Pghda4vceZbk1",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": [
            {
                "id": 10,
                "name": "aut",
                "status": false,
                "display_status": "InActive",
                "created_at": "2020-10-15 10:35:09",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:09",
                "updated_by": null
            },
            {
                "id": 1,
                "name": "totam",
                "status": true,
                "display_status": "Active",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 2,
                "name": "sed",
                "status": true,
                "display_status": "Active",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 3,
                "name": "consequuntur",
                "status": false,
                "display_status": "InActive",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 4,
                "name": "vero",
                "status": false,
                "display_status": "InActive",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 5,
                "name": "consequatur",
                "status": false,
                "display_status": "InActive",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 6,
                "name": "non",
                "status": false,
                "display_status": "InActive",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 7,
                "name": "saepe",
                "status": true,
                "display_status": "Active",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 8,
                "name": "veritatis",
                "status": false,
                "display_status": "InActive",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            },
            {
                "id": 9,
                "name": "in",
                "status": true,
                "display_status": "Active",
                "created_at": "2020-10-15 10:35:08",
                "created_by": "Gaylord Grimes",
                "updated_at": "2020-10-15 10:35:08",
                "updated_by": null
            }
        ],
        "links": {
            "first": "http:\/\/laravel-starter.local\/\/api\/v1\/blog-tags?page=1",
            "last": "http:\/\/laravel-starter.local\/\/api\/v1\/blog-tags?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 1,
            "path": "http:\/\/laravel-starter.local\/\/api\/v1\/blog-tags",
            "per_page": 20,
            "to": 10,
            "total": 10
        }
    }

### Request

GET `api/v1/blog-tags`

#### Query Parameters

`page` optional
Which page to show.

`per_page` optional
Number of records per page. (use -1 to retrieve all)

`order_by` optional
Order by database column.

`order` optional
Order direction ascending (asc) or descending (desc).

## Create a new Blog Tag

requires authentication

This endpoint lets you create new Blog Tag

> Example request:

    curl -X POST \
        "/api/v1/blog-tags" \
        -H "Authorization: Bearer 8dDaZkPvc1g3be5Vf4h66Ea" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"name":"Software","status":true}'

    const url = new URL(
        "/api/v1/blog-tags"
    );

    let headers = {
        "Authorization": "Bearer 8dDaZkPvc1g3be5Vf4h66Ea",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "name": "Software",
        "status": true
    }

    fetch(url, {
        method: "POST",
        headers: headers,
        body: body
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": {
            "id": 10,
            "name": "aut",
            "status": false,
            "display_status": "InActive",
            "created_at": "2020-10-15 10:35:09",
            "created_by": "Gaylord Grimes",
            "updated_at": "2020-10-15 10:35:09",
            "updated_by": null
        }
    }

### Request

POST `api/v1/blog-tags`

#### Body Parameters

`name` string
Name of the tag.

`status` boolean optional
Status of the tag.

## Gives a specific Blog Tag

requires authentication

This endpoint provides you a single Blog Tag The Blog Tag is identified based on the ID provided as url parameter.

> Example request:

    curl -X GET \
        -G "/api/v1/blog-tags/1" \
        -H "Authorization: Bearer 6Ev6D14h3gd8aVckbf5aPeZ" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/blog-tags/1"
    );

    let headers = {
        "Authorization": "Bearer 6Ev6D14h3gd8aVckbf5aPeZ",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, API token not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": {
            "id": 10,
            "name": "aut",
            "status": false,
            "display_status": "InActive",
            "created_at": "2020-10-15 10:35:09",
            "created_by": "Gaylord Grimes",
            "updated_at": "2020-10-15 10:35:09",
            "updated_by": null
        }
    }

### Request

GET `api/v1/blog-tags/{blog_tag}`

#### URL Parameters

`id`
The ID of the Blog Tag

## Update Blog Tag

requires authentication

This endpoint allows you to update existing Blog Tag with new data. The Blog Tag to be updated is identified based on the ID provided as url parameter.

> Example request:

    curl -X PUT \
        "/api/v1/blog-tags/1" \
        -H "Authorization: Bearer e4v1ha63k5PEafcbd8ZVgD6" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"name":"Software","status":true}'

    const url = new URL(
        "/api/v1/blog-tags/1"
    );

    let headers = {
        "Authorization": "Bearer e4v1ha63k5PEafcbd8ZVgD6",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "name": "Software",
        "status": true
    }

    fetch(url, {
        method: "PUT",
        headers: headers,
        body: body
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": {
            "id": 10,
            "name": "aut",
            "status": false,
            "display_status": "InActive",
            "created_at": "2020-10-15 10:35:09",
            "created_by": "Gaylord Grimes",
            "updated_at": "2020-10-19 12:03:22",
            "updated_by": "Gaylord Grimes"
        }
    }

### Request

PUT `api/v1/blog-tags/{blog_tag}`

PATCH `api/v1/blog-tags/{blog_tag}`

#### URL Parameters

`id`
The ID of the Blog Tag

#### Body Parameters

`name` string
Name of the tag.

`status` boolean optional
Status of the tag.

## Delete Blog Tag

requires authentication

This endpoint allows you to delete a Blog Tag The Blog Tag to be deleted is identified based on the ID provided as url parameter.

> Example request:

    curl -X DELETE \
        "/api/v1/blog-tags/1" \
        -H "Authorization: Bearer 6EP4vVZc8bah1adekD6g5f3" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/blog-tags/1"
    );

    let headers = {
        "Authorization": "Bearer 6EP4vVZc8bah1adekD6g5f3",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (204, When the record is deleted):

    <Empty response>

### Request

DELETE `api/v1/blog-tags/{blog_tag}`

#### URL Parameters

`id`
The ID of the Blog Tag

# Faq Management

Class FaqsController

APIs for Faq Management

## Get all Faq

requires authentication

This endpoint provides a paginated list of all faqs. You can customize how many records you want in each returned response as well as sort records based on a key in specific order.

> Example request:

    curl -X GET \
        -G "/api/v1/faqs?page=12&per_page=20&order_by=created_at&order=asc" \
        -H "Authorization: Bearer PE6cZ8DdkhV1e6vabg534fa" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/faqs"
    );

    let params = {
        "page": "12",
        "per_page": "20",
        "order_by": "created_at",
        "order": "asc",
    };
    Object.keys(params)
        .forEach(key => url.searchParams.append(key, params[key]));

    let headers = {
        "Authorization": "Bearer PE6cZ8DdkhV1e6vabg534fa",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": [
            {
                "id": 1,
                "question": "Rerum ipsa asperiores animi voluptatem provident odio aut.",
                "answer": "Minima eveniet mollitia quis aut quo molestiae. Voluptatem et debitis laborum et delectus consequuntur enim quidem. Occaecati sit voluptate delectus aut et laudantium. Ut deleniti esse quia repudiandae ut omnis.",
                "status": 1,
                "display_status": "Active",
                "created_at": "2020-10-15 10:35:08",
                "updated_at": "2020-10-15 10:35:08"
            }
        ],
        "links": {
            "first": "http:\/\/laravel-starter.local\/\/api\/v1\/faqs?page=1",
            "last": "http:\/\/laravel-starter.local\/\/api\/v1\/faqs?page=10",
            "prev": null,
            "next": "http:\/\/laravel-starter.local\/\/api\/v1\/faqs?page=2"
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 10,
            "path": "http:\/\/laravel-starter.local\/\/api\/v1\/faqs",
            "per_page": 1,
            "to": 1,
            "total": 10
        }
    }

### Request

GET `api/v1/faqs`

#### Query Parameters

`page` optional
Which page to show.

`per_page` optional
Number of records per page. (use -1 to retrieve all)

`order_by` optional
Order by database column.

`order` optional
Order direction ascending (asc) or descending (desc).

## Create a new Faq

requires authentication

This endpoint lets you create new Faq

> Example request:

    curl -X POST \
        "/api/v1/faqs" \
        -H "Authorization: Bearer 6V5fZhvD146gba3Eedk8acP" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"question":"cumque","answer":"eligendi","status":false}'

    const url = new URL(
        "/api/v1/faqs"
    );

    let headers = {
        "Authorization": "Bearer 6V5fZhvD146gba3Eedk8acP",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "question": "cumque",
        "answer": "eligendi",
        "status": false
    }

    fetch(url, {
        method: "POST",
        headers: headers,
        body: body
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (201):

    {
        "data": {
            "id": 1,
            "question": "Rerum ipsa asperiores animi voluptatem provident odio aut.",
            "answer": "Minima eveniet mollitia quis aut quo molestiae. Voluptatem et debitis laborum et delectus consequuntur enim quidem. Occaecati sit voluptate delectus aut et laudantium. Ut deleniti esse quia repudiandae ut omnis.",
            "status": 1,
            "display_status": "Active",
            "created_at": "2020-10-15 10:35:08",
            "updated_at": "2020-10-15 10:35:08"
        }
    }

### Request

POST `api/v1/faqs`

#### Body Parameters

`question` string

`answer` string

`status` boolean optional

## Gives a specific Faq

requires authentication

This endpoint provides you a single Faq The Faq is identified based on the ID provided as url parameter.

> Example request:

    curl -X GET \
        -G "/api/v1/faqs/1" \
        -H "Authorization: Bearer PD5a8agEefv6ck63bZ1V4dh" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/faqs/1"
    );

    let headers = {
        "Authorization": "Bearer PD5a8agEefv6ck63bZ1V4dh",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": {
            "id": 1,
            "question": "Rerum ipsa asperiores animi voluptatem provident odio aut.",
            "answer": "Minima eveniet mollitia quis aut quo molestiae. Voluptatem et debitis laborum et delectus consequuntur enim quidem. Occaecati sit voluptate delectus aut et laudantium. Ut deleniti esse quia repudiandae ut omnis.",
            "status": 1,
            "display_status": "Active",
            "created_at": "2020-10-15 10:35:08",
            "updated_at": "2020-10-15 10:35:08"
        }
    }

### Request

GET `api/v1/faqs/{faq}`

#### URL Parameters

`id`
The ID of the Faq

## Update Faq

requires authentication

This endpoint allows you to update existing Faq with new data. The Faq to be updated is identified based on the ID provided as url parameter.

> Example request:

    curl -X PUT \
        "/api/v1/faqs/1" \
        -H "Authorization: Bearer bdD51f83a6vV6hZegc4kaPE" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"question":"nobis","answer":"laudantium","status":false}'

    const url = new URL(
        "/api/v1/faqs/1"
    );

    let headers = {
        "Authorization": "Bearer bdD51f83a6vV6hZegc4kaPE",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "question": "nobis",
        "answer": "laudantium",
        "status": false
    }

    fetch(url, {
        method: "PUT",
        headers: headers,
        body: body
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": {
            "id": 1,
            "question": "Rerum ipsa asperiores animi voluptatem provident odio aut.",
            "answer": "Minima eveniet mollitia quis aut quo molestiae. Voluptatem et debitis laborum et delectus consequuntur enim quidem. Occaecati sit voluptate delectus aut et laudantium. Ut deleniti esse quia repudiandae ut omnis.",
            "status": 1,
            "display_status": "Active",
            "created_at": "2020-10-15 10:35:08",
            "updated_at": "2020-10-15 10:35:08"
        }
    }

### Request

PUT `api/v1/faqs/{faq}`

PATCH `api/v1/faqs/{faq}`

#### URL Parameters

`id`
The ID of the Faq

#### Body Parameters

`question` string

`answer` string

`status` boolean optional

## Delete Faq

requires authentication

This endpoint allows you to delete a Faq The Faq to be deleted is identified based on the ID provided as url parameter.

> Example request:

    curl -X DELETE \
        "/api/v1/faqs/1" \
        -H "Authorization: Bearer aVDg843cP1dakZhev56fE6b" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/faqs/1"
    );

    let headers = {
        "Authorization": "Bearer aVDg843cP1dakZhev56fE6b",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (204, When the record is deleted):

    <Empty response>

### Request

DELETE `api/v1/faqs/{faq}`

#### URL Parameters

`id`
The ID of the Faq

# Pages Management

Class PagesController

APIs for Pages Management

## Get all Pages

requires authentication

This endpoint provides a paginated list of all pages. You can customize how many records you want in each returned response as well as sort records based on a key in specific order.

> Example request:

    curl -X GET \
        -G "/api/v1/pages?page=12&per_page=20&order_by=created_at&order=asc" \
        -H "Authorization: Bearer 6PD18Ekb36V5c4gdeZavhaf" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/pages"
    );

    let params = {
        "page": "12",
        "per_page": "20",
        "order_by": "created_at",
        "order": "asc",
    };
    Object.keys(params)
        .forEach(key => url.searchParams.append(key, params[key]));

    let headers = {
        "Authorization": "Bearer 6PD18Ekb36V5c4gdeZavhaf",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": [
            {
                "id": 11,
                "title": "Faith Yates",
                "description": "<p>Proident, qui pariat.<\/p>",
                "status_label": "<label class='label label-success'>Active<\/label>",
                "status": true,
                "display_status": "Active",
                "created_at": "2020-10-16 08:31:19",
                "updated_at": "2020-10-16 08:31:40",
                "created_by": "Alan Whitmore",
                "updated_by": "Alan Whitmore"
            }
        ],
        "links": {
            "first": "http:\/\/laravel-starter.local\/\/api\/v1\/pages?page=1",
            "last": "http:\/\/laravel-starter.local\/\/api\/v1\/pages?page=11",
            "prev": null,
            "next": "http:\/\/laravel-starter.local\/\/api\/v1\/pages?page=2"
        },
        "meta": {
            "current_page": 1,
            "from": 1,
            "last_page": 11,
            "path": "http:\/\/laravel-starter.local\/\/api\/v1\/pages",
            "per_page": 1,
            "to": 1,
            "total": 11
        }
    }

### Request

GET `api/v1/pages`

#### Query Parameters

`page` optional
Which page to show.

`per_page` optional
Number of records per page. (use -1 to retrieve all)

`order_by` optional
Order by database column.

`order` optional
Order direction ascending (asc) or descending (desc).

## Create a new Page

requires authentication

This endpoint lets you create new Page

> Example request:

    curl -X POST \
        "/api/v1/pages" \
        -H "Authorization: Bearer Vdaf6hbePDcg65Eka31Zv48" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"title":"rerum","description":"sunt","status":false,"cannonical_link":"http:\/\/www.hilpert.com\/enim-molestias-placeat-ab-reiciendis-veritatis-voluptas","seo_title":"aperiam","seo_keyword":"vel","seo_description":"qui"}'

    const url = new URL(
        "/api/v1/pages"
    );

    let headers = {
        "Authorization": "Bearer Vdaf6hbePDcg65Eka31Zv48",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "title": "rerum",
        "description": "sunt",
        "status": false,
        "cannonical_link": "http:\/\/www.hilpert.com\/enim-molestias-placeat-ab-reiciendis-veritatis-voluptas",
        "seo_title": "aperiam",
        "seo_keyword": "vel",
        "seo_description": "qui"
    }

    fetch(url, {
        method: "POST",
        headers: headers,
        body: body
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (201):

    {
        "data": {
            "id": 11,
            "title": "Faith Yates",
            "description": "<p>Proident, qui pariat.<\/p>",
            "status_label": "<label class='label label-success'>Active<\/label>",
            "status": true,
            "display_status": "Active",
            "created_at": "2020-10-16 08:31:19",
            "updated_at": "2020-10-16 08:31:40",
            "created_by": "Alan Whitmore",
            "updated_by": "Alan Whitmore"
        }
    }

### Request

POST `api/v1/pages`

#### Body Parameters

`title` string

`description` string

`status` boolean optional

`cannonical_link` string optional
The value must be a valid URL.

`seo_title` string optional

`seo_keyword` string optional

`seo_description` string optional

## Gives a specific Page

requires authentication

This endpoint provides you a single Page The Page is identified based on the ID provided as url parameter.

> Example request:

    curl -X GET \
        -G "/api/v1/pages/1" \
        -H "Authorization: Bearer 6dca6hDZ48P35vb1egfkEaV" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/pages/1"
    );

    let headers = {
        "Authorization": "Bearer 6dca6hDZ48P35vb1egfkEaV",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "GET",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": {
            "id": 11,
            "title": "Faith Yates",
            "description": "<p>Proident, qui pariat.<\/p>",
            "status_label": "<label class='label label-success'>Active<\/label>",
            "status": true,
            "display_status": "Active",
            "created_at": "2020-10-16 08:31:19",
            "updated_at": "2020-10-16 08:31:40",
            "created_by": "Alan Whitmore",
            "updated_by": "Alan Whitmore"
        }
    }

### Request

GET `api/v1/pages/{page}`

#### URL Parameters

`id`
The ID of the Page

## Update Page

requires authentication

This endpoint allows you to update existing Page with new data. The Page to be updated is identified based on the ID provided as url parameter.

> Example request:

    curl -X PUT \
        "/api/v1/pages/1" \
        -H "Authorization: Bearer 3cfakVb8dgP16hEDa546eZv" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"title":"tempora","description":"in","status":false,"cannonical_link":"http:\/\/schuster.com\/","seo_title":"inventore","seo_keyword":"veniam","seo_description":"a"}'

    const url = new URL(
        "/api/v1/pages/1"
    );

    let headers = {
        "Authorization": "Bearer 3cfakVb8dgP16hEDa546eZv",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    let body = {
        "title": "tempora",
        "description": "in",
        "status": false,
        "cannonical_link": "http:\/\/schuster.com\/",
        "seo_title": "inventore",
        "seo_keyword": "veniam",
        "seo_description": "a"
    }

    fetch(url, {
        method: "PUT",
        headers: headers,
        body: body
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (200):

    {
        "data": {
            "id": 11,
            "title": "Faith Yates",
            "description": "<p>Proident, qui pariat.<\/p>",
            "status_label": "<label class='label label-success'>Active<\/label>",
            "status": true,
            "display_status": "Active",
            "created_at": "2020-10-16 08:31:19",
            "updated_at": "2020-10-16 08:31:40",
            "created_by": "Alan Whitmore",
            "updated_by": "Alan Whitmore"
        }
    }

### Request

PUT `api/v1/pages/{page}`

PATCH `api/v1/pages/{page}`

#### URL Parameters

`id`
The ID of the Page

#### Body Parameters

`title` string

`description` string

`status` boolean optional

`cannonical_link` string optional
The value must be a valid URL.

`seo_title` string optional

`seo_keyword` string optional

`seo_description` string optional

## Delete Page

requires authentication

This endpoint allows you to delete a Page The Page to be deleted is identified based on the ID provided as url parameter.

> Example request:

    curl -X DELETE \
        "/api/v1/pages/1" \
        -H "Authorization: Bearer 45ac6e3kEVfhDPa81dZvg6b" \
        -H "Content-Type: application/json" \
        -H "Accept: application/json"

    const url = new URL(
        "/api/v1/pages/1"
    );

    let headers = {
        "Authorization": "Bearer 45ac6e3kEVfhDPa81dZvg6b",
        "Content-Type": "application/json",
        "Accept": "application/json",
    };

    fetch(url, {
        method: "DELETE",
        headers: headers,
    })
        .then(response => response.json())
        .then(json => console.log(json));

> Example response (401, api_key not provided):

    {
        "error": {
            "message": "Unauthenticated.",
            "status_code": 401
        }
    }

> Example response (204, When the record is deleted):

    <Empty response>

### Request

DELETE `api/v1/pages/{page}`

#### URL Parameters

`id`
The ID of the Page

bash javascript