Documentation

You can copy paste the code in your browser console to quickly test Store API.

Auth

Login

fetch('https://api.storerestapi.com/auth/login',
  {
    method: 'POST',
    body: JSON.stringify({
      email: '[email protected]',
      password: 'simple_password'
    }),
    headers: {
      'Content-type': 'application/json; charset=UTF-8',
    },
  })
  .then(response => response.json())
  .then(json => console.log(json))

Registration

fetch('https://api.storerestapi.com/auth/register',
  {
    method: 'POST',
    body: JSON.stringify({
      name: 'Alex Pi',
      email: '[email protected]',
      number: 12025550108,
      password: 'Simple12345',
      password_repeat: 'Simple12345'
    }),
    headers: {
      'Content-type': 'application/json; charset=UTF-8',
    },
  })
  .then(response => response.json())
  .then(json => console.log(json))

Refresh Token

fetch('https://api.storerestapi.com/auth/refresh',
  {
    method: 'POST',
    body: JSON.stringify({
      refresh_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjY2NGY3NWY3N2VmZTlkYzJmZWFiMTMxZiIsIm5hbWUiOiJBbGV4IFBpIiwicm9sZSI6IlJPTEVfQ1VTVE9NRVIiLCJlbWFpbCI6ImV4YW1wbGVAbWFpbC5jb20ifSwiaWF0IjoxNzE2NDgzNTc1LCJleHAiOjE3MTcwODgzNzV9.QcYOn2Xtr-zyLT4WTk3Z1JvKVCvrxk1hW__8wAIogrM',
    }),
    headers: {
      'Content-type': 'application/json; charset=UTF-8',
    },
  })
  .then(response => response.json())
  .then(json => console.log(json))