Category

This page will explain how to use the API to request category data.


Request multiple categories

Use this to request multiple categories. Call this request using the GET http method, the results will be in JSON format.

Request URL

http://api.lucyvegas.com/client/v1/category

Filter parameters

Use these options as query string variables to filter the request's results:

Variable Description
limit Limits the amount of deals returned. Must be an integer between 1 and 100. By default: 10.
skip Indicates how many deals must be skipped for the results, ideal for paging. Must be an integer. By default: 0.
name Search data by name similar to the filter's value.

Results

Column Description
id Record (category) id.
name Category name.
slug Category slug.
createdAt Date the record was created.
updatedAt Date the record was last updated.

Example

Request
http://api.lucyvegas.com/client/v1/category?access_token={...}&limit=1&name=dining
Response (JSON)
{
    "error": false,
    "results": [
        {
            "id": 81,
            "name": "Dining & Nightlife",
            "slug": "dining-and-nightlife",
            "createdAt": "2014-03-25",
            "updatedAt": "2014-03-25"
        }
    ],
    "query": {
        "limit": 1,
        "skip": 0
    },
    "0": 200
}

Request a single category

Use this to request a single category. Call this request using the GET http method, the results will be in JSON format.

Request URL

http://api.lucyvegas.com/client/v1/category/{id}

Filter parameters

Use these options as query string variables to filter the request's results:

Variable Description
{id} Category ID.

Results

A single record is returned with the same columns as the ones explained when you request for multiple deals.

Example

Request
http://api.lucyvegas.com/client/v1/category/78?access_token={...}
Response (JSON)
{
    "error": false,
    "category": {
        "id": 78,
        "name": "Activities & Events",
        "slug": "activities-and-events",
        "createdAt": "2014-03-25",
        "updatedAt": "2014-03-25"
    },
    "0": 200
}