Categories

Categories

List Categories

GET
/v1/data/lookup_categories
💡
This request requires header called “PB-USER-TOKEN”. This API call can be only called by the users.
Request
Empty 
Response
{
    "totalRecords": "16",
    "results": [
        {
            "id": "11",
            "title": "Around the Post",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "15",
            "title": "Basics & Rules",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "7",
            "title": "Block",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "1",
            "title": "Dink",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "6",
            "title": "Drop",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "4",
            "title": "Footwork",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "13",
            "title": "Mental",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "2",
            "title": "Overhead",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "10",
            "title": "Poach",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "12",
            "title": "Power",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "3",
            "title": "PPA",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "8",
            "title": "Reset",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "16",
            "title": "Returns",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "9",
            "title": "Serve",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "14",
            "title": "Strategy",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        },
        {
            "id": "5",
            "title": "Two Handed Backhand",
            "isInstructionalVideo": true,
            "isNews": true,
            "isActive": true
        }
    ]
}

Create Category

POST
/v1/categories 

Note: Required permission (News Creator) to access this endpoint.

💡
This request requires header called “PB-USER-TOKEN”. This API call can be only called by the users.
Request
{
    "payload": {
        "title": "My Test Category",
        "is_instructional_video": true,
        "is_news": true,
        "is_active": true
    }
}
Response
{
    "result": {
        "id": "18",
        "title": "My Test Category",
        "is_instructional_video": true,
        "is_news": true,
        "is_active": true
    }
}

Response Code : 201 (created)

Update Category

PUT
/v1/categories/{id}

Note: Required permission (News Creator) to access this endpoint.

💡
This request requires header called “PB-USER-TOKEN”. This API call can be only called by the users.
Request
{
    "payload": {
        "id": 18,
        "title": "My Test Category 2",
        "is_instructional_video": true,
        "is_news": true,
        "is_active": true
    }
}
Response
200 OK if succesffully updated, 304 if not modified 

Delete Category

DELETE
/v1/categories/{id}

Note: Required permission (News Creator) to access this endpoint.

💡
This request requires header called “PB-USER-TOKEN”. This API call can be only called by the users.
Request
Empty 
Response
204 if successfully deleted 

List Single Category

GET
/v1/data/categories/{id}
💡
This request requires header called “PB-USER-TOKEN”. This API call can be only called by the users.
Request
Empty 
Response
{
    "id": "18",
    "title": "My Test Category 2",
    "is_instructional_video": true,
    "is_news": true,
    "is_active": true
}