Fresh Tasty Ecommerce Site

Get Started. It's Free
or sign up with your email address
Rocket clouds
Fresh Tasty Ecommerce Site by Mind Map: Fresh Tasty Ecommerce Site

1. Dish

1.1. Get All Dishes available in System

1.1.1. Request

1.1.1.1. URL: /api/products

1.1.1.2. Method: GET

1.1.1.3. Authentication: No

1.1.1.4. Data: No

1.1.2. Response

1.1.2.1. Success

1.1.2.1.1. Status: 200 Dishes List

1.1.3. Form

1.2. Get all Information of one Dish

1.2.1. Request

1.2.1.1. URL: /api/products/:id

1.2.1.2. Method: GET

1.2.1.3. Authentication: No

1.2.1.4. Data: No

1.2.2. Response

1.2.2.1. Success

1.2.2.1.1. Status: 200 Dish Information

1.2.3. Form

1.3. Get all Dishes available in System by delivery date duration

1.3.1. Request

1.3.1.1. URL: /api/products_duration

1.3.1.2. Method: GET

1.3.1.3. Authentication: No

1.3.1.4. Delivery_date: start_date, end_date

1.3.2. Response

1.3.2.1. Success

1.3.2.1.1. Status: 200 Data: Dishes List followed by delivery_date with information

1.3.3. Form

1.4. Remove Delivery Date of Dish

1.4.1. Request

1.4.1.1. URL: /api/products/:id/remove_date

1.4.1.2. Method: DELETE

1.4.1.3. Authentication: Admin

1.4.1.4. Data: delivery date

1.4.2. Response

1.4.2.1. Success

1.4.2.1.1. Status: 200 Message: Remove Successful

1.4.2.2. Fail

1.4.2.2.1. Status: 401 not authorized to perform that action

1.4.2.3. Fail

1.4.2.3.1. Status 404 The resource could not be found

1.4.3. Form

1.5. Update Delivery Date of Dish

1.5.1. Request

1.5.1.1. URL: /api/date_deliveries/:id

1.5.1.2. Method: PUT

1.5.1.3. Authentication: Admin

1.5.1.4. Data: delivery_date

1.5.2. Response

1.5.2.1. Success

1.5.2.1.1. Status: 200 Updated Date Delivery of Product id: id

1.5.2.2. Fail

1.5.2.2.1. Status: 401 not authorized to perform that action

1.5.2.3. Fail

1.5.2.3.1. Status 404 The resource could not be found

1.5.3. Form

2. Box

2.1. Get All Boxes available in System

2.1.1. Request

2.1.1.1. URL: /api/boxes

2.1.1.2. Method: GET

2.1.1.3. Authentication: No

2.1.1.4. Data: No

2.1.2. Response

2.1.2.1. Success

2.1.2.1.1. Status: 200 Boxes List

2.1.3. Form

3. User

3.1. Register account to System

3.1.1. Request

3.1.1.1. URL: /api/users

3.1.1.2. Method: POST

3.1.1.3. Authentication : No

3.1.1.4. Data: User's information

3.1.2. Response

3.1.2.1. Success

3.1.2.1.1. Status: 200 User's basic information

3.1.2.2. Fail

3.1.2.2.1. Status: 422 Exception: email has been taken, requested field can't be blank

3.1.3. Sign Up Form

3.2. Login System

3.2.1. Request

3.2.1.1. URL: /api/login

3.2.1.2. Method: POST

3.2.1.3. Authentication: No

3.2.1.4. Data: Email, Password

3.2.2. Response

3.2.2.1. Success

3.2.2.1.1. Status: 200 User's basic Information

3.2.2.2. Fail

3.2.2.2.1. Status: 404 Email or Password is wrong

3.2.2.3. Fail

3.2.2.3.1. Status: 422 Exception: requested field can't be blank

3.2.3. Form

3.3. Logout System

3.3.1. Request

3.3.1.1. URL: /api/logout

3.3.1.2. Method: POST

3.3.1.3. Authentication: User

3.3.1.4. Data: No

3.3.2. Response

3.3.2.1. Success

3.3.2.1.1. Status: 200 Message: Logout Successful

3.3.2.2. Fail

3.3.2.2.1. Status: 401 Unauthorized: Invalid API Key

3.3.3. Form

3.4. Get Information of User

3.4.1. Request

3.4.1.1. URL: /api/users/:id

3.4.1.2. Method: GET

3.4.1.3. Authentication: User

3.4.1.4. Data: No

3.4.2. Response

3.4.2.1. Success

3.4.2.1.1. Status: 200 User's basic Information

3.4.2.2. Fail

3.4.2.2.1. Status: 401 Unauthorized: Invalid API key

3.4.2.3. Fail

3.4.2.3.1. Status: 404 The resource could not be found

3.4.3. Form

3.5. Update information of User

3.5.1. Request

3.5.1.1. URL: /api/users/:id

3.5.1.2. Method: PUT

3.5.1.3. Authentication: User

3.5.1.4. Data: User Information will be updated

3.5.2. Response

3.5.2.1. Success

