updates the custom relations
PUT /api/v1/pages/:page_id/blocks/:id
Parameters
| Name |
Description |
|
page_id
|
page id
|
|
body
|
body contents
|
|
id
|
id
|
|
position
|
position
|
|
custom_relations_data
|
custom relations object IDs
|
Request
Headers
Route
PUT /api/v1/pages/2411/blocks/6444
Body
{"position":1,"custom_relations_data":{"upsell_product":102,"upsell_coupon":null}}
cURL
curl "http://localhost:3000/api/v1/pages/2411/blocks/6444" -d '{"position":1,"custom_relations_data":{"upsell_product":102,"upsell_coupon":null}}' -X PUT \
-H "Accept: application/json" \
-H "X-Api-Token: 98vZBBz7LVjzgivLjrscs3JAWtNnUeLHDQ" \
-H "X-Api-Email: user-42@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
202 Accepted
Body
{
"created_at": "2019-10-31T22:07:42Z",
"are_dependencies_met": true,
"partial": "upsell_button",
"position": 1,
"data": {
"upsell_button_text": "Enroll in Course",
"continue_button_text": "No Thanks, Continue",
"upsell_post_purchase_url": null
},
"page_id": 2411,
"course_id": 295,
"is_hidden": false,
"id": 6444,
"custom_relations_data": {
"upsell_product": 102,
"upsell_coupon": null
},
"css_properties": {
},
"toggles": {
},
"meta": {
"class": "block",
"url": null,
"name": "6444",
"description": "",
"image_url": null
}
}