Developer documentation
API v1 · CMS v13.0.0
SmartEnd CMS / Developer guide

API Reference

Access website content and accept newsletter subscriptions, comments, orders, and contact messages through the SmartEnd REST API.

28 endpointsGET & POSTVersion 1

At a glance

Base URL

https://YOUR_WEBSITE_URL/api/v1

Read content

GET endpoints return website and topic data.

Submit data

POST endpoints require your API key.

Getting started

Enable the API from your SmartEnd Admin Dashboard and copy the generated key.

  1. Open Webmaster → General Settings.
  2. In RESTful API, find RESTful API status.
  3. Set it to Active to reveal your API_key.
  4. Use the link under the key if you need to generate a new one.
Authentication: Include api_key in the POST data for comments, messages, orders, and subscriptions. Keep the key private.

Endpoints

Website

/api/v1/website/status

GET

Get the status of the website and the html message in case of closed.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/website/status

URL Params

-

Success Response

{
    "msg": "Website Status details",
    "details": {
        "status": 1,
        "close_msg": ""
    }
}
Response Status Code : 200

"status"
0 = Closed, 1= active

"close_msg"
html message in case of "status" is 0

Error Response

-
Back to top ↑
Website

/api/v1/website/info

GET

Get the information of the website.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/website/info

URL Params

/Lang_code to the end of URL
Examples:
/api/v1/website/info
/api/v1/website/info/en
/api/v1/website/info/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "Main information about the Website",
    "details": {
        "site_url": "http://website_url",
        "site_title": "Website title",
        "site_desc": "Website description",
        "site_keywords": "key, words, website, web",
        "site_webmails": "support@smartfordesign.com"
    }
}
Response Status Code : 200

Error Response

-
Back to top ↑
Website

/api/v1/website/contacts

GET

Get the contacts information of the website.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/website/contacts

URL Params

/Lang_code to the end of URL
Examples:
/api/v1/website/contacts
/api/v1/website/contacts/en
/api/v1/website/contacts/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "List of Contacts Details",
    "details": {
        "address": "Building, Street name, City, Country",
        "phone": "+(00) 0123456789",
        "fax": "+(00) 0123456789",
        "mobile": "+(00) 0123456789",
        "email": "info@sitename.com",
        "working_time": "Sunday to Thursday 08:00 AM to 05:00 PM"
    }
}
Response Status Code : 200

Error Response

-
Back to top ↑
Website

/api/v1/website/style

GET

Get the Style Settings of the website.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/website/style

URL Params

/Lang_code to the end of URL
Examples:
/api/v1/website/style
/api/v1/website/style/en
/api/v1/website/style/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "List of Style Settings",
    "details": {
        "logo": "http://file_url",
        "fav_icon": "http://file_url",
        "apple_icon": "http://file_url",
        "style_color_1": "#0cbaa4",
        "style_color_2": "#2e3e4e",
        "layout_mode": 0,
        "bg_type": 0,
        "bg_pattern": null,
        "bg_color": "#2e3e4e",
        "bg_image": null,
        "footer_style": 1,
        "footer_bg": null,
        "newsletter_subscribe_status": 1,
        "preload_status": 0
    }
}
Response Status Code : 200

"layout_mode"
0 = Wide, 1 = boxed

"bg_type"
0 = color, 1 = Pattern, 2 = Image

"footer_style"
0 = Footer Style #1,
1 = Footer Style #2

"newsletter_subscribe_status"
0 = disabled, 1 = active

"preload_status"
0 = disabled, 1 = active

Error Response

-
Back to top ↑
Website

/api/v1/website/social

GET

Get the social links of the website.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/website/social

URL Params

-

Success Response

{
    "msg": "List of Social Networks Links",
    "details": {
        "facebook": "#",
        "twitter": "#",
        "google": "#",
        "linkedin": "#",
        "youtube": "#",
        "instagram": "#",
        "pinterest": "#",
        "tumblr": "#",
        "flickr": "#",
        "whatsapp": "#"
    }
}
Response Status Code : 200

Error Response

-
Back to top ↑
Website

/api/v1/website/settings

GET

Get the general website settings.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/website/settings

URL Params

-

Success Response

