Pages
Covered in this doc:

List pages

List all pages within a Site
1
GET /api/v2/pages/?site_id=12345
Copied!

Parameters

Name
Type
Description
site_id
string
required ID of the Site you want to get the pages for

Response

1
{
2
"meta": {
3
"limit": 20,
4
"next": "/api/v2/pages/?limit=20&offset=20",
5
"offset": 0,
6
"previous": null,
7
"total_count": 5
8
},
9
"objects": [
10
{
11
"active": true,
12
"id": 22225773,
13
"name": "Home",
14
"nofollow": false,
15
"path": "/",
16
"resource_uri": "/api/v2/pages/22225773/",
17
"site_id": 12345,
18
"type": "default"
19
},
20
{
21
"active": true,
22
"id": 22225774,
23
"name": "Contact Us",
24
"nofollow": false,
25
"path": "/contact-us/",
26
"resource_uri": "/api/v2/pages/22225774/",
27
"site_id": 12345,
28
"type": "default"
29
},
30
...
31
]
32
}
Copied!

Get a single page

Fetch the Page detail using the Page.id
1
GET /api/v2/pages/:id/
Copied!

Response

1
{
2
"site_id": "12345",
3
"path": "/",
4
"title": "Site Home Page",
5
"name": "Home",
6
"column_widths": [[50, 50]],
7
"modules": [
8
{
9
"module": "contact_info",
10
"column": 1,
11
"order": 1,
12
"row": 1
13
},
14
{
15
"module": "content",
16
"column": 2,
17
"order": 1,
18
"row": 1,
19
"content": "<h1>Here is some content</h1><p>You can even access site meta data like ${business_name} and ${city}</p>"
20
},
21
{
22
"module": "googlemaps",
23
"column": 2,
24
"order": 2,
25
"row": 1
26
},
27
{
28
"module": "about",
29
"column": 2,
30
"order": 3,
31
"row": 1
32
},
33
{
34
"module": "embed",
35
"column": 2,
36
"order": 4,
37
"row": 1,
38
"content": "<script src="..."></script>",
39
"props": {
40
"render_template": true
41
}
42
}
43
]
44
}
Copied!

Create a page

1
POST /api/v2/pages/
Copied!

Parameters

Name
Type
Description
site_id
integer
required
name
string
required Name of the page. Used in navigation menus and buttons
Optional
column_widths
list of lists
Percentage widths of the rows and columns within the Page. Examples: Single column page [[100]] (default), Two columns within one row [[50, 50]], Multiple rows and columns [[100], [50, 50]]
modules
list
List of Page Module objects to publish to the Page with positional details including row, column, and order
path
string
Specific path within the Site where you want to publish the page (i.e. /contact-us/)
title
string
HTML <title> tag for the Page. Defaults to the name parameter

Example

1
{
2
"name": "Our Services",
3
"path": "/our-services/",
4
"site_id": 12345
5
}
Copied!

Response

A status code of 201 created is returned on a successful creation and contains the created page object as JSON. See the Get a single page section for an example Page object.

Update a page

1
PUT /api/v2/pages/:id/
Copied!
You can PUT a partial or full object to the detail endpoint to update/change values on the Page object. If using a partial object, you must insure that the primary page id is part of the payload.
Last modified 2yr ago