Michael's API WIKI - lenlaurito/shopping-center GitHub Wiki

Shopping Center Wiki

Table of Contents

Shop

Listing Shops

Request

GET: /api/v1/shop

Params

Parameter name Required
offset (Optional)
max (Optional)
tagId (Optional)
Response

HTTP Status: 200 OK

Response Body: Shop Response Body

View Shop

Request

GET: /api/v1/shop/{shopId}

Response

HTTP Status: 200 OK

Response Body: Response Body

Create Shop

Request

POST: /api/v1/shop

Request Body: Shop Request Body

Response

HTTP Status: 201 CREATED

Response Body: Shop Response Body

Update Shop

Request

PUT: /api/v1/shop/{shopId}

Request Body: Shop Request Body

Response

HTTP Status: 200 OK

Response Body: Shop Response Body

Delete Shop

Request

DELETE : /api/v1/shop/{shopId}

Response

HTTP Status: 204 NO CONTENT

Shop Request Body
{
    "name": "jollibee",
    "location": "FIRST_FLOOR",
    "description": "bida ang saya",
    "tags": [1,2,3,4,5]
}
Shop Response Body
{
    "id": 1,
    "name": "jollibee",
    "location": "FIRST_FLOOR",
    "description": "test ",
    "tags": [1]
}
name description required type
id The id of the shop. auto-generated Long
name The name of the shop. true String
location The location of the shop. true Location
description The description of the shop. false String
tags The duration of the shop. false List

Tag

Listing Tags

Request

GET: /api/v1/tag

Response

HTTP Status: 200 OK

Response Body: Tag Response Body

View Tag

Request

GET: /api/v1/tag/{tagId}

Response

HTTP Status: 200 OK

Response Body: Tag Response Body

Create Tag

Request

POST: /api/v1/tag

Request Body: Tag Request Body

Response

HTTP Status: 201 CREATED

Response Body: Tag Response Body

Update Tag

Request

PUT: /api/v1/tag/{tagId}

Request Body: Tag Request Body

Response

HTTP Status: 200 OK

Response Body: Tag Response Body

Delete Tag

Request

DELETE : /api/v1/tag/{tagId}

Response

HTTP Status: 204 NO CONTENT

Tag Request Body
{
  "name": "Grocery"
}
Tag Response Body
{
  "id": 1,
  "name": "Grocery"
}
name description required type
id The id of the tag. auto-generated Long
name The name of the tag. true String