SHARE
TWEET

Untitled

a guest Apr 27th, 2018 139 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // POST /api/v1/login
  2. // payload:
  3. {
  4.   username: “danillashin”,
  5.   password: “mypass”,
  6. };
  7. // result:
  8. {
  9.   "success": true,
  10.   "code": 200,
  11.   "data":
  12.   {
  13.       token: "sdnv93qwq9efu0q23npAE9FSYDVB",
  14.       user: {
  15.         id: 1,
  16.         username: “danillashin”,
  17.         encryptedMnemonics: [
  18.           {
  19.             isMain: true,
  20.             address: “Mx...”,
  21.             data: “...”
  22.           }
  23.         ],
  24.       }
  25.   },
  26.   "message": ""
  27. };
  28.  
  29. // POST /api/v1/register
  30. // payload:
  31. {
  32.   username: “danillashin”,
  33.   password: “mypass”,
  34.   email: “danil-lashin@ya.ru,
  35.   phone:+7...”,
  36.   encryptedMnemonic: {
  37.     isMain: true,
  38.     address: “Mx...”,
  39.     data: “...”
  40.   }
  41. };
  42. // result:
  43. {
  44.   "success": true,
  45.   "code": 201,
  46.   "data":{
  47.     confirmations: [
  48.       {
  49.         type: "sms",
  50.         endpoint: "/api/v1/confirmation/7815696ecbf1c96e6894b779456d330e"
  51.       },
  52.       {
  53.         type: "email",
  54.         endpoint: "/api/v1/confirmation/fw34hsd9fahppqwdfhqp49fhgpsaifuh"
  55.       }
  56.     ]
  57.   },
  58.   "message": ""
  59. };
  60.  
  61. // GET /api/v1/profile
  62. // result:
  63. {
  64.   "success": true,
  65.   "code": 200,
  66.   "data":{
  67.     user_profile: {
  68.         id: 1,
  69.         username: “danillashin”,
  70.         email: “danil-lashin@ya.ru,
  71.         phone:+7...”
  72.         language: “en”
  73.       }
  74.     },
  75.   "message": ""
  76. };
  77.  
  78. // PUT /api/v1/profile
  79. // payload:
  80. {
  81.   username: “danillashin”,
  82.   password: “mypass”,
  83.   email: “danil-lashin@ya.ru,
  84.   phone:+7...”
  85.   language: “en”,
  86. };
  87. // result:
  88. {
  89.   "success": true,
  90.   "code": 200,
  91.   "data":[],
  92.   "message": ""
  93. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top