Page Templates API

Creating Page Templates

POST /api/v1/page_templates

Parameters

Name Description
name boolean
body link text
is_published link target

Request

Headers

Accept: application/json
X-Api-Token: XkWuKontp5DHqTYzx5LgSgaE3jp2LxSJyQ
X-Api-Email: user-694@example.com

Route

POST /api/v1/page_templates

Body

{"name":"partials/footer.liquid","body":"\u003cfooter\u003ea footer\u003c/footer\u003e","is_published":true}

cURL

curl "http://localhost:3000/api/v1/page_templates" -d '{"name":"partials/footer.liquid","body":"\u003cfooter\u003ea footer\u003c/footer\u003e","is_published":true}' -X POST \
	-H "Accept: application/json" \
	-H "X-Api-Token: XkWuKontp5DHqTYzx5LgSgaE3jp2LxSJyQ" \
	-H "X-Api-Email: user-694@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

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

Status

201 Created

Body

{
  "id": 1,
  "school_id": 516,
  "path": "partials/footer",
  "is_published": true,
  "body": "<footer>a footer</footer>",
  "created_at": "2019-10-31T22:06:49Z",
  "updated_at": "2019-10-31T22:06:49Z",
  "partial": true,
  "handler": "liquid",
  "locale": "en",
  "format": "html",
  "subject": null
}