Proposals
Proposal API: /api/bw/v2/proposal
API BW version 2 (Beta)
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.
Methods
POST: Create/Update Proposal
POST
jsonData 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.
RESULT:
HTTP 200 Skipped. The Proposal exists and does not need to be updated
{
"done": "Skip Proposal TEST111",
"id": "TEST111",
"new": false,
"update": false
}
HTTP 201 Created. The Proposal did not exist, so it was created
{
"done": "Create Proposal TEST111",
"id": "TEST111",
"new": true,
"update": true
}
HTTP 202 Accepted. The Proposal existed, so it was updated
{
"done": "Update Proposal TEST111",
"id": "TEST111",
"new": false,
"update": true
}
HTTP 400 Wrong request
{
"fail": "Wrong request"
}
HTTP 401 Unauthorized
{
"fail": "Unauthorized"
}
HTTP 409 Conflict. The submitted contents are not valid
{
"fail": "Explanation of the problems encountered"
}
GET: Get Proposal/s
/{ids}Id or Ids CSV format (Optional)/published/{1|0|*}Published (Optional) (Default:1)/fields/{fields}Only these fields (Optional) (Default:All)/ignoreFields/{fields}Ignore these fields (Optional) (Default:None)/excludeFilesIgnore file fields (Optional) (Default:No)RESULT:
HTTP 200SuccessProposal data in JSON format according to Schema (schema.json or schema.multiple.json)
HTTP 400Wrong request{ "fail": "Wrong request" }
HTTP 401Unauthorized{ "fail": "Unauthorized" }
HTTP 404Not found{ "fail": "ERROR: Export fail" }
DELETE: Delete Proposal/s
/{ids}Id or Ids CSV formatRESULT:
HTTP 202Deleted{ "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"] }
HTTP 400Wrong request{ "fail": "Wrong request" }
HTTP 401Unauthorized{ "fail": "Unauthorized" }
HTTP 404Not found{ "fail": "No Proposals to delete" }
HTTP 409Conflict. The submitted contents are not valid{ "fail": "Deletion of 5 Proposals not done" }
POST/GET: Clone a Proposal. Optionally can be added to a Map
/cloneCommand/{id}Id (Optional) (Default: Proposal “Base” is cloned)RESULT:
HTTP 201Cloned{ "done": "Cloned Proposal TEST111 to Proposal TEST111_8PtTXiU6mcw", "id": "TEST111_8PtTXiU6mcw" }
HTTP 400Wrong request{ "fail": "Wrong request" }
HTTP 401Unauthorized{ "fail": "Unauthorized" }
HTTP 404Error{ "fail": "There is no Proposal TEST111 to clone" }
HTTP 409Fail{ "fail": "Not cloned Proposal TEST111" }
GET: Get Schema JSON from the data structure of a Proposal
/fullSchema and data (Optinal)/schema.jsonJSON schema for importRESULT:
HTTP 200SuccessJSON schema document
GET: Get Schema JSON schema of a group of Proposals in a batch process
/fullSchema and data (Optinal)/schema.multiple.jsonSchema for batch import JSONRESULT:
HTTP 200SuccessJSON 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)
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
Expiration date (YYYY-MM-DD)
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)
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.