3.5.2.1.1. Status: 200 User's basic information

3.5.2.2. Fail

3.5.2.2.1. Status: 401 Unauthorized Invalid API Key

3.5.2.3. Fail

3.5.2.3.1. Status: 404 The resource could not be found

3.5.3. Form

3.6. Change Password

3.6.1. Request

3.6.1.1. URL: /api/change_password

3.6.1.2. Method: POST

3.6.1.3. Authentication: User

3.6.1.4. Data: Password: old, new

3.6.2. Response

3.6.2.1. Success

3.6.2.1.1. Status: 200 Message: Update Password Successful

3.6.2.2. Fail

3.6.2.2.1. Status: 404 Message: Password is Not Right

3.6.2.3. Fail

3.6.2.3.1. Status: 401 Unauthorized: Invalid API Key

3.6.3. Form

4. Order

4.1. Add Dishes/Boxes into Cart

4.1.1. Request

4.1.1.1. URL: /api/orders/:number/line_items

4.1.1.2. Method: POST

4.1.1.3. Authentication: User

4.1.1.4. Data: line_items[]

4.1.2. Response

4.1.2.1. Success

4.1.2.1.1. Status: 200 Message: Add Line Items in Order Successful

4.1.2.2. Fail

4.1.2.2.1. Status: 404 The resource could not be found

4.1.2.3. Fail

4.1.2.3.1. Status: 401 Invalid API Key

4.1.3. Form

4.2. Get All Dishes and Boxes from Cart

4.2.1. Request

4.2.1.1. URL: /api/orders/:number/line_items

4.2.1.2. Method: GET

4.2.1.3. Authentication: User

4.2.1.4. Data: No

4.2.2. Response

4.2.2.1. Success

4.2.2.1.1. Status: 200 line_items array

4.2.2.2. Fail

4.2.2.2.1. Status: 401 not authorized to perform that action

4.2.3. Form

4.3. Update line_item (dish/box) in Cart: quantity or delivery_date

4.3.1. Request

4.3.1.1. URL: /api/orders/:number/line_items/:id

4.3.1.2. Method: PUT

4.3.1.3. Authentication: User

4.3.1.4. Data: quantity, delivery_date

4.3.2. Response

4.3.2.1. Success

4.3.2.1.1. Status: 200 Message: Update Line Item in Order Successful

4.3.2.2. Fail

4.3.2.2.1. Status: 401 not authorized to perform that action

4.3.2.3. Fail

4.3.2.3.1. Status: 404 The resource could not be found

4.3.3. Form

4.4. Remove line_item (dish/box) in Cart

4.4.1. Request

4.4.1.1. URL: /api/orders/:number/line_items/:id

4.4.1.2. Method: DELETE

4.4.1.3. Authentication: User

4.4.1.4. Data: No

4.4.2. Response

4.4.2.1. Success

4.4.2.1.1. Status: 200 Message: Remove Successful

4.4.2.2. Fail

4.4.2.2.1. Status: 401 not authorized to perform that action

4.4.2.3. Fail

4.4.2.3.1. Status: 404 The resource could not be found

4.4.3. Form

4.5. Empty - Clear all dishes/boxes in Cart

4.5.1. Request

4.5.1.1. URL: /api/orders/:number/empty

4.5.1.2. Method: PUT

4.5.1.3. Authentication: User

4.5.1.4. Data: No

4.5.2. Response

4.5.2.1. Success

4.5.2.1.1. Status: 204 No Content

4.5.2.2. Fail

4.5.2.2.1. Status: 401 not authorized to perform that action

4.5.2.3. Fail

4.5.2.3.1. Status: 404 The resource could not be found

4.5.3. Form

4.6. Change status of line_items followed by delivery date

4.6.1. Request

4.6.1.1. URL: /api/orders/:number/line_items_status

4.6.1.2. Method: POST

4.6.1.3. Authentication: Admin

4.6.1.4. Data: line_item: status, delivery_date

4.6.2. Response

4.6.2.1. Success

4.6.2.1.1. Status: 200 Message: Update Status Successful

4.6.2.2. Fail

4.6.2.2.1. Status: 404 The resource could not be found

4.6.2.3. Fail

4.6.2.3.1. Status: 401 Unauthorized: Invalid API Key

4.6.3. Form

4.7. Update Address and Time Delivery

4.7.1. Request

4.7.1.1. URL: /api/orders/:number

4.7.1.2. Method: PUT

4.7.1.3. Authentication: User

4.7.1.4. Data: address information and time_delivery_id

4.7.2. Response

4.7.2.1. Success

4.7.2.1.1. Status: 200 Message: Update Address - Time Successful

4.7.2.2. Fail

4.7.2.2.1. Status: 401 not authorized to perform that action

4.7.2.3. Fail

4.7.2.3.1. Status: 404 The resource could not be found

4.7.3. Form

4.8. Get all line_items (dish/box) in upcoming Order

4.8.1. Request

4.8.1.1. URL: /api/orders/mine/upcoming

4.8.1.2. Method: GET

4.8.1.3. Authentication: User

4.8.1.4. Data: No

