Create
const url = 'https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/studio/map';const options = { method: 'POST', headers: { 'Wink-Version': '2.0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: 'null'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/studio/map \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data nullCreate a new map configuration owned by the specified managing entity with the supplied settings.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”UUID of the managing entity that will own the map.
Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”Map configuration including name, center coordinates, zoom level, style and the list of inventory items to display as markers
Request to create or update a map configuration for displaying inventory
object
UUID of the customization context (e.g., Wink Links, channel manager)
Example
3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51Display name for this map
Example
Premium Hotels in Southeast AsiaUUID of the inventory source: single channel inventory, curated list, or dynamic search
Example
7a0c5d9e-2f6b-4c1a-8e4d-3b9f1a0c6d52Category of inventory being displayed (SINGLE, LIST, or SEARCH)
Example
LISTGeoJSON point defining map center (longitude, latitude)
object
Example
{ "type": "Point", "coordinates": [ 100.5581533, 13.7370197 ]}Allow users to pan the map by dragging
Example
trueAllow users to zoom in and out
Example
trueInitial zoom level (0-21, where 0 shows the entire world)
Example
15Map visual style (normal, clean, or bluish)
Example
normalHexadecimal color code for map markers
Example
cc2138Height of the embedded map in pixels
Example
500Which data to display initially (NATIVE, MODIFIED, or AFFILIATE)
Example
NATIVEOptional circular overlay regions on the map
object
Circle radius from center
Example
2.5Circle center point
object
Example
{ "radius": 2.5}Optional rectangular overlay regions on the map
object
A GeoJSON rectangle
object
South-west corner of the geographic bounding rectangle
object
North-east corner of the geographic bounding rectangle
object
Optional custom markers to display on the map
object
A GeoJSON point
object
Optional polygonal overlay regions on the map
object
A GeoJSON polygon
object
object
object
object
Example
{ "customizationIdentifier": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51", "name": "Premium Hotels in Southeast Asia", "typeIdentifier": "7a0c5d9e-2f6b-4c1a-8e4d-3b9f1a0c6d52", "type": "LIST", "center": { "type": "Point", "coordinates": [ 100.5581533, 13.7370197 ] }, "draggable": true, "zoomable": true, "initialZoomLevel": 15, "mapStyle": "normal", "mapMarkerColor": "cc2138", "mapHeight": 500, "displayType": "NATIVE", "circles": [ { "radius": 2.5 } ]}Responses
Section titled “ Responses ”Map configuration created successfully
Inventory map configuration for displaying sellable inventory on an embedded map
object
Document UUID
Datetime this record was first created
Datetime this record was last updated
Version property that shows how many times this document has been persisted. Document will not persist if the version property is less than current version property in the system. Result in an optimistic locking exception.
Map owner identifier
UUID of the customization context (e.g., Wink Links, channel manager)
Display name for this map
UUID of the inventory source: single channel inventory, curated list, or dynamic search
Category of inventory being displayed (SINGLE, LIST, or SEARCH)
GeoJSON point defining map center (longitude, latitude)
object
User can move around / pan the map
User can zoom in/out of the map
Initial zoom level (0-21, where 0 shows the entire world)
Map visual style (normal, clean, or bluish)
Hexadecimal color code for map markers
Height of the embedded map in pixels
Indicate which initial values to display first on the front-facing card
Custom-defined circles
object
Circle radius from center
Circle center point
object
Custom-defined rectangles
object
A GeoJSON rectangle
object
South-west corner of the geographic bounding rectangle
object
North-east corner of the geographic bounding rectangle
object
Custom-defined markers
object
A GeoJSON point
object
Custom-defined polygons
object
A GeoJSON polygon
object
object
object
object
Example
Bad Request — missing or invalid request parameter or body
object
object
Example
Unauthorized — authentication is required or the session has expired
object
object
Example
Forbidden — authenticated but lacking the required permission or scope
object
object
Example
Not Found — the requested resource does not exist
object
object
Example
Method Not Allowed — the HTTP verb is not supported on this endpoint
object
object
Example
Unsupported Media Type — use application/json
object
object
Example
Internal Server Error — an unexpected failure occurred on the server
object
object
Example
Service Unavailable — a downstream dependency is unreachable