Fresh Tasty Ecommerce Site

시작하기. 무료입니다
또는 회원 가입 e메일 주소
Fresh Tasty Ecommerce Site 저자: Mind Map: Fresh Tasty Ecommerce Site

1. Order

1.1. Add Dishes/Boxes into Cart

1.1.1. Request

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

1.1.1.2. Method: POST

1.1.1.3. Authentication: User

1.1.1.4. Data: line_items[]

1.1.2. Response

1.1.2.1. Success

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

1.1.2.2. Fail

1.1.2.2.1. Status: 404 The resource could not be found

1.1.2.3. Fail

1.1.2.3.1. Status: 401 Invalid API Key

1.1.3. Form

1.2. Get All Dishes and Boxes from Cart

1.2.1. Request

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

1.2.1.2. Method: GET

1.2.1.3. Authentication: User

1.2.1.4. Data: No

1.2.2. Response

1.2.2.1. Success

1.2.2.1.1. Status: 200 line_items array

1.2.2.2. Fail

1.2.2.2.1. Status: 401 not authorized to perform that action

1.2.3. Form

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

1.3.1. Request

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

1.3.1.2. Method: PUT

1.3.1.3. Authentication: User

1.3.1.4. Data: quantity, delivery_date

1.3.2. Response

1.3.2.1. Success

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

1.3.2.2. Fail

1.3.2.2.1. Status: 401 not authorized to perform that action

1.3.2.3. Fail

1.3.2.3.1. Status: 404 The resource could not be found

1.3.3. Form

1.4. Remove line_item (dish/box) in Cart

1.4.1. Request

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

1.4.1.2. Method: DELETE

1.4.1.3. Authentication: User

1.4.1.4. Data: No

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. Empty - Clear all dishes/boxes in Cart

1.5.1. Request

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

1.5.1.2. Method: PUT

1.5.1.3. Authentication: User

1.5.1.4. Data: No

1.5.2. Response

1.5.2.1. Success

1.5.2.1.1. Status: 204 No Content

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

1.6. Change status of line_items followed by delivery date

1.6.1. Request

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

1.6.1.2. Method: POST

1.6.1.3. Authentication: Admin

1.6.1.4. Data: line_item: status, delivery_date

1.6.2. Response

1.6.2.1. Success

1.6.2.1.1. Status: 200 Message: Update Status Successful

1.6.2.2. Fail

1.6.2.2.1. Status: 404 The resource could not be found

1.6.2.3. Fail

1.6.2.3.1. Status: 401 Unauthorized: Invalid API Key

1.6.3. Form

1.7. Update Address and Time Delivery

1.7.1. Request

1.7.1.1. URL: /api/orders/:number

1.7.1.2. Method: PUT

1.7.1.3. Authentication: User

1.7.1.4. Data: address information and time_delivery_id

1.7.2. Response

1.7.2.1. Success

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

1.7.2.2. Fail

1.7.2.2.1. Status: 401 not authorized to perform that action

1.7.2.3. Fail

1.7.2.3.1. Status: 404 The resource could not be found

1.7.3. Form

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

1.8.1. Request

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

1.8.1.2. Method: GET

1.8.1.3. Authentication: User

1.8.1.4. Data: No

1.8.2. Response

1.8.2.1. Success

1.8.2.1.1. Status: 200 orders array

1.8.2.2. Fail

1.8.2.2.1. Status: 401 Invalid API Key

1.8.3. Form

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

1.9.1. Request

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

1.9.1.2. Method: GET

1.9.1.3. Authentication: No

1.9.1.4. Data: No

1.9.2. Response

1.9.2.1. Success

1.9.2.1.1. Status: 200 orders array

1.9.2.2. Fail

1.9.2.2.1. Status: 401 Invalid API Key

1.9.3. Form

1.10. Allow User Place Order

1.10.1. Request

1.10.1.1. URL: /api/placeorder/:number

1.10.1.2. Method: POST

1.10.1.3. Authentication: User

1.10.1.4. Data: No

