# Request Flow

For every action that handles user interaction with the app (e.g.: login, registration or ordering a product) the API works as a Proxy between the hubble PWA and the actual shopping backend.

# Request Flow - Overview

Realm Request Method Auth Required

Payment API

Route

Payment API

Response

Customer Login POST (Minus) /api/login

(Info) create personal access token

  • success (boolean)
  • auth (personal access token)
  • user (object)

Example:
Request / Response - Customer Login

Customer Logout POST (Haken) /api/logout

(Info) revoke personal access token

  • success (boolean)
  • message
  • users (null)
  • token (null)

Example:
Request / Response - Customer Logout

Customer Registration POST (Minus) /api/register

(Info) create personal access token

  • success (boolean)
  • auth (personal access token)
  • user (object)

Example:
Request / Response - Customer Register

Add Customer Address POST (Haken)

api/customer/{customer}/
addresses

Request / Response - Customer Addresses POST
Get Customer Address GET (Haken) api/customer/{customer}/
addresses
Request / Response - Customer Addresses GET
Edit Customer Address PUT | PATCH (Haken)

api/customer/{customer}/
addresses/{address}

Request / Response - Customer Addresses PUT | PATCH
Delete Customer Address DELETE (Haken) api/customer/{customer}/
addresses/{address}
Request / Response - Customer Addresses DELETE
Apply Coupon POST (Minus)

api/cart/apply_coupon

(Info) Request contains stringified JSON

Request / Response - Apply Coupon

Recalculate Cart POST (Minus)

api/cart/recalculate

(Info) Request and Response contains stringified JSON

Request / Response - Recalculate Cart

Post Form Recaptcha V3 POST (Minus) api/form_recaptcha

(Info) Request Parameter contains stringified JSON

Request / Response - Post Form Recaptcha V3

Post Form POST (Minus) api/form

(Info) Request Parameter contains stringified JSON

Request / Response - Post Form

Store Order POST (Minus) api/order

(Info) Request Parameter contains stringified JSON

Request / Response - Store Order

Get All Orders GET (Minus) api/order

(Info) Response Parameter contains stringified JSON

Request / Response - Get Orders

Get Payments GET (Minus) api/payment Request / Response - Get Payments
Get Shipping GET (Minus) api/shipping Request / Response - Get Shipping