---
# System prepended metadata

title: Bonat (API DOCS)

---

# Bonat (API DOCS)

#### Basic api ==> `/api/v2/` `//then the api follows with:`

### 1- **`/merchant`**

 
 ```js
   POST | /info
```
  * body :newspaper: 
  ```js
  // the body request here is coming from the login response 
  {
  balance: 1534.05,
  email: 'ibrahim2@gmail.com',
  idMerchant: '1003',
 merchantImageUrl: 'https://www.48hourslogo.com/48hourslogo_data/2018/03/26/71697_1522068644.jpg',
  name: 'Your Tea',
  ourToken: /*our generated token*/,
  phoneNumber: '11255322563',
  token: /* the token */,
__v: 0,
_id: '5cec31ac8f81e2460ec742ac' // this value is greated from the mongodb
}
Note : inside this request we will ading default segment 
 function name: setDefaultSegmentsForMerchant(result._id) 
  ```
   * response: on success should return cookie in the response header and the body will be like :white_check_mark: 
 ```json
 {
   "balance": 1534.05,
    "_id": "5cec31ac8f81e2460ec742ac",
    "idMerchant": "1003",
    "email": "ibrahim2@gmail.com",
    "merchantImageUrl": "https://www.48hourslogo.com/48hourslogo_data/2018/03/26/71697_1522068644.jpg",
    "name": "Your Tea",
    "phoneNumber": "11255322563",
    "__v": 0,
    "token": /*token */,
    "ourToken": /*our generated token*/
 }
 ```
 ---
 ```js
  POST | /set-password
  ```
  * body 
  
  ```js
  {
    email:'fatma.o.siam@gmail.com',
    oldPassword:/*old password*/,
    confirmPassword: /* confirmed password*/,
    password:/* the new password*/
  }
  Note: inside this request, there is another request to rest the password
  ```
  * response: on success like this :white_check_mark: 
  
  ```js
  response // the response when the status code 200
  ```
  
---
### 2- `/merchant/gift`