Merchant

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


Request multiple merchants

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

Request URL

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

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 (merchant) id.
name Merchant name.
address Merchant address.
locality Merchant locality.
region Merchant region.
postalCode Merchant postal code.
country Merchant country.
countryCode Merchant country code.
latitude Merchant latitude.
longitude Merchant longitude.
imageURL Image related to the merchant (nullable).
createdAt Date the record was created.
updatedAt Date the record was last updated.

Example

Request
http://api.lucyvegas.com/client/v1/merchant?access_token={...}&limit=1&name=diamond
Response (JSON)
{
    "error": false,
    "results": [
        {
            "id": 168,
            "name": "D & R House of Diamonds",
            "address": "410 South Rampart Boulevard #390, Las Vegas, NV 89145, USA",
            "locality": "Las Vegas",
            "region": "NV",
            "postalCode": 89145,
            "country": "United States",
            "countryCode": "US",
            "latitude": 36.1684254,
            "longitude": -115.2869638,
            "imageUrl": null,
            "createdAt": "2014-03-13",
            "updatedAt": "2014-03-13"
        }
    ],
    "query": {
        "limit": 1,
        "skip": 0
    },
    "0": 200
}

Request a single merchant

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

Request URL

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

Filter parameters

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

Variable Description
{id} Merchant 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/merchant/1?access_token={...}
Response (JSON)
{
    "error": false,
    "merchant": {
        "id": 1,
        "name": "AJR Inc Elegance in Stone",
        "address": "6745 South Eastern Avenue #2, Las Vegas, NV 89119, USA",
        "locality": "Las Vegas",
        "region": "NV",
        "postalCode": 89119,
        "country": "United States",
        "countryCode": "US",
        "latitude": 36.067784,
        "longitude": -115.119876,
        "imageUrl": null,
        "createdAt": "2014-03-11",
        "updatedAt": "2014-03-11"
    },
    "0": 200
}