Customer API
This is a section of API to provide access to registration, customer login and account access.
It is highly recommended to use HTTPS to access this part of API.
Customer Login or authentication confirmation
This API request needs to be done every time customer request to login to get access to customer account or just to confirm that current authentication is still valid and not expired.
Route: a/account/login
Method: POST
Example logon request:
POST: rt=a/account/login , loginname=testlogin , password=123456789
Example response: Success
{"status":1,"success":"Logged in","token":"58fb1592f0c59b8dc1d5541aebdff8da"}Example response: Fail
{"status":0,"error":"Login attempt failed!"}Example authentication check request:
POST: rt=a/account/login , token=58fb1592f0c59b8dc1d5541aebdff8da
Example response:
{
"status":1,
"request":"authorized"
}Account Logout
Simple log out request. Token needs to be disregarded from future use.
Route: a/account/logout
Method: POST
Example request:
POST: rt=a/account/logout , token=58fb1592f0c59b8dc1d5541aebdff8da
Example response:
{
"status":1,
"success":"Logged out"
}Customer Account Details
Get basic customer Details.
Route: a/account/account
Method: POST
Example request:
POST: rt=a/account/account , token=58fb1592f0c59b8dc1d5541aebdff8da
Example response:
{
"title":"My Account",
"customer_id":"14",
"firstname":"Joe",
"lastname":"Doe",
"email":"test@test.com",
"information":"a\/account\/edit",
"history":"a\/account\/history",
"newsletter":"a\/account\/logout"
}Customer Account History
Get customer order history.
Route: a/account/history
Method: POST
Example request:
POST: rt=a/account/history , token=58fb1592f0c59b8dc1d5541aebdff8da
Example response:
{
"orders":[
],
"total_orders":0
}