Create a page
POST
/shops/{shop_id}/pagesAuthorization
AuthorizationBearer token (JWT) · headerrequiredPath parameters
shop_idintegerrequiredRequest body
requiredapplication/jsontitlestringrequiredbodystringslugstringdescriptionstringvisiblebooleandefault: true
formatstringdefault: "html"
Allowed:
htmlmarkdownResponses
201Page created
_linksHalLinksidintegershop_idintegertitlestringslugstringbodystringdescriptionstringvisiblebooleanformatstringcreated_onstring<date-time>updated_onstring<date-time>422Validation error
Request
curl -X POST "https://api.onbolder.com/v2/shops/1/pages" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "About Us",
"body": "<p>We are a small shop.</p>"
}'const response = await fetch("https://api.onbolder.com/v2/shops/1/pages", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"title": "About Us",
"body": "<p>We are a small shop.</p>"
})
});import requests
response = requests.post(
"https://api.onbolder.com/v2/shops/1/pages",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"title": "About Us",
"body": "<p>We are a small shop.</p>"
},
)Response
{
"_links": {
"property1": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
},
"property2": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
}
},
"id": 0,
"shop_id": 0,
"title": "string",
"slug": "string",
"body": "string",
"description": "string",
"visible": true,
"format": "string",
"created_on": "2019-08-24T14:15:22Z",
"updated_on": "2019-08-24T14:15:22Z"
}Validation error