Categories API

PUT - /api/v1/categories/:id - Updating

PUT /api/v1/categories/:id

Parameters

Name Description
id id
name Name
description a description

Request

Headers

Accept: application/json
X-Api-Token: VTGZbsReCfW6NBRf7G4VHAUyWdeHSStJmA
X-Api-Email: user-604@example.com

Route

PUT /api/v1/categories/5

Body

{"name":"Name","description":"test headline"}

cURL

curl "http://localhost:3000/api/v1/categories/5" -d '{"name":"Name","description":"test headline"}' -X PUT \
	-H "Accept: application/json" \
	-H "X-Api-Token: VTGZbsReCfW6NBRf7G4VHAUyWdeHSStJmA" \
	-H "X-Api-Email: user-604@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 219

Status

202 Accepted

Body

{
  "created_at": "2019-10-31T22:06:03Z",
  "name": "Name",
  "description": "test headline",
  "is_published": true,
  "id": 5,
  "meta": {
    "class": "category",
    "url": "/categories/5",
    "name": "Name",
    "description": "test headline",
    "image_url": null
  }
}