4.8.2. Response

4.8.2.1. Success

4.8.2.1.1. Status: 200 orders array

4.8.2.2. Fail

4.8.2.2.1. Status: 401 Invalid API Key

4.8.3. Form

4.9. Get all line_items (dish/box) in past Order

4.9.1. Request

4.9.1.1. URL: /api/orders/mine/past

4.9.1.2. Method: GET

4.9.1.3. Authentication: No

4.9.1.4. Data: No

4.9.2. Response

4.9.2.1. Success

4.9.2.1.1. Status: 200 orders array

4.9.2.2. Fail

4.9.2.2.1. Status: 401 Invalid API Key

4.9.3. Form

4.10. Allow User Place Order

4.10.1. Request

4.10.1.1. URL: /api/placeorder/:number

4.10.1.2. Method: POST

4.10.1.3. Authentication: User

4.10.1.4. Data: No

4.10.2. Response

4.10.2.1. Success

4.10.2.1.1. Status: 200 New cart number and prepaid card information

4.10.2.2. Fail

4.10.2.2.1. Status: 406 Message: Your Money in Prepaid Card is not enough

4.10.2.3. Fail

4.10.2.3.1. Status: 404 The resource could not be found

4.10.2.4. Fail

4.10.2.4.1. Status: 401 Invalid API Key

4.10.3. Form

5. Enter information

5.1. Get All Information: Address, Delivery Time, Survey, Payment method

5.1.1. Request

5.1.1.1. URL: /api/enter_customer_infor

5.1.1.2. Method: GET

5.1.1.3. Authentication: User

5.1.1.4. Data: order_number

5.1.2. Response

5.1.2.1. Success

5.1.2.1.1. Status: 200 Information of Order

5.1.2.2. Fail

5.1.2.2.1. Status: 401 not authorized to perform that action

5.1.2.3. Fail

5.1.2.3.1. Status: 404 The resource could not be found

5.1.2.4. Fail

5.1.2.4.1. Status: 401 not authorized to perform that action

5.1.2.5. Fail

5.1.2.5.1. Status: 404 The resource could not be found

5.1.3. Form

5.2. Set Information: Address, Delivery Time, Survey, Payment method

5.2.1. Request

5.2.1.1. URL: /api/enter_customer_id

5.2.1.2. Method: POST

5.2.1.3. Authentication: User

5.2.1.4. Data: address, survey, payment type, time_delivery_id, cart_number

5.2.2. Response

5.2.2.1. Success

5.2.2.1.1. Status: 200 Message: Add Enter Information for User Successful

5.2.2.2. Fail

5.2.2.2.1. Status: 401 not authorized to perform that action

5.2.2.3. Fail

5.2.2.3.1. Status: 404 The resource could not be found

5.2.2.4. Fail

5.2.2.4.1. Status: 401 not authorized to perform that action

5.2.2.5. Fail

5.2.2.5.1. Status: 404 The resource could not be found

5.2.3. Form

5.3. Update Information: Address, Delivery Time, Survey, Payment method

5.3.1. Request

5.3.1.1. URL: /api/enter_customer_id

5.3.1.2. Method: PUT

5.3.1.3. Authentication: User

5.3.1.4. Data: address, survey, payment type, time_delivery_id, cart_number

5.3.2. Response

5.3.2.1. Success

5.3.2.1.1. Status: 200 Message: Update Enter Information for User Successful

5.3.2.2. Fail

5.3.2.2.1. Status: 401 not authorized to perform that action

5.3.2.3. Fail

5.3.2.3.1. Status: 404 The resource could not be found

5.3.3. Form

5.4. Get latest Address of User

5.4.1. Request

5.4.1.1. URL: /api/address_latest

5.4.1.2. Method: GET

5.4.1.3. Authentication: User

5.4.1.4. Data: No

5.4.2. Response

5.4.2.1. Success

5.4.2.1.1. Status: 200 time_delivery_id, address

5.4.2.2. Fail

5.4.2.2.1. Status: 401 Invalid API Key

5.4.3. Form

6. Payment

6.1. Get all Prepaid Categories

6.1.1. Request

6.1.1.1. URL: /api/prepaid_categories

6.1.1.2. Method: GET

6.1.1.3. Authentication: No

6.1.1.4. Data: No

6.1.2. Response

6.1.2.1. Success

6.1.2.1.1. Status: 200 Prepaid Categories List

6.1.2.2. Fail

6.1.2.2.1. Status: 401 Invalid API Key

6.1.3. Form

6.2. Listener for Paypal send IPN Messages

6.2.1. Request

6.2.1.1. URL: /paypal

6.2.1.2. Method: POST

6.3. Check result of Transaction with trans custom

6.3.1. Request

6.3.1.1. URL: /api/transactions/:trans

6.3.1.2. Method: GET

6.3.1.3. Authentication: User

6.3.1.4. Data: No

6.3.2. Response

6.3.2.1. Success

6.3.2.1.1. Status: 200 Result of Transaction

6.3.2.2. Fail

6.3.2.2.1. Status: 404 Message: Not Receive Response

6.3.3. Form