Proposals
Proposal API: /api/bw/v2/proposal
Allows you to add, update or delete Proposals in a Boldest platform account. Among many other things, it can also be used to categorize Proposals.
Endpoints
POST /api/bw/v2/proposal - Create/Update Proposal
Create or update a Proposal using JSON data according to Schema.
Request:
json(POST body) - Data to import in JSON format according to Schema/api/bw/v2/proposal/schema.json
Consult the Schema documentation for the structure of the JSON data.
Response HTTP 200 - Skipped (no update needed):
{
"done": "Skip Proposal TEST111",
"id": "TEST111",
"new": false,
"update": false
}
Response HTTP 201 - Created:
{
"done": "Create Proposal TEST111",
"id": "TEST111",
"new": true,
"update": true
}
Response HTTP 202 - Accepted (updated):
{
"done": "Update Proposal 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/proposal/{ids} - Get Proposals
Retrieve one or more Proposals 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:
Proposal 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/proposal/{ids} - Delete Proposals
Delete one or more Proposals by ID.
Request:
/{ids}(path) - Id or Ids in CSV format
Response HTTP 202 - Deleted:
{
"done": "Deletion of 5 Proposals done",
"count": 5 // Number of Proposals deleted
}
Partial deletion:
{
"done": "Deletion of 3 Proposals done",
"count": 3, // Number of Proposals deleted
"fail": "Deletion of 2 Proposals 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 Proposals to delete"
}
Response HTTP 409 - Conflict:
{
"fail": "Deletion of 5 Proposals not done"
}
POST/GET /api/bw/v2/proposal/clone/{id} - Clone Proposal
Clone a Proposal.
Request:
/{id}(path) - Id (Optional) (Default: Proposal “Base” is cloned)
Response HTTP 201 - Cloned:
{
"done": "Cloned Proposal TEST111 to Proposal 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 Proposal TEST111 to clone"
}
Response HTTP 409 - Conflict:
{
"fail": "Not cloned Proposal TEST111"
}
GET /api/bw/v2/proposal/schema.json - Get Schema
Get JSON Schema from the data structure of a Proposal.
Request:
/full(path) - Schema and data (Optional)
Response HTTP 200 - Success:
JSON schema document
GET /api/bw/v2/proposal/schema.multiple.json - Get Batch Schema
Get JSON Schema of a group of Proposals in a batch process.
Request:
/full(path) - Schema and data (Optional)
Response HTTP 200 - Success:
JSON schema document
Proposal 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 Proposal
published Type: boolean
Visibility of the Proposal
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 Proposal
shortDescription Type: string (nullable). Size: (0, 160)
Snippet describing the Proposal in brief
htmlDescription Type: string (nullable). Size: (0, 1000)
Summary paragraph describing the Proposal executively (supports HTML)
htmlContent Type: string (nullable). Size: (0, 32000)
Full content describing the Proposal (supports HTML)
image Type: uri (nullable)
Featured image representing the Proposal (URL to jpg, png or webp)
urlAlias Type: string. Size: (2, 500)
URL of the Proposal (not full URL. Without protocol and domain. Starts with /)
canonicalUrl Type: uri (nullable). Size: (0, 500)
URL of equivalent external Proposal
infoSummary Type: string (nullable). Size: (0, 2000)
Proposal summary (HTML)
hotels Type: array(Type: object)
See below schema of properties of hotels items
Hotels sections related to the Proposal
mapId Type: string
Map displayed in the Proposal
ctaUrl Type: uri (nullable). Size: (0, 2000)
URL pointed to by the Proposal 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
customerId Type: string (nullable). Size: (3, 80)
Customer id of the Proposal (Template Proposal don’t have customerId)
groupName Type: string (nullable). Size: (0, 100)
Group name
tripDates Type: string (nullable). Size: (0, 100)
Trip dates
paxNum Type: string (nullable). Size: (0, 100)
Number of passengers
roomsNum Type: string (nullable). Size: (0, 100)
Number of rooms
pricing Type: string (nullable). Size: (0, 1000)
Pricing (HTML)
expireDate Type: string (nullable). Size: 10
Last update date and time (YYYY-MM-DD HH:MM:SS). Time zone: CET (UTC+1)
typeSchema Type: string
Type of the Proposal
statsAccess Type: integer
Only read. Number of accesses to the Proposal
statsLastAccess Type: string. Size: 19
Only read. Last access date and time (YYYY-MM-DD HH:MM:SS). Time zone: CET (UTC+1)
Schema hotels item
title Type: string. Size: (0, 200)
Title of the hotels section
shortDescription Type: string (nullable). Size: (0, 200)
Description of the hotels section in brief (Plain text)
htmlContent Type: string (nullable). Size: (0, 32000)
Description of the hotels section (HTML)
resourceIds Type: array(Type: string) (nullable)
Sorted array with the ‘id’ of the Resources (hotels) to be displayed in the section
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
relatedContents.title
relatedContents.shortDescription
relatedContents.htmlContent
hotels.title
hotels.shortDescription
hotels.htmlContent
infoSummary
buttonViewMapLabel
ctaValuePrefix
ctaValue
ctaValueSufix
ctaLabel
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.