API user Information
(Last update: 2020-04-19 19:32:11)
1. Create an account
2. Log in
3. Personal information
4. Log out
Note:
- To use the authentication API, files oauth-private.key, oauth-public.key must exist in directory "s-cart-folder/storage"

- To create a new key (due to deletion or replacement), you use the command "php artisan passport:keys --force"

- If you use a connection to limit the application's API access, add apikey and apiconnection information in the header of each connection.
Details HERE
1. Create an account
Link: https://your-domain.com/api/auth/create
Method: POST
- Required fields:
+ reg_first_name:
+ reg_email:
+ reg_password:
+ reg_address1:
Header:
Not required
- Additional fields depend on the configuration in the admin

+ reg_last_name
+ reg_address2
+ reg_phone
+ reg_country: Code ISO. Example: VN, EN, AU
+ reg_postcode
+ reg_company
+ reg_sex
+ reg_birthday
+ reg_group
- Results returned: Newly created user information

2. Log in
Link: https://your-domain.com/api/auth/login
Method: POST
Data fields:
+ email
+ password
+ remember_me: optional. If the value is 1, the login session lasts 1 week.
Header:
Not required
Results returned:
Successful results will receive "access_token" as below

3. Personal information
Note:
All APIs that take user personal information, header must be valid as "Authorization" is Bearer+'space'+access_token
With:
+ Bearer: token type
+ access_token: Received after login above.

3.1. Get user information
Link: https://your-domain.com/api/auth/user
Method: GET
Data fields:
Not required
Header:
Required

3.2. Get the list of orders
Link: https://your-domain.com/api/auth/orders
Method: GET
Data fields:
Not required
Header:
Required

3.3. Get order detail
Link: https://your-domain.com/api/auth/orders/{id}
Method: GET
Data fields:
Not required
Header:
Required

4. Log out
Link: https://your-domain.com/api/auth/logout
Method: GET
Data fields:
Not required
Header:
Required
2. Log in
3. Personal information
4. Log out
Note:
- To use the authentication API, files oauth-private.key, oauth-public.key must exist in directory "s-cart-folder/storage"

- To create a new key (due to deletion or replacement), you use the command "php artisan passport:keys --force"

- If you use a connection to limit the application's API access, add apikey and apiconnection information in the header of each connection.
Details HERE
1. Create an account
Link: https://your-domain.com/api/auth/create
Method: POST
- Required fields:
+ reg_first_name:
+ reg_email:
+ reg_password:
+ reg_address1:
Header:
Not required
- Additional fields depend on the configuration in the admin

+ reg_last_name
+ reg_address2
+ reg_phone
+ reg_country: Code ISO. Example: VN, EN, AU
+ reg_postcode
+ reg_company
+ reg_sex
+ reg_birthday
+ reg_group
- Results returned: Newly created user information

2. Log in
Link: https://your-domain.com/api/auth/login
Method: POST
Data fields:
+ password
+ remember_me: optional. If the value is 1, the login session lasts 1 week.
Header:
Not required
Results returned:
Successful results will receive "access_token" as below

3. Personal information
Note:
All APIs that take user personal information, header must be valid as "Authorization" is Bearer+'space'+access_token
With:
+ Bearer: token type
+ access_token: Received after login above.

3.1. Get user information
Link: https://your-domain.com/api/auth/user
Method: GET
Data fields:
Not required
Header:
Required

3.2. Get the list of orders
Link: https://your-domain.com/api/auth/orders
Method: GET
Data fields:
Not required
Header:
Required

3.3. Get order detail
Link: https://your-domain.com/api/auth/orders/{id}
Method: GET
Data fields:
Not required
Header:
Required

4. Log out
Link: https://your-domain.com/api/auth/logout
Method: GET
Data fields:
Not required
Header:
Required
