API admin

1. Login
2. Management Information
3. Logout

Note:
Please see the general guide for all APIs first: https://s-cart.org/en/developer/master/about-api-scart.html


1. Login
Link: https://your-domain.com/api/admin/login
Method: POST
Field data:
+ username
+ password
+ remember_me: optional. If value 1, login session lasts 1 week.
Results returned:
Successful result will get "access_token" as below


2. Management Information

NOTE:
- All APIs get the user's personal information, the header must have a value "Authorization"  is Bearer+'space'+access_token
- Admin can create order for any customer (specify customer_id), can view or delete all orders

Inside:
+ Bearer: Token Type
+ access_token: Received after login above


Api access token

3.1. Get admin information
Link: https://your-domain.com/api/admin/info
Method: GET


3.2. Create new order
Link: http://scart.local/api/admin/create_order
Method: POST
Data field:
Ref: https://s-cart.org/demo-api/#/Admin/Adminaddorder

Result: 



3.3. Get orders list
Link: https://your-domain.com/api/admin/orders
Method: GET


3.4. Get order detail
Link: https://your-domain.com/api/admin/orders/{id}
Method: GET
Api chi tiết đơn hàng

3.5. Cancel order
Link: https://your-domain.com/api/admin/cancel_order/{id}
Method: POST
Api chi tiết đơn hàng

4. Logout
Link: https://your-domain.com/api/admin/logout
Method: GET
Api đăng xuất

Related topics

Latest Document