- Core API's
- >
- Categories API Documentation
Categories API Documentation
A Simple to use CRUD API for your Categories application. This API is ready to use with any frontend/backend framework or language.
Endpoints
Name | Endpoint | Method | Copy |
---|---|---|---|
Category List | /api/categories | GET | |
Category Detail | /api/categories/1 | GET | |
Category Create | /api/categories | POST | |
Category Update | /api/categories/1 | PUT | |
Category Delete | /api/categories/1 | DELETE |
How to Use
Category List API
fetch('https://simplecrudapi.com/api/categories')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
Category Detail API
fetch('https://simplecrudapi.com/api/categories/1')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
Category Create API
fetch('https://simplecrudapi.com/api/categories', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
'name': 'Education',
'description': 'Resources and information for lifelong learning.'
})
})
.then(response => response.json())
.then(json => console.log(json))
.catch(error => console.error(error));
Category Update API
fetch('https://simplecrudapi.com/api/categories/1', {
method: 'PUT',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
'name': 'Education',
'description': 'Resources and information for lifelong learning.'
})
})
.then(response => response.json())
.then(json => console.log(json))
.catch(error => console.error(error));
Category Delete API
fetch('https://simplecrudapi.com/api/categories/1', {
method: 'DELETE',
headers: {
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(json => console.log(json))
.catch(error => console.error(error));
Code Sandbox Demos
No Code sandbox demos found yet!
No demos found, You can create a demo and contact us to put that with your credit link.
Contact UsOr,
Browse All Code sandbox Demos