{
    "msg": "General Website Settings",
    "details": {
        "new_comments_status": 1,
        "allow_register_status": 0,
        "register_permission_group": 3,
        "contact_text_page_id": 2,
        "header_menu_id": 1,
        "footer_menu_id": 2,
        "latest_news_section_id": 3,
        "newsletter_contacts_group": 1,
        "home_content1_section_id": 7,
        "home_content2_section_id": 4,
        "home_content3_section_id": 9,
        "home_banners_section_id": 1,
        "home_text_banners_section_id": 2,
        "side_banners_section_id": 3,
        "languages": []
    }
}
Response Status Code : 200

"languages_count"
1 = default language
2 = all languages

"new_comments_status"
1 = Automatic Publish
0 = Manual By Admin

"allow_register_status"
0 = Disabled
1 = Active

Error Response

-
Back to top ↑
Navigation & content

/api/v1/banners/GROUP_ID

GET

List of Banners by group_id.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/banners/GROUP_ID

URL Params

GROUP_ID : Integer ID number
/Lang_code to the end of URL
Examples:
/api/v1/banners/1
/api/v1/banners/1/en
/api/v1/banners/1/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "List of Banners",
    "type": 1,
    "banners_count": 3,
    "banners": [
        {
            "id": 7,
            "title": "Banner #1",
            "details": "banner text details",
            "file": "http://Photo_or_File_URL",
            "video_type": null,
            "youtube_link": null,
            "link_url": "#",
            "icon": null
        },
        {
            "id": 2,
            "title": "Banner #2",
            "details": "banner text details",
            "file": "http://Photo_or_File_URL",
            "video_type": null,
            "youtube_link": null,
            "link_url": "#",
            "icon": null
        },
        {
            "id": 1,
            "title": "Banner #3",
            "details": "banner text details",
            "file": "http://Photo_or_File_URL",
            "video_type": null,
            "youtube_link": null,
            "link_url": "#",
            "icon": null
        }
    ]
}
Response Status Code : 200

"type"
0 = Code / Text
1 = Photos
2 = Videos

"video_type"
0 = Direct video
1 = Youtube video
2 = Vimeo video

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Navigation & content

/api/v1/section/SECTION_ID

GET

Get Website Section Details by section_id.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/section/SECTION_ID

URL Params

SECTION_ID : Integer ID number
/Lang_code to the end of URL
Examples:
/api/v1/section/7
/api/v1/section/7/en
/api/v1/section/7/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "Website Section Details",
    "section_id": "7",
    "title": "Blog",
    "href": "/blog",
    "type": 0,
    "categories_status": 1
}
Response Status Code : 200

"type"
0 = General text pages
1 = Photo Gallery
2 = Video Gallery
3 = Audio Book

"categories_status"
0 = Without Categories
1 = Have Main categories only
2 = Have Main and sub categories

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Navigation & content

/api/v1/categories/SECTION_ID

GET

Get a list of categories of a section by section_id.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/categories/SECTION_ID

URL Params

SECTION_ID : Integer ID number
/Lang_code to the end of URL
Examples:
/api/v1/categories/7
/api/v1/categories/7/en
/api/v1/categories/7/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "List of Categories",
    "section_id": "7",
    "section_title": "Blog",
    "type": 0,
    "categories_count": 4,
    "categories": [
        {
            "id": 1,
            "title": "Web Design",
            "icon": "fa-desktop",
            "photo": null,
            "href": "topics/cat/1",
            "sub_categories_count": 0,
            "sub_categories": []
        },
        {
            "id": 2,
            "title": "Mobile Applications",
            "icon": "fa-apple",
            "photo": null,
            "href": "topics/cat/2",
            "sub_categories_count": 0,
            "sub_categories": []
        },
        {
            "id": 3,
            "title": "Motion Draws",
            "icon": "fa-motorcycle",
            "photo": null,
            "href": "topics/cat/3",
            "sub_categories_count": 0,
            "sub_categories": []
        },
        {
            "id": 4,
            "title": "Web Development",
            "icon": "fa-html5",
            "photo": null,
            "href": "topics/cat/4",
            "sub_categories_count": 0,
            "sub_categories": []
        }
    ]
}
Response Status Code : 200

