Working with the user
Registering in the system
HOST: https://api.mixapp.io
Path: /v1/signup
Method: POST
Headers:
Content-Type: application/json
Body:
{ "email":"user@domain.com", "name": "YourName" }
Response:
Success
{
"password": "password",
"token": "token",
"user": {
"avatar": "",
"email": "user@domain.com",
"id": "58ecb9b427218c4f59ac1db9",
"last_login": "2017-04-11T14:10:44.761368829+03:00",
"name": "YourName",
"password": "b973b7e8ee9e6400e0dff36ca8fb6a96",
"reg_date": "2017-04-11T14:10:44.761368864+03:00",
"workplaces": []
}
}
Error
JSON
{
error_code: int,
error_message: string,
more_info: ""
}
Authorising in the system
HOST: https://api.mixapp.io
Path: /v1/signin
Method: POST
Headers:
Content-Type: application/json
Body:
{ "email":"user@domain.com", "password": "YourPassword" }
Response:
Success
{
"token": "token",
"user": {
"avatar": "",
"email": "user@domain.com",
"id": "58ecb9b427218c4f59ac1db9",
"last_login": "2017-04-11T14:10:44.761368829+03:00",
"name": "YourName",
"password": "b973b7e8ee9e6400e0dff36ca8fb6a96",
"reg_date": "2017-04-11T14:10:44.761368864+03:00",
"workplaces": []
}
}
Error
JSON
{
error_code: int,
error_message: string,
more_info: ""
}
Updating user info
HOST: https://api.mixapp.io
Path: /v1/update
Method: POST
Headers:
Content-Type: application/json
Body:
{ "name": "Ники111та", "avatar": "wefwef", "password": "NewPassword | empty" }
Response:
Success
{
"user": {
"avatar": "",
"email": "user@domain.com",
"id": "58ecb9b427218c4f59ac1db9",
"last_login": "2017-04-11T14:10:44.761368829+03:00",
"name": "YourName",
"password": "b973b7e8ee9e6400e0dff36ca8fb6a96",
"reg_date": "2017-04-11T14:10:44.761368864+03:00",
"workplaces": []
}
}
Error
JSON
{
error_code: int,
error_message: string,
more_info: ""
}
Password reset
HOST: https://api.mixapp.io
Path: /v1/repair
Method: POST
Headers:
Content-Type: application/json
Body:
{ "email":"user@domain.com" }
Response:
Success
{
"result": true
}
If the request is executed successfully, an e-mail containing a link to generate a new password will be sent.
Error
JSON
{
error_code: int,
error_message: string,
more_info: ""
}
Password reset - setting a new password
HOST: https://api.mixapp.io
Path: /v1/repair/:token
token - code from the e-mail sent after password reset was requested
Method: POST
Headers:
Content-Type: application/json
Body:
{ "password": "NewPassword" }
Response:
Success
{
"result": true
}
If the request is executed successfully, an e-mail containing a link to generate a new password will be sent.
Error
JSON
{
error_code: int,
error_message: string,
more_info: ""
}