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:
Header:
- Return result: Newly created user information
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
3. Customer information
+ Bearer: Token Type
+ access_token: Received after login above
3.1. Get customer information
Link: https://your-domain.com/api/member/info
Method: GET
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:
3.3. Get orders list
Link: https://your-domain.com/api/member/orders
Method: GET
3.4. Get order detail
Link: https://your-domain.com/api/member/orders/{id}
Method: GET
3.5. Cancel order
Link: https://your-domain.com/api/member/cancel_order/{id}
Method: POST
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:
Header:
- Return result: Newly created user information
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
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
3.1. Get customer information
Link: https://your-domain.com/api/member/info
Method: GET
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:
3.3. Get orders list
Link: https://your-domain.com/api/member/orders
Method: GET
3.4. Get order detail
Link: https://your-domain.com/api/member/orders/{id}
Method: GET
3.5. Cancel order
Link: https://your-domain.com/api/member/cancel_order/{id}
Method: POST
4. Logout
Link: https://your-domain.com/api/member/logout
Method: GET
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