API customer
1. Create new account
2. Login
3. Customer information
4. Logout
1. Create new account
Link: https://your-domain.com/api/member/create
Method: POST
To change the customer's data fields, update in the admin website:
![](https://static.s-cart.org/guide/use/api/api-customer-field.jpg)
Header:
![](https://static.s-cart.org/guide/use/api/api-customer-header.jpg)
- Return result: Newly created user information
![](https://static.s-cart.org/guide/use/api/api-customer-response.jpg)
2. Login
Link: https://your-domain.com/api/member/login
Method: POST
Field data:
+ email
+ password
+ remember_me: optional. If value 1, login session lasts 1 week.
Results returned:
Successful result will get "access_token" as below
![](https://static.s-cart.org/guide/use/api/api-customer-login.jpg)
3. Customer information
+ Bearer: Token Type
+ access_token: Received after login above
![Api access token](https://static.s-cart.org/guide/use/api-access-token.jpg)
3.1. Get customer information
Link: https://your-domain.com/api/member/info
Method: GET
![](https://static.s-cart.org/guide/use/api/api-customer-info.jpg)
3.2. Create new order
Link: http://scart.local/api/member/create_order
Method: POST
Data field:
Ref: https://s-cart.org/demo-api/#/Customer/Customeraddneworder
Result:
![](https://static.s-cart.org/guide/use/api/api-customer-create-order.jpg)
3.3. Get orders list
Link: https://your-domain.com/api/member/orders
Method: GET
![](https://static.s-cart.org/guide/use/api/api-customer-orders.jpg)
3.4. Get order detail
Link: https://your-domain.com/api/member/orders/{id}
Method: GET
![Api chi tiết đơn hàng](https://static.s-cart.org/guide/use/api/api-customer-orders-detail.jpg)
3.5. Cancel order
Link: https://your-domain.com/api/member/cancel_order/{id}
Method: POST
![Api chi tiết đơn hàng](https://static.s-cart.org/guide/use/api/api-customer-cancel-order.jpg)
4. Logout
Link: https://your-domain.com/api/member/logout
Method: GET
2. Login
3. Customer information
4. Logout
Note:
Please see the general guide for all APIs first: https://s-cart.org/en/developer/master/about-api-scart.html
1. Create new account
Link: https://your-domain.com/api/member/create
Method: POST
To change the customer's data fields, update in the admin website:
![](https://static.s-cart.org/guide/use/api/api-customer-field.jpg)
Header:
![](https://static.s-cart.org/guide/use/api/api-customer-header.jpg)
- Return result: Newly created user information
![](https://static.s-cart.org/guide/use/api/api-customer-response.jpg)
2. Login
Link: https://your-domain.com/api/member/login
Method: POST
Field data:
+ password
+ remember_me: optional. If value 1, login session lasts 1 week.
Results returned:
Successful result will get "access_token" as below
![](https://static.s-cart.org/guide/use/api/api-customer-login.jpg)
3. Customer information
Inside:NOTE:
All APIs get the user's personal information, the header must have a value "Authorization" is Bearer+'space'+access_token
+ Bearer: Token Type
+ access_token: Received after login above
![Api access token](https://static.s-cart.org/guide/use/api-access-token.jpg)
3.1. Get customer information
Link: https://your-domain.com/api/member/info
Method: GET
![](https://static.s-cart.org/guide/use/api/api-customer-info.jpg)
3.2. Create new order
Link: http://scart.local/api/member/create_order
Method: POST
Data field:
Ref: https://s-cart.org/demo-api/#/Customer/Customeraddneworder
Result:
![](https://static.s-cart.org/guide/use/api/api-customer-create-order.jpg)
3.3. Get orders list
Link: https://your-domain.com/api/member/orders
Method: GET
![](https://static.s-cart.org/guide/use/api/api-customer-orders.jpg)
3.4. Get order detail
Link: https://your-domain.com/api/member/orders/{id}
Method: GET
![Api chi tiết đơn hàng](https://static.s-cart.org/guide/use/api/api-customer-orders-detail.jpg)
3.5. Cancel order
Link: https://your-domain.com/api/member/cancel_order/{id}
Method: POST
![Api chi tiết đơn hàng](https://static.s-cart.org/guide/use/api/api-customer-cancel-order.jpg)
4. Logout
Link: https://your-domain.com/api/member/logout
Method: GET
![Api đăng xuất](https://static.s-cart.org/guide/use/api/api-customer-logout.jpg)
Related topics
Latest Document
- Upgrade guide 2024-03-24
- Customize search page 2023-08-02
- Discount code (coupon) 2023-05-14
- Upgrade guide 2023-11-23
- Data relations in S-Cart 2023-02-05