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. 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:
2208
Time-to-live in hours, maximum value = 8784 (366 days)
- application/json
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>}>}.
Body example with a "pretty" representation (not recommended):
{
"keyToUpdate": {
"field1": "newStringValue",
"field2": [
"newArrayValueElement1",
"newArrayValueElement2"
]
},
"keyToDelete": {
},
"someVisitorCode": {
"someMapProperty": {
"name1": 0,
"name2": [
"a",
"b",
"c"
]
},
"someBooleanProperty": true,
"someNumberProperty": 25
}
}Body example with a "compact" representation (recommended):
{"keyToUpdate":{"field1":"newStringValue","field2":["newArrayValueElement1","newArrayValueElement2"]},"keyToDelete":{},"someVisitorCode":{"someMapProperty":{"name1":0,"name2":["a","b","c"]},"someBooleanProperty":true,"someNumberProperty":25}}
- 204
- 400
- 401
- 403
- 413
- 429
- 500
Request allowed, URL query processed successfully, request body will be processed
Malformed request syntax
Failed authentication (missing token when required, bad token - malformed, expired, invalid signature)
Forbidden user-agent or access denied to restricted resource
Body too large
Rate limited
Unexpected internal error