Client API

get
Get User Data - Logged user data

https://yourdomain.com/api/user/data
This endpoint get logged user data.
Request
Response
Request
Path Parameters
api_token
required
string
The user api token
Response
200: OK
{
"name": "User name",
"email": "[email protected]",
"phone": "001122334455"
}

post
Get Token - Login user via email

https://yourdomain.com/api/clientgettoken
This endpoint get client token.
Request
Response
Request
Form Data Parameters
password
required
string
email
required
string
Response
200: OK
{
"status": true,
"token": "THE_TOKEN",
"id": 3
}
401: Unauthorized

post
Register - Register user via email

https://yourdomain.com/api/client/register
This endpoint register new client.
Request
Response
Request
Form Data Parameters
app_secret
required
string
The app secret
phone
required
string
name
required
string
password
required
string
email
required
string
Response
200: OK
{
"status": true,
"token": "THE_TOKEN",
"id": 3
}
401: Unauthorized

post
Login or register with Facebook

https://yourdomain.com/api/client/loginfb
Login or register user via Facebook
Request
Response
Request
Form Data Parameters
email
required
string
Email
name
required
string
Name
phone
required
string
Phone
app_secret
required
string
The app secret
fb_id
required
string
The Facebook ID
Response
200: OK
{
"status": true,
"token": "THE_TOKEN",
"id": 3
}

post
Login or register via Google

https://yourdomain.com/api/client/logingoogle
Login or register via Google
Request
Response
Request
Form Data Parameters
email
required
string
Email
name
required
string
Name
phone
required
string
Phone
google_id
required
string
The google id
app_secret
required
string
The app secret
Response
200: OK
{
"status": true,
"token": "THE_TOKEN",
"id": 3
}

get
Get Restaurants

https://yourdomain.com/api/restorantslist
This endpoint will retrieve all restaurants.
Request
Response
Request
Query Parameters
lng
optional
string
The longitude of the user
lat
optional
string
The latitude of the user
Response
200: OK

get
Get Restaurant Items

https://yourdomain.com/api/restorant/{id}/items
This endpoint will retrieve restaurant items.
Request
Response
Request
Path Parameters
id
required
integer
The restaurant id.
Response
200: OK

post
Get settings

https://yourdomain.com/api/app/settings
Request
Response
Request
Form Data Parameters
app_secret
required
string
Get app settings
Response
200: OK
Get project data, like what kind of payment methods should we show.

post
Make order

https://yourdomain.com/api/make/order
This endpoint will make new order.
Request
Response
Request
Form Data Parameters
timeslot
optional
string
The time slot for delivery or pickup
order_price
required
number
Total order price with delivery if delivery
delivery_method
required
string
delivery or pickup
stripe_token
optional
string
The stripe payment id method. Required if payment method is stripe.
payment_method
required
string
cod | stripe
api_token
required
string
The user api token
comment
optional
string
Comment on order
restaurant_id
required
integer
The restaurant id
address_id
required
integer
The address id
items
required
array
The order items ex [{id:1,qty:1}]
Response
200: OK

get
My Orders

https://yourdomain.com/api/myorders
This endpoint will retrieve client orders.
Request
Response
Request
Path Parameters
api_token
required
string
The authentication token.
Response
200: OK

get
My Addresses

https://yourdomain.com/api/myaddresses
This endpoint will retrieve client addresses.
Request
Response
Request
Path Parameters
api_token
required
string
The authentication token.
Response
200: OK

post
Make address

https://yourdomain.com/api/make/address
Makes an address for this user
Request
Response
Request
Form Data Parameters
api_token
required
string
lng
required
string
lat
required
string
address
required
string
The address name
Response
200: OK

post
Delete address

https://yourdomain.com/api/delete/address
Delete an address of user
Request
Response
Request
Form Data Parameters
id
required
string
api_token
required
string
Response
200: OK

get
Get Notifications

https://yourdomain.com/api/mynotifications
Get notifications
Request
Response
Request
Query Parameters
api_token
optional
string
Response
200: OK