Maps
Map API: /api/bw/v2/map
Allows you to add, update, clone or delete Maps in a Boldest platform account. Among many other things, it can also be used to assign Resources to Maps.
Endpoints
POST /api/bw/v2/map - Create/Update Map
Create or update a Map using JSON data according to Schema.
Request:
json(POST body) - Data to import in JSON format according to Schema/api/bw/v2/map/schema.json
Consult the Schema documentation for the structure of the JSON data.
Response HTTP 200 - Skipped (no update needed):
{
"done": "Skip Map TEST111",
"id": "TEST111",
"new": false,
"update": false
}
Response HTTP 201 - Created:
{
"done": "Create Map TEST111",
"id": "TEST111",
"new": true,
"update": true
}
Response HTTP 202 - Accepted (updated):
{
"done": "Update Map 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/map/{ids} - Get Maps
Retrieve one or more Maps 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:
Map 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/map/{ids} - Delete Maps
Delete one or more Maps by ID.
Request:
/{ids}(path) - Id or Ids in CSV format
Response HTTP 202 - Deleted:
{
"done": "Deletion of 5 Maps done",
"count": 5 // Number of Maps deleted
}
Partial deletion:
{
"done": "Deletion of 3 Maps done",
"count": 3, // Number of Maps deleted
"fail": "Deletion of 2 Maps 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 Maps to delete"
}
Response HTTP 409 - Conflict:
{
"fail": "Deletion of 5 Maps not done"
}
POST /api/bw/v2/map/batch - Batch Create/Update
Request the Create/Update of a Map group in a batch process.
Request:
json(POST body) - Batch data to import in JSON format according to Schema (schema.multiple.json)
Response HTTP 201 - Created:
{
"done": "Batch process created",
"batchId": "22123112345678",
"count": 123 // Number of Maps to be processed
}
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/map/batch/{id} - Batch Status
Query the status of a batch process.
Request:
/{id}(path) - Batch process Id
Response HTTP 200 - Success:
{
"done": "Batch process status",
"status": "waiting", // "waiting", "processing", "done", "error"
"dateStatus": "2022-12-31 12:34:56",
"dateRequest": "2022-12-31 12:34:56",
"count": 123
}
Response HTTP 400 - Wrong request:
{
"fail": "Wrong request"
}
Response HTTP 401 - Unauthorized:
{
"fail": "Unauthorized"
}
Response HTTP 404 - Not found:
{
"fail": "There is no Map TEST111 to clone"
}
POST/GET /api/bw/v2/map/clone/{id} - Clone Map
Clone a Map.
Request:
/{id}(path) - Id (Optional) (Default: Map “Base” is cloned)
Response HTTP 201 - Cloned:
{
"done": "Cloned Map TEST111 to Map 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 Map TEST111 to clone"
}
Response HTTP 409 - Conflict:
{
"fail": "Not cloned Map TEST111"
}
GET /api/bw/v2/map/schema.json - Get Schema
Get JSON Schema from the data structure of a Map.
Request:
/full(path) - Schema and data (Optional)
Response HTTP 200 - Success:
JSON schema document
GET /api/bw/v2/map/schema.multiple.json - Get Batch Schema
Get JSON Schema of a group of Maps in a batch process.
Request:
/full(path) - Schema and data (Optional)
Response HTTP 200 - Success:
JSON schema document
Map 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 Map
published Type: boolean
Map visibility for non-authenticated users
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 Map
shortDescription Type: string (nullable). Size: (0, 160)
Snippet describing the Map in brief
image Type: uri (nullable)
Featured image representing the Map (URL to jpg, png or webp)
urlAlias Type: string. Size: (2, 500)
URL of the Map (not full URL. Without protocol and domain. Starts with /)
canonicalUrl Type: uri (nullable). Size: (0, 500)
URL of equivalent external Resource
locationLat Type: number (nullable). Size: (-90, 90)
Map centering point at initialization: Latitude
locationLon Type: number (nullable). Size: (-180, 180)
Map centering point at initialization: Longitude
locationZoom Type: integer (nullable). Size: (2, 25)
Map zoom level at initialization. Google Maps zoom level format
mapLayerFile Type: uri (nullable)
Layer to overlay on the map with GIS information in KML format. (URL to a KML or KMZ file up to 2MB)
ctaOnMap Type: boolean (nullable)
Activate the floating CTA button on the map.
ctaOnImage Type: boolean (nullable)
Activate the floating CTA button on the image.
ctaUrl Type: uri (nullable). Size: (0, 1500)
URL pointed to by the Map 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
resourceIds Type: array(Type: string) (nullable)
Sorted array with the ‘id’ of the PRIMARY Resources that compose the Map (option to replace all the existing ones)
resourceIdsAdd Type: array(Type: string) (nullable)
Sorted array with the ‘id’ of the PRIMARY Resources that compose the Map (option to add Resources to the existing ones)
tourMultiday Type: array(Type: object)
See below schema of properties of tourMultiday items
Array with information of the different days of a multi-day tour map
secondaryResourceIds Type: array(Type: string) (nullable)
Sorted array with the ‘id’ of the SECONDARY Resources that compose the Map (option to replace all the existing ones)
secondaryResourceIdsAdd Type: array(Type: string) (nullable)
Sorted array with the ‘id’ of the SECONDARY Resources that compose the Map (option to add to the existing ones)
poiResourceIds Type: array(Type: string) (nullable)
Sorted array with the ‘id’ of the Resources that complements the Map as POIs (option to replace all the existing ones)
poiResourceIdsAdd Type: array(Type: string) (nullable)
Sorted array with the ‘id’ of the Resources that complements the Map as POIs (option to add to the existing ones)
brandedPoiIds Type: array(Type: string) (nullable)
Sorted array with the ‘id’ of the Resources that acts as branded POIs of the Map (option to replace all the existing ones)
trackResourceId Type: string (nullable)
‘id’ of the Resource of type TRACK that contains information of the route to be shown on the map
routePlannerAuto Type: boolean
Enable automatic route planner
routePlannerMethod Type: string
RoutePlanner method used to calculate the route
routePlannerColor Type: string
RoutePlanner color in HTML hex format (#RRGGBB)
routePlannerWidth Type: number. Size: (1, 4)
RoutePlanner line width in pixels
mapClusterize Type: boolean (nullable)
Enable clustering of map markers
mapLabel Type: string (nullable). Size: (0, 40)
Map short title-label
customFilterFile Type: uri (nullable)
Custom filter icon (URL to jpg, png or webp file)
customHeaderFile Type: uri (nullable)
Custom header image (URL to jpg, png or webp file)
customBrandedPoiFile Type: uri (nullable)
Custom branded POI icon for its marker (URL to jpg, png or webp file)
customLoaderFile Type: uri (nullable)
Custom loader bouncing image (URL to jpg, png or webp file)
mapLayerType Type: string
Type of geographic map layer to display when the map is initialized
mapMaxAutozoom Type: integer (nullable). Size: (2, 25)
Maximum zoom level applied in the auto-zoom process after applying a filter (Google Maps zoom standard)
mapIsTour Type: boolean (nullable)
Enable tour mode on the Map
trackResourceShowEffort Type: boolean (nullable)
Display the effort information (distance, difficulty, time, elevation, elevation model…) in case there is a TRACK type Resource displayed on the map base (trackResourceId)
mapShowFilter Type: boolean (nullable)
Enable filter controls
mapFilterType Type: string
Filter control configuration
mapFilterCategorySwitch Type: boolean (nullable)
Enable filter controls by Category
mapFilterDifficultySwitch Type: boolean (nullable)
Enable filter controls by difficulty
mapFilterDistanceSwitch Type: boolean (nullable)
Enable filter controls by distance
mapFilterCircularSwitch Type: boolean (nullable)
Enable filter controls by circular
mapFilterCategories Type: array(Type: string) (nullable)
Sorted array of Categories that compose the map filter control. If not specified, the filter use all used Categories in the map content
mapFilterCategoriesSecondary Type: array(Type: string) (nullable)
Sorted array of Categories that compose the map filter control secondary
mapCategories Type: array(Type: string) (nullable)
Sorted array of Categories to sort and filter the maps in the admin table
mapShowList Type: boolean (nullable)
Enables or disables the map Resource gallery
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 Map will be deleted irreversibly
Schema tourMultiday item
dayLabels Type: array(Type: string)
Array of labels indicating the day within the multi-day tour (format: “D1”, “D2”, …)
title Type: string (nullable). Size: (0, 100)
Title of a particular day description in a multi-day tour map
shortDescription Type: string (nullable). Size: (0, 160)
Intro text of a particular day description in a multi-day tour map
htmlContent Type: string (nullable). Size: (0, 32000)
Complete HTML text of a particular day description in a multi-day tour map
image Type: uri (nullable)
Descriptive image of the gallery (URL to jpg, png or webp)
resourceIds Type: array(Type: string) (nullable)
Sorted array with the ‘id’ of the Resources that are visited on a particular day in a multi-day tour map
Language information
This schema includes certain fields which have multiple languages support.
The following fields have multiple languages support:
title
shortDescription
urlAlias
ctaValuePrefix
ctaValue
ctaValueSufix
ctaLabel
mapLabel
tourMultiday.title
tourMultiday.shortDescription
tourMultiday.htmlContent
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.