Skip to main content

POST /map/maps

This endpoint can be used to post data for several keys.

An incoming request is rejected if the source is identified as bot or spider, according to user-agent filtering rules from IAB/ABC. See https://www.iab.com/guidelines/iab-abc-international-spiders-bots-list/.
Kameleoon is using single-pass method. This means nothing specific is to be done in the case request is sent from a web browser using a standard library (XHR); but in other cases the user should set a custom value to the User-Agent request header, to overwrite the default value set by the library.

Query Parameters
  • siteCode string required

    Id of the Kameleoon project

  • ttlHours int32

    Default value: 8784

    Time-to-live in hours, maximum value = 8784 (366 days)

Request Body required

Maps to save. Body size limited to 1 MB

  • string UTF-8

    JSON object {"<key>": <JSON object {"<field>": <value = any JSON type>}>}.

    See example below.

    With "pretty" representation (not recommended):

    {
      "key1": {
        "field1ToUpdate": "newStringValue",
        "field2ToUpdate": [
          "newArrayValueElement1",
          "newArrayValueElement2"
        ],
        "fieldToDelete": null
      },
      "someVisitorCode": {
        "someMapPropertyToUpdate": {
          "name1": 0,
          "name2": [
            "a",
            "b",
            "c"
          ]
        },
        "someBooleanPropertyToUpdate": true,
        "someNumberPropertyToUpdate": 25,
        "somePropertyToDelete": null
      }
    }


    With compact representation (recommended):

    {"key1":{"field1ToUpdate":"newStringValue","field2ToUpdate":["newArrayValueElement1","newArrayValueElement2"],"fieldToDelete":null},"someVisitorCode":{"someMapPropertyToUpdate":{"name1":0,"name2":["a","b","c"]},"someBooleanPropertyToUpdate":true,"someNumberPropertyToUpdate":25,"somePropertyToDelete":null}}

Responses

Successful operation, maps are savedmerged

Loading...