succeeds
PUT /api/v1/pages/:id/update_from_draft
Parameters
| Name |
Description |
|
id
|
id
|
|
friendly_url
|
text, url for page
|
|
show_footer
|
show page footer, boolean
|
|
show_header
|
show header, boolean
|
|
is_published
|
show to public?
|
|
title
|
page title
|
|
content
|
page content(HTML)
|
|
template
|
template
|
|
course_id
|
course_id
|
Request
Headers
Route
PUT /api/v1/pages/1166/update_from_draft
Body
{"friendly_url":"page_slug","show_footer":false,"show_header":true,"title":"a page title","content":"\u003cdiv\u003epagecontent\u003c/div\u003e"}
cURL
curl "http://localhost:3000/api/v1/pages/1166/update_from_draft" -d '{"friendly_url":"page_slug","show_footer":false,"show_header":true,"title":"a page title","content":"\u003cdiv\u003epagecontent\u003c/div\u003e"}' -X PUT \
-H "Accept: application/json" \
-H "X-Api-Token: pXEHmA4Gp7go8sixvnra7NUh92kDSGR-uw" \
-H "X-Api-Email: user-99@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
202 Accepted
Body
{
"created_at": "2019-10-31T22:02:14Z",
"draft": {
"created_at": "2019-10-31T22:02:14Z",
"draft": null,
"friendly_url": "friendly-url-15",
"title": "Course Name 15",
"meta_description": null,
"feature": "course_pages",
"content": null,
"show_header": true,
"show_footer": true,
"show_nav_background_color": false,
"is_published": true,
"blank_page_template": null,
"published_at": null,
"template": "course_sales_page",
"course_id": 161,
"id": 1169,
"skip_block_loop_wrapper": null,
"custom_head_code": null,
"css_properties": {
},
"draft_of_id": 1166,
"updated_at": "2019-10-31T22:02:14Z",
"compatibles": {
"editor": "page_editor"
},
"meta": {
"class": "page",
"url": null,
"name": "1169",
"description": "Course Name 15",
"image_url": null
},
"blocks": [
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "checkout",
"position": 10,
"data": {
"enroll_button_text": null
},
"page_id": 1169,
"course_id": 161,
"is_hidden": false,
"id": 3309,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3309",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "closing_letter",
"position": 9,
"data": {
"body": null
},
"page_id": 1169,
"course_id": 161,
"is_hidden": false,
"id": 3308,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3308",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "coupon_banner",
"position": 8,
"data": {
},
"page_id": 1169,
"course_id": 161,
"is_hidden": false,
"id": 3307,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3307",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "faq",
"position": 7,
"data": {
"faqs": [
{
"data": {
"answer": "The course starts now and never ends! It is a completely self-paced online course - you decide when you start and when you finish.",
"question": "When does the course start and finish?"
}
},
{
"data": {
"answer": "How does lifetime access sound? After enrolling, you have unlimited access to this course for as long as you like - across any and all devices you own.",
"question": "How long do I have access to the course?"
}
},
{
"data": {
"answer": "We would never want you to be unhappy! If you are unsatisfied with your purchase, contact us in the first 30 days and we will give you a full refund.",
"question": "What if I am unhappy with the course?"
}
}
]
},
"page_id": 1169,
"course_id": 161,
"is_hidden": false,
"id": 3306,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3306",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "bundle_contents",
"position": 6,
"data": {
},
"page_id": 1169,
"course_id": 161,
"is_hidden": false,
"id": 3305,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3305",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "curriculum",
"position": 5,
"data": {
},
"page_id": 1169,
"course_id": 161,
"is_hidden": false,
"id": 3304,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3304",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "bio",
"position": 4,
"data": {
},
"page_id": 1169,
"course_id": 161,
"is_hidden": false,
"id": 3303,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3303",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "description_with_share_icons",
"position": 3,
"data": {
"description": null
},
"page_id": 1169,
"course_id": 161,
"is_hidden": false,
"id": 3302,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3302",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "coupon_banner",
"position": 2,
"data": {
},
"page_id": 1169,
"course_id": 161,
"is_hidden": false,
"id": 3301,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3301",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "hero",
"position": 1,
"data": {
"hero_image_url": "https://assets.teachablecdn.com/bg/default-hero.png",
"background_opacity": 0.0,
"enroll_button_text": null
},
"page_id": 1169,
"course_id": 161,
"is_hidden": false,
"id": 3300,
"custom_relations_data": {
"video": null
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3300",
"description": "",
"image_url": null
}
}
]
},
"friendly_url": "friendly-url-15",
"title": "Course Name 15",
"meta_description": null,
"feature": "course_pages",
"content": null,
"show_header": true,
"show_footer": true,
"show_nav_background_color": false,
"is_published": true,
"blank_page_template": null,
"published_at": null,
"template": "course_sales_page",
"course_id": 161,
"id": 1166,
"skip_block_loop_wrapper": null,
"custom_head_code": null,
"css_properties": {
},
"draft_of_id": null,
"updated_at": "2019-10-31T22:02:14Z",
"compatibles": {
"editor": "page_editor"
},
"meta": {
"class": "page",
"url": null,
"name": "1166",
"description": "Course Name 15",
"image_url": null
},
"blocks": [
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "checkout",
"position": 10,
"data": {
"enroll_button_text": null
},
"page_id": 1166,
"course_id": 161,
"is_hidden": false,
"id": 3310,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3310",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "closing_letter",
"position": 9,
"data": {
"body": null
},
"page_id": 1166,
"course_id": 161,
"is_hidden": false,
"id": 3311,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3311",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "coupon_banner",
"position": 8,
"data": {
},
"page_id": 1166,
"course_id": 161,
"is_hidden": false,
"id": 3312,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3312",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "faq",
"position": 7,
"data": {
"faqs": [
{
"data": {
"answer": "The course starts now and never ends! It is a completely self-paced online course - you decide when you start and when you finish.",
"question": "When does the course start and finish?"
}
},
{
"data": {
"answer": "How does lifetime access sound? After enrolling, you have unlimited access to this course for as long as you like - across any and all devices you own.",
"question": "How long do I have access to the course?"
}
},
{
"data": {
"answer": "We would never want you to be unhappy! If you are unsatisfied with your purchase, contact us in the first 30 days and we will give you a full refund.",
"question": "What if I am unhappy with the course?"
}
}
]
},
"page_id": 1166,
"course_id": 161,
"is_hidden": false,
"id": 3313,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3313",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "bundle_contents",
"position": 6,
"data": {
},
"page_id": 1166,
"course_id": 161,
"is_hidden": false,
"id": 3314,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3314",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "curriculum",
"position": 5,
"data": {
},
"page_id": 1166,
"course_id": 161,
"is_hidden": false,
"id": 3315,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3315",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "bio",
"position": 4,
"data": {
},
"page_id": 1166,
"course_id": 161,
"is_hidden": false,
"id": 3316,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3316",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "description_with_share_icons",
"position": 3,
"data": {
"description": null
},
"page_id": 1166,
"course_id": 161,
"is_hidden": false,
"id": 3317,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3317",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "coupon_banner",
"position": 2,
"data": {
},
"page_id": 1166,
"course_id": 161,
"is_hidden": false,
"id": 3318,
"custom_relations_data": {
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3318",
"description": "",
"image_url": null
}
},
{
"created_at": "2019-10-31T22:02:14Z",
"are_dependencies_met": true,
"partial": "hero",
"position": 1,
"data": {
"hero_image_url": "https://assets.teachablecdn.com/bg/default-hero.png",
"background_opacity": 0.0,
"enroll_button_text": null
},
"page_id": 1166,
"course_id": 161,
"is_hidden": false,
"id": 3319,
"custom_relations_data": {
"video": null
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "3319",
"description": "",
"image_url": null
}
}
]
}