"type"
0 = General text pages
1 = Photo Gallery
2 = Video Gallery
3 = Audio Book

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Topic details

/api/v1/topics/SECTION_ID/page/PAGE_NUMBER/count/TOPICS_COUNT

GET

Get a list of topics of a section by section_id,page_number,topics_count.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/topics/SECTION_ID/page/PAGE_NUMBER/count/TOPICS_COUNT

URL Params

SECTION_ID : Integer ID number
PAGE_NUMBER : Integer page number
TOPICS_COUNT : topics count per page

/Lang_code to the end of URL
Examples:
/api/v1/topics/7/page/1/count/10
/api/v1/topics/7/page/1/count/10/en
/api/v1/topics/7/page/1/count/10/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "List of Topics",
    "section_id": "7",
    "section_title": "Blog",
    "type": 0,
    "topics_count": 8,
    "topics": [
        {
            "id": 15,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 2,
            "href": "topic/15",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 2,
            "Joined_categories": [
                {
                    "id": 17,
                    "title": "Web Design",
                    "icon": "fa-desktop",
                    "photo": null,
                    "href": "topics/cat/17"
                },
                {
                    "id": 18,
                    "title": "Mobile Applications",
                    "icon": "fa-apple",
                    "photo": null,
                    "href": "topics/cat/18"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 16,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 2,
            "href": "topic/16",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 2,
            "Joined_categories": [
                {
                    "id": 19,
                    "title": "Publications Design",
                    "icon": "fa-connectdevelop",
                    "photo": null,
                    "href": "topics/cat/19"
                },
                {
                    "id": 20,
                    "title": "Search Engines Optmization",
                    "icon": "fa-line-chart",
                    "photo": null,
                    "href": "topics/cat/20"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 17,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 0,
            "href": "topic/17",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 1,
            "Joined_categories": [
                {
                    "id": 21,
                    "title": "Motion Draws",
                    "icon": "fa-motorcycle",
                    "photo": null,
                    "href": "topics/cat/21"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 18,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 0,
            "href": "topic/18",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 2,
            "Joined_categories": [
                {
                    "id": 22,
                    "title": "Web Design",
                    "icon": "fa-desktop",
                    "photo": null,
                    "href": "topics/cat/22"
                },
                {
                    "id": 23,
                    "title": "Search Engines Optmization",
                    "icon": "fa-line-chart",
                    "photo": null,
                    "href": "topics/cat/23"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 19,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 0,
            "href": "topic/19",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 1,
            "Joined_categories": [
                {
                    "id": 24,
                    "title": "Web Design",
                    "icon": "fa-desktop",
                    "photo": null,
                    "href": "topics/cat/24"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 20,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 2,
            "href": "topic/20",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 1,
            "Joined_categories": [
                {
                    "id": 25,
                    "title": "Motion Draws",
                    "icon": "fa-motorcycle",
                    "photo": null,
                    "href": "topics/cat/25"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 21,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 4,
            "href": "topic/21",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 3,
            "Joined_categories": [
                {
                    "id": 26,
                    "title": "Web Design",
                    "icon": "fa-desktop",
                    "photo": null,
                    "href": "topics/cat/26"
                },
                {
                    "id": 27,
                    "title": "Mobile Applications",
                    "icon": "fa-apple",
                    "photo": null,
                    "href": "topics/cat/27"
                },
                {
                    "id": 28,
                    "title": "Motion Draws",
                    "icon": "fa-motorcycle",
                    "photo": null,
                    "href": "topics/cat/28"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 22,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 3,
            "href": "topic/22",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 2,
            "Joined_categories": [
                {
                    "id": 29,
                    "title": "Mobile Applications",
                    "icon": "fa-apple",
                    "photo": null,
                    "href": "topics/cat/29"
                },
                {
                    "id": 30,
                    "title": "Web Development",
                    "icon": "fa-html5",
                    "photo": null,
                    "href": "topics/cat/30"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        }
    ]
}
Response Status Code : 200

"type"
0 = General text pages
1 = Photo Gallery
2 = Video Gallery
3 = Audio Book

"video_type"
0 = Direct video
1 = Youtube video
2 = Vimeo video
3 = Embed

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Topic details

/api/v1/category/CAT_ID/page/PAGE_NUMBER/count/TOPICS_COUNT

GET

Get a list of topics of category by cat_id,page_number,topics_count.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/category/CAT_ID/page/PAGE_NUMBER/count/TOPICS_COUNT

URL Params

CAT_ID : Integer ID number
PAGE_NUMBER : Integer page number
TOPICS_COUNT : topics count per page

/Lang_code to the end of URL
Examples:
/api/v1/category/5/page/1/count/10
/api/v1/category/5/page/1/count/10/en
/api/v1/category/5/page/1/count/10/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "List of Topics",
    "cat_id": "5",
    "cat_title": "Blog Category",
    "topics_count": 8,
    "topics": [
        {
            "id": 15,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 2,
            "href": "topic/15",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 2,
            "Joined_categories": [
                {
                    "id": 17,
                    "title": "Web Design",
                    "icon": "fa-desktop",
                    "photo": null,
                    "href": "topics/cat/17"
                },
                {
                    "id": 18,
                    "title": "Mobile Applications",
                    "icon": "fa-apple",
                    "photo": null,
                    "href": "topics/cat/18"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 16,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 2,
            "href": "topic/16",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 2,
            "Joined_categories": [
                {
                    "id": 19,
                    "title": "Publications Design",
                    "icon": "fa-connectdevelop",
                    "photo": null,
                    "href": "topics/cat/19"
                },
                {
                    "id": 20,
                    "title": "Search Engines Optmization",
                    "icon": "fa-line-chart",
                    "photo": null,
                    "href": "topics/cat/20"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 17,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 0,
            "href": "topic/17",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 1,
            "Joined_categories": [
                {
                    "id": 21,
                    "title": "Motion Draws",
                    "icon": "fa-motorcycle",
                    "photo": null,
                    "href": "topics/cat/21"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 18,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 0,
            "href": "topic/18",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 2,
            "Joined_categories": [
                {
                    "id": 22,
                    "title": "Web Design",
                    "icon": "fa-desktop",
                    "photo": null,
                    "href": "topics/cat/22"
                },
                {
                    "id": 23,
                    "title": "Search Engines Optmization",
                    "icon": "fa-line-chart",
                    "photo": null,
                    "href": "topics/cat/23"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 19,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 0,
            "href": "topic/19",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 1,
            "Joined_categories": [
                {
                    "id": 24,
                    "title": "Web Design",
                    "icon": "fa-desktop",
                    "photo": null,
                    "href": "topics/cat/24"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 20,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 2,
            "href": "topic/20",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 1,
            "Joined_categories": [
                {
                    "id": 25,
                    "title": "Motion Draws",
                    "icon": "fa-motorcycle",
                    "photo": null,
                    "href": "topics/cat/25"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 21,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 4,
            "href": "topic/21",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 3,
            "Joined_categories": [
                {
                    "id": 26,
                    "title": "Web Design",
                    "icon": "fa-desktop",
                    "photo": null,
                    "href": "topics/cat/26"
                },
                {
                    "id": 27,
                    "title": "Mobile Applications",
                    "icon": "fa-apple",
                    "photo": null,
                    "href": "topics/cat/27"
                },
                {
                    "id": 28,
                    "title": "Motion Draws",
                    "icon": "fa-motorcycle",
                    "photo": null,
                    "href": "topics/cat/28"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        },
        {
            "id": 22,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 3,
            "href": "topic/22",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 2,
            "Joined_categories": [
                {
                    "id": 29,
                    "title": "Mobile Applications",
                    "icon": "fa-apple",
                    "photo": null,
                    "href": "topics/cat/29"
                },
                {
                    "id": 30,
                    "title": "Web Development",
                    "icon": "fa-html5",
                    "photo": null,
                    "href": "topics/cat/30"
                }
            ],
            "user": {
                "id": 1,
                "name": "admin",
                "href": "user/1/topics"
            }
        }
    ]
}
Response Status Code : 200

"type"
0 = General text pages
1 = Photo Gallery
2 = Video Gallery
3 = Audio Book

"video_type"
0 = Direct video
1 = Youtube video
2 = Vimeo video
3 = Embed

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Topic details

/api/v1/topic/TOPIC_ID

GET

Get all topic details by topic_id .

Request URLhttps://YOUR_WEBSITE_URL/api/v1/topic/TOPIC_ID

URL Params

TOPIC_ID : Integer ID number

/Lang_code to the end of URL
Examples:
/api/v1/topic/5
/api/v1/topic/5/en
/api/v1/topic/5/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "Details of topic",
    "section_id": 7,
    "section_title": "Blog",
    "type": 0,
    "topic": [
        {
            "id": 15,
            "title": "Sample Lorem Ipsum Text",
            "details": "html details of the topic",
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 2,
            "href": "topic/15",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 2,
            "Joined_categories": [
                        {
                            "id": 17,
                            "title": "Web Design",
                            "icon": "fa-desktop",
                            "photo": null,
                            "href": "topics/cat/17"
                        },
                        {
                            "id": 18,
                            "title": "Mobile Applications",
                            "icon": "fa-apple",
                            "photo": null,
                            "href": "topics/cat/18"
                        }
            ],
            "photos_count": 0,
            "photos": [],
            "attach_files_count": 0,
            "attach_files": [],
            "maps_count": 0,
            "maps": [],
            "comments_count": 0,
            "comments": [],
            "related_topics_count": 0,
            "related_topics": [],
            "user": {
            "id": 1,
            "name": "admin",
            "href": "user/1/topics"
        }
    }
    ]
}
Response Status Code : 200

"type"
0 = General text pages
1 = Photo Gallery
2 = Video Gallery
3 = Audio Book

"video_type"
0 = Direct video
1 = Youtube video
2 = Vimeo video
3 = Embed

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Topic details

/api/v1/topic/fields/TOPIC_ID

GET

Get additional fields with values of topic by topic_id .

Request URLhttps://YOUR_WEBSITE_URL/api/v1/topic/fields/TOPIC_ID

URL Params

TOPIC_ID : Integer ID number

/Lang_code to the end of URL
Examples:
/api/v1/topic/fields/32
/api/v1/topic/fields/32/en
/api/v1/topic/fields/32/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "Additional Fields of topic",
    "topic_id": "32",
    "topic_title": "Sample Lorem Ipsum Text",
    "topic_link": "topic/32",
    "topic_photo": "http://File_URL",
    "fields_count": 2,
    "fields": [
        {
            "type": 0,
            "title": "Price",
            "value": "50000 USD"
        },
        {
            "type": 6,
            "title": "Status",
            "value": "1"
        }
    ]
}
Response Status Code : 200

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Topic details

/api/v1/topic/photos/TOPIC_ID

GET

Get additional photos of topic by topic_id .

Request URLhttps://YOUR_WEBSITE_URL/api/v1/topic/photos/TOPIC_ID

URL Params

TOPIC_ID : Integer ID number

/Lang_code to the end of URL
Examples:
/api/v1/topic/photos/32
/api/v1/topic/photos/32/en
/api/v1/topic/photos/32/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "Photos of topic",
    "topic_id": "9",
    "topic_title": "Sample Lorem Ipsum Text",
    "topic_link": "topic/9",
    "topic_photo": "http://File_URL",
    "photos_count": 3,
    "photos": [
        {
            "id": 1,
            "title": "14888146802295",
            "url": "http://File_URL",
            "href": "/topic/photo/1"
        },
        {
            "id": 2,
            "title": "14888146712437",
            "url": "http://File_URL",
            "href": "/topic/photo/2"
        },
        {
            "id": 3,
            "title": "14888155324481",
            "url": "http://File_URL",
            "href": "/topic/photo/3"
        }
    ]
}
Response Status Code : 200

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Topic details

/api/v1/topic/photo/PHOTO_ID

GET

Get photo details of topic by photo_id .

Request URLhttps://YOUR_WEBSITE_URL/api/v1/topic/photo/PHOTO_ID

URL Params

PHOTO_ID : Integer ID number

/Lang_code to the end of URL
Examples:
/api/v1/topic/photo/1
/api/v1/topic/photo/1/en
/api/v1/topic/photo/1/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "Photo details",
    "topic_id": 9,
    "photo": [
        {
            "id": 1,
            "title": "14888146802295",
            "url": "http://File_URL"
        }
    ]
}
Response Status Code : 200

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Topic details

/api/v1/topic/maps/TOPIC_ID

GET

Get maps of topic by topic_id .

Request URLhttps://YOUR_WEBSITE_URL/api/v1/topic/maps/TOPIC_ID

URL Params

TOPIC_ID : Integer ID number

/Lang_code to the end of URL
Examples:
/api/v1/topic/maps/2
/api/v1/topic/maps/2/en
/api/v1/topic/maps/2/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "Maps of topic",
    "topic_id": "2",
    "topic_title": "Contact Us",
    "topic_link": "topic/2",
    "topic_photo": null,
    "maps_count": 3,
    "maps": [
        {
            "id": 1,
            "longitude": "39.639537564366684",
            "latitude": "-101.953125",
            "title": "Main Title here",
            "details": "Co Rd 6, Kanorado, KS 67741, USA",
            "href": "/topic/map/1"
        },
        {
            "id": 4,
            "longitude": "40.136890695345905",
            "latitude": "-100.689697265625",
            "title": "Main title here",
            "details": "Rd 381, McCook, NE 69001, USA",
            "href": "/topic/map/4"
        },
        {
            "id": 5,
            "longitude": "40.463666324587685",
            "latitude": "-103.447265625",
            "title": "Main title here",
            "details": "Co Rd 6, Merino, CO 80741, USA",
            "href": "/topic/map/5"
        }
    ]
}
Response Status Code : 200

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Topic details

/api/v1/topic/map/MAP_ID

GET

Get map details of topic by map_id .

Request URLhttps://YOUR_WEBSITE_URL/api/v1/topic/map/MAP_ID

URL Params

MAP_ID : Integer ID number

/Lang_code to the end of URL
Examples:
/api/v1/topic/map/5
/api/v1/topic/map/5/en
/api/v1/topic/map/5/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "Map details",
    "topic_id": 2,
    "map": [
        {
            "id": 5,
            "longitude": "40.463666324587685",
            "latitude": "-103.447265625",
            "title": "Main title here",
            "details": "Co Rd 6, Merino, CO 80741, USA"
        }
    ]
}
Response Status Code : 200

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Topic details

/api/v1/topic/files/TOPIC_ID

GET

Get additional files of topic by topic_id .

Request URLhttps://YOUR_WEBSITE_URL/api/v1/topic/files/TOPIC_ID

URL Params

TOPIC_ID : Integer ID number

/Lang_code to the end of URL
Examples:
/api/v1/topic/files/5
/api/v1/topic/files/5/en
/api/v1/topic/files/5/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "Attach files of topic",
    "topic_id": "5",
    "topic_title": "Nullam mollis dolor",
    "topic_link": "topic/5",
    "topic_photo": "http://Photo_URL",
    "files_count": 2,
    "files": [
        {
            "id": 1,
            "title": "File title",
            "url": "http://File_URL",
            "href": "/topic/file/1"
        },
        {
            "id": 2,
            "title": "File title",
            "url": "http://File_URL",
            "href": "/topic/file/2"
        }
    ]
}
Response Status Code : 200

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Topic details

/api/v1/topic/file/FILE_ID

GET

Get file details of topic by file_id .

Request URLhttps://YOUR_WEBSITE_URL/api/v1/topic/file/FILE_ID

URL Params

FILE_ID : Integer ID number

/Lang_code to the end of URL
Examples:
/api/v1/topic/file/1
/api/v1/topic/file/1/en
/api/v1/topic/file/1/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "Attach file details",
    "topic_id": 5,
    "file": [
        {
            "id": 1,
            "title": "File title",
            "url": "http://File_URL"
        }
    ]
}
Response Status Code : 200

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Topic details

/api/v1/topic/comments/TOPIC_ID

GET

Get comments of topic by topic_id .

Request URLhttps://YOUR_WEBSITE_URL/api/v1/topic/comments/TOPIC_ID

URL Params

TOPIC_ID : Integer ID number

/Lang_code to the end of URL
Examples:
/api/v1/topic/comments/9
/api/v1/topic/comments/9/en
/api/v1/topic/comments/9/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "Comments of topic",
    "topic_id": "9",
    "topic_title": "Sample Lorem Ipsum Text",
    "topic_link": "topic/9",
    "topic_photo": "http://File_URL",
    "comments_count": 2,
    "comments": [
        {
            "id": 1,
            "name": "Roza Hesham",
            "email": "email@site.com",
            "date": "2017-03-06 15:55:21",
            "comment": "Comment text details",
            "href": "/topic/comment/1"
        },
        {
            "id": 2,
            "name": "Adam Ali",
            "email": "emm@site.com",
            "date": "2017-03-06 15:55:59",
            "comment": "Comment text details",
            "href": "/topic/comment/2"
        }
    ]
}
Response Status Code : 200

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Topic details

/api/v1/topic/comment/COMMENT_ID

GET

Get comment details by comment_id .

Request URLhttps://YOUR_WEBSITE_URL/api/v1/topic/comment/COMMENT_ID

URL Params

COMMENT_ID : Integer ID number

/Lang_code to the end of URL
Examples:
/api/v1/topic/comment/1
/api/v1/topic/comment/1/en
/api/v1/topic/comment/1/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "Comment details",
    "topic_id": 9,
    "comment": [
        {
            "id": 1,
            "name": "Roza Hesham",
            "email": "email@site.com",
            "date": "2017-03-06 15:55:21",
            "comment": "Comment text details will be here"
        }
    ]
}
Response Status Code : 200

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Topic details

/api/v1/user/USER_ID/topics/page/PAGE_NO/count/TOPICS_COUNT

GET

Get a list of topics of user by user_id,page_no,topics_count.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/user/USER_ID/topics/page/PAGE_NO/count/TOPICS_COUNT

URL Params

USER_ID : Integer ID number
PAGE_NO : Integer page number
TOPICS_COUNT : topics count per page

/Lang_code to the end of URL
Examples:
/api/v1/user/1/topics/page/1/count/5
/api/v1/user/1/topics/page/1/count/5/en
/api/v1/user/1/topics/page/1/count/5/ar
Default Language if no Lang parameter is the default language in .env file

Success Response

{
    "msg": "List of Topics for user",
    "user_id": "1",
    "user_name": "admin",
    "topics_count": 5,
    "topics": [
        {
            "id": 1,
            "title": "About Us",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 34,
            "href": "topic/1",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 0,
            "Joined_categories": [],
            "section_id": 1,
            "section_name": "sitePages",
            "section_type": 0
        },
        {
            "id": 5,
            "title": "Nullam mollis dolor",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": "fa-ambulance",
            "visits": 18,
            "href": "topic/5",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 0,
            "Joined_categories": [],
            "section_id": 2,
            "section_name": "services",
            "section_type": 0
        },
        {
            "id": 9,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 15,
            "href": "topic/9",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 0,
            "Joined_categories": [],
            "section_id": 3,
            "section_name": "news",
            "section_type": 0
        },
        {
            "id": 15,
            "title": "Sample Lorem Ipsum Text",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": "http://File_URL",
            "audio_file": null,
            "icon": null,
            "visits": 2,
            "href": "topic/15",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 2,
            "Joined_categories": [
                {
                    "id": 17,
                    "title": "Web Design",
                    "icon": "fa-desktop",
                    "photo": null,
                    "href": "topics/cat/17"
                },
                {
                    "id": 18,
                    "title": "Mobile Applications",
                    "icon": "fa-apple",
                    "photo": null,
                    "href": "topics/cat/18"
                }
            ],
            "section_id": 7,
            "section_name": "blog",
            "section_type": 0
        },
        {
            "id": 23,
            "title": "Cars Gallery",
            "details": null,
            "date": "2017-03-06",
            "video_type": null,
            "video_file": "",
            "photo_file": null,
            "audio_file": null,
            "icon": null,
            "visits": 0,
            "href": "topic/23",
            "fields_count": 0,
            "fields": [],
            "Joined_categories_count": 0,
            "Joined_categories": [],
            "section_id": 4,
            "section_name": "photos",
            "section_type": 1
        }
    ]
}
Response Status Code : 200

"video_type"
0 = Direct video
1 = Youtube video
2 = Vimeo video
3 = Embed

Error Response

{ "msg": "There is no data" }
Response Status Code : 404
Back to top ↑
Submissions

/api/v1/subscribe

POST

Post subscribe to news letter .

Request URLhttps://YOUR_WEBSITE_URL/api/v1/subscribe

URL Params

-

DATA Params

"api_key" : Required
"subscribe_name" : Required
"subscribe_email" : Required

Success Response

{
    "code": "1",
    "msg": "You have subscribed successfully"
}
Response Status Code : 200

Error Response

{
    "message": "The given data was invalid.",
    "errors": {
        "api_key": [
            "The api key field is required."
        ],
        "subscribe_name": [
            "The subscribe name field is required."
        ],
        "subscribe_email": [
            "The subscribe email field is required."
        ]
    }
}
OR
{
    "code": "2",
    "msg": "You are already subscribed"
}
OR
{
    "code": "-1",
    "msg": "Authentication failed"
}
Required Fields:
Response Status Code : 422

Already subscribed:
Response Status Code : 200

Authentication failed:
Response Status Code : 500
Back to top ↑
Submissions

/api/v1/comment

POST

Post comment to topic by topic_id.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/comment

URL Params

-

DATA Params

"api_key" : Required
"topic_id" : Required
"comment_name" : Required
"comment_email" : Required
"comment_message" : Required

Success Response

{
    "code": "1",
    "msg": "Your Comment Sent successfully"
}
Response Status Code : 200

Error Response

{
    "api_key": [
        "The api key field is required."
    ],
    "topic_id": [
        "The topic id field is required."
    ],
    "comment_name": [
        "The comment name field is required."
    ],
    "comment_message": [
        "The comment message field is required."
    ],
    "comment_email": [
        "The comment email field is required."
    ]
}
OR
{
    "code": "0",
    "msg": "There is no data"
}
OR
{
    "code": "-1",
    "msg": "Authentication failed"
}
Required Fields:
Response Status Code : 422

Topic_id not found:
Response Status Code : 404

Authentication failed:
Response Status Code : 500
Back to top ↑
Submissions

/api/v1/order

POST

Post order to topic by topic_id.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/order

URL Params

-

DATA Params

"api_key" : Required
"topic_id" : Required
"order_name" : Required
"order_phone" : Required
"order_email" : Required
"order_qty" : Required
"order_message" : Optional

Success Response

{
    "code": "1",
    "msg": "Your Order Sent successfully"
}
Response Status Code : 200

Error Response

{
    "api_key": [
        "The api key field is required."
    ],
    "topic_id": [
        "The topic id field is required."
    ],
    "order_name": [
        "The order name field is required."
    ],
    "order_phone": [
        "The order phone field is required."
    ],
    "order_email": [
        "The order email field is required."
    ],
    "order_qty": [
        "The order qty field is required."
    ]
}
OR
{
    "code": "0",
    "msg": "There is no data"
}
OR
{
    "code": "-1",
    "msg": "Authentication failed"
}
Required Fields:
Response Status Code : 422

Topic_id not found:
Response Status Code : 404

Authentication failed:
Response Status Code : 500
Back to top ↑
Submissions

/api/v1/contact

POST

Post contact form data.

Request URLhttps://YOUR_WEBSITE_URL/api/v1/contact

URL Params

-

DATA Params

"api_key" : Required
"topic_id" : Required
"contact_name" : Required
"contact_email" : Required
"contact_phone" : Optional
"contact_subject" : Required
"contact_message" : Required

Success Response

{
    "code": "1",
    "msg": "Message Sent successfully"
}
Response Status Code : 200

Error Response

{
    "api_key": [
        "The api key field is required."
    ],
    "contact_name": [
        "The contact name field is required."
    ],
    "contact_email": [
        "The contact email field is required."
    ],
    "contact_subject": [
        "The contact subject field is required."
    ],
    "contact_message": [
        "The contact message field is required."
    ]
}
OR
{
    "code": "-1",
    "msg": "Authentication failed"
}
Required Fields:
Response Status Code : 422

Authentication failed:
Response Status Code : 500
Back to top ↑