Categories

Get Categories

Returns records of news categories created by client

Get News Categories

GET /news/categories

Query Parameters

Name
Type
Description

is_parent

Boolean

Filter categories by showing parent only

Headers

Name
Type
Description

Client-Key*

String

Your client Key

{
  "data": [
        {
            "id": 178,
            "name": "Hiburan & Olahraga",
            "slug": "hiburan-olahraga",
            "description": null,
            "parent": {
                "data": []
            },
            "children": {
                "data": [
                    {
                        "id": 177,
                        "name": "Hiburan",
                        "slug": "hiburan",
                        "description": ""
                    }
                ]
            }
        },
        {
            "id": 177,
            "name": "Hiburan",
            "slug": "hiburan",
            "description": "",
            "parent": {
                "data": {
                    "id": 178,
                    "name": "Hiburan & Olahraga",
                    "slug": "hiburan-olahraga",
                    "description": null
                }
            },
            "children": {
                "data": []
            }
        }
  ]
}

Create Category

Create a news category and return it value

Create Catogery

POST /news/categories

Headers

Name
Type
Description

Client-Key*

String

Your client Key

Authorization*

String

Bearer access_token

Request Body

Name
Type
Description

name*

String

The name of the category

slug

String

description

String

Get Category Detail

Returns news category by id

Detail Category

GET /news/categories/detail/{slug}

Path Parameters

Name
Type
Description

slug*

String

Headers

Name
Type
Description

Client-Key*

String

Your client Key

Update Category

Update news category by id and return its value

Update Category

PUT /news/categories/{id}

Path Parameters

Name
Type
Description

id*

Integer

Headers

Name
Type
Description

Client-Key*

String

Your client Key

Authorization*

String

Bearer access_token

Request Body

Name
Type
Description

name*

String

The name of the category

slug

String

description

String

Delete Category

Delete news category by id

Delete Category

DELETE /news/categories/{id}

Path Parameters

Name
Type
Description

*

Integer

Headers

Name
Type
Description

Client-Key*

String

Your client Key

Authorization*

String

Bearer access_token

Example Request

Last updated