Skip to content
phuchiss edited this page Jun 2, 2014 · 1 revision

Rest API

Store API

Example JSON Response

{
    "title": "kakashi",
    "engTitle": "kakashi",
    "description": "kakashi",
    "tel": "02-720-1566",
    "website": "www.oishigroup.com/product_kakashi.php",
    "isPublished": false,
    "branchs": [
      "5383174f5a3f57d32d00018b",
      "5383174f5a3f57d32d00018d",
      "538317505a3f57d32d00018e",
      "538317505a3f57d32d000190",
      "538317505a3f57d32d000192",
      "538317515a3f57d32d000193",
      "538317515a3f57d32d000194",
      "538317515a3f57d32d000195",
      "538317525a3f57d32d000196"
    ],
    "pictures": "5383173b5a3f57d32d000189",
    "running": "",
    "order": 0,
    "entity": "Stores",
    "_id": "5383173c5a3f57d32d00018a",
    "createDate": "2014-05-26T10:28:12.907Z",
    "lastUpdate": "2014-05-26T10:28:34.305Z",
    "publish": true
  }
{
    "title": "kakashi",
    "engTitle": "kakashi"
}

#​Branch API

Example Requesthttp://192.168.0.106:8080/api/store/5383173c5a3f57d32d00018a/branch

Example JSON Response

[{
    "title": "KAKASHI - สายใต้ใหม่",
    "description": "เขต ตลิ่งชัน กรุงเทพมหานคร ",
    "engTitle": "",
    "tel": "02-894-6267",
    "address": "เขต ตลิ่งชัน กรุงเทพมหานคร ",
    "latitude": 13.781359,
    "longtutude": 100.429531,
    "departmentStore": {
      "title": "สายใต้ใหม่",
      "description": "เขต ตลิ่งชัน กรุงเทพมหานคร ",
      "engTitle": "",
      "tel": "Sai Tai Mai",
      "address": "เขต ตลิ่งชัน กรุงเทพมหานคร ",
      "latitude": 13.781376,
      "longtutude": 100.429527,
      "entity": "DepartmentStores",
      "_id": "538317505a3f57d32d000191",
      "createDate": "2014-05-26T10:28:32.718Z",
      "lastUpdate": "2014-05-26T10:28:32.718Z",
      "publish": true
    },
    "loc": [
      13.781359,
      100.429531
    ],
    "entity": "Branchs",
    "_id": "538317505a3f57d32d000192",
    "createDate": "2014-05-26T10:28:32.843Z",
    "lastUpdate": "2014-05-26T10:28:32.843Z",
    "publish": true
  },
  {
    "title": "KAKASHI - ซีคอนบางแค ",
    "description": "ชั้น 4  บางหว้า ภาษีเจริญกรุงเทพมหานคร",
    "engTitle": "",
    "tel": "02-720-1566",
    "address": "ชั้น 4  บางหว้า ภาษีเจริญกรุงเทพมหานคร",
    "latitude": 13.71201,
    "longtutude": 100.433361,
    "departmentStore": {
      "title": "ซีคอนบางแค",
      "description": "บางหว้า ชั้น 4",
      "engTitle": "",
      "tel": "Seacon Bangkae ",
      "address": "บางหว้า ชั้น 4",
      "latitude": 13.712208,
      "longtutude": 100.434077,
      "entity": "DepartmentStores",
      "_id": "537eca4ec9822e8021000141",
      "createDate": "2014-05-23T04:10:54.330Z",
      "lastUpdate": "2014-05-26T11:04:26.737Z",
      "publish": true 
    }​]​

Example Request body : 2 kilometre from lat long location

{
   "latitude":111,
   "longtitude":222,
   "distance":2
}

​Menu API

Example Request : http://192.168.0.106:8080/api/branch/5383174f5a3f57d32d00018b/menu

Example JSON Response

[
  {
    "title": "เกี๊ยวซ่า",
    "description": "เกี๊ยวหมูซ่า ผักสด",
    "engTitle": "",
    "price": "",
    "types": [
      "อาหารทานเล่น"
    ],
    "pictures": [
      "5383179c5a3f57d32d000197"
    ],
    "branchs": [
      "5383174f5a3f57d32d00018b",
      "5383174f5a3f57d32d00018d",
      "538317505a3f57d32d00018e",
      "538317505a3f57d32d000190",
      "538317505a3f57d32d000192",
      "538317515a3f57d32d000193",
      "538317515a3f57d32d000194",
      "538317515a3f57d32d000195",
      "538317525a3f57d32d000196"
    ],
    "storeRunning": "",
    "order": 0,
    "hilight": true,
    "entity": "Menus",
    "_id": "5383179c5a3f57d32d000198",
    "createDate": "2014-05-26T10:29:48.907Z",
    "lastUpdate": "2014-05-26T10:29:48.907Z",
    "publish": true
  },
  {
    "title": "กุ้งเทมปุระ",
    "description": "กุ้งทอดกรอบ",
    "engTitle": "",
    "price": "",
    "types": [
      "อาหารทานเล่น"
    ],
    "pictures": [
      "5383179d5a3f57d32d000199"
    ],
    "branchs": [
      "5383174f5a3f57d32d00018b",
      "5383174f5a3f57d32d00018d",
      "538317505a3f57d32d00018e",
      "538317505a3f57d32d000190",
      "538317505a3f57d32d000192",
      "538317515a3f57d32d000193",
      "538317515a3f57d32d000194",
      "538317515a3f57d32d000195",
      "538317525a3f57d32d000196"
    ],
    "storeRunning": "",
    "order": 0,
    "hilight": true,
    "entity": "Menus",
    "_id": "5383179d5a3f57d32d00019a",
    "createDate": "2014-05-26T10:29:49.098Z",
    "lastUpdate": "2014-05-26T10:29:49.098Z",
    "publish": true
  }

Picture API

  • Get Picture - GET 192.168.0.106:8080/api/picture/[picture uuid]

_Example Request _: 192.168.0.106:8080/api/picture/5383179d5a3f57d32d000199

Promotion API

Example Request : http://192.168.0.106:8080/api/promotion/distinct

Clone this wiki locally