Documentation

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

Todo

Get All Todos

fetch('https://api.storerestapi.com/todos')
  .then(response => response.json())
  .then(json => console.log(json))

Add New Todo

fetch('https://api.storerestapi.com/todos',
  {
    method: 'POST',
    body: JSON.stringify({
      "title": "Conduct code reviews regularly",
      "status": "TODO",
      "description": "Some description"
    }),
    headers: {
      'Content-type': 'application/json; charset=UTF-8',
    },
  })
  .then(response => response.json())
  .then(json => console.log(json))

Update Todo

fetch('https://api.storerestapi.com/todos/654fbbee25a4902cc1fc7032',
  {
    method: 'PUT',
    body: JSON.stringify({
      "status": "IN_PROGRESS",
      "description": "Update description"
    }),
    headers: {
      'Content-type': 'application/json; charset=UTF-8',
    },
  })
  .then(response => response.json())
  .then(json => console.log(json))

Delete Todo

fetch('https://api.storerestapi.com/todos/654fbbee25a4902cc1fc7032',
  {
    method: 'DELETE',
  })
  .then(response => response.json())
  .then(json => console.log(json))