(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.data-privacy-src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-TT9ZP96');

Knowledge Base

Create Map API V2


This API function creates a map defined in the JSON. The response will return a location vCard file for download. Map details like location name, address, latitude/longitude may be provided.

  • A map must have some data added in the request.
  • The name of the location in the map is required. The request will fail if the name is not included.
  • Either the physical address of the location or the latitude/longitude of the location is required. The request will fail if neither are not included.
  • If both the “location-address” and the “location-latitude/location-longitude” values are passed, the “location-latitude/location-longitude” value will take precedence over the “location-address”.

Request: JSON

curl -X POST \ 
     -H "x-api-key: {Api Key}" \
     -H "content-type: application/json" -d '
          "action": "createmap",
          "location-name": "{Map location name}",
          "location-address": "{Map location address}",
          "location-latitude": "{Map location latitude}",
          "location-longitude": "{Map location longitude}"
      }' \
  "{Api Endpoint URL}"

Request Parameters

Param NameOptional/Mandatory; DatatypeDescription
x-api-keyMandatory; AlphanumericAuthentication Key for your account to access API service. Unique Alphanumeric Key can be reset under your Account->API Settings. 
actionMandatory; StringExplains the action for this API Request. Value is Case-Insensitive.
location-nameMandatory; StringName of the location.
location-addressOptional, Mandatory if no location latitude/longitude; AlphanumericAddress of the location.
location-latitudeOptional, Mandatory if no location address; NumericLatitude of the location.
location-longitudeOptional, Mandatory if no location address; NumericLongitude of the location.

Response Parameters

Param NamePresenceDescription
statusError Response“failure” 
error-codeError ResponseError code associated with the error.
error-infoError ResponseError message explaining the error code.

Request Example: JSON

curl -X POST \ 
     -H "x-api-key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
     -H "content-type: application/json" -d '
          "action": "createmap",
          "location-name": "Dunder Mifflin",
          "location-address": "Fake Address",
          "location-latitude": "42.3694407",
          "location-longitude": "-71.2374387"
      }' \
  "{Api Endpoint URL}"

Response: Success

Output the map file to download (.loc.vcf file)
Content-type: text/vcard; charset=utf-8;
Content-Disposition: inline; filename=location.loc.vcf;
PRODID:-//Apple Inc.//iOS 9.2.1//EN
N:;Dunder Mifflin;;;
FN:Dunder Mifflin
item1.X-ABLabel:map url

Response: Failure

    "status": "failure",
    "error-code": "E1801",
    "error-info": "Location Name is required."
Go to Top