1.10.2. Response

1.10.2.1. Success

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

1.10.2.2. Fail

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

1.10.2.3. Fail

1.10.2.3.1. Status: 404 The resource could not be found

1.10.2.4. Fail

1.10.2.4.1. Status: 401 Invalid API Key

1.10.3. Form

2. Enter information

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

2.1.1. Request

2.1.1.1. URL: /api/enter_customer_infor

2.1.1.2. Method: GET

2.1.1.3. Authentication: User

2.1.1.4. Data: order_number

2.1.2. Response

2.1.2.1. Success

2.1.2.1.1. Status: 200 Information of Order

2.1.2.2. Fail

2.1.2.2.1. Status: 401 not authorized to perform that action

2.1.2.3. Fail

2.1.2.3.1. Status: 404 The resource could not be found

2.1.2.4. Fail

2.1.2.4.1. Status: 401 not authorized to perform that action

2.1.2.5. Fail

2.1.2.5.1. Status: 404 The resource could not be found

2.1.3. Form

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

2.2.1. Request

2.2.1.1. URL: /api/enter_customer_id

2.2.1.2. Method: POST

2.2.1.3. Authentication: User

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

2.2.2. Response

2.2.2.1. Success

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

2.2.2.2. Fail

2.2.2.2.1. Status: 401 not authorized to perform that action

2.2.2.3. Fail

2.2.2.3.1. Status: 404 The resource could not be found

2.2.2.4. Fail

2.2.2.4.1. Status: 401 not authorized to perform that action

2.2.2.5. Fail

2.2.2.5.1. Status: 404 The resource could not be found

2.2.3. Form

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

2.3.1. Request

2.3.1.1. URL: /api/enter_customer_id

2.3.1.2. Method: PUT

2.3.1.3. Authentication: User

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

2.3.2. Response

2.3.2.1. Success

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

2.3.2.2. Fail

2.3.2.2.1. Status: 401 not authorized to perform that action

2.3.2.3. Fail

2.3.2.3.1. Status: 404 The resource could not be found

2.3.3. Form

2.4. Get latest Address of User

2.4.1. Request

2.4.1.1. URL: /api/address_latest

2.4.1.2. Method: GET

2.4.1.3. Authentication: User

2.4.1.4. Data: No

2.4.2. Response

2.4.2.1. Success

2.4.2.1.1. Status: 200 time_delivery_id, address

2.4.2.2. Fail

2.4.2.2.1. Status: 401 Invalid API Key

2.4.3. Form

3. Payment

3.1. Get all Prepaid Categories

3.1.1. Request

3.1.1.1. URL: /api/prepaid_categories

3.1.1.2. Method: GET

3.1.1.3. Authentication: No

3.1.1.4. Data: No

3.1.2. Response

3.1.2.1. Success

3.1.2.1.1. Status: 200 Prepaid Categories List

3.1.2.2. Fail

3.1.2.2.1. Status: 401 Invalid API Key

3.1.3. Form

3.2. Listener for Paypal send IPN Messages

3.2.1. Request

3.2.1.1. URL: /paypal

3.2.1.2. Method: POST

3.3. Check result of Transaction with trans custom

3.3.1. Request

3.3.1.1. URL: /api/transactions/:trans

3.3.1.2. Method: GET

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 Result of Transaction

3.3.2.2. Fail

3.3.2.2.1. Status: 404 Message: Not Receive Response

3.3.3. Form

4. Dish

4.1. Get All Dishes available in System

4.1.1. Request

4.1.1.1. URL: /api/products

4.1.1.2. Method: GET

4.1.1.3. Authentication: No

4.1.1.4. Data: No

4.1.2. Response

4.1.2.1. Success

4.1.2.1.1. Status: 200 Dishes List

4.1.3. Form

4.2. Get all Information of one Dish

4.2.1. Request

4.2.1.1. URL: /api/products/:id

4.2.1.2. Method: GET

4.2.1.3. Authentication: No

4.2.1.4. Data: No

4.2.2. Response

