Project APIFor purposes of this API description, all URLs are relative to the base url of http://localhost:8080/sad Also, all data is in JSON format. A GET request will return JSON. A PUT or POST will submit a JSON document. To keep things simple, no authentication is required to access any resource. NOTE: We'll accept any number of valid JSON that satisfy the requirements of this project. Admin
POST /advertiserCreates an advertiser. Returns the id of the account created. HTTP response codes:
Resource URL/admin/advertiser Parameters
Example RequestPOST http://localhost:8080/sad/admin/advertiser Here is data being POST-ed { "name": "The Summit Bed and Breakfast", "address": { "street": "123 Main Street", "city": "Anytown", "state": "Anystate", "zip": "12345" }, "email": "jane.doe@example.com", "phone": "123-456-7890", "facebook": "", "twitter": "" } Example Response{ "id": 123 } CustomerGET /[{cid}/{cid}/.../{cid}]Returns an array of listings under /[{cid}/{cid}/.../{cid}]. If no category ID is provided, then return the home page listings. The array of listings returned includes an array of home-page-featured listings, an array of category-featured and an array of regular listings. HTTP response codes: 200 (OK). Resource URL/[{cid}/{cid}/.../{cid}] Parameterscid: e.g. "travel", "hotels", etc. Example RequestGET http://localhost:8080/sad/travel Customer Service RepresentativeGET /csr/search?q=query_stringReturns an array of entities that match the query_string. HTTP response code: 200 (OK). Resource URL/csr/search Parametersq (optional): query string (aka keyword) used for search, if none specified, then everything matches. Example RequestGET http://localhost:8080/sad/csr/search?q=travel
$Id: project-api.html,v 1.1 2015/11/23 04:57:55 virgil Exp $ |