GET - grab resource PUT - update resource (replace) PATCH - update in resource provided fields POST - create new resource DELETE - delete resource
200 - all good 201 - created resource 204 - nothing to respond, but all good
400 - error happens 401 - unauthorized (auth not provided) 403 - forbidden (auth provided, but not valid for given resource) 404 - not found (requested resource not found on server) 429 - no many requests
500 - server error
{
"message": "Optional massage. Error message on errors",
"data": [ {} ] // can be object or array of objects
"errors": { // optional in case of provided fields error
"fieldName": "error description for field",
"anotherField": "another field error"
},
"total": 400, //in case of pagination request shouls return total count
"page" :1, //in case of pagination
"limit": 30 //in case of pagination
}
Do not include "status" field