Landings
Landing API: /api/bw/v2/landing
Allows you to add, update or delete Landings in a Boldest platform account. Among many other things, it can also be used to categorize Landings.
Endpoints
POST /api/bw/v2/landing - Create/Update Landing
Create or update a Landing using JSON data according to Schema.
Request:
json(POST body) - Data to import in JSON format according to Schema/api/bw/v2/landing/schema.json
Consult the Schema documentation for the structure of the JSON data.
Response HTTP 200 - Skipped (no update needed):
{
"done": "Skip Landing TEST111",
"id": "TEST111",
"new": false,
"update": false
}
Response HTTP 201 - Created:
{
"done": "Create Landing TEST111",
"id": "TEST111",
"new": true,
"update": true
}
Response HTTP 202 - Accepted (updated):
{
"done": "Update Landing TEST111",
"id": "TEST111",
"new": false,
"update": true
}
Response HTTP 400 - Wrong request:
{
"fail": "Wrong request"
}
Response HTTP 401 - Unauthorized:
{
"fail": "Unauthorized"
}
Response HTTP 409 - Conflict (invalid contents):
{
"fail": "Explanation of the problems encountered"
}
GET /api/bw/v2/landing/{ids} - Get Landings
Retrieve one or more Landings by ID.
Request:
/{ids}(path) - Id or Ids in CSV format (Optional)/published/{1|0|*}(path) - Published status (Optional) (Default: 1)/fields/{fields}(path) - Only these fields (Optional) (Omit for all)/ignoreFields/{fields}(path) - Ignore these fields (Optional) (Omit for none)/excludeFiles(path) - Ignore file fields (Optional) (Omit for none)
Response HTTP 200 - Success:
Landing data in JSON format according to Schema (schema.json or schema.multiple.json)
Response HTTP 400 - Wrong request:
{
"fail": "Wrong request"
}
Response HTTP 401 - Unauthorized:
{
"fail": "Unauthorized"
}
Response HTTP 404 - Not found:
{
"fail": "ERROR: Export fail"
}
DELETE /api/bw/v2/landing/{ids} - Delete Landings
Delete one or more Landings by ID.
Request:
/{ids}(path) - Id or Ids in CSV format
Response HTTP 202 - Deleted:
{
"done": "Deletion of 5 Landings done",
"count": 5 // Number of Landings deleted
}
Partial deletion:
{
"done": "Deletion of 3 Landings done",
"count": 3, // Number of Landings deleted
"fail": "Deletion of 2 Landings not done",
"failed": ["TEST114", "TEST115"]
}
Response HTTP 400 - Wrong request:
{
"fail": "Wrong request"
}
Response HTTP 401 - Unauthorized:
{
"fail": "Unauthorized"
}
Response HTTP 404 - Not found:
{
"fail": "No Landings to delete"
}
Response HTTP 409 - Conflict:
{
"fail": "Deletion of 5 Landings not done"
}
POST/GET /api/bw/v2/landing/clone/{id} - Clone Landing
Clone a Landing.
Request:
/{id}(path) - Id (Optional) (Default: Landing “Base” is cloned)
Response HTTP 201 - Cloned:
{
"done": "Cloned Landing TEST111 to Landing TEST111_8PtTXiU6mcw",
"id": "TEST111_8PtTXiU6mcw"
}
Response HTTP 400 - Wrong request:
{
"fail": "Wrong request"
}
Response HTTP 401 - Unauthorized:
{
"fail": "Unauthorized"
}
Response HTTP 404 - Not found:
{
"fail": "There is no Landing TEST111 to clone"
}
Response HTTP 409 - Conflict:
{
"fail": "Not cloned Landing TEST111"
}
GET /api/bw/v2/landing/schema.json - Get Schema
Get JSON Schema from the data structure of a Landing.
Request:
/full(path) - Schema and data (Optional)
Response HTTP 200 - Success:
JSON schema document
GET /api/bw/v2/landing/schema.multiple.json - Get Batch Schema
Get JSON Schema of a group of Landings in a batch process.
Request:
/full(path) - Schema and data (Optional)
Response HTTP 200 - Success:
JSON schema document
Landing schema documentation
Properties:
These are the fields used in the JSON for the map creation and update API.
id (required) Type: string. Size: (3, 80)
Unique key that identifies the Landing
published Type: boolean
Visibility of the Landing
timeLastUpdate Type: string. Size: 19
Last update date and time (YYYY-MM-DD HH:MM:SS). Time zone: CET (UTC+1)
title Type: string. Size: (0, 100)
Title of the Landing
shortDescription Type: string (nullable). Size: (0, 160)
Snippet describing the Landing in brief
htmlDescription Type: string (nullable). Size: (0, 1000)
Summary paragraph describing the Landing executively (supports HTML)
htmlContent Type: string (nullable). Size: (0, 32000)
Full content describing the Landing (supports HTML)
image Type: uri (nullable)
Featured image representing the Landing (URL to jpg, png or webp)
urlAlias Type: string. Size: (2, 500)
URL of the Landing (not full URL. Without protocol and domain. Starts with /)
canonicalUrl Type: uri (nullable). Size: (0, 500)
URL of equivalent external Landing
alternativeView Type: string (nullable)
Alternative view of the Landing (default: null)
proposal Type: boolean
Proposal (Bool)
proposalSummary Type: string (nullable). Size: (0, 2000)
Proposal summary (HTML)
proposalCalendar Type: string (nullable). Size: (0, 2000)
Proposal calendar (HTML)
proposalDescription Type: string (nullable). Size: (0, 2000)
Proposal description (HTML)
landingCategories Type: array(Type: string) (nullable)
Sorted array of Categories to sort and filter the landings in the admin table
landingBlocks Type: array(Type: object)
See below schema of properties of landingBlocks items
Content blocks for the Landing
landingHotels Type: array(Type: object)
See below schema of properties of landingHotels items
Hotels section in the Landing
mapIntro Type: string (nullable). Size: (0, 250)
Intro text for the map
mapId Type: string
Map displayed in the landing
ctaOnMap Type: boolean (nullable)
Activate the floating CTA button on the map.
ctaUrl Type: uri (nullable). Size: (0, 2000)
URL pointed to by the Landing CTA button
ctaLabel Type: string (nullable). Size: (0, 20)
CTA button: text label
ctaValuePrefix Type: string (nullable). Size: (0, 20)
CTA introduction text or pricing: Prefix
ctaValue Type: string (nullable). Size: (0, 20)
CTA introduction text or pricing: label
ctaValueSufix Type: string (nullable). Size: (0, 20)
CTA introduction text or pricing: Sufix
headTitle Type: string (nullable). Size: (0, 100)
SEO title (title tag). If not set, the ‘title’ field will be used
headDescription Type: string (nullable). Size: (0, 150)
SEO description (meta description). If not set, the ‘shortDescription’ field will be used
headKeywords Type: string (nullable). Size: (0, 150)
SEO keywords (meta keywords).
deleteElementIrreversibly Type: boolean
If true, the Landing will be deleted irreversibly
Schema landingBlocks item
title Type: string. Size: (0, 200)
Title of the block
shortDescription Type: string (nullable). Size: (0, 200)
Description of the block in brief (Plain text)
htmlContent Type: string (nullable). Size: (0, 32000)
Description of the block (HTML)
resourceIds Type: array(Type: string) (nullable)
Sorted array with the ‘id’ of the Maps or Landings to be displayed in the block
Schema landingHotels item
title Type: string. Size: (0, 200)
Title of the hotels block
shortDescription Type: string (nullable). Size: (0, 200)
Description of the hotels block in brief (Plain text)
htmlContent Type: string (nullable). Size: (0, 32000)
Description of the hotels block (HTML)
resourceIds Type: array(Type: string) (nullable)
Sorted array with the ‘id’ of the Resources (hotels) to be displayed in the block
Language information
This schema includes certain fields which have multiple languages support.
The following fields have multiple languages support:
title
shortDescription
htmlDescription
htmlContent
urlAlias
canonicalUrl
landingBlocks.title
landingBlocks.shortDescription
landingBlocks.htmlContent
landingHotels.title
landingHotels.shortDescription
landingHotels.htmlContent
proposalSummary
proposalCalendar
proposalDescription
buttonViewMapLabel
mapIntro
ctaValuePrefix
ctaValue
ctaValueSufix
ctaLabel
headKeywords
headTitle
headDescription
When you use the name of this fields without the suffix with language you are referring to the field in the default language.
If you want to use a field in a different language, you must add to the field name the language code separated by an underscore (_).
For example, if the proyect have English language and
you want to use the field title in English language,
you must add the language code en to the field name as title_en.