4.2.2.1. Success

4.2.2.1.1. Status: 200 Dish Information

4.2.3. Form

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

4.3.1. Request

4.3.1.1. URL: /api/products_duration

4.3.1.2. Method: GET

4.3.1.3. Authentication: No

4.3.1.4. Delivery_date: start_date, end_date

4.3.2. Response

4.3.2.1. Success

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

4.3.3. Form

4.4. Remove Delivery Date of Dish

4.4.1. Request

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

4.4.1.2. Method: DELETE

4.4.1.3. Authentication: Admin

4.4.1.4. Data: delivery date

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. Update Delivery Date of Dish

4.5.1. Request

4.5.1.1. URL: /api/date_deliveries/:id

4.5.1.2. Method: PUT

4.5.1.3. Authentication: Admin

4.5.1.4. Data: delivery_date

4.5.2. Response

4.5.2.1. Success

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

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

5. Box

5.1. Get All Boxes available in System

5.1.1. Request

5.1.1.1. URL: /api/boxes

5.1.1.2. Method: GET

5.1.1.3. Authentication: No

5.1.1.4. Data: No

5.1.2. Response

5.1.2.1. Success

5.1.2.1.1. Status: 200 Boxes List

5.1.3. Form

6. User

6.1. Register account to System

6.1.1. Request

6.1.1.1. URL: /api/users

6.1.1.2. Method: POST

6.1.1.3. Authentication : No

6.1.1.4. Data: User's information

6.1.2. Response

6.1.2.1. Success

6.1.2.1.1. Status: 200 User's basic information

6.1.2.2. Fail

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

6.1.3. Sign Up Form

6.2. Login System

6.2.1. Request

6.2.1.1. URL: /api/login

6.2.1.2. Method: POST

6.2.1.3. Authentication: No

6.2.1.4. Data: Email, Password

6.2.2. Response

6.2.2.1. Success

6.2.2.1.1. Status: 200 User's basic Information

6.2.2.2. Fail

6.2.2.2.1. Status: 404 Email or Password is wrong

6.2.2.3. Fail

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

6.2.3. Form

6.3. Logout System

6.3.1. Request

6.3.1.1. URL: /api/logout

6.3.1.2. Method: POST

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 Message: Logout Successful

6.3.2.2. Fail

6.3.2.2.1. Status: 401 Unauthorized: Invalid API Key

6.3.3. Form

6.4. Get Information of User

6.4.1. Request

6.4.1.1. URL: /api/users/:id

6.4.1.2. Method: GET

6.4.1.3. Authentication: User

6.4.1.4. Data: No

6.4.2. Response

6.4.2.1. Success

6.4.2.1.1. Status: 200 User's basic Information

6.4.2.2. Fail

6.4.2.2.1. Status: 401 Unauthorized: Invalid API key

6.4.2.3. Fail

6.4.2.3.1. Status: 404 The resource could not be found

6.4.3. Form

6.5. Update information of User

6.5.1. Request

6.5.1.1. URL: /api/users/:id

6.5.1.2. Method: PUT

6.5.1.3. Authentication: User

6.5.1.4. Data: User Information will be updated

6.5.2. Response

6.5.2.1. Success

6.5.2.1.1. Status: 200 User's basic information

6.5.2.2. Fail

6.5.2.2.1. Status: 401 Unauthorized Invalid API Key

6.5.2.3. Fail

6.5.2.3.1. Status: 404 The resource could not be found

6.5.3. Form

6.6. Change Password

6.6.1. Request

6.6.1.1. URL: /api/change_password

6.6.1.2. Method: POST

6.6.1.3. Authentication: User

6.6.1.4. Data: Password: old, new

6.6.2. Response

6.6.2.1. Success

6.6.2.1.1. Status: 200 Message: Update Password Successful

6.6.2.2. Fail

6.6.2.2.1. Status: 404 Message: Password is Not Right

6.6.2.3. Fail

6.6.2.3.1. Status: 401 Unauthorized: Invalid API Key

6.6.3. Form