{"openapi":"3.0.0","info":{"title":"Synerise Public API","version":"1.6.2"},"servers":[{"url":"https://api.synerise.com","description":"Microsoft Azure EU"},{"url":"https://api.azu.synerise.com","description":"Microsoft Azure USA"},{"url":"https://api.geb.synerise.com","description":"Google Cloud Platform"}],"tags":[{"name":"Authorization"},{"name":"Authorization (deprecated)"},{"name":"Events"},{"name":"AI Events"},{"name":"Activities"},{"name":"Catalogs"},{"name":"Asset tags"},{"name":"Tags"},{"name":"Profile management"},{"name":"Analytics: Expressions"},{"name":"Analytics: Aggregates"},{"name":"Profile registration"},{"name":"Profile account management"},{"name":"Profile devices"},{"name":"Settings"},{"name":"Access control"},{"name":"User management"},{"name":"Access groups"},{"name":"User account management"},{"name":"Directory"},{"name":"Recommendation campaigns"},{"name":"Recommendation statistics"},{"name":"Recommendations"},{"name":"Search"},{"name":"Visual Search"},{"name":"Listing"},{"name":"Synonyms"},{"name":"Search Configuration"},{"name":"Suggestions Configuration"},{"name":"Query Rules"},{"name":"Search Stats"},{"name":"Promotions"},{"name":"Vouchers"},{"name":"Handbills"},{"name":"Screen views"},{"name":"Promotions points"},{"name":"Promotion settings"},{"name":"Promotion locks"},{"name":"Screen views (legacy)"},{"name":"Time Optimizer"},{"name":"Item filters"},{"name":"Documents"},{"name":"Uploader"},{"name":"Documents (legacy)"},{"name":"Templates"},{"name":"Template directories"},{"name":"Workflows"},{"name":"Workflow schedules"},{"name":"Control Center"},{"name":"Data Processing Job Logs"},{"name":"Consumption"},{"name":"Organization workspaces"},{"name":"Analytics: Funnels"},{"name":"Analytics: Histograms"},{"name":"Analytics: Metrics"},{"name":"AI: Metrics"},{"name":"Analytics: Reports"},{"name":"Analytics: Sankeys"},{"name":"Analytics: Segmentations"},{"name":"Analytics: Trends"},{"name":"Analytics: Management"},{"name":"Brickworks: Schemas"},{"name":"Brickworks: Records"},{"name":"Brickworks: Content generation"},{"name":"Brickworks: External sources"},{"name":"Brickworks: Record versions"}],"paths":{"/activities-api/activities/{clientId}":{"get":{"deprecated":true,"tags":["Activities"],"summary":"Get profile activities","description":"Retrieve a list of activities from a single profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ACTIVITIES_API_ACTIVITIES_READ`\n\n**User role permission required:** `client_activities: read`\n","operationId":"getActivitiesPerClient","security":[{"JWT":[]}],"parameters":[{"in":"path","name":"clientId","description":"The ID of the profile","required":true,"schema":{"type":"number","example":"434428563"}},{"$ref":"#/components/parameters/activities-api-queryDateFrom"},{"$ref":"#/components/parameters/activities-api-queryDateTo"},{"$ref":"#/components/parameters/activities-api-queryActions"},{"$ref":"#/components/parameters/activities-api-queryLimit"},{"$ref":"#/components/parameters/activities-api-queryRaw"},{"$ref":"#/components/parameters/activities-api-queryFormat"}],"responses":{"200":{"description":"Activities","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/activities-api-ActivityTerrarium2"},{"$ref":"#/components/schemas/activities-api-ActivityRaw2"}]}}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Activities/operation/getActivitiesPerClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/activities-api/activities/434428563?dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&actions=page.visit&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&format=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/activities-api/activities/434428563?dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&actions=page.visit&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&format=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/activities-api/activities/434428563?dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&actions=page.visit&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&format=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activities-api/activities/434428563?dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&actions=page.visit&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&format=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activities-api/activities/434428563');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'dateFrom' => 'SOME_NUMBER_VALUE',\n  'dateTo' => 'SOME_NUMBER_VALUE',\n  'actions' => 'page.visit',\n  'limit' => 'SOME_NUMBER_VALUE',\n  'raw' => 'SOME_BOOLEAN_VALUE',\n  'format' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/activities-api/activities/434428563?dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&actions=page.visit&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&format=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/activities-api/activity/by/{identifierType}":{"post":{"deprecated":true,"tags":["Activities"],"summary":"Get a single activity","description":"Retrieve the details of a single activity.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ACTIVITIES_API_ACTIVITIES_READ`\n\n**User role permission required:** `client_activities: read`\n","operationId":"getActivityForClient","security":[{"JWT":[]}],"parameters":[{"in":"path","name":"identifierType","description":"Profile identifier type","required":true,"schema":{"type":"string","enum":["id","uuid","email","custom_identify"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-SingleActivityRequest"}}}},"responses":{"200":{"description":"Activity","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/activities-api-ActivityTerrarium1"},{"$ref":"#/components/schemas/activities-api-ActivityRaw1"}]}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Activities/operation/getActivityForClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/activities-api/activity/by/%7BidentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\",\"additionalData\":{\"time\":\"1667563770404\",\"unique\":\"1245924049\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\",\\\"additionalData\\\":{\\\"time\\\":\\\"1667563770404\\\",\\\"unique\\\":\\\"1245924049\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/activities-api/activity/by/%7BidentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\",\n  \"additionalData\": {\n    \"time\": \"1667563770404\",\n    \"unique\": \"1245924049\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/activities-api/activity/by/%7BidentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activities-api/activity/by/%7BidentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  identifierValue: 'string',\n  additionalData: {time: '1667563770404', unique: '1245924049'}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activities-api/activity/by/%7BidentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\",\"additionalData\":{\"time\":\"1667563770404\",\"unique\":\"1245924049\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/activities-api/activity/by/%7BidentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\",\\\"additionalData\\\":{\\\"time\\\":\\\"1667563770404\\\",\\\"unique\\\":\\\"1245924049\\\"}}\")\n  .asString();"}]}},"/activities-api/descriptions":{"post":{"tags":["Activities"],"summary":"Add description mapping","description":"For each event, you can add a custom, human-readable description that's displayed in the Synerise Web Application\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ACTIVITIES_API_ACTIVITIES_UPDATE`\n\n**User role permission required:** `client_activities: update`\n","operationId":"addDescription","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-descriptionRequest"}}},"description":"Details of the description mapping","required":true},"responses":{"200":{"description":"Description mapping","content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-descriptionResponse"}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Activities/operation/addDescription"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/activities-api/descriptions \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"action\":\"page.visit\",\"description\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"action\\\":\\\"page.visit\\\",\\\"description\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/activities-api/descriptions\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"action\": \"page.visit\",\n  \"description\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/activities-api/descriptions\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activities-api/descriptions\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({action: 'page.visit', description: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activities-api/descriptions');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"action\":\"page.visit\",\"description\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/activities-api/descriptions\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"action\\\":\\\"page.visit\\\",\\\"description\\\":\\\"string\\\"}\")\n  .asString();"}]},"get":{"tags":["Activities"],"summary":"Get description mappings","description":"Retrieve a list of existing event-description mappings\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ACTIVITIES_API_ACTIVITIES_READ`\n\n**User role permission required:** `client_activities: read`\n","operationId":"getDescription","security":[{"JWT":[]}],"responses":{"200":{"description":"Description mappings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/activities-api-descriptionResponse"}}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Activities/operation/getDescription"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/activities-api/descriptions \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/activities-api/descriptions\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/activities-api/descriptions\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activities-api/descriptions\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activities-api/descriptions');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/activities-api/descriptions\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/activities-api/descriptions/{descriptionId}":{"post":{"tags":["Activities"],"summary":"Update description mapping","description":"Modify an existing description mapping\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ACTIVITIES_API_ACTIVITIES_UPDATE`\n\n**User role permission required:** `client_activities: update`\n","operationId":"updateDescriptionsById","security":[{"JWT":[]}],"parameters":[{"in":"path","name":"descriptionId","description":"ID of the mapping","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-descriptionRequest"}}},"description":"Updated information","required":true},"responses":{"200":{"description":"Description mapping","content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-descriptionResponse"}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Activities/operation/updateDescriptionsById"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/activities-api/descriptions/%7BdescriptionId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"action\":\"page.visit\",\"description\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"action\\\":\\\"page.visit\\\",\\\"description\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/activities-api/descriptions/%7BdescriptionId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"action\": \"page.visit\",\n  \"description\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/activities-api/descriptions/%7BdescriptionId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activities-api/descriptions/%7BdescriptionId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({action: 'page.visit', description: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activities-api/descriptions/%7BdescriptionId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"action\":\"page.visit\",\"description\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/activities-api/descriptions/%7BdescriptionId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"action\\\":\\\"page.visit\\\",\\\"description\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/activities-api/labels":{"post":{"tags":["Activities"],"summary":"Add label mapping","description":"For each event, you can add a custom, human-readable label that's displayed in the Synerise Web Application\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ACTIVITIES_API_ACTIVITIES_UPDATE`\n\n**User role permission required:** `client_activities: update`\n","operationId":"addLabel","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-labelRequest"}}},"description":"Details of the label mapping","required":true},"responses":{"200":{"description":"Label mapping","content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-labelResponse"}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Activities/operation/addLabel"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/activities-api/labels \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"action\":\"page.visit\",\"label\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"action\\\":\\\"page.visit\\\",\\\"label\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/activities-api/labels\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"action\": \"page.visit\",\n  \"label\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/activities-api/labels\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activities-api/labels\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({action: 'page.visit', label: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activities-api/labels');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"action\":\"page.visit\",\"label\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/activities-api/labels\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"action\\\":\\\"page.visit\\\",\\\"label\\\":\\\"string\\\"}\")\n  .asString();"}]},"get":{"tags":["Activities"],"summary":"Get label mappings","description":"Retrieve a list of existing event-label mappings\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ACTIVITIES_API_ACTIVITIES_READ`\n\n**User role permission required:** `client_activities: read`\n","operationId":"getLabel","security":[{"JWT":[]}],"responses":{"200":{"description":"Label mappings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/activities-api-labelResponse"}}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Activities/operation/getLabel"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/activities-api/labels \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/activities-api/labels\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/activities-api/labels\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activities-api/labels\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activities-api/labels');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/activities-api/labels\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/activities-api/labels/{labelId}":{"post":{"tags":["Activities"],"summary":"Update label mapping","description":"Modify an existing label mapping\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ACTIVITIES_API_ACTIVITIES_UPDATE`\n\n**User role permission required:** `client_activities: update`\n","operationId":"updateLabelById","security":[{"JWT":[]}],"parameters":[{"in":"path","name":"labelId","description":"ID of the mapping","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-labelRequest"}}},"description":"Updated information","required":true},"responses":{"200":{"description":"Label mapping","content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-labelResponse"}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Activities/operation/updateLabelById"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/activities-api/labels/%7BlabelId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"action\":\"page.visit\",\"label\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"action\\\":\\\"page.visit\\\",\\\"label\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/activities-api/labels/%7BlabelId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"action\": \"page.visit\",\n  \"label\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/activities-api/labels/%7BlabelId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activities-api/labels/%7BlabelId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({action: 'page.visit', label: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activities-api/labels/%7BlabelId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"action\":\"page.visit\",\"label\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/activities-api/labels/%7BlabelId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"action\\\":\\\"page.visit\\\",\\\"label\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/activities-api/icons":{"post":{"tags":["Activities"],"summary":"Add icon mapping","description":"For each event, you can add a custom icon that's displayed in the Synerise Web Application\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ACTIVITIES_API_ACTIVITIES_UPDATE`\n\n**User role permission required:** `client_activities: update`\n","operationId":"addIcon","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-iconRequest"}}},"description":"Icon details","required":true},"responses":{"200":{"description":"Icon","content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-iconResponse"}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Activities/operation/addIcon"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/activities-api/icons \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"action\":\"page.visit\",\"icons\":{\"primary\":\"string\",\"secondary\":\"string\",\"color\":\"string\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"action\\\":\\\"page.visit\\\",\\\"icons\\\":{\\\"primary\\\":\\\"string\\\",\\\"secondary\\\":\\\"string\\\",\\\"color\\\":\\\"string\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/activities-api/icons\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"action\": \"page.visit\",\n  \"icons\": {\n    \"primary\": \"string\",\n    \"secondary\": \"string\",\n    \"color\": \"string\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/activities-api/icons\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activities-api/icons\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  action: 'page.visit',\n  icons: {primary: 'string', secondary: 'string', color: 'string'}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activities-api/icons');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"action\":\"page.visit\",\"icons\":{\"primary\":\"string\",\"secondary\":\"string\",\"color\":\"string\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/activities-api/icons\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"action\\\":\\\"page.visit\\\",\\\"icons\\\":{\\\"primary\\\":\\\"string\\\",\\\"secondary\\\":\\\"string\\\",\\\"color\\\":\\\"string\\\"}}\")\n  .asString();"}]},"get":{"tags":["Activities"],"summary":"Get icon mappings","description":"Retrieve a list of existing event-icon mappings\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ACTIVITIES_API_ACTIVITIES_READ`\n\n**User role permission required:** `client_activities: read`\n","operationId":"getIcons","security":[{"JWT":[]}],"responses":{"200":{"description":"Icon mappings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/activities-api-iconResponse"}}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Activities/operation/getIcons"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/activities-api/icons \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/activities-api/icons\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/activities-api/icons\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activities-api/icons\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activities-api/icons');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/activities-api/icons\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/activities-api/icons/{iconID}":{"post":{"tags":["Activities"],"summary":"Update icon mapping","description":"Modify an existing icon mapping\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ACTIVITIES_API_ACTIVITIES_UPDATE`\n\n**User role permission required:** `client_activities: update`\n","operationId":"updateIconById","security":[{"JWT":[]}],"parameters":[{"in":"path","name":"iconID","description":"ID of the icon","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-iconRequest"}}},"description":"Updated mapping data","required":true},"responses":{"200":{"description":"Icon mapping","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/activities-api-iconResponse"}}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Activities/operation/updateIconById"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/activities-api/icons/%7BiconID%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"action\":\"page.visit\",\"icons\":{\"primary\":\"string\",\"secondary\":\"string\",\"color\":\"string\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"action\\\":\\\"page.visit\\\",\\\"icons\\\":{\\\"primary\\\":\\\"string\\\",\\\"secondary\\\":\\\"string\\\",\\\"color\\\":\\\"string\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/activities-api/icons/%7BiconID%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"action\": \"page.visit\",\n  \"icons\": {\n    \"primary\": \"string\",\n    \"secondary\": \"string\",\n    \"color\": \"string\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/activities-api/icons/%7BiconID%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activities-api/icons/%7BiconID%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  action: 'page.visit',\n  icons: {primary: 'string', secondary: 'string', color: 'string'}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activities-api/icons/%7BiconID%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"action\":\"page.visit\",\"icons\":{\"primary\":\"string\",\"secondary\":\"string\",\"color\":\"string\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/activities-api/icons/%7BiconID%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"action\\\":\\\"page.visit\\\",\\\"icons\\\":{\\\"primary\\\":\\\"string\\\",\\\"secondary\\\":\\\"string\\\",\\\"color\\\":\\\"string\\\"}}\")\n  .asString();"}]}},"/activities-api/events":{"get":{"tags":["Activities"],"summary":"Get profile's own events","description":"As a profile, retrieve a list of your own events.\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n\n**User role permission required:** `client_activities: read`\n","operationId":"getEvents","parameters":[{"$ref":"#/components/parameters/activities-api-queryActions"},{"$ref":"#/components/parameters/activities-api-queryDateFromV2"},{"$ref":"#/components/parameters/activities-api-queryDateToV2"},{"$ref":"#/components/parameters/activities-api-queryLimit"},{"$ref":"#/components/parameters/activities-api-queryRaw"},{"$ref":"#/components/parameters/activities-api-queryToken"},{"$ref":"#/components/parameters/activities-api-querySortBy"}],"responses":{"200":{"$ref":"#/components/responses/activities-api-EventResponse"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Activities/operation/getEvents"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/activities-api/events?actions=page.visit&dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&pageToken=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/activities-api/events?actions=page.visit&dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&pageToken=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/activities-api/events?actions=page.visit&dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&pageToken=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activities-api/events?actions=page.visit&dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&pageToken=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activities-api/events');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'actions' => 'page.visit',\n  'dateFrom' => 'SOME_NUMBER_VALUE',\n  'dateTo' => 'SOME_NUMBER_VALUE',\n  'limit' => 'SOME_NUMBER_VALUE',\n  'raw' => 'SOME_BOOLEAN_VALUE',\n  'pageToken' => 'SOME_STRING_VALUE',\n  'sortBy' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/activities-api/events?actions=page.visit&dateFrom=SOME_NUMBER_VALUE&dateTo=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&raw=SOME_BOOLEAN_VALUE&pageToken=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/activities-api/events/by/{identifierType}":{"post":{"tags":["Activities"],"summary":"Get profile events as a workspace/Synerise user","description":"Retrieve a list of events for the single profile.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ACTIVITIES_API_ACTIVITIES_READ`\n\n**User role permission required:** `client_activities: read`\n","operationId":"getEventsByIdentifier","parameters":[{"$ref":"#/components/parameters/activities-api-pathIdentifierType"},{"$ref":"#/components/parameters/activities-api-queryToken"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-ClientEventsRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/activities-api-EventResponse"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Activities/operation/getEventsByIdentifier"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/activities-api/events/by/%7BidentifierType%7D?pageToken=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\",\"additionalData\":{\"actions\":\"page.visit,client.login\",\"dateFrom\":\"1720688755000\",\"dateTo\":\"1720695955000\",\"limit\":50,\"raw\":\"true\",\"pageToken\":\"string\",\"sortBy\":\"time:desc\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\",\\\"additionalData\\\":{\\\"actions\\\":\\\"page.visit,client.login\\\",\\\"dateFrom\\\":\\\"1720688755000\\\",\\\"dateTo\\\":\\\"1720695955000\\\",\\\"limit\\\":50,\\\"raw\\\":\\\"true\\\",\\\"pageToken\\\":\\\"string\\\",\\\"sortBy\\\":\\\"time:desc\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/activities-api/events/by/%7BidentifierType%7D?pageToken=SOME_STRING_VALUE\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\",\n  \"additionalData\": {\n    \"actions\": \"page.visit,client.login\",\n    \"dateFrom\": \"1720688755000\",\n    \"dateTo\": \"1720695955000\",\n    \"limit\": 50,\n    \"raw\": \"true\",\n    \"pageToken\": \"string\",\n    \"sortBy\": \"time:desc\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/activities-api/events/by/%7BidentifierType%7D?pageToken=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activities-api/events/by/%7BidentifierType%7D?pageToken=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  identifierValue: 'string',\n  additionalData: {\n    actions: 'page.visit,client.login',\n    dateFrom: '1720688755000',\n    dateTo: '1720695955000',\n    limit: 50,\n    raw: 'true',\n    pageToken: 'string',\n    sortBy: 'time:desc'\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activities-api/events/by/%7BidentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setQueryData([\n  'pageToken' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\",\"additionalData\":{\"actions\":\"page.visit,client.login\",\"dateFrom\":\"1720688755000\",\"dateTo\":\"1720695955000\",\"limit\":50,\"raw\":\"true\",\"pageToken\":\"string\",\"sortBy\":\"time:desc\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/activities-api/events/by/%7BidentifierType%7D?pageToken=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\",\\\"additionalData\\\":{\\\"actions\\\":\\\"page.visit,client.login\\\",\\\"dateFrom\\\":\\\"1720688755000\\\",\\\"dateTo\\\":\\\"1720695955000\\\",\\\"limit\\\":50,\\\"raw\\\":\\\"true\\\",\\\"pageToken\\\":\\\"string\\\",\\\"sortBy\\\":\\\"time:desc\\\"}}\")\n  .asString();"}]}},"/activity-time-estimator/v1/query-model":{"post":{"summary":"Generate activity time predictions","description":"Calculate the probability of a profile performing an activity (event) at specific times of the week.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `AI_TIME_OPTIMIZER_GET_PREDICTIONS_ANALYTICS_READ`\n\n**User role permission required:** `analytics_ai_time_optimizer: read`\n","operationId":"generate-time-predictions","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"With profile ID","required":["clientID"],"properties":{"clientID":{"$ref":"#/components/schemas/activity-time-estimator-ClientIDs"},"mode":{"$ref":"#/components/schemas/activity-time-estimator-Mode"},"timeIndex":{"$ref":"#/components/schemas/activity-time-estimator-TimeIndex"},"timeIndexExclude":{"$ref":"#/components/schemas/activity-time-estimator-TimeIndexExclude"},"topN":{"$ref":"#/components/schemas/activity-time-estimator-TopN"}}},{"type":"object","title":"With profile UUID","required":["clientUUID"],"properties":{"clientUUID":{"$ref":"#/components/schemas/activity-time-estimator-ClientUUIDs"},"mode":{"$ref":"#/components/schemas/activity-time-estimator-Mode"},"timeIndex":{"$ref":"#/components/schemas/activity-time-estimator-TimeIndex"},"timeIndexExclude":{"$ref":"#/components/schemas/activity-time-estimator-TimeIndexExclude"},"topN":{"$ref":"#/components/schemas/activity-time-estimator-TopN"}}}]}}}},"responses":{"200":{"description":"Predicted activity times","content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"With profile ID","properties":{"clientID":{"$ref":"#/components/schemas/activity-time-estimator-ClientIDs"},"hours":{"$ref":"#/components/schemas/activity-time-estimator-Hours"},"predictions":{"$ref":"#/components/schemas/activity-time-estimator-Predictions"}}},{"type":"object","title":"With profile UUID","properties":{"clientUUID":{"$ref":"#/components/schemas/activity-time-estimator-ClientUUIDs"},"hours":{"$ref":"#/components/schemas/activity-time-estimator-Hours"},"predictions":{"$ref":"#/components/schemas/activity-time-estimator-Predictions"}}}]}}}}},"tags":["Time Optimizer"],"x-snr-doc-urls":["/api-reference/ai-suite#tag/Time-Optimizer/operation/generate-time-predictions"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/activity-time-estimator/v1/query-model \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"clientID\":[\"67346\"],\"mode\":\"standard\",\"timeIndex\":[[0,23],24,25,26,[27,48]],\"timeIndexExclude\":[[0,23],24,25,26],\"topN\":1}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"clientID\\\":[\\\"67346\\\"],\\\"mode\\\":\\\"standard\\\",\\\"timeIndex\\\":[[0,23],24,25,26,[27,48]],\\\"timeIndexExclude\\\":[[0,23],24,25,26],\\\"topN\\\":1}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/activity-time-estimator/v1/query-model\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"clientID\": [\n    \"67346\"\n  ],\n  \"mode\": \"standard\",\n  \"timeIndex\": [\n    [\n      0,\n      23\n    ],\n    24,\n    25,\n    26,\n    [\n      27,\n      48\n    ]\n  ],\n  \"timeIndexExclude\": [\n    [\n      0,\n      23\n    ],\n    24,\n    25,\n    26\n  ],\n  \"topN\": 1\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/activity-time-estimator/v1/query-model\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/activity-time-estimator/v1/query-model\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  clientID: ['67346'],\n  mode: 'standard',\n  timeIndex: [[0, 23], 24, 25, 26, [27, 48]],\n  timeIndexExclude: [[0, 23], 24, 25, 26],\n  topN: 1\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/activity-time-estimator/v1/query-model');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"clientID\":[\"67346\"],\"mode\":\"standard\",\"timeIndex\":[[0,23],24,25,26,[27,48]],\"timeIndexExclude\":[[0,23],24,25,26],\"topN\":1}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/activity-time-estimator/v1/query-model\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"clientID\\\":[\\\"67346\\\"],\\\"mode\\\":\\\"standard\\\",\\\"timeIndex\\\":[[0,23],24,25,26,[27,48]],\\\"timeIndexExclude\\\":[[0,23],24,25,26],\\\"topN\\\":1}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/stats/queries/summary":{"get":{"summary":"Get queries stats summary","description":"Retrieves the statistics of all queries or a single query defined in the request.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `AI_STATS_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"GetQueriesSummary","tags":["Search Stats"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/ai-stats-indexId"},{"$ref":"#/components/parameters/ai-stats-dateFrom"},{"$ref":"#/components/parameters/ai-stats-dateTo"},{"$ref":"#/components/parameters/ai-stats-query"},{"$ref":"#/components/parameters/ai-stats-searchType"},{"$ref":"#/components/parameters/ai-stats-searchGroupBy"}],"responses":{"200":{"description":"Statistics returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-WrappedQueriesSummary"}}}},"500":{"description":"Service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}},"4xx":{"description":"Incorrect request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Stats/operation/GetQueriesSummary"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/summary');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'dateFrom' => 'SOME_STRING_VALUE',\n  'dateTo' => 'SOME_STRING_VALUE',\n  'query' => 'SOME_STRING_VALUE',\n  'searchType' => 'SOME_STRING_VALUE',\n  'groupBy' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/stats/queries/top":{"get":{"summary":"Get top query statistics","description":"Retrieves the 1000 most popular queries. \n\n<strong>IMPORTANT</strong>: Don't use this endpoint for displaying most popular queries to end users when they're searching. Instead, use [`search/v2/indices/{indexId}/list`](https://developers.synerise.com/AISearch/AISearch.html#operation/ListingGet), where `indexId` is a suggestion index.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <span title=\"Deprecated\">AI API key (legacy)</span>\n\n**API key permission required:** `AI_STATS_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"GetQueriesTop","tags":["Search Stats"],"security":[{"JWT":[]},{"TrackerKey":[]}],"parameters":[{"$ref":"#/components/parameters/ai-stats-indexId"},{"$ref":"#/components/parameters/ai-stats-dateFrom"},{"$ref":"#/components/parameters/ai-stats-dateTo"},{"$ref":"#/components/parameters/ai-stats-query"},{"$ref":"#/components/parameters/ai-stats-searchType"},{"$ref":"#/components/parameters/ai-stats-queryFilter"},{"$ref":"#/components/parameters/ai-stats-searchGroupBy"},{"$ref":"#/components/parameters/ai-stats-withFilters"},{"$ref":"#/components/parameters/ai-stats-searchSortBy"},{"$ref":"#/components/parameters/ai-stats-searchOrdering"}],"responses":{"200":{"description":"Statistics returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-WrappedQueriesTop"}}}},"500":{"description":"Service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}},"4xx":{"description":"Incorrect request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Stats/operation/GetQueriesTop"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/top?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&queryFilter=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&withFilters=SOME_STRING_VALUE&SortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/top?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&queryFilter=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&withFilters=SOME_STRING_VALUE&SortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/top?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&queryFilter=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&withFilters=SOME_STRING_VALUE&SortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/top?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&queryFilter=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&withFilters=SOME_STRING_VALUE&SortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/top');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'dateFrom' => 'SOME_STRING_VALUE',\n  'dateTo' => 'SOME_STRING_VALUE',\n  'query' => 'SOME_STRING_VALUE',\n  'searchType' => 'SOME_STRING_VALUE',\n  'queryFilter' => 'SOME_STRING_VALUE',\n  'groupBy' => 'SOME_STRING_VALUE',\n  'withFilters' => 'SOME_STRING_VALUE',\n  'SortBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/queries/top?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&queryFilter=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&withFilters=SOME_STRING_VALUE&SortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/stats/filters/summary":{"get":{"summary":"Get filters stats","description":"Retrieves the statistics of filters used in searches.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `AI_STATS_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"GetFiltersSummary","tags":["Search Stats"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/ai-stats-indexId"},{"$ref":"#/components/parameters/ai-stats-filterName"},{"$ref":"#/components/parameters/ai-stats-dateFrom"},{"$ref":"#/components/parameters/ai-stats-dateTo"},{"$ref":"#/components/parameters/ai-stats-searchGroupBy"},{"$ref":"#/components/parameters/ai-stats-searchOrdering"}],"responses":{"200":{"description":"Statistics returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-WrappedFiltersSummary"}}}},"500":{"description":"Service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}},"4xx":{"description":"Incorrect request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Stats/operation/GetFiltersSummary"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/filters/summary?filterName=brand&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/filters/summary?filterName=brand&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/filters/summary?filterName=brand&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/filters/summary?filterName=brand&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/filters/summary');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'filterName' => 'brand',\n  'dateFrom' => 'SOME_STRING_VALUE',\n  'dateTo' => 'SOME_STRING_VALUE',\n  'groupBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/filters/summary?filterName=brand&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/stats/rules/summary":{"get":{"summary":"Get rules stats","description":"Retrieves the statistics of applied rules.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `AI_STATS_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"GetRulesSummary","tags":["Search Stats"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/ai-stats-indexId"},{"$ref":"#/components/parameters/ai-stats-dateFrom"},{"$ref":"#/components/parameters/ai-stats-dateTo"},{"$ref":"#/components/parameters/ai-stats-searchGroupBy"}],"responses":{"200":{"description":"Statistics returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-WrappedRulesSummary"}}}},"500":{"description":"Service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}},"4xx":{"description":"Incorrect request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Stats/operation/GetRulesSummary"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/rules/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/rules/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/rules/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/rules/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/rules/summary');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'dateFrom' => 'SOME_STRING_VALUE',\n  'dateTo' => 'SOME_STRING_VALUE',\n  'groupBy' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/stats/rules/summary?dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/indices/stats/queries/summary":{"get":{"summary":"Get queries summary for multiple indices","description":"Retrieves the statistics of all queries or a single query defined in the request for multiple indices.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `AI_STATS_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"GetQueriesSummaryMultipleIndices","tags":["Search Stats"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/ai-stats-indexIdArray"},{"$ref":"#/components/parameters/ai-stats-dateFrom"},{"$ref":"#/components/parameters/ai-stats-dateTo"},{"$ref":"#/components/parameters/ai-stats-query"},{"$ref":"#/components/parameters/ai-stats-searchType"},{"$ref":"#/components/parameters/ai-stats-searchGroupBy"}],"responses":{"200":{"description":"Statistics returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-WrappedQueriesSummaryMultipleIndices"}}}},"500":{"description":"Service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}},"4xx":{"description":"Incorrect request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Stats/operation/GetQueriesSummaryMultipleIndices"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/stats/queries/summary?indexId=SOME_ARRAY_VALUE&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/stats/queries/summary?indexId=SOME_ARRAY_VALUE&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/stats/queries/summary?indexId=SOME_ARRAY_VALUE&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/stats/queries/summary?indexId=SOME_ARRAY_VALUE&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/stats/queries/summary');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'indexId' => 'SOME_ARRAY_VALUE',\n  'dateFrom' => 'SOME_STRING_VALUE',\n  'dateTo' => 'SOME_STRING_VALUE',\n  'query' => 'SOME_STRING_VALUE',\n  'searchType' => 'SOME_STRING_VALUE',\n  'groupBy' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/stats/queries/summary?indexId=SOME_ARRAY_VALUE&dateFrom=SOME_STRING_VALUE&dateTo=SOME_STRING_VALUE&query=SOME_STRING_VALUE&searchType=SOME_STRING_VALUE&groupBy=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/recommendations/v2/campaigns/stats":{"post":{"summary":"Get recommendation campaign statistics","description":"Retrieves the statistics of campaigns defined in the request.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `AI_STATS_READ`\n\n**User role permission required:** `campaigns_recommendations: read`\n","operationId":"PostCampaignsStats","tags":["Recommendation statistics"],"security":[{"JWT":[]},{"TrackerKey":[]}],"requestBody":{"description":"Request for recommendation campaigns stats.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaignIds":{"type":"array","minItems":1,"items":{"type":"string"},"description":"List of campaign IDs for which the statistics are requested. Must not be empty."},"from":{"type":"string","format":"date","description":"Upper bound of the interval for which the statistics will be retrieved.  \nMust be provided with `to`, otherwise the filter is treated as unspecified.  \nIf not specified, the interval is last 7 days.\n"},"to":{"type":"string","format":"date","description":"Lower bound of the interval for which the statistics will be retrieved.  \nMust be provided with `from`, otherwise the filter is treated as unspecified.  \nIf not specified, the interval is last 7 days.\n"},"timeZone":{"type":"string","description":"Time zone identifier.","default":"UTC","example":"Europe/Warsaw"}},"required":["campaignIds"]}}}},"responses":{"200":{"description":"Statistics returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-WrappedRecoStatsByCampaign"}}}},"500":{"description":"Service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}},"4xx":{"description":"Incorrect request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendation-statistics/operation/PostCampaignsStats"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/campaigns/stats \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"campaignIds\":[\"string\"],\"from\":\"2019-08-24\",\"to\":\"2019-08-24\",\"timeZone\":\"Europe/Warsaw\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"campaignIds\\\":[\\\"string\\\"],\\\"from\\\":\\\"2019-08-24\\\",\\\"to\\\":\\\"2019-08-24\\\",\\\"timeZone\\\":\\\"Europe/Warsaw\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/campaigns/stats\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"campaignIds\": [\n    \"string\"\n  ],\n  \"from\": \"2019-08-24\",\n  \"to\": \"2019-08-24\",\n  \"timeZone\": \"Europe/Warsaw\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/campaigns/stats\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/campaigns/stats\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  campaignIds: ['string'],\n  from: '2019-08-24',\n  to: '2019-08-24',\n  timeZone: 'Europe/Warsaw'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/campaigns/stats');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"campaignIds\":[\"string\"],\"from\":\"2019-08-24\",\"to\":\"2019-08-24\",\"timeZone\":\"Europe/Warsaw\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/campaigns/stats\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"campaignIds\\\":[\\\"string\\\"],\\\"from\\\":\\\"2019-08-24\\\",\\\"to\\\":\\\"2019-08-24\\\",\\\"timeZone\\\":\\\"Europe/Warsaw\\\"}\")\n  .asString();"}]}},"/recommendations/v2/campaigns/stats/global":{"get":{"summary":"Get global recommendation campaign statistics","description":"Retrieves the statistics of all recommendation campaigns.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `AI_STATS_READ`\n\n**User role permission required:** `campaigns_recommendations: read`\n","operationId":"GetCampaignsGlobalStats","tags":["Recommendation statistics"],"security":[{"JWT":[]},{"TrackerKey":[]}],"parameters":[{"$ref":"#/components/parameters/ai-stats-from"},{"$ref":"#/components/parameters/ai-stats-to"},{"$ref":"#/components/parameters/ai-stats-timeZone"}],"responses":{"200":{"description":"Statistics returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-WrappedRecoStatsByDate"}}}},"500":{"description":"Service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}},"4xx":{"description":"Incorrect request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendation-statistics/operation/GetCampaignsGlobalStats"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/campaigns/stats/global?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/campaigns/stats/global?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/campaigns/stats/global?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/campaigns/stats/global?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/campaigns/stats/global');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'from' => 'SOME_STRING_VALUE',\n  'to' => 'SOME_STRING_VALUE',\n  'timeZone' => 'Europe/Warsaw'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/campaigns/stats/global?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/recommendations/v2/campaigns/{campaignId}/stats":{"get":{"summary":"Get recommendation campaign statistics","description":"Retrieves the statistics of a single recommendation campaign.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `AI_STATS_READ`\n\n**User role permission required:** `campaigns_recommendations: read`\n","operationId":"GetCampaignStats","tags":["Recommendation statistics"],"security":[{"JWT":[]},{"TrackerKey":[]}],"parameters":[{"$ref":"#/components/parameters/ai-stats-campaignIdPath"},{"$ref":"#/components/parameters/ai-stats-from"},{"$ref":"#/components/parameters/ai-stats-to"},{"$ref":"#/components/parameters/ai-stats-timeZone"}],"responses":{"200":{"description":"Statistics returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-WrappedRecoStatsByDate"}}}},"500":{"description":"Service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}},"4xx":{"description":"Incorrect request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendation-statistics/operation/GetCampaignStats"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/campaigns/50NCGoRK0VRb/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/campaigns/50NCGoRK0VRb/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/campaigns/50NCGoRK0VRb/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/campaigns/50NCGoRK0VRb/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/campaigns/50NCGoRK0VRb/stats');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'from' => 'SOME_STRING_VALUE',\n  'to' => 'SOME_STRING_VALUE',\n  'timeZone' => 'Europe/Warsaw'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/campaigns/50NCGoRK0VRb/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/recommendations/v2/campaigns/{campaignId}/products/stats":{"get":{"summary":"Get statistics for top items in a campaign","description":"Retrieves the statistics of top products for a single recommendation campaign.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `AI_STATS_READ`\n\n**User role permission required:** `campaigns_recommendations: read`\n","operationId":"GetRecoTopProductsStats","tags":["Recommendation statistics"],"security":[{"JWT":[]},{"TrackerKey":[]}],"parameters":[{"$ref":"#/components/parameters/ai-stats-campaignIdPath"},{"$ref":"#/components/parameters/ai-stats-from"},{"$ref":"#/components/parameters/ai-stats-to"},{"$ref":"#/components/parameters/ai-stats-timeZone"},{"$ref":"#/components/parameters/ai-stats-productMetricName"}],"responses":{"200":{"description":"Statistics returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-WrappedRecoTopProductsStats"}}}},"500":{"description":"Service error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}},"4xx":{"description":"Incorrect request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai-stats-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendation-statistics/operation/GetRecoTopProductsStats"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/campaigns/50NCGoRK0VRb/products/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw&metric=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/campaigns/50NCGoRK0VRb/products/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw&metric=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/campaigns/50NCGoRK0VRb/products/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw&metric=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/campaigns/50NCGoRK0VRb/products/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw&metric=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/campaigns/50NCGoRK0VRb/products/stats');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'from' => 'SOME_STRING_VALUE',\n  'to' => 'SOME_STRING_VALUE',\n  'timeZone' => 'Europe/Warsaw',\n  'metric' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/campaigns/50NCGoRK0VRb/products/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw&metric=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/analytics/analytics/batch-delete":{"post":{"tags":["Analytics: Management"],"summary":"Delete multiple analyses","description":"Deletes many analytics in a single request\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `analytics: delete`\n","operationId":"analytics2-analytics-batch-delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-AnalyticsBatchDeleteRequest"}}},"required":true},"responses":{"204":{"description":"Analytics deleted"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-analytics-batch-delete"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/batch-delete \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"funnelIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"segmentationIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"trendIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"metricIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"histogramIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"reportIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"aggregateIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"expressionIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"sankeyIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"funnelIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"segmentationIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"trendIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"metricIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"histogramIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"reportIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"aggregateIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"expressionIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"sankeyIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/batch-delete\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"funnelIds\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"segmentationIds\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"trendIds\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"metricIds\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"histogramIds\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"reportIds\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"aggregateIds\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"expressionIds\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"sankeyIds\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/batch-delete\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/batch-delete\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  funnelIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n  segmentationIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n  trendIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n  metricIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n  histogramIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n  reportIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n  aggregateIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n  expressionIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n  sankeyIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/batch-delete');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"funnelIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"segmentationIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"trendIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"metricIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"histogramIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"reportIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"aggregateIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"expressionIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"sankeyIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/batch-delete\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"funnelIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"segmentationIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"trendIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"metricIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"histogramIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"reportIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"aggregateIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"expressionIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"sankeyIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"]}\")\n  .asString();"}]}},"/analytics/{Namespace}/metrics":{"get":{"tags":["Analytics: Metrics"],"summary":"List metrics","description":"Returns a paginated list of metrics.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_METRICS_LIST_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-metrics-list","parameters":[{"$ref":"#/components/parameters/analytics-page"},{"$ref":"#/components/parameters/analytics-limit"},{"$ref":"#/components/parameters/analytics-search"},{"$ref":"#/components/parameters/analytics-sortBy"},{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-directoryId"},{"$ref":"#/components/parameters/analytics-ids"},{"$ref":"#/components/parameters/analytics-isHistogramMetric"},{"$ref":"#/components/parameters/analytics-isReportMetric"}],"responses":{"200":{"description":"List of metrics","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"Array of metrics","items":{"$ref":"#/components/schemas/analytics-MetricListItem"}},"meta":{"$ref":"#/components/schemas/analytics-Meta"}},"required":["data"]}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/analytics/%7BNamespace%7D/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isHistogramMetric=SOME_BOOLEAN_VALUE&isReportMetric=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isHistogramMetric=SOME_BOOLEAN_VALUE&isReportMetric=SOME_BOOLEAN_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isHistogramMetric=SOME_BOOLEAN_VALUE&isReportMetric=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isHistogramMetric=SOME_BOOLEAN_VALUE&isReportMetric=SOME_BOOLEAN_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/metrics');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'sortBy' => 'name:asc',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'ids' => 'SOME_STRING_VALUE',\n  'isHistogramMetric' => 'SOME_BOOLEAN_VALUE',\n  'isReportMetric' => 'SOME_BOOLEAN_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/metrics?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isHistogramMetric=SOME_BOOLEAN_VALUE&isReportMetric=SOME_BOOLEAN_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Analytics: Metrics"],"summary":"Create metric analysis","operationId":"analytics2-metrics-create","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-MetricRequest"}}}},"responses":{"200":{"description":"ID of the created analysis","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-Id"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-create"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_METRICS_CREATE`, `ANALYTICS_BACKEND_METRIC_CREATE`\n\n**User role permission required:** `analytics: create`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/metrics \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"comparison\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}}},\"metricType\":\"SIMPLE\",\"expression\":{\"type\":\"VALUE\",\"value\":{\"type\":\"NUMBER\",\"value\":100}},\"isVisibleForClientProfile\":true,\"allowNull\":true,\"grouping\":[{\"type\":\"TOP\",\"top\":0}]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"comparison\\\":{\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}}},\\\"metricType\\\":\\\"SIMPLE\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"value\\\":{\\\"type\\\":\\\"NUMBER\\\",\\\"value\\\":100}},\\\"isVisibleForClientProfile\\\":true,\\\"allowNull\\\":true,\\\"grouping\\\":[{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0}]},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/metrics\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"format\": {\n      \"compactNumbers\": false,\n      \"currency\": \"EUR\",\n      \"dataFormat\": \"cash\",\n      \"fixedLength\": 0,\n      \"useSeparator\": false\n    },\n    \"comparison\": {\n      \"dateFilter\": {\n        \"type\": \"ABSOLUTE\",\n        \"from\": \"2019-08-24T14:15:22Z\",\n        \"to\": \"2019-08-24T14:15:22Z\",\n        \"filter\": {\n          \"type\": \"DAILY\",\n          \"nestingType\": \"IN_PLACE\",\n          \"from\": \"string\",\n          \"to\": \"string\",\n          \"inverted\": false\n        }\n      }\n    },\n    \"metricType\": \"SIMPLE\",\n    \"expression\": {\n      \"type\": \"VALUE\",\n      \"value\": {\n        \"type\": \"NUMBER\",\n        \"value\": 100\n      }\n    },\n    \"isVisibleForClientProfile\": true,\n    \"allowNull\": true,\n    \"grouping\": [\n      {\n        \"type\": \"TOP\",\n        \"top\": 0\n      }\n    ]\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/metrics\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/metrics\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    format: {\n      compactNumbers: false,\n      currency: 'EUR',\n      dataFormat: 'cash',\n      fixedLength: 0,\n      useSeparator: false\n    },\n    comparison: {\n      dateFilter: {\n        type: 'ABSOLUTE',\n        from: '2019-08-24T14:15:22Z',\n        to: '2019-08-24T14:15:22Z',\n        filter: {\n          type: 'DAILY',\n          nestingType: 'IN_PLACE',\n          from: 'string',\n          to: 'string',\n          inverted: false\n        }\n      }\n    },\n    metricType: 'SIMPLE',\n    expression: {type: 'VALUE', value: {type: 'NUMBER', value: 100}},\n    isVisibleForClientProfile: true,\n    allowNull: true,\n    grouping: [{type: 'TOP', top: 0}]\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/metrics');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"comparison\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}}},\"metricType\":\"SIMPLE\",\"expression\":{\"type\":\"VALUE\",\"value\":{\"type\":\"NUMBER\",\"value\":100}},\"isVisibleForClientProfile\":true,\"allowNull\":true,\"grouping\":[{\"type\":\"TOP\",\"top\":0}]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/metrics\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"comparison\\\":{\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}}},\\\"metricType\\\":\\\"SIMPLE\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"value\\\":{\\\"type\\\":\\\"NUMBER\\\",\\\"value\\\":100}},\\\"isVisibleForClientProfile\\\":true,\\\"allowNull\\\":true,\\\"grouping\\\":[{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0}]},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/metrics/{AnalysisId}":{"get":{"tags":["Analytics: Metrics"],"summary":"Get metric details","description":"Retrieve the details of a metric definition.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_METRICS_READ`, `ANALYTICS_BACKEND_METRIC_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-metrics-get","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"},{"$ref":"#/components/parameters/analytics-pathNamespace"}],"responses":{"200":{"description":"Metric details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-MetricView"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Analytics: Metrics"],"summary":"Update metric","description":"Update an existing metric definition.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_METRICS_UPDATE`, `ANALYTICS_BACKEND_METRIC_UPDATE`\n\n**User role permission required:** `analytics: update`\n","operationId":"analytics2-metrics-update","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"},{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-MetricRequest"}}}},"responses":{"200":{"description":"Metric details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-MetricView"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-update"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"comparison\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}}},\"metricType\":\"SIMPLE\",\"expression\":{\"type\":\"VALUE\",\"value\":{\"type\":\"NUMBER\",\"value\":100}},\"isVisibleForClientProfile\":true,\"allowNull\":true,\"grouping\":[{\"type\":\"TOP\",\"top\":0}]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"comparison\\\":{\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}}},\\\"metricType\\\":\\\"SIMPLE\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"value\\\":{\\\"type\\\":\\\"NUMBER\\\",\\\"value\\\":100}},\\\"isVisibleForClientProfile\\\":true,\\\"allowNull\\\":true,\\\"grouping\\\":[{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0}]},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"format\": {\n      \"compactNumbers\": false,\n      \"currency\": \"EUR\",\n      \"dataFormat\": \"cash\",\n      \"fixedLength\": 0,\n      \"useSeparator\": false\n    },\n    \"comparison\": {\n      \"dateFilter\": {\n        \"type\": \"ABSOLUTE\",\n        \"from\": \"2019-08-24T14:15:22Z\",\n        \"to\": \"2019-08-24T14:15:22Z\",\n        \"filter\": {\n          \"type\": \"DAILY\",\n          \"nestingType\": \"IN_PLACE\",\n          \"from\": \"string\",\n          \"to\": \"string\",\n          \"inverted\": false\n        }\n      }\n    },\n    \"metricType\": \"SIMPLE\",\n    \"expression\": {\n      \"type\": \"VALUE\",\n      \"value\": {\n        \"type\": \"NUMBER\",\n        \"value\": 100\n      }\n    },\n    \"isVisibleForClientProfile\": true,\n    \"allowNull\": true,\n    \"grouping\": [\n      {\n        \"type\": \"TOP\",\n        \"top\": 0\n      }\n    ]\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    format: {\n      compactNumbers: false,\n      currency: 'EUR',\n      dataFormat: 'cash',\n      fixedLength: 0,\n      useSeparator: false\n    },\n    comparison: {\n      dateFilter: {\n        type: 'ABSOLUTE',\n        from: '2019-08-24T14:15:22Z',\n        to: '2019-08-24T14:15:22Z',\n        filter: {\n          type: 'DAILY',\n          nestingType: 'IN_PLACE',\n          from: 'string',\n          to: 'string',\n          inverted: false\n        }\n      }\n    },\n    metricType: 'SIMPLE',\n    expression: {type: 'VALUE', value: {type: 'NUMBER', value: 100}},\n    isVisibleForClientProfile: true,\n    allowNull: true,\n    grouping: [{type: 'TOP', top: 0}]\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"comparison\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}}},\"metricType\":\"SIMPLE\",\"expression\":{\"type\":\"VALUE\",\"value\":{\"type\":\"NUMBER\",\"value\":100}},\"isVisibleForClientProfile\":true,\"allowNull\":true,\"grouping\":[{\"type\":\"TOP\",\"top\":0}]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"comparison\\\":{\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}}},\\\"metricType\\\":\\\"SIMPLE\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"value\\\":{\\\"type\\\":\\\"NUMBER\\\",\\\"value\\\":100}},\\\"isVisibleForClientProfile\\\":true,\\\"allowNull\\\":true,\\\"grouping\\\":[{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0}]},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]},"delete":{"tags":["Analytics: Metrics"],"summary":"Delete metric analysis","operationId":"analytics2-metrics-delete","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"},{"$ref":"#/components/parameters/analytics-pathNamespace"}],"responses":{"204":{"description":"Metric deleted"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-metrics-delete"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_METRICS_DELETE`, `ANALYTICS_BACKEND_METRIC_DELETE`\n\n**User role permission required:** `analytics: delete`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/analytics/%7BNamespace%7D/metrics/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/analytics/analytics/v4/reports/{AnalysisId}/recalculate/override":{"post":{"tags":["Analytics: Reports"],"summary":"Calculate report with override","description":"Calculate a report with new parameters and/or variables (dynamic keys)\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_REPORT_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-recalculate-report-override","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-OverrideQueryRequest"}}}},"responses":{"200":{"description":"Report calculation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-ReportCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-recalculate-report-override"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v4/reports/%7BAnalysisId%7D/recalculate/override \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"title\":\"string\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"title\\\":\\\"string\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}],\\\"overrideNested\\\":false}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v4/reports/%7BAnalysisId%7D/recalculate/override\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"title\": \"string\",\n  \"dateFilter\": {\n    \"type\": \"ABSOLUTE\",\n    \"from\": \"2019-08-24T14:15:22Z\",\n    \"to\": \"2019-08-24T14:15:22Z\",\n    \"filter\": {\n      \"type\": \"DAILY\",\n      \"nestingType\": \"IN_PLACE\",\n      \"from\": \"string\",\n      \"to\": \"string\",\n      \"inverted\": false\n    }\n  },\n  \"aggregateDataBy\": {\n    \"type\": \"YEARS\",\n    \"value\": 0\n  },\n  \"filter\": {\n    \"matching\": true,\n    \"expressions\": [\n      {\n        \"type\": \"ATTRIBUTE\",\n        \"name\": \"string\",\n        \"matching\": true,\n        \"attribute\": {\n          \"expressions\": [\n            {\n              \"constraint\": {\n                \"type\": \"BOOL\",\n                \"logic\": \"IS_TRUE\"\n              },\n              \"attribute\": {\n                \"type\": \"PARAM\",\n                \"param\": \"string\"\n              }\n            }\n          ]\n        }\n      }\n    ],\n    \"expression\": {\n      \"type\": \"EMPTY\"\n    },\n    \"groupBy\": [\n      {\n        \"type\": \"CONSTANT\",\n        \"constant\": \"string\"\n      }\n    ]\n  },\n  \"variables\": [\n    {\n      \"name\": \"string\",\n      \"value\": \"example-string-value\"\n    }\n  ],\n  \"overrideNested\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v4/reports/%7BAnalysisId%7D/recalculate/override\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v4/reports/%7BAnalysisId%7D/recalculate/override\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  title: 'string',\n  dateFilter: {\n    type: 'ABSOLUTE',\n    from: '2019-08-24T14:15:22Z',\n    to: '2019-08-24T14:15:22Z',\n    filter: {\n      type: 'DAILY',\n      nestingType: 'IN_PLACE',\n      from: 'string',\n      to: 'string',\n      inverted: false\n    }\n  },\n  aggregateDataBy: {type: 'YEARS', value: 0},\n  filter: {\n    matching: true,\n    expressions: [\n      {\n        type: 'ATTRIBUTE',\n        name: 'string',\n        matching: true,\n        attribute: {\n          expressions: [\n            {\n              constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n              attribute: {type: 'PARAM', param: 'string'}\n            }\n          ]\n        }\n      }\n    ],\n    expression: {type: 'EMPTY'},\n    groupBy: [{type: 'CONSTANT', constant: 'string'}]\n  },\n  variables: [{name: 'string', value: 'example-string-value'}],\n  overrideNested: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v4/reports/%7BAnalysisId%7D/recalculate/override');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"title\":\"string\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v4/reports/%7BAnalysisId%7D/recalculate/override\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"title\\\":\\\"string\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}],\\\"overrideNested\\\":false}\")\n  .asString();"}]}},"/analytics/analytics/v4/reports/{AnalysisId}/recalculate":{"post":{"tags":["Analytics: Reports"],"summary":"Recalculate report","description":"Retrieve the results of a previously-created report.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_REPORT_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-recalculate-report","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"responses":{"200":{"description":"Report calculation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-ReportCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-recalculate-report"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v4/reports/%7BAnalysisId%7D/recalculate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/analytics/analytics/v4/reports/%7BAnalysisId%7D/recalculate\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v4/reports/%7BAnalysisId%7D/recalculate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v4/reports/%7BAnalysisId%7D/recalculate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v4/reports/%7BAnalysisId%7D/recalculate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v4/reports/%7BAnalysisId%7D/recalculate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/analytics/analytics/v4/reports/preview":{"post":{"tags":["Analytics: Reports"],"summary":"Preview report","description":"Retrieve the results of a report. This request doesn't save the report.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_REPORT_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-preview-report","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-ReportPreviewRequest"}}}},"responses":{"200":{"description":"Report calculation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-ReportCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-preview-report"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v4/reports/preview \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"allowNull\":true,\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"allowNull\\\":true,\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"reportMetrics\\\":[{\\\"metricId\\\":\\\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"columnName\\\":\\\"string\\\",\\\"grouping\\\":{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0},\\\"groups\\\":[{\\\"title\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"type\\\":\\\"CLIENT\\\",\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v4/reports/preview\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"allowNull\": true,\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"reportMetrics\": [\n      {\n        \"metricId\": \"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\n        \"dateFilter\": {\n          \"type\": \"ABSOLUTE\",\n          \"from\": \"2019-08-24T14:15:22Z\",\n          \"to\": \"2019-08-24T14:15:22Z\",\n          \"filter\": {\n            \"type\": \"DAILY\",\n            \"nestingType\": \"IN_PLACE\",\n            \"from\": \"string\",\n            \"to\": \"string\",\n            \"inverted\": false\n          }\n        },\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"format\": {\n          \"compactNumbers\": false,\n          \"currency\": \"EUR\",\n          \"dataFormat\": \"cash\",\n          \"fixedLength\": 0,\n          \"useSeparator\": false\n        },\n        \"columnName\": \"string\",\n        \"grouping\": {\n          \"type\": \"TOP\",\n          \"top\": 0\n        },\n        \"groups\": [\n          {\n            \"title\": \"string\",\n            \"format\": {\n              \"compactNumbers\": false,\n              \"currency\": \"EUR\",\n              \"dataFormat\": \"cash\",\n              \"fixedLength\": 0,\n              \"useSeparator\": false\n            },\n            \"type\": \"CLIENT\",\n            \"attribute\": {\n              \"type\": \"PARAM\",\n              \"param\": \"string\"\n            }\n          }\n        ]\n      }\n    ],\n    \"filter\": {\n      \"matching\": true,\n      \"expressions\": [\n        {\n          \"type\": \"ATTRIBUTE\",\n          \"name\": \"string\",\n          \"matching\": true,\n          \"attribute\": {\n            \"expressions\": [\n              {\n                \"constraint\": {\n                  \"type\": \"BOOL\",\n                  \"logic\": \"IS_TRUE\"\n                },\n                \"attribute\": {\n                  \"type\": \"PARAM\",\n                  \"param\": \"string\"\n                }\n              }\n            ]\n          }\n        }\n      ],\n      \"expression\": {\n        \"type\": \"EMPTY\"\n      },\n      \"groupBy\": [\n        {\n          \"type\": \"CONSTANT\",\n          \"constant\": \"string\"\n        }\n      ]\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v4/reports/preview\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v4/reports/preview\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  allowNull: true,\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    reportMetrics: [\n      {\n        metricId: 'c2cc9ad9-a69d-40a3-8e01-a95e09e71978',\n        dateFilter: {\n          type: 'ABSOLUTE',\n          from: '2019-08-24T14:15:22Z',\n          to: '2019-08-24T14:15:22Z',\n          filter: {\n            type: 'DAILY',\n            nestingType: 'IN_PLACE',\n            from: 'string',\n            to: 'string',\n            inverted: false\n          }\n        },\n        action: {id: 0, name: 'page.visit'},\n        format: {\n          compactNumbers: false,\n          currency: 'EUR',\n          dataFormat: 'cash',\n          fixedLength: 0,\n          useSeparator: false\n        },\n        columnName: 'string',\n        grouping: {type: 'TOP', top: 0},\n        groups: [\n          {\n            title: 'string',\n            format: {\n              compactNumbers: false,\n              currency: 'EUR',\n              dataFormat: 'cash',\n              fixedLength: 0,\n              useSeparator: false\n            },\n            type: 'CLIENT',\n            attribute: {type: 'PARAM', param: 'string'}\n          }\n        ]\n      }\n    ],\n    filter: {\n      matching: true,\n      expressions: [\n        {\n          type: 'ATTRIBUTE',\n          name: 'string',\n          matching: true,\n          attribute: {\n            expressions: [\n              {\n                constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                attribute: {type: 'PARAM', param: 'string'}\n              }\n            ]\n          }\n        }\n      ],\n      expression: {type: 'EMPTY'},\n      groupBy: [{type: 'CONSTANT', constant: 'string'}]\n    }\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v4/reports/preview');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"allowNull\":true,\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v4/reports/preview\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"allowNull\\\":true,\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"reportMetrics\\\":[{\\\"metricId\\\":\\\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"columnName\\\":\\\"string\\\",\\\"grouping\\\":{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0},\\\"groups\\\":[{\\\"title\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"type\\\":\\\"CLIENT\\\",\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/analytics/v4/reports/preview-csv":{"post":{"tags":["Analytics: Reports"],"summary":"Preview report as CSV","description":"Retrieve the results of a report as CSV. This request doesn't save the report.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_REPORT_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-preview-csv-report","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-ReportPreviewRequest"}}}},"responses":{"200":{"description":"CSV data","content":{"text/csv":{"schema":{"type":"string","description":"Results for groupings. Each grouping is a CSV row, with the first row being the column headers.\n\n**Example**: if the dimensions of your report are _firstname_ and _title_ in a page visit event, this may be the result:\n\n```\n\"firstname\";\"title\";\"Value\"\n\"John\";\"Discounted Product Page\";\"26.0\"\n\"Steve\";\"Discounted Product Page\";\"12.0\"\n\"Steve\";\"New product pre-order\";\"117.0\"\n```\n\nThis means that 26 profiles named John visited a page titled \"Discounted Product Page\". The same page was visited by 12 profiles named Steve. Profiles named Steve visited \"New product pre-order\" page 117 times.\n"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-preview-csv-report"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v4/reports/preview-csv \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"allowNull\":true,\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"allowNull\\\":true,\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"reportMetrics\\\":[{\\\"metricId\\\":\\\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"columnName\\\":\\\"string\\\",\\\"grouping\\\":{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0},\\\"groups\\\":[{\\\"title\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"type\\\":\\\"CLIENT\\\",\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v4/reports/preview-csv\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"allowNull\": true,\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"reportMetrics\": [\n      {\n        \"metricId\": \"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\n        \"dateFilter\": {\n          \"type\": \"ABSOLUTE\",\n          \"from\": \"2019-08-24T14:15:22Z\",\n          \"to\": \"2019-08-24T14:15:22Z\",\n          \"filter\": {\n            \"type\": \"DAILY\",\n            \"nestingType\": \"IN_PLACE\",\n            \"from\": \"string\",\n            \"to\": \"string\",\n            \"inverted\": false\n          }\n        },\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"format\": {\n          \"compactNumbers\": false,\n          \"currency\": \"EUR\",\n          \"dataFormat\": \"cash\",\n          \"fixedLength\": 0,\n          \"useSeparator\": false\n        },\n        \"columnName\": \"string\",\n        \"grouping\": {\n          \"type\": \"TOP\",\n          \"top\": 0\n        },\n        \"groups\": [\n          {\n            \"title\": \"string\",\n            \"format\": {\n              \"compactNumbers\": false,\n              \"currency\": \"EUR\",\n              \"dataFormat\": \"cash\",\n              \"fixedLength\": 0,\n              \"useSeparator\": false\n            },\n            \"type\": \"CLIENT\",\n            \"attribute\": {\n              \"type\": \"PARAM\",\n              \"param\": \"string\"\n            }\n          }\n        ]\n      }\n    ],\n    \"filter\": {\n      \"matching\": true,\n      \"expressions\": [\n        {\n          \"type\": \"ATTRIBUTE\",\n          \"name\": \"string\",\n          \"matching\": true,\n          \"attribute\": {\n            \"expressions\": [\n              {\n                \"constraint\": {\n                  \"type\": \"BOOL\",\n                  \"logic\": \"IS_TRUE\"\n                },\n                \"attribute\": {\n                  \"type\": \"PARAM\",\n                  \"param\": \"string\"\n                }\n              }\n            ]\n          }\n        }\n      ],\n      \"expression\": {\n        \"type\": \"EMPTY\"\n      },\n      \"groupBy\": [\n        {\n          \"type\": \"CONSTANT\",\n          \"constant\": \"string\"\n        }\n      ]\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v4/reports/preview-csv\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v4/reports/preview-csv\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  allowNull: true,\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    reportMetrics: [\n      {\n        metricId: 'c2cc9ad9-a69d-40a3-8e01-a95e09e71978',\n        dateFilter: {\n          type: 'ABSOLUTE',\n          from: '2019-08-24T14:15:22Z',\n          to: '2019-08-24T14:15:22Z',\n          filter: {\n            type: 'DAILY',\n            nestingType: 'IN_PLACE',\n            from: 'string',\n            to: 'string',\n            inverted: false\n          }\n        },\n        action: {id: 0, name: 'page.visit'},\n        format: {\n          compactNumbers: false,\n          currency: 'EUR',\n          dataFormat: 'cash',\n          fixedLength: 0,\n          useSeparator: false\n        },\n        columnName: 'string',\n        grouping: {type: 'TOP', top: 0},\n        groups: [\n          {\n            title: 'string',\n            format: {\n              compactNumbers: false,\n              currency: 'EUR',\n              dataFormat: 'cash',\n              fixedLength: 0,\n              useSeparator: false\n            },\n            type: 'CLIENT',\n            attribute: {type: 'PARAM', param: 'string'}\n          }\n        ]\n      }\n    ],\n    filter: {\n      matching: true,\n      expressions: [\n        {\n          type: 'ATTRIBUTE',\n          name: 'string',\n          matching: true,\n          attribute: {\n            expressions: [\n              {\n                constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                attribute: {type: 'PARAM', param: 'string'}\n              }\n            ]\n          }\n        }\n      ],\n      expression: {type: 'EMPTY'},\n      groupBy: [{type: 'CONSTANT', constant: 'string'}]\n    }\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v4/reports/preview-csv');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"allowNull\":true,\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v4/reports/preview-csv\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"allowNull\\\":true,\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"reportMetrics\\\":[{\\\"metricId\\\":\\\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"columnName\\\":\\\"string\\\",\\\"grouping\\\":{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0},\\\"groups\\\":[{\\\"title\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"type\\\":\\\"CLIENT\\\",\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/directories":{"get":{"tags":["Analytics: Management"],"summary":"List directories","description":"Returns a list of directories for a given analytic type.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_DESCRIPTION_ANALYTICS_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-directories-list","parameters":[{"name":"analyticType","in":"query","description":"Type of object","required":true,"style":"form","explode":true,"schema":{"type":"string","enum":["EXPRESSION","AGGREGATE","SEGMENTATION","METRIC","FUNNEL","SANKEY","TREND","HISTOGRAM","REPORT","ANALYTICS_QUERY","ANALYTICS_DASHBOARD"]}}],"responses":{"200":{"description":"List of directories","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/analytics-Directory"}}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/analytics/directories?analyticType=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/directories?analyticType=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/directories?analyticType=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/directories?analyticType=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/directories');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'analyticType' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/directories?analyticType=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Analytics: Management"],"summary":"Create directory","description":"Creates a new directory\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_DESCRIPTION_ANALYTICS_CREATE`\n\n**User role permission required:** `analytics: create`\n","operationId":"analytics2-directories-create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-DirectoryCreateRequest"}}}},"responses":{"201":{"description":"ID of the created directory","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-Id"}}}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-create"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/directories \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"analyticType\":\"EXPRESSION\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/directories\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"analyticType\": \"EXPRESSION\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/directories\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/directories\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string', analyticType: 'EXPRESSION'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/directories');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"analyticType\":\"EXPRESSION\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/directories\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\"}\")\n  .asString();"}]}},"/analytics/directories/{DirectoryId}":{"delete":{"tags":["Analytics: Management"],"summary":"Delete directory","description":"Deletes a directory. If the directory contains any analyses, they are moved to the default directory.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_DESCRIPTION_ANALYTICS_DELETE`\n\n**User role permission required:** `analytics: delete`\n","operationId":"analytics2-directories-delete","parameters":[{"$ref":"#/components/parameters/analytics-DirectoryIdPathParam"}],"responses":{"204":{"description":"Directory deleted"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-delete"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/analytics/directories/%7BDirectoryId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/analytics/directories/%7BDirectoryId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/analytics/directories/%7BDirectoryId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/directories/%7BDirectoryId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/directories/%7BDirectoryId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/analytics/directories/%7BDirectoryId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"patch":{"tags":["Analytics: Management"],"summary":"Rename directory","description":"Renames a directory\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_DESCRIPTION_ANALYTICS_UPDATE`\n\n**User role permission required:** `analytics: update`\n","operationId":"analytics2-directories-rename","parameters":[{"$ref":"#/components/parameters/analytics-DirectoryIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-DirectoryRenameRequest"}}}},"responses":{"204":{"description":"Directory renamed"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-rename"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PATCH \\\n  --url https://api.synerise.com/analytics/directories/%7BDirectoryId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"newName\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"newName\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PATCH\", \"/analytics/directories/%7BDirectoryId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"newName\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://api.synerise.com/analytics/directories/%7BDirectoryId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PATCH\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/directories/%7BDirectoryId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({newName: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\nHttpRequest::methodRegister('PATCH');\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/directories/%7BDirectoryId%7D');\n$request->setMethod(HttpRequest::HTTP_METH_PATCH);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"newName\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.patch(\"https://api.synerise.com/analytics/directories/%7BDirectoryId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"newName\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/analytics/directories/change/{AnalysisId}":{"patch":{"tags":["Analytics: Management"],"summary":"Change Directory","description":"Moves an analysis to another directory\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_DESCRIPTION_ANALYTICS_UPDATE`\n\n**User role permission required:** `analytics: update`\n","operationId":"analytics2-directories-change","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-DirectoryChangeRequest"}}}},"responses":{"204":{"description":"Analysis moved"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Management/operation/analytics2-directories-change"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PATCH \\\n  --url https://api.synerise.com/analytics/directories/change/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"newDir\":\"927cf82e-bfcc-4026-ba0d-96408cda03cb\",\"analyticType\":\"EXPRESSION\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"newDir\\\":\\\"927cf82e-bfcc-4026-ba0d-96408cda03cb\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PATCH\", \"/analytics/directories/change/%7BAnalysisId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"newDir\": \"927cf82e-bfcc-4026-ba0d-96408cda03cb\",\n  \"analyticType\": \"EXPRESSION\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://api.synerise.com/analytics/directories/change/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PATCH\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/directories/change/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({newDir: '927cf82e-bfcc-4026-ba0d-96408cda03cb', analyticType: 'EXPRESSION'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\nHttpRequest::methodRegister('PATCH');\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/directories/change/%7BAnalysisId%7D');\n$request->setMethod(HttpRequest::HTTP_METH_PATCH);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"newDir\":\"927cf82e-bfcc-4026-ba0d-96408cda03cb\",\"analyticType\":\"EXPRESSION\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.patch(\"https://api.synerise.com/analytics/directories/change/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"newDir\\\":\\\"927cf82e-bfcc-4026-ba0d-96408cda03cb\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\"}\")\n  .asString();"}]}},"/analytics/analytics/v3/metrics/preview":{"post":{"tags":["Analytics: Metrics"],"summary":"Preview metric","description":"Get the results of a metric. This request doesn't save the metric to the database.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_METRIC_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-preview-metric-legacy","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-MetricLegacyPreview"}}}},"responses":{"200":{"description":"Metric preview result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-MetricCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-preview-metric-legacy"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v3/metrics/preview \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"comparison\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}}},\"metricType\":\"SIMPLE\",\"expression\":{\"type\":\"VALUE\",\"value\":{\"type\":\"NUMBER\",\"value\":100}},\"isVisibleForClientProfile\":true,\"allowNull\":true,\"grouping\":[{\"type\":\"TOP\",\"top\":0}]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"comparison\\\":{\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}}},\\\"metricType\\\":\\\"SIMPLE\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"value\\\":{\\\"type\\\":\\\"NUMBER\\\",\\\"value\\\":100}},\\\"isVisibleForClientProfile\\\":true,\\\"allowNull\\\":true,\\\"grouping\\\":[{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0}]},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v3/metrics/preview\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"format\": {\n      \"compactNumbers\": false,\n      \"currency\": \"EUR\",\n      \"dataFormat\": \"cash\",\n      \"fixedLength\": 0,\n      \"useSeparator\": false\n    },\n    \"comparison\": {\n      \"dateFilter\": {\n        \"type\": \"ABSOLUTE\",\n        \"from\": \"2019-08-24T14:15:22Z\",\n        \"to\": \"2019-08-24T14:15:22Z\",\n        \"filter\": {\n          \"type\": \"DAILY\",\n          \"nestingType\": \"IN_PLACE\",\n          \"from\": \"string\",\n          \"to\": \"string\",\n          \"inverted\": false\n        }\n      }\n    },\n    \"metricType\": \"SIMPLE\",\n    \"expression\": {\n      \"type\": \"VALUE\",\n      \"value\": {\n        \"type\": \"NUMBER\",\n        \"value\": 100\n      }\n    },\n    \"isVisibleForClientProfile\": true,\n    \"allowNull\": true,\n    \"grouping\": [\n      {\n        \"type\": \"TOP\",\n        \"top\": 0\n      }\n    ]\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v3/metrics/preview\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v3/metrics/preview\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    format: {\n      compactNumbers: false,\n      currency: 'EUR',\n      dataFormat: 'cash',\n      fixedLength: 0,\n      useSeparator: false\n    },\n    comparison: {\n      dateFilter: {\n        type: 'ABSOLUTE',\n        from: '2019-08-24T14:15:22Z',\n        to: '2019-08-24T14:15:22Z',\n        filter: {\n          type: 'DAILY',\n          nestingType: 'IN_PLACE',\n          from: 'string',\n          to: 'string',\n          inverted: false\n        }\n      }\n    },\n    metricType: 'SIMPLE',\n    expression: {type: 'VALUE', value: {type: 'NUMBER', value: 100}},\n    isVisibleForClientProfile: true,\n    allowNull: true,\n    grouping: [{type: 'TOP', top: 0}]\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v3/metrics/preview');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"comparison\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}}},\"metricType\":\"SIMPLE\",\"expression\":{\"type\":\"VALUE\",\"value\":{\"type\":\"NUMBER\",\"value\":100}},\"isVisibleForClientProfile\":true,\"allowNull\":true,\"grouping\":[{\"type\":\"TOP\",\"top\":0}]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v3/metrics/preview\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"comparison\\\":{\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}}},\\\"metricType\\\":\\\"SIMPLE\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"value\\\":{\\\"type\\\":\\\"NUMBER\\\",\\\"value\\\":100}},\\\"isVisibleForClientProfile\\\":true,\\\"allowNull\\\":true,\\\"grouping\\\":[{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0}]},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/analytics/v3/metrics/{AnalysisId}/recalculate/override":{"post":{"tags":["Analytics: Metrics"],"summary":"Calculate metric with parameter override","description":"Recalculate a metric with new parameters and/or variable (dynamic key) values.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_METRIC_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-calculate-metric-with-override","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-OverrideQueryRequest"}}}},"responses":{"200":{"description":"Metric calculation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-MetricCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-calculate-metric-with-override"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v3/metrics/%7BAnalysisId%7D/recalculate/override \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"title\":\"string\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"title\\\":\\\"string\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}],\\\"overrideNested\\\":false}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v3/metrics/%7BAnalysisId%7D/recalculate/override\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"title\": \"string\",\n  \"dateFilter\": {\n    \"type\": \"ABSOLUTE\",\n    \"from\": \"2019-08-24T14:15:22Z\",\n    \"to\": \"2019-08-24T14:15:22Z\",\n    \"filter\": {\n      \"type\": \"DAILY\",\n      \"nestingType\": \"IN_PLACE\",\n      \"from\": \"string\",\n      \"to\": \"string\",\n      \"inverted\": false\n    }\n  },\n  \"aggregateDataBy\": {\n    \"type\": \"YEARS\",\n    \"value\": 0\n  },\n  \"filter\": {\n    \"matching\": true,\n    \"expressions\": [\n      {\n        \"type\": \"ATTRIBUTE\",\n        \"name\": \"string\",\n        \"matching\": true,\n        \"attribute\": {\n          \"expressions\": [\n            {\n              \"constraint\": {\n                \"type\": \"BOOL\",\n                \"logic\": \"IS_TRUE\"\n              },\n              \"attribute\": {\n                \"type\": \"PARAM\",\n                \"param\": \"string\"\n              }\n            }\n          ]\n        }\n      }\n    ],\n    \"expression\": {\n      \"type\": \"EMPTY\"\n    },\n    \"groupBy\": [\n      {\n        \"type\": \"CONSTANT\",\n        \"constant\": \"string\"\n      }\n    ]\n  },\n  \"variables\": [\n    {\n      \"name\": \"string\",\n      \"value\": \"example-string-value\"\n    }\n  ],\n  \"overrideNested\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v3/metrics/%7BAnalysisId%7D/recalculate/override\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v3/metrics/%7BAnalysisId%7D/recalculate/override\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  title: 'string',\n  dateFilter: {\n    type: 'ABSOLUTE',\n    from: '2019-08-24T14:15:22Z',\n    to: '2019-08-24T14:15:22Z',\n    filter: {\n      type: 'DAILY',\n      nestingType: 'IN_PLACE',\n      from: 'string',\n      to: 'string',\n      inverted: false\n    }\n  },\n  aggregateDataBy: {type: 'YEARS', value: 0},\n  filter: {\n    matching: true,\n    expressions: [\n      {\n        type: 'ATTRIBUTE',\n        name: 'string',\n        matching: true,\n        attribute: {\n          expressions: [\n            {\n              constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n              attribute: {type: 'PARAM', param: 'string'}\n            }\n          ]\n        }\n      }\n    ],\n    expression: {type: 'EMPTY'},\n    groupBy: [{type: 'CONSTANT', constant: 'string'}]\n  },\n  variables: [{name: 'string', value: 'example-string-value'}],\n  overrideNested: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v3/metrics/%7BAnalysisId%7D/recalculate/override');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"title\":\"string\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v3/metrics/%7BAnalysisId%7D/recalculate/override\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"title\\\":\\\"string\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}],\\\"overrideNested\\\":false}\")\n  .asString();"}]}},"/analytics/analytics/v3/metrics/{AnalysisId}/recalculate":{"post":{"tags":["Analytics: Metrics"],"summary":"Calculate metric","description":"Calculate a metric that was created earlier.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_METRIC_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-calculate-metric","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"responses":{"200":{"description":"Metric calculation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-MetricCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-calculate-metric"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v3/metrics/%7BAnalysisId%7D/recalculate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/analytics/analytics/v3/metrics/%7BAnalysisId%7D/recalculate\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v3/metrics/%7BAnalysisId%7D/recalculate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v3/metrics/%7BAnalysisId%7D/recalculate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v3/metrics/%7BAnalysisId%7D/recalculate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v3/metrics/%7BAnalysisId%7D/recalculate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/analytics/analytics/v3/metrics/{AnalysisId}/dynamic/value":{"post":{"tags":["Analytics: Metrics"],"summary":"Calculate dynamic metric","description":"Calculate a metric that includes variables (dynamic keys).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_METRIC_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-calculate-metric-override-variables","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-DynamicVariablesRequest"}}}},"responses":{"200":{"description":"Metric calculation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-MetricCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-calculate-metric-override-variables"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v3/metrics/%7BAnalysisId%7D/dynamic/value \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v3/metrics/%7BAnalysisId%7D/dynamic/value\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"variables\": [\n    {\n      \"name\": \"string\",\n      \"value\": \"example-string-value\"\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v3/metrics/%7BAnalysisId%7D/dynamic/value\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v3/metrics/%7BAnalysisId%7D/dynamic/value\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({variables: [{name: 'string', value: 'example-string-value'}]}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v3/metrics/%7BAnalysisId%7D/dynamic/value');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v3/metrics/%7BAnalysisId%7D/dynamic/value\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/expressions/visible-for-client/by/{IdentifierType}":{"post":{"tags":["Analytics: Expressions"],"summary":"Get expressions for profile card","description":"Retrieve expressions to display on a profile's card in the Profiles module (`\"isVisibleForClientProfile\": true` in the [expression config](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/addExpressionPOST)).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_EXPRESSION_FOR_CLIENT_READ`\n\n**User role permission required (at least one):** `analytics: read`, `client_analytics_preview: read`\n","operationId":"analytics2-client-card-expressions-get","parameters":[{"$ref":"#/components/parameters/analytics-pathIdentifierType"},{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"identifierValue":{"$ref":"#/components/schemas/analytics-IdentifierValue"}},"required":["identifierValue"]}}}},"responses":{"200":{"description":"List of calculated expressions configured as visible on the profile card","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/analytics-BatchCalculationResult"}}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-client-card-expressions-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/expressions/visible-for-client/by/%7BIdentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/expressions/visible-for-client/by/%7BIdentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/expressions/visible-for-client/by/%7BIdentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/expressions/visible-for-client/by/%7BIdentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({identifierValue: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/expressions/visible-for-client/by/%7BIdentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/expressions/visible-for-client/by/%7BIdentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/analytics/{Namespace}/expressions/{AnalysisId}/calculate/by/{IdentifierType}":{"post":{"tags":["Analytics: Expressions"],"summary":"Calculate expression for profile","description":"Calculate the result of an expression in context of a single profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_EXPRESSION_FOR_CLIENT_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-expression-calculate","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"},{"$ref":"#/components/parameters/analytics-pathIdentifierType"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"identifierValue":{"$ref":"#/components/schemas/analytics-IdentifierValue"}},"required":["identifierValue"]}}}},"responses":{"200":{"description":"Expression result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-ExpressionResult"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expression-calculate"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D/calculate/by/%7BIdentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D/calculate/by/%7BIdentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D/calculate/by/%7BIdentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D/calculate/by/%7BIdentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({identifierValue: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D/calculate/by/%7BIdentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D/calculate/by/%7BIdentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/analytics/{Namespace}/expressions":{"get":{"tags":["Analytics: Expressions"],"summary":"List expressions","description":"Returns a paginated list of expressions.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_EXPRESSIONS_LIST_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-expressions-list","parameters":[{"$ref":"#/components/parameters/analytics-page"},{"$ref":"#/components/parameters/analytics-limit"},{"$ref":"#/components/parameters/analytics-search"},{"$ref":"#/components/parameters/analytics-sortBy"},{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-directoryId"},{"$ref":"#/components/parameters/analytics-ids"},{"$ref":"#/components/parameters/analytics-expressionType"},{"$ref":"#/components/parameters/analytics-actionName"}],"responses":{"200":{"description":"List of expressions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"Array of expressions","items":{"$ref":"#/components/schemas/analytics-ExpressionListItem"}},"meta":{"$ref":"#/components/schemas/analytics-Meta"}},"required":["data"]}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/analytics/%7BNamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&type=SOME_STRING_VALUE&actionName=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&type=SOME_STRING_VALUE&actionName=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&type=SOME_STRING_VALUE&actionName=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&type=SOME_STRING_VALUE&actionName=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/expressions');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'sortBy' => 'name:asc',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'ids' => 'SOME_STRING_VALUE',\n  'type' => 'SOME_STRING_VALUE',\n  'actionName' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/expressions?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&type=SOME_STRING_VALUE&actionName=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Analytics: Expressions"],"summary":"Create expression","description":"Create an expression that is saved in the database and can be used in other analyses.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_EXPRESSIONS_CREATE`, `ANALYTICS_BACKEND_EXPRESSION_CREATE`\n\n**User role permission required:** `analytics: create`\n","operationId":"analytics2-expressions-create","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-expressionCreateRequestBody"}}}},"responses":{"201":{"description":"Create expression","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}}}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-create"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/expressions \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"isVisibleForClientProfile\":true,\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"isVisibleForClientProfile\\\":true,\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/expressions\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"isVisibleForClientProfile\": true,\n  \"analysis\": {\n    \"type\": \"EVENT\",\n    \"action\": {\n      \"id\": 0,\n      \"name\": \"page.visit\"\n    },\n    \"name\": \"string\",\n    \"description\": \"string\",\n    \"expression\": {\n      \"type\": \"VALUE\",\n      \"title\": \"title\",\n      \"value\": {\n        \"type\": \"CONSTANT\",\n        \"constant\": 10\n      }\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/expressions\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/expressions\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  isVisibleForClientProfile: true,\n  analysis: {\n    type: 'EVENT',\n    action: {id: 0, name: 'page.visit'},\n    name: 'string',\n    description: 'string',\n    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/expressions');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"isVisibleForClientProfile\":true,\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/expressions\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"isVisibleForClientProfile\\\":true,\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/expressions/{AnalysisId}":{"get":{"tags":["Analytics: Expressions"],"summary":"Get expression details","description":"Retrieve information about an expression analysis\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_EXPRESSIONS_READ`, `ANALYTICS_BACKEND_EXPRESSION_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-expressions-get","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"responses":{"200":{"description":"Get expression details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-ExpressionView"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Analytics: Expressions"],"summary":"Update expression","description":"Update an existing expression\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_EXPRESSIONS_UPDATE`, `ANALYTICS_BACKEND_EXPRESSION_UPDATE`\n\n**User role permission required:** `analytics: update`\n","operationId":"analytics2-expressions-update","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-expressionCreateRequestBody"}}}},"responses":{"200":{"description":"Update expression"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-update"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"isVisibleForClientProfile\":true,\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"isVisibleForClientProfile\\\":true,\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"isVisibleForClientProfile\": true,\n  \"analysis\": {\n    \"type\": \"EVENT\",\n    \"action\": {\n      \"id\": 0,\n      \"name\": \"page.visit\"\n    },\n    \"name\": \"string\",\n    \"description\": \"string\",\n    \"expression\": {\n      \"type\": \"VALUE\",\n      \"title\": \"title\",\n      \"value\": {\n        \"type\": \"CONSTANT\",\n        \"constant\": 10\n      }\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  isVisibleForClientProfile: true,\n  analysis: {\n    type: 'EVENT',\n    action: {id: 0, name: 'page.visit'},\n    name: 'string',\n    description: 'string',\n    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"isVisibleForClientProfile\":true,\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"isVisibleForClientProfile\\\":true,\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]},"delete":{"tags":["Analytics: Expressions"],"summary":"Delete expression","operationId":"analytics2-expressions-delete","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"responses":{"204":{"description":"Delete expression"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expressions-delete"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_EXPRESSIONS_DELETE`, `ANALYTICS_BACKEND_EXPRESSION_DELETE`\n\n**User role permission required:** `analytics: delete`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/analytics/%7BNamespace%7D/expressions/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/analytics/{Namespace}/expressions/preview/by/{IdentifierType}":{"post":{"tags":["Analytics: Expressions"],"summary":"Get expression preview","description":"Retrieve expression preview value. Previews are only available for CLIENT-type expressions. This request doesn't save the expression.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_EXPRESSION_FOR_CLIENT_READ`\n\n**User role permission required (at least one):** `analytics: read`, `client_analytics_preview: read`\n","operationId":"analytics2-expression-preview-v2","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-pathIdentifierType"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-ExpressionPreviewRequestWithClient"}}}},"responses":{"200":{"description":"Expression preview result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-ExpressionTypedCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Expressions/operation/analytics2-expression-preview-v2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/expressions/preview/by/%7BIdentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\",\"expression\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"CLIENT\",\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\",\\\"expression\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"type\\\":\\\"CLIENT\\\",\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/expressions/preview/by/%7BIdentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\",\n  \"expression\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"type\": \"CLIENT\",\n    \"name\": \"string\",\n    \"description\": \"string\",\n    \"expression\": {\n      \"type\": \"VALUE\",\n      \"title\": \"title\",\n      \"value\": {\n        \"type\": \"CONSTANT\",\n        \"constant\": 10\n      }\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/expressions/preview/by/%7BIdentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/expressions/preview/by/%7BIdentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  identifierValue: 'string',\n  expression: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    type: 'CLIENT',\n    name: 'string',\n    description: 'string',\n    expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/expressions/preview/by/%7BIdentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\",\"expression\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"CLIENT\",\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/expressions/preview/by/%7BIdentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\",\\\"expression\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"type\\\":\\\"CLIENT\\\",\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/histograms":{"get":{"tags":["Analytics: Histograms"],"summary":"List histograms","description":"Returns a paginated list of histograms.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_HISTOGRAMS_LIST_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-histograms-list","parameters":[{"$ref":"#/components/parameters/analytics-page"},{"$ref":"#/components/parameters/analytics-limit"},{"$ref":"#/components/parameters/analytics-search"},{"$ref":"#/components/parameters/analytics-sortBy"},{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-directoryId"},{"$ref":"#/components/parameters/analytics-ids"}],"responses":{"200":{"description":"List of histograms","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"Array of histograms","items":{"$ref":"#/components/schemas/analytics-ListAnalyticsItemCommon"}},"meta":{"$ref":"#/components/schemas/analytics-Meta"}},"required":["data"]}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/analytics/%7BNamespace%7D/histograms?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/histograms?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/histograms?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/histograms?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/histograms');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'sortBy' => 'name:asc',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'ids' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/histograms?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Analytics: Histograms"],"summary":"Create histogram","operationId":"analytics2-histograms-create","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-HistogramRequest"}}}},"responses":{"200":{"description":"Histogram created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-Id"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-create"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_HISTOGRAMS_CREATE`, `ANALYTICS_BACKEND_HISTOGRAM_CREATE`\n\n**User role permission required:** `analytics: create`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/histograms \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"histogram\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"period\":{\"type\":\"YEARS\",\"value\":0},\"eventMetrics\":[{\"metricId\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"histogram\\\":{\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"period\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"eventMetrics\\\":[{\\\"metricId\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"chartType\\\":\\\"COLUMN\\\",\\\"title\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/histograms\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"histogram\": {\n      \"dateFilter\": {\n        \"type\": \"ABSOLUTE\",\n        \"from\": \"2019-08-24T14:15:22Z\",\n        \"to\": \"2019-08-24T14:15:22Z\",\n        \"filter\": {\n          \"type\": \"DAILY\",\n          \"nestingType\": \"IN_PLACE\",\n          \"from\": \"string\",\n          \"to\": \"string\",\n          \"inverted\": false\n        }\n      },\n      \"period\": {\n        \"type\": \"YEARS\",\n        \"value\": 0\n      },\n      \"eventMetrics\": [\n        {\n          \"metricId\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n          \"chartType\": \"COLUMN\",\n          \"title\": \"string\"\n        }\n      ]\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/histograms\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/histograms\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    title: 'string',\n    description: 'string',\n    histogram: {\n      dateFilter: {\n        type: 'ABSOLUTE',\n        from: '2019-08-24T14:15:22Z',\n        to: '2019-08-24T14:15:22Z',\n        filter: {\n          type: 'DAILY',\n          nestingType: 'IN_PLACE',\n          from: 'string',\n          to: 'string',\n          inverted: false\n        }\n      },\n      period: {type: 'YEARS', value: 0},\n      eventMetrics: [\n        {\n          metricId: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n          chartType: 'COLUMN',\n          title: 'string'\n        }\n      ]\n    }\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/histograms');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"histogram\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"period\":{\"type\":\"YEARS\",\"value\":0},\"eventMetrics\":[{\"metricId\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/histograms\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"histogram\\\":{\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"period\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"eventMetrics\\\":[{\\\"metricId\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"chartType\\\":\\\"COLUMN\\\",\\\"title\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/histograms/{AnalysisId}":{"get":{"tags":["Analytics: Histograms"],"summary":"Get histogram details","description":"Retrieve the details of an existing histogram definition\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_HISTOGRAMS_READ`, `ANALYTICS_BACKEND_HISTOGRAM_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-histograms-get","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"responses":{"200":{"description":"Histogram analysis details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-HistogramView"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Analytics: Histograms"],"summary":"Update histogram analysis","description":"Update an existing histogram analysis\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_HISTOGRAMS_UPDATE`, `ANALYTICS_BACKEND_HISTOGRAM_UPDATE`\n\n**User role permission required:** `analytics: update`\n","operationId":"analytics2-histograms-update","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-HistogramRequest"}}}},"responses":{"200":{"description":"Histogram updated"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-update"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"histogram\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"period\":{\"type\":\"YEARS\",\"value\":0},\"eventMetrics\":[{\"metricId\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"histogram\\\":{\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"period\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"eventMetrics\\\":[{\\\"metricId\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"chartType\\\":\\\"COLUMN\\\",\\\"title\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"histogram\": {\n      \"dateFilter\": {\n        \"type\": \"ABSOLUTE\",\n        \"from\": \"2019-08-24T14:15:22Z\",\n        \"to\": \"2019-08-24T14:15:22Z\",\n        \"filter\": {\n          \"type\": \"DAILY\",\n          \"nestingType\": \"IN_PLACE\",\n          \"from\": \"string\",\n          \"to\": \"string\",\n          \"inverted\": false\n        }\n      },\n      \"period\": {\n        \"type\": \"YEARS\",\n        \"value\": 0\n      },\n      \"eventMetrics\": [\n        {\n          \"metricId\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n          \"chartType\": \"COLUMN\",\n          \"title\": \"string\"\n        }\n      ]\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    title: 'string',\n    description: 'string',\n    histogram: {\n      dateFilter: {\n        type: 'ABSOLUTE',\n        from: '2019-08-24T14:15:22Z',\n        to: '2019-08-24T14:15:22Z',\n        filter: {\n          type: 'DAILY',\n          nestingType: 'IN_PLACE',\n          from: 'string',\n          to: 'string',\n          inverted: false\n        }\n      },\n      period: {type: 'YEARS', value: 0},\n      eventMetrics: [\n        {\n          metricId: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n          chartType: 'COLUMN',\n          title: 'string'\n        }\n      ]\n    }\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"histogram\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"period\":{\"type\":\"YEARS\",\"value\":0},\"eventMetrics\":[{\"metricId\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"histogram\\\":{\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"period\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"eventMetrics\\\":[{\\\"metricId\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"chartType\\\":\\\"COLUMN\\\",\\\"title\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]},"delete":{"tags":["Analytics: Histograms"],"summary":"Delete histogram","operationId":"analytics2-histograms-delete","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"responses":{"204":{"description":"Histogram deleted"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histograms-delete"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_HISTOGRAMS_DELETE`, `ANALYTICS_BACKEND_HISTOGRAM_DELETE`\n\n**User role permission required:** `analytics: delete`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/analytics/%7BNamespace%7D/histograms/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/analytics/analytics/v3/metrics/histogram-metrics":{"get":{"tags":["Analytics: Metrics"],"summary":"Get metrics usable in histograms","description":"Retrieve a list of metrics that can be used in histograms.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_METRIC_HISTOGRAM_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-get-histogram-metrics","responses":{"200":{"description":"List of metrics","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/analytics-MetricProjectionResponse"}}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Metrics/operation/analytics2-get-histogram-metrics"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/analytics/analytics/v3/metrics/histogram-metrics \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/analytics/v3/metrics/histogram-metrics\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/analytics/v3/metrics/histogram-metrics\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v3/metrics/histogram-metrics\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v3/metrics/histogram-metrics');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/analytics/v3/metrics/histogram-metrics\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/analytics/analytics/v2/segmentations/{AnalysisId}/dynamic/value":{"post":{"tags":["Analytics: Segmentations"],"summary":"Calculate dynamic segmentation","description":"Calculate a segmentation that includes variables (dynamic keys).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_SEGMENTATION_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-calculate-segmentations-with-variables","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-DynamicVariablesRequest"}}}},"responses":{"200":{"description":"Segmentation calculation results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-SegmentationCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-calculate-segmentations-with-variables"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v2/segmentations/%7BAnalysisId%7D/dynamic/value \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v2/segmentations/%7BAnalysisId%7D/dynamic/value\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"variables\": [\n    {\n      \"name\": \"string\",\n      \"value\": \"example-string-value\"\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v2/segmentations/%7BAnalysisId%7D/dynamic/value\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v2/segmentations/%7BAnalysisId%7D/dynamic/value\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({variables: [{name: 'string', value: 'example-string-value'}]}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v2/segmentations/%7BAnalysisId%7D/dynamic/value');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v2/segmentations/%7BAnalysisId%7D/dynamic/value\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}]}\")\n  .asString();"}]}},"/analytics/analytics/v2/segmentations/preview":{"post":{"tags":["Analytics: Segmentations"],"summary":"Preview segmentation","description":"Preview the results of a segmentation, with information about the results of each segment. This request does not save the analysis.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_SEGMENTATION_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-segmentation-preview-legacy","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-SegmentationPreviewRequest"}}}},"responses":{"200":{"description":"Calculation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-SegmentationCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-preview-legacy"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v2/segmentations/preview \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"segments\\\":[{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}}],\\\"unique\\\":true},\\\"allowNull\\\":true,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v2/segmentations/preview\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"segments\": [\n      {\n        \"title\": \"string\",\n        \"description\": \"string\",\n        \"filter\": {\n          \"matching\": true,\n          \"expressions\": [\n            {\n              \"type\": \"ATTRIBUTE\",\n              \"name\": \"string\",\n              \"matching\": true,\n              \"attribute\": {\n                \"expressions\": [\n                  {\n                    \"constraint\": {\n                      \"type\": \"BOOL\",\n                      \"logic\": \"IS_TRUE\"\n                    },\n                    \"attribute\": {\n                      \"type\": \"PARAM\",\n                      \"param\": \"string\"\n                    }\n                  }\n                ]\n              }\n            }\n          ],\n          \"expression\": {\n            \"type\": \"EMPTY\"\n          },\n          \"groupBy\": [\n            {\n              \"type\": \"CONSTANT\",\n              \"constant\": \"string\"\n            }\n          ]\n        }\n      }\n    ],\n    \"unique\": true\n  },\n  \"allowNull\": true,\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v2/segmentations/preview\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v2/segmentations/preview\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    segments: [\n      {\n        title: 'string',\n        description: 'string',\n        filter: {\n          matching: true,\n          expressions: [\n            {\n              type: 'ATTRIBUTE',\n              name: 'string',\n              matching: true,\n              attribute: {\n                expressions: [\n                  {\n                    constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                    attribute: {type: 'PARAM', param: 'string'}\n                  }\n                ]\n              }\n            }\n          ],\n          expression: {type: 'EMPTY'},\n          groupBy: [{type: 'CONSTANT', constant: 'string'}]\n        }\n      }\n    ],\n    unique: true\n  },\n  allowNull: true,\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v2/segmentations/preview');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v2/segmentations/preview\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"segments\\\":[{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}}],\\\"unique\\\":true},\\\"allowNull\\\":true,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/analytics/v2/segmentations/preview/clients":{"post":{"tags":["Analytics: Segmentations"],"summary":"Preview profiles in segmentation","description":"Calculate a segmentation and get a list of profiles in each segment. This request doesn't save the segmentation in the database.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_SEGMENTATION_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-segmentation-preview-clients-legacy","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-SegmentationPreviewRequest"}}}},"responses":{"200":{"description":"Array of segments","content":{"application/json":{"schema":{"type":"array","description":"Each item in this array is a segment, according to their order in the request.","items":{"type":"array","description":"Each number in the segment is a profile ID.","items":{"type":"number","format":"int64"}}}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-preview-clients-legacy"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v2/segmentations/preview/clients \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"segments\\\":[{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}}],\\\"unique\\\":true},\\\"allowNull\\\":true,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v2/segmentations/preview/clients\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"segments\": [\n      {\n        \"title\": \"string\",\n        \"description\": \"string\",\n        \"filter\": {\n          \"matching\": true,\n          \"expressions\": [\n            {\n              \"type\": \"ATTRIBUTE\",\n              \"name\": \"string\",\n              \"matching\": true,\n              \"attribute\": {\n                \"expressions\": [\n                  {\n                    \"constraint\": {\n                      \"type\": \"BOOL\",\n                      \"logic\": \"IS_TRUE\"\n                    },\n                    \"attribute\": {\n                      \"type\": \"PARAM\",\n                      \"param\": \"string\"\n                    }\n                  }\n                ]\n              }\n            }\n          ],\n          \"expression\": {\n            \"type\": \"EMPTY\"\n          },\n          \"groupBy\": [\n            {\n              \"type\": \"CONSTANT\",\n              \"constant\": \"string\"\n            }\n          ]\n        }\n      }\n    ],\n    \"unique\": true\n  },\n  \"allowNull\": true,\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v2/segmentations/preview/clients\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v2/segmentations/preview/clients\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    segments: [\n      {\n        title: 'string',\n        description: 'string',\n        filter: {\n          matching: true,\n          expressions: [\n            {\n              type: 'ATTRIBUTE',\n              name: 'string',\n              matching: true,\n              attribute: {\n                expressions: [\n                  {\n                    constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                    attribute: {type: 'PARAM', param: 'string'}\n                  }\n                ]\n              }\n            }\n          ],\n          expression: {type: 'EMPTY'},\n          groupBy: [{type: 'CONSTANT', constant: 'string'}]\n        }\n      }\n    ],\n    unique: true\n  },\n  allowNull: true,\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v2/segmentations/preview/clients');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v2/segmentations/preview/clients\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"segments\\\":[{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}}],\\\"unique\\\":true},\\\"allowNull\\\":true,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/analytics/v2/metrics/histograms/{AnalysisId}/recalculate/override":{"post":{"tags":["Analytics: Histograms"],"summary":"Calculate histogram with parameter override","description":"Calculate a histogram with new parameters and/or variable (dynamic key) values.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_HISTOGRAM_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-calculate-histogram-with-override","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-OverrideQueryRequest"}}}},"responses":{"200":{"description":"Histogram override calculation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-HistogramCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-calculate-histogram-with-override"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v2/metrics/histograms/%7BAnalysisId%7D/recalculate/override \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"title\":\"string\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"title\\\":\\\"string\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}],\\\"overrideNested\\\":false}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v2/metrics/histograms/%7BAnalysisId%7D/recalculate/override\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"title\": \"string\",\n  \"dateFilter\": {\n    \"type\": \"ABSOLUTE\",\n    \"from\": \"2019-08-24T14:15:22Z\",\n    \"to\": \"2019-08-24T14:15:22Z\",\n    \"filter\": {\n      \"type\": \"DAILY\",\n      \"nestingType\": \"IN_PLACE\",\n      \"from\": \"string\",\n      \"to\": \"string\",\n      \"inverted\": false\n    }\n  },\n  \"aggregateDataBy\": {\n    \"type\": \"YEARS\",\n    \"value\": 0\n  },\n  \"filter\": {\n    \"matching\": true,\n    \"expressions\": [\n      {\n        \"type\": \"ATTRIBUTE\",\n        \"name\": \"string\",\n        \"matching\": true,\n        \"attribute\": {\n          \"expressions\": [\n            {\n              \"constraint\": {\n                \"type\": \"BOOL\",\n                \"logic\": \"IS_TRUE\"\n              },\n              \"attribute\": {\n                \"type\": \"PARAM\",\n                \"param\": \"string\"\n              }\n            }\n          ]\n        }\n      }\n    ],\n    \"expression\": {\n      \"type\": \"EMPTY\"\n    },\n    \"groupBy\": [\n      {\n        \"type\": \"CONSTANT\",\n        \"constant\": \"string\"\n      }\n    ]\n  },\n  \"variables\": [\n    {\n      \"name\": \"string\",\n      \"value\": \"example-string-value\"\n    }\n  ],\n  \"overrideNested\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v2/metrics/histograms/%7BAnalysisId%7D/recalculate/override\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v2/metrics/histograms/%7BAnalysisId%7D/recalculate/override\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  title: 'string',\n  dateFilter: {\n    type: 'ABSOLUTE',\n    from: '2019-08-24T14:15:22Z',\n    to: '2019-08-24T14:15:22Z',\n    filter: {\n      type: 'DAILY',\n      nestingType: 'IN_PLACE',\n      from: 'string',\n      to: 'string',\n      inverted: false\n    }\n  },\n  aggregateDataBy: {type: 'YEARS', value: 0},\n  filter: {\n    matching: true,\n    expressions: [\n      {\n        type: 'ATTRIBUTE',\n        name: 'string',\n        matching: true,\n        attribute: {\n          expressions: [\n            {\n              constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n              attribute: {type: 'PARAM', param: 'string'}\n            }\n          ]\n        }\n      }\n    ],\n    expression: {type: 'EMPTY'},\n    groupBy: [{type: 'CONSTANT', constant: 'string'}]\n  },\n  variables: [{name: 'string', value: 'example-string-value'}],\n  overrideNested: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v2/metrics/histograms/%7BAnalysisId%7D/recalculate/override');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"title\":\"string\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v2/metrics/histograms/%7BAnalysisId%7D/recalculate/override\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"title\\\":\\\"string\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}],\\\"overrideNested\\\":false}\")\n  .asString();"}]}},"/analytics/analytics/v2/metrics/histograms/preview":{"post":{"tags":["Analytics: Histograms"],"summary":"Preview histogram","description":"Preview the results of a histogram. This request doesn't save the histogram.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_HISTOGRAM_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-histogram-preview-legacy","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-HistogramLegacyPreviewRequest"}}}},"responses":{"200":{"description":"Histogram preview calculation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-HistogramCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Histograms/operation/analytics2-histogram-preview-legacy"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v2/metrics/histograms/preview \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"histogram\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"period\":{\"type\":\"YEARS\",\"value\":0},\"eventMetrics\":[{\"metricId\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"histogram\\\":{\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"period\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"eventMetrics\\\":[{\\\"metricId\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"chartType\\\":\\\"COLUMN\\\",\\\"title\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v2/metrics/histograms/preview\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"histogram\": {\n      \"dateFilter\": {\n        \"type\": \"ABSOLUTE\",\n        \"from\": \"2019-08-24T14:15:22Z\",\n        \"to\": \"2019-08-24T14:15:22Z\",\n        \"filter\": {\n          \"type\": \"DAILY\",\n          \"nestingType\": \"IN_PLACE\",\n          \"from\": \"string\",\n          \"to\": \"string\",\n          \"inverted\": false\n        }\n      },\n      \"period\": {\n        \"type\": \"YEARS\",\n        \"value\": 0\n      },\n      \"eventMetrics\": [\n        {\n          \"metricId\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n          \"chartType\": \"COLUMN\",\n          \"title\": \"string\"\n        }\n      ]\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v2/metrics/histograms/preview\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v2/metrics/histograms/preview\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    title: 'string',\n    description: 'string',\n    histogram: {\n      dateFilter: {\n        type: 'ABSOLUTE',\n        from: '2019-08-24T14:15:22Z',\n        to: '2019-08-24T14:15:22Z',\n        filter: {\n          type: 'DAILY',\n          nestingType: 'IN_PLACE',\n          from: 'string',\n          to: 'string',\n          inverted: false\n        }\n      },\n      period: {type: 'YEARS', value: 0},\n      eventMetrics: [\n        {\n          metricId: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n          chartType: 'COLUMN',\n          title: 'string'\n        }\n      ]\n    }\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v2/metrics/histograms/preview');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"histogram\":{\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"period\":{\"type\":\"YEARS\",\"value\":0},\"eventMetrics\":[{\"metricId\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"chartType\":\"COLUMN\",\"title\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v2/metrics/histograms/preview\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"histogram\\\":{\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"period\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"eventMetrics\\\":[{\\\"metricId\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"chartType\\\":\\\"COLUMN\\\",\\\"title\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/profiles/segmentations/firstMatch/by/{IdentifierType}":{"post":{"tags":["Analytics: Segmentations"],"summary":"Get first matching segmentation for profile from provided list","description":"Check a number of segmentations and return the first one that matches the selected profile. Note that `segmentations` is a list of objects to check, and each object can also refer to multiple segmentations.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_SEGMENTATIONS_READ`, `ANALYTICS_BACKEND_SEGMENTATION_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-segmentation-first-match-by","parameters":[{"$ref":"#/components/parameters/analytics-pathIdentifierType"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-AnalyticsFirstMatchRequest"}}},"required":true},"responses":{"200":{"description":"Identifier (`id` from the request body) of the matched entry","content":{"application/json":{"schema":{"type":"string","format":"uuid"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-first-match-by"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/profiles/segmentations/firstMatch/by/%7BIdentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\",\"segmentations\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"segmentationIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\",\\\"segmentations\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"segmentationIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"query\\\":{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"segments\\\":[{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}}],\\\"unique\\\":true}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/profiles/segmentations/firstMatch/by/%7BIdentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\",\n  \"segmentations\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"segmentationIds\": [\n        \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n      ],\n      \"query\": {\n        \"analysis\": {\n          \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n          \"title\": \"string\",\n          \"description\": \"string\",\n          \"segments\": [\n            {\n              \"title\": \"string\",\n              \"description\": \"string\",\n              \"filter\": {\n                \"matching\": true,\n                \"expressions\": [\n                  {\n                    \"type\": \"ATTRIBUTE\",\n                    \"name\": \"string\",\n                    \"matching\": true,\n                    \"attribute\": {\n                      \"expressions\": [\n                        {\n                          \"constraint\": {\n                            \"type\": \"BOOL\",\n                            \"logic\": \"IS_TRUE\"\n                          },\n                          \"attribute\": {\n                            \"type\": \"PARAM\",\n                            \"param\": \"string\"\n                          }\n                        }\n                      ]\n                    }\n                  }\n                ],\n                \"expression\": {\n                  \"type\": \"EMPTY\"\n                },\n                \"groupBy\": [\n                  {\n                    \"type\": \"CONSTANT\",\n                    \"constant\": \"string\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"unique\": true\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/profiles/segmentations/firstMatch/by/%7BIdentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/profiles/segmentations/firstMatch/by/%7BIdentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  identifierValue: 'string',\n  segmentations: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      segmentationIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n      query: {\n        analysis: {\n          id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n          title: 'string',\n          description: 'string',\n          segments: [\n            {\n              title: 'string',\n              description: 'string',\n              filter: {\n                matching: true,\n                expressions: [\n                  {\n                    type: 'ATTRIBUTE',\n                    name: 'string',\n                    matching: true,\n                    attribute: {\n                      expressions: [\n                        {\n                          constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                          attribute: {type: 'PARAM', param: 'string'}\n                        }\n                      ]\n                    }\n                  }\n                ],\n                expression: {type: 'EMPTY'},\n                groupBy: [{type: 'CONSTANT', constant: 'string'}]\n              }\n            }\n          ],\n          unique: true\n        }\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/profiles/segmentations/firstMatch/by/%7BIdentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\",\"segmentations\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"segmentationIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/profiles/segmentations/firstMatch/by/%7BIdentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\",\\\"segmentations\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"segmentationIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"query\\\":{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"segments\\\":[{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}}],\\\"unique\\\":true}}}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/segmentations":{"get":{"tags":["Analytics: Segmentations"],"summary":"List segmentations","description":"Returns a paginated list of segmentations.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_SEGMENTATIONS_LIST_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-segmentations-list","parameters":[{"$ref":"#/components/parameters/analytics-page"},{"$ref":"#/components/parameters/analytics-limit"},{"$ref":"#/components/parameters/analytics-search"},{"$ref":"#/components/parameters/analytics-sortBy"},{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-directoryId"},{"$ref":"#/components/parameters/analytics-ids"},{"$ref":"#/components/parameters/analytics-shareType"}],"responses":{"200":{"description":"List of segmentations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"Array of segmentations","items":{"$ref":"#/components/schemas/analytics-SegmentationBasic"}},"meta":{"$ref":"#/components/schemas/analytics-Meta"}},"required":["data"]}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentations-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/analytics/%7BNamespace%7D/segmentations?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&shareType=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/segmentations?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&shareType=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&shareType=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/segmentations?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&shareType=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/segmentations');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'sortBy' => 'name:asc',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'ids' => 'SOME_STRING_VALUE',\n  'shareType' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&shareType=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Analytics: Segmentations"],"summary":"Create segmentation","description":"Create a new segmentation\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_SEGMENTATIONS_CREATE`, `ANALYTICS_BACKEND_SEGMENTATION_CREATE`\n\n**User role permission required:** `analytics: create`\n","operationId":"analytics2-segmentations-create","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-SegmentationRequest"}}}},"responses":{"200":{"description":"ID of the created segmentation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-Id"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentations-create"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/segmentations \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"isVisibleForClientProfile\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"segments\\\":[{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}}],\\\"unique\\\":true},\\\"isVisibleForClientProfile\\\":true,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/segmentations\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"segments\": [\n      {\n        \"title\": \"string\",\n        \"description\": \"string\",\n        \"filter\": {\n          \"matching\": true,\n          \"expressions\": [\n            {\n              \"type\": \"ATTRIBUTE\",\n              \"name\": \"string\",\n              \"matching\": true,\n              \"attribute\": {\n                \"expressions\": [\n                  {\n                    \"constraint\": {\n                      \"type\": \"BOOL\",\n                      \"logic\": \"IS_TRUE\"\n                    },\n                    \"attribute\": {\n                      \"type\": \"PARAM\",\n                      \"param\": \"string\"\n                    }\n                  }\n                ]\n              }\n            }\n          ],\n          \"expression\": {\n            \"type\": \"EMPTY\"\n          },\n          \"groupBy\": [\n            {\n              \"type\": \"CONSTANT\",\n              \"constant\": \"string\"\n            }\n          ]\n        }\n      }\n    ],\n    \"unique\": true\n  },\n  \"isVisibleForClientProfile\": true,\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/segmentations\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    segments: [\n      {\n        title: 'string',\n        description: 'string',\n        filter: {\n          matching: true,\n          expressions: [\n            {\n              type: 'ATTRIBUTE',\n              name: 'string',\n              matching: true,\n              attribute: {\n                expressions: [\n                  {\n                    constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                    attribute: {type: 'PARAM', param: 'string'}\n                  }\n                ]\n              }\n            }\n          ],\n          expression: {type: 'EMPTY'},\n          groupBy: [{type: 'CONSTANT', constant: 'string'}]\n        }\n      }\n    ],\n    unique: true\n  },\n  isVisibleForClientProfile: true,\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/segmentations');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"isVisibleForClientProfile\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"segments\\\":[{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}}],\\\"unique\\\":true},\\\"isVisibleForClientProfile\\\":true,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/segmentations/{AnalysisId}":{"get":{"tags":["Analytics: Segmentations"],"summary":"Get segmentation details","description":"Retrieve the details of a segmentation analysis\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_SEGMENTATIONS_READ`, `ANALYTICS_BACKEND_SEGMENTATION_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-segmentation-get","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"},{"$ref":"#/components/parameters/analytics-pathNamespace"}],"responses":{"200":{"description":"Segmentation details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-SegmentationView"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Analytics: Segmentations"],"summary":"Update segmentation","description":"Update an existing segmentation analysis.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_SEGMENTATIONS_UPDATE`, `ANALYTICS_BACKEND_SEGMENTATION_UPDATE`\n\n**User role permission required:** `analytics: update`\n","operationId":"analytics2-segmentation-update","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"},{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-SegmentationRequest"}}}},"responses":{"200":{"description":"Segmentation updated"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-update"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"isVisibleForClientProfile\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"segments\\\":[{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}}],\\\"unique\\\":true},\\\"isVisibleForClientProfile\\\":true,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"segments\": [\n      {\n        \"title\": \"string\",\n        \"description\": \"string\",\n        \"filter\": {\n          \"matching\": true,\n          \"expressions\": [\n            {\n              \"type\": \"ATTRIBUTE\",\n              \"name\": \"string\",\n              \"matching\": true,\n              \"attribute\": {\n                \"expressions\": [\n                  {\n                    \"constraint\": {\n                      \"type\": \"BOOL\",\n                      \"logic\": \"IS_TRUE\"\n                    },\n                    \"attribute\": {\n                      \"type\": \"PARAM\",\n                      \"param\": \"string\"\n                    }\n                  }\n                ]\n              }\n            }\n          ],\n          \"expression\": {\n            \"type\": \"EMPTY\"\n          },\n          \"groupBy\": [\n            {\n              \"type\": \"CONSTANT\",\n              \"constant\": \"string\"\n            }\n          ]\n        }\n      }\n    ],\n    \"unique\": true\n  },\n  \"isVisibleForClientProfile\": true,\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    segments: [\n      {\n        title: 'string',\n        description: 'string',\n        filter: {\n          matching: true,\n          expressions: [\n            {\n              type: 'ATTRIBUTE',\n              name: 'string',\n              matching: true,\n              attribute: {\n                expressions: [\n                  {\n                    constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                    attribute: {type: 'PARAM', param: 'string'}\n                  }\n                ]\n              }\n            }\n          ],\n          expression: {type: 'EMPTY'},\n          groupBy: [{type: 'CONSTANT', constant: 'string'}]\n        }\n      }\n    ],\n    unique: true\n  },\n  isVisibleForClientProfile: true,\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"segments\":[{\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}}],\"unique\":true},\"isVisibleForClientProfile\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"segments\\\":[{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}}],\\\"unique\\\":true},\\\"isVisibleForClientProfile\\\":true,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]},"delete":{"tags":["Analytics: Segmentations"],"summary":"Delete segmentation","operationId":"analytics2-segmentation-delete","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"},{"$ref":"#/components/parameters/analytics-pathNamespace"}],"responses":{"204":{"description":"Deleted segmentation analysis"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-delete"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_SEGMENTATIONS_DELETE`, `ANALYTICS_BACKEND_SEGMENTATION_DELETE`\n\n**User role permission required:** `analytics: delete`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/analytics/{Namespace}/segmentations/visible-for-client/by/{IdentifierType}":{"post":{"tags":["Analytics: Segmentations"],"summary":"Get segmentations for profile card","description":"Retrieve segmentations to display on a profile's card in the Profiles module (`\"isVisibleForClientProfile\": true`) in the [segmentation config](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/addSegmentationPOST_v2)).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_SEGMENTATIONS_FOR_CLIENT_READ`\n\n**User role permission required (at least one):** `analytics: read`, `client_analytics_preview: read`\n","operationId":"analytics2-client-card-segmentations-get","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-pathIdentifierType"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"identifierValue":{"$ref":"#/components/schemas/analytics-IdentifierValue"}},"required":["identifierValue"]}}}},"responses":{"200":{"description":"List of checked segmentations configured as visible on the profile card","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/analytics-CalculatedAnalytic"}}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-client-card-segmentations-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/visible-for-client/by/%7BIdentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/segmentations/visible-for-client/by/%7BIdentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/visible-for-client/by/%7BIdentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/segmentations/visible-for-client/by/%7BIdentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({identifierValue: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/visible-for-client/by/%7BIdentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/visible-for-client/by/%7BIdentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/analytics/{Namespace}/segmentations/check/by/{IdentifierType}":{"post":{"tags":["Analytics: Segmentations"],"summary":"Check if profile in segmentations","description":"Check if a profile is in a number of segmentations.\n\n**IMPORTANT**: This endpoint is limited to:\n- 10 segmentations per request\n- 500 requests per second\n- 10 requests per second per profile\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_SEGMENTATIONS_LIST_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-segmentation-check","parameters":[{"$ref":"#/components/parameters/analytics-pathIdentifierType"},{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"identifierValue":{"$ref":"#/components/schemas/analytics-IdentifierValue"},"segmentationIds":{"type":"array","description":"UUIDs of the segmentations to check","items":{"$ref":"#/components/schemas/analytics-AnalyticId"},"maxItems":10}},"required":["identifierValue","segmentationIds"]}}}},"responses":{"200":{"description":"Check results","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/analytics-SegmentationWithRelated"}}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Segmentations/operation/analytics2-segmentation-check"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/check/by/%7BIdentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\",\"segmentationIds\":[\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\",\\\"segmentationIds\\\":[\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\"]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/segmentations/check/by/%7BIdentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\",\n  \"segmentationIds\": [\n    \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/check/by/%7BIdentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/segmentations/check/by/%7BIdentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  identifierValue: 'string',\n  segmentationIds: ['5370bf3c-2dfa-4e89-98ff-07100cffee6c']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/check/by/%7BIdentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\",\"segmentationIds\":[\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/segmentations/check/by/%7BIdentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\",\\\"segmentationIds\\\":[\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\"]}\")\n  .asString();"}]}},"/analytics/analytics/definitions-manager/aggregates/{AggregateIdentifier}/client/{ProfileId}/calculate/histogram":{"post":{"tags":["Analytics: Aggregates"],"summary":"Calculate aggregate for profile with period conditions","description":"Calculate the results of an aggregate in context of a single profile. The results can be date-filtered and aggregated in time periods.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_AGGREGATE_HISTOGRAM_FOR_CLIENT_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics-calculate-aggregate-for-profile-with-period-uuid","parameters":[{"$ref":"#/components/parameters/analytics-aggregateIdentifierAsPathParam"},{"$ref":"#/components/parameters/analytics-clientIdAsPathParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-AggregateHistogramRequest"}}}},"responses":{"200":{"description":"Aggregate calculation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-AggregateHistogramCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics-calculate-aggregate-for-profile-with-period-uuid"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/definitions-manager/aggregates/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}],\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/definitions-manager/aggregates/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"variables\": [\n    {\n      \"name\": \"string\",\n      \"value\": \"example-string-value\"\n    }\n  ],\n  \"dateFilter\": {\n    \"type\": \"ABSOLUTE\",\n    \"from\": \"2019-08-24T14:15:22Z\",\n    \"to\": \"2019-08-24T14:15:22Z\",\n    \"filter\": {\n      \"type\": \"DAILY\",\n      \"nestingType\": \"IN_PLACE\",\n      \"from\": \"string\",\n      \"to\": \"string\",\n      \"inverted\": false\n    }\n  },\n  \"aggregateDataBy\": {\n    \"type\": \"YEARS\",\n    \"value\": 0\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/definitions-manager/aggregates/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/definitions-manager/aggregates/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  variables: [{name: 'string', value: 'example-string-value'}],\n  dateFilter: {\n    type: 'ABSOLUTE',\n    from: '2019-08-24T14:15:22Z',\n    to: '2019-08-24T14:15:22Z',\n    filter: {\n      type: 'DAILY',\n      nestingType: 'IN_PLACE',\n      from: 'string',\n      to: 'string',\n      inverted: false\n    }\n  },\n  aggregateDataBy: {type: 'YEARS', value: 0}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/definitions-manager/aggregates/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/definitions-manager/aggregates/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}],\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0}}\")\n  .asString();"}]}},"/analytics/{Namespace}/aggregates/preview/by/{IdentifierType}":{"post":{"tags":["Analytics: Aggregates"],"summary":"Get aggregate preview","description":"Retrieve aggregate preview value. Previews are only available for the AGGREGATE type (profile aggregate). This request doesn't save an aggregate to the database.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_READ`, `ANALYTICS_BACKEND_AGGREGATE_READ`\n\n**User role permission required:** `analytics_aggregates: read`\n","operationId":"analytics2-aggregate-preview-v2","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-pathIdentifierType"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-AggregatePreviewRequest"}}}},"responses":{"200":{"description":"Aggregate preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-AggregateTypedCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-preview-v2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/preview/by/%7BIdentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\",\"aggregate\":{\"aggregateType\":\"AGGREGATE\",\"id\":0,\"name\":\"string\",\"description\":\"string\",\"uuid\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"AVG\",\"level\":0.1,\"size\":0,\"unique\":true,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"},\"action\":{\"id\":0,\"name\":\"page.visit\"}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\",\\\"aggregate\\\":{\\\"aggregateType\\\":\\\"AGGREGATE\\\",\\\"id\\\":0,\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"uuid\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"type\\\":\\\"AVG\\\",\\\"level\\\":0.1,\\\"size\\\":0,\\\"unique\\\":true,\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/aggregates/preview/by/%7BIdentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\",\n  \"aggregate\": {\n    \"aggregateType\": \"AGGREGATE\",\n    \"id\": 0,\n    \"name\": \"string\",\n    \"description\": \"string\",\n    \"uuid\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"type\": \"AVG\",\n    \"level\": 0.1,\n    \"size\": 0,\n    \"unique\": true,\n    \"dateFilter\": {\n      \"type\": \"ABSOLUTE\",\n      \"from\": \"2019-08-24T14:15:22Z\",\n      \"to\": \"2019-08-24T14:15:22Z\",\n      \"filter\": {\n        \"type\": \"DAILY\",\n        \"nestingType\": \"IN_PLACE\",\n        \"from\": \"string\",\n        \"to\": \"string\",\n        \"inverted\": false\n      }\n    },\n    \"expressions\": [\n      {\n        \"constraint\": {\n          \"type\": \"BOOL\",\n          \"logic\": \"IS_TRUE\"\n        },\n        \"attribute\": {\n          \"type\": \"PARAM\",\n          \"param\": \"string\"\n        }\n      }\n    ],\n    \"attribute\": {\n      \"type\": \"PARAM\",\n      \"param\": \"string\"\n    },\n    \"action\": {\n      \"id\": 0,\n      \"name\": \"page.visit\"\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/preview/by/%7BIdentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/aggregates/preview/by/%7BIdentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  identifierValue: 'string',\n  aggregate: {\n    aggregateType: 'AGGREGATE',\n    id: 0,\n    name: 'string',\n    description: 'string',\n    uuid: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    type: 'AVG',\n    level: 0.1,\n    size: 0,\n    unique: true,\n    dateFilter: {\n      type: 'ABSOLUTE',\n      from: '2019-08-24T14:15:22Z',\n      to: '2019-08-24T14:15:22Z',\n      filter: {\n        type: 'DAILY',\n        nestingType: 'IN_PLACE',\n        from: 'string',\n        to: 'string',\n        inverted: false\n      }\n    },\n    expressions: [\n      {\n        constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n        attribute: {type: 'PARAM', param: 'string'}\n      }\n    ],\n    attribute: {type: 'PARAM', param: 'string'},\n    action: {id: 0, name: 'page.visit'}\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/preview/by/%7BIdentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\",\"aggregate\":{\"aggregateType\":\"AGGREGATE\",\"id\":0,\"name\":\"string\",\"description\":\"string\",\"uuid\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"AVG\",\"level\":0.1,\"size\":0,\"unique\":true,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"},\"action\":{\"id\":0,\"name\":\"page.visit\"}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/preview/by/%7BIdentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\",\\\"aggregate\\\":{\\\"aggregateType\\\":\\\"AGGREGATE\\\",\\\"id\\\":0,\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"uuid\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"type\\\":\\\"AVG\\\",\\\"level\\\":0.1,\\\"size\\\":0,\\\"unique\\\":true,\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/aggregates/visible-for-client/by/{IdentifierType}":{"post":{"tags":["Analytics: Aggregates"],"summary":"Get aggregates for profile card","description":"Retrieve aggregates to display on a profile's card in the Profiles module (`\"isVisibleForClientProfile\": true`) in the [expression config](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/addAggregatePOST)).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_AGGREGATE_FOR_CLIENT_READ`\n\n**User role permission required (at least one):** `analytics: read`, `client_analytics_preview: read`\n","operationId":"analytics2-client-card-aggregates-get","parameters":[{"$ref":"#/components/parameters/analytics-pathIdentifierType"},{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"identifierValue":{"$ref":"#/components/schemas/analytics-IdentifierValue"}},"required":["identifierValue"]}}}},"responses":{"200":{"description":"List of calculated aggregates configured as visible on the profile card","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/analytics-CalculatedAnalytic"}}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-client-card-aggregates-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/visible-for-client/by/%7BIdentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/aggregates/visible-for-client/by/%7BIdentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/visible-for-client/by/%7BIdentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/aggregates/visible-for-client/by/%7BIdentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({identifierValue: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/visible-for-client/by/%7BIdentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/visible-for-client/by/%7BIdentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/analytics/{Namespace}/aggregates/{AggregateIdentifier}/calculate/by/{IdentifierType}":{"post":{"tags":["Analytics: Aggregates"],"summary":"Calculate aggregate for profile","description":"Calculate the result of an existing aggregate in context of a single profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_AGGREGATE_FOR_CLIENT_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-aggregate-calculate","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-aggregateIdentifierAsPathParam"},{"$ref":"#/components/parameters/analytics-pathIdentifierType"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"identifierValue":{"$ref":"#/components/schemas/analytics-IdentifierValue"}},"required":["identifierValue"]}}}},"responses":{"200":{"description":"Aggregate result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-AggregateResult"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-calculate"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D/calculate/by/%7BIdentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D/calculate/by/%7BIdentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D/calculate/by/%7BIdentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D/calculate/by/%7BIdentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({identifierValue: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D/calculate/by/%7BIdentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D/calculate/by/%7BIdentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/analytics/{Namespace}/aggregates":{"get":{"tags":["Analytics: Aggregates"],"summary":"List aggregates","description":"Returns a paginated list of aggregates.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_AGGREGATES_LIST_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-aggregates-list","parameters":[{"$ref":"#/components/parameters/analytics-page"},{"$ref":"#/components/parameters/analytics-limit"},{"$ref":"#/components/parameters/analytics-search"},{"$ref":"#/components/parameters/analytics-sortBy"},{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-directoryId"},{"$ref":"#/components/parameters/analytics-ids"},{"$ref":"#/components/parameters/analytics-AggregateType"}],"responses":{"200":{"description":"List of aggregates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-AggregatePaginationContainer"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregates-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/analytics/%7BNamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/aggregates');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'sortBy' => 'name:asc',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'ids' => 'SOME_STRING_VALUE',\n  'aggregateType' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&aggregateType=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Analytics: Aggregates"],"summary":"Create aggregate","description":"Create an aggregate analysis and save it to the database.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_CREATE`, `ANALYTICS_BACKEND_AGGREGATE_CREATE`\n\n**User role permission required:** `analytics_aggregates: create`\n","operationId":"analytics2-aggregate-create","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-AggregateRequest"}}}},"responses":{"201":{"description":"Aggregate has been created","content":{"application/json":{"schema":{"type":"string","description":"UUID of the created aggregate","format":"uuid"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-create"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/aggregates \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"aggregateType\":\"AGGREGATE\",\"id\":0,\"name\":\"string\",\"description\":\"string\",\"uuid\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"AVG\",\"level\":0.1,\"size\":0,\"unique\":true,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"},\"action\":{\"id\":0,\"name\":\"page.visit\"}},\"isVisibleForClientProfile\":true,\"aggregateType\":\"AGGREGATE\",\"previewDefaultObjectId\":0,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"aggregateType\\\":\\\"AGGREGATE\\\",\\\"id\\\":0,\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"uuid\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"type\\\":\\\"AVG\\\",\\\"level\\\":0.1,\\\"size\\\":0,\\\"unique\\\":true,\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"}},\\\"isVisibleForClientProfile\\\":true,\\\"aggregateType\\\":\\\"AGGREGATE\\\",\\\"previewDefaultObjectId\\\":0,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/aggregates\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"aggregateType\": \"AGGREGATE\",\n    \"id\": 0,\n    \"name\": \"string\",\n    \"description\": \"string\",\n    \"uuid\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"type\": \"AVG\",\n    \"level\": 0.1,\n    \"size\": 0,\n    \"unique\": true,\n    \"dateFilter\": {\n      \"type\": \"ABSOLUTE\",\n      \"from\": \"2019-08-24T14:15:22Z\",\n      \"to\": \"2019-08-24T14:15:22Z\",\n      \"filter\": {\n        \"type\": \"DAILY\",\n        \"nestingType\": \"IN_PLACE\",\n        \"from\": \"string\",\n        \"to\": \"string\",\n        \"inverted\": false\n      }\n    },\n    \"expressions\": [\n      {\n        \"constraint\": {\n          \"type\": \"BOOL\",\n          \"logic\": \"IS_TRUE\"\n        },\n        \"attribute\": {\n          \"type\": \"PARAM\",\n          \"param\": \"string\"\n        }\n      }\n    ],\n    \"attribute\": {\n      \"type\": \"PARAM\",\n      \"param\": \"string\"\n    },\n    \"action\": {\n      \"id\": 0,\n      \"name\": \"page.visit\"\n    }\n  },\n  \"isVisibleForClientProfile\": true,\n  \"aggregateType\": \"AGGREGATE\",\n  \"previewDefaultObjectId\": 0,\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/aggregates\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    aggregateType: 'AGGREGATE',\n    id: 0,\n    name: 'string',\n    description: 'string',\n    uuid: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    type: 'AVG',\n    level: 0.1,\n    size: 0,\n    unique: true,\n    dateFilter: {\n      type: 'ABSOLUTE',\n      from: '2019-08-24T14:15:22Z',\n      to: '2019-08-24T14:15:22Z',\n      filter: {\n        type: 'DAILY',\n        nestingType: 'IN_PLACE',\n        from: 'string',\n        to: 'string',\n        inverted: false\n      }\n    },\n    expressions: [\n      {\n        constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n        attribute: {type: 'PARAM', param: 'string'}\n      }\n    ],\n    attribute: {type: 'PARAM', param: 'string'},\n    action: {id: 0, name: 'page.visit'}\n  },\n  isVisibleForClientProfile: true,\n  aggregateType: 'AGGREGATE',\n  previewDefaultObjectId: 0,\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/aggregates');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"aggregateType\":\"AGGREGATE\",\"id\":0,\"name\":\"string\",\"description\":\"string\",\"uuid\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"AVG\",\"level\":0.1,\"size\":0,\"unique\":true,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"},\"action\":{\"id\":0,\"name\":\"page.visit\"}},\"isVisibleForClientProfile\":true,\"aggregateType\":\"AGGREGATE\",\"previewDefaultObjectId\":0,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"aggregateType\\\":\\\"AGGREGATE\\\",\\\"id\\\":0,\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"uuid\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"type\\\":\\\"AVG\\\",\\\"level\\\":0.1,\\\"size\\\":0,\\\"unique\\\":true,\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"}},\\\"isVisibleForClientProfile\\\":true,\\\"aggregateType\\\":\\\"AGGREGATE\\\",\\\"previewDefaultObjectId\\\":0,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/aggregates/{AggregateIdentifier}":{"get":{"tags":["Analytics: Aggregates"],"summary":"Get aggregate details","description":"Retrieve all data about an aggregate definition.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_READ`, `ANALYTICS_BACKEND_AGGREGATE_READ`\n\n**User role permission required:** `analytics_aggregates: read`\n","operationId":"analytics2-aggregate-get","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-aggregateIdentifierAsPathParam"}],"responses":{"200":{"description":"Details of the aggregate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-AggregateView"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Analytics: Aggregates"],"summary":"Update aggregate","description":"Update an aggregate.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_UPDATE`, `ANALYTICS_BACKEND_AGGREGATE_UPDATE`\n\n**User role permission required:** `analytics_aggregates: update`\n","operationId":"analytics2-aggregate-update","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-aggregateIdentifierAsPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-AggregateUpdateRequest"}}}},"responses":{"200":{"description":"Aggregate updated"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-update"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"aggregateType\":\"AGGREGATE\",\"id\":0,\"name\":\"string\",\"description\":\"string\",\"uuid\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"AVG\",\"level\":0.1,\"size\":0,\"unique\":true,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"},\"action\":{\"id\":0,\"name\":\"page.visit\"}},\"isVisibleForClientProfile\":true,\"aggregateType\":\"AGGREGATE\",\"previewDefaultObjectId\":0,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"aggregateType\\\":\\\"AGGREGATE\\\",\\\"id\\\":0,\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"uuid\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"type\\\":\\\"AVG\\\",\\\"level\\\":0.1,\\\"size\\\":0,\\\"unique\\\":true,\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"}},\\\"isVisibleForClientProfile\\\":true,\\\"aggregateType\\\":\\\"AGGREGATE\\\",\\\"previewDefaultObjectId\\\":0,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"aggregateType\": \"AGGREGATE\",\n    \"id\": 0,\n    \"name\": \"string\",\n    \"description\": \"string\",\n    \"uuid\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"type\": \"AVG\",\n    \"level\": 0.1,\n    \"size\": 0,\n    \"unique\": true,\n    \"dateFilter\": {\n      \"type\": \"ABSOLUTE\",\n      \"from\": \"2019-08-24T14:15:22Z\",\n      \"to\": \"2019-08-24T14:15:22Z\",\n      \"filter\": {\n        \"type\": \"DAILY\",\n        \"nestingType\": \"IN_PLACE\",\n        \"from\": \"string\",\n        \"to\": \"string\",\n        \"inverted\": false\n      }\n    },\n    \"expressions\": [\n      {\n        \"constraint\": {\n          \"type\": \"BOOL\",\n          \"logic\": \"IS_TRUE\"\n        },\n        \"attribute\": {\n          \"type\": \"PARAM\",\n          \"param\": \"string\"\n        }\n      }\n    ],\n    \"attribute\": {\n      \"type\": \"PARAM\",\n      \"param\": \"string\"\n    },\n    \"action\": {\n      \"id\": 0,\n      \"name\": \"page.visit\"\n    }\n  },\n  \"isVisibleForClientProfile\": true,\n  \"aggregateType\": \"AGGREGATE\",\n  \"previewDefaultObjectId\": 0,\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    aggregateType: 'AGGREGATE',\n    id: 0,\n    name: 'string',\n    description: 'string',\n    uuid: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    type: 'AVG',\n    level: 0.1,\n    size: 0,\n    unique: true,\n    dateFilter: {\n      type: 'ABSOLUTE',\n      from: '2019-08-24T14:15:22Z',\n      to: '2019-08-24T14:15:22Z',\n      filter: {\n        type: 'DAILY',\n        nestingType: 'IN_PLACE',\n        from: 'string',\n        to: 'string',\n        inverted: false\n      }\n    },\n    expressions: [\n      {\n        constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n        attribute: {type: 'PARAM', param: 'string'}\n      }\n    ],\n    attribute: {type: 'PARAM', param: 'string'},\n    action: {id: 0, name: 'page.visit'}\n  },\n  isVisibleForClientProfile: true,\n  aggregateType: 'AGGREGATE',\n  previewDefaultObjectId: 0,\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"aggregateType\":\"AGGREGATE\",\"id\":0,\"name\":\"string\",\"description\":\"string\",\"uuid\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"type\":\"AVG\",\"level\":0.1,\"size\":0,\"unique\":true,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"},\"action\":{\"id\":0,\"name\":\"page.visit\"}},\"isVisibleForClientProfile\":true,\"aggregateType\":\"AGGREGATE\",\"previewDefaultObjectId\":0,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"aggregateType\\\":\\\"AGGREGATE\\\",\\\"id\\\":0,\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"uuid\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"type\\\":\\\"AVG\\\",\\\"level\\\":0.1,\\\"size\\\":0,\\\"unique\\\":true,\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"}},\\\"isVisibleForClientProfile\\\":true,\\\"aggregateType\\\":\\\"AGGREGATE\\\",\\\"previewDefaultObjectId\\\":0,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]},"delete":{"tags":["Analytics: Aggregates"],"summary":"Delete aggregate","operationId":"analytics2-aggregate-delete","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-aggregateIdentifierAsPathParam"}],"responses":{"204":{"description":"Aggregate deleted"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics2-aggregate-delete"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_AGGREGATES_DELETE`, `ANALYTICS_BACKEND_AGGREGATE_DELETE`\n\n**User role permission required:** `analytics_aggregates: delete`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/analytics/%7BNamespace%7D/aggregates/%7BAggregateIdentifier%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/analytics/analytics/v2/sankeys/preview":{"post":{"tags":["Analytics: Sankeys"],"summary":"Preview Sankey analysis","description":"Preview the results of a Sankey analysis. This request doesn't save the analysis.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_SANKEY_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-sankey-preview-override","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-CreateRequestSankeyAnalysis"}}},"required":true},"responses":{"200":{"description":"Calculation results","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/analytics-SankeyCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankey-preview-override"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v2/sankeys/preview \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"layer\":0,\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"drillDownCount\":0,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"sourceEvent\\\":{\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]},\\\"reverseOrder\\\":true,\\\"numberOfSteps\\\":0,\\\"numberOfPaths\\\":0,\\\"drillDown\\\":[{\\\"layer\\\":0,\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"drillDownCount\\\":0,\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"eventFilters\\\":[{\\\"title\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"excludeEvents\\\":true,\\\"firstOccurrenceOnly\\\":true},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v2/sankeys/preview\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"sourceEvent\": {\n      \"action\": {\n        \"id\": 0,\n        \"name\": \"page.visit\"\n      },\n      \"expressions\": [\n        {\n          \"constraint\": {\n            \"type\": \"BOOL\",\n            \"logic\": \"IS_TRUE\"\n          },\n          \"attribute\": {\n            \"type\": \"PARAM\",\n            \"param\": \"string\"\n          }\n        }\n      ]\n    },\n    \"reverseOrder\": true,\n    \"numberOfSteps\": 0,\n    \"numberOfPaths\": 0,\n    \"drillDown\": [\n      {\n        \"layer\": 0,\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"attribute\": {\n          \"type\": \"PARAM\",\n          \"param\": \"string\"\n        }\n      }\n    ],\n    \"drillDownCount\": 0,\n    \"dateFilter\": {\n      \"type\": \"ABSOLUTE\",\n      \"from\": \"2019-08-24T14:15:22Z\",\n      \"to\": \"2019-08-24T14:15:22Z\",\n      \"filter\": {\n        \"type\": \"DAILY\",\n        \"nestingType\": \"IN_PLACE\",\n        \"from\": \"string\",\n        \"to\": \"string\",\n        \"inverted\": false\n      }\n    },\n    \"filter\": {\n      \"matching\": true,\n      \"expressions\": [\n        {\n          \"type\": \"ATTRIBUTE\",\n          \"name\": \"string\",\n          \"matching\": true,\n          \"attribute\": {\n            \"expressions\": [\n              {\n                \"constraint\": {\n                  \"type\": \"BOOL\",\n                  \"logic\": \"IS_TRUE\"\n                },\n                \"attribute\": {\n                  \"type\": \"PARAM\",\n                  \"param\": \"string\"\n                }\n              }\n            ]\n          }\n        }\n      ],\n      \"expression\": {\n        \"type\": \"EMPTY\"\n      },\n      \"groupBy\": [\n        {\n          \"type\": \"CONSTANT\",\n          \"constant\": \"string\"\n        }\n      ]\n    },\n    \"eventFilters\": [\n      {\n        \"title\": \"string\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"expressions\": [\n          {\n            \"constraint\": {\n              \"type\": \"BOOL\",\n              \"logic\": \"IS_TRUE\"\n            },\n            \"attribute\": {\n              \"type\": \"PARAM\",\n              \"param\": \"string\"\n            }\n          }\n        ]\n      }\n    ],\n    \"excludeEvents\": true,\n    \"firstOccurrenceOnly\": true\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v2/sankeys/preview\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v2/sankeys/preview\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    sourceEvent: {\n      action: {id: 0, name: 'page.visit'},\n      expressions: [\n        {\n          constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n          attribute: {type: 'PARAM', param: 'string'}\n        }\n      ]\n    },\n    reverseOrder: true,\n    numberOfSteps: 0,\n    numberOfPaths: 0,\n    drillDown: [\n      {\n        layer: 0,\n        action: {id: 0, name: 'page.visit'},\n        attribute: {type: 'PARAM', param: 'string'}\n      }\n    ],\n    drillDownCount: 0,\n    dateFilter: {\n      type: 'ABSOLUTE',\n      from: '2019-08-24T14:15:22Z',\n      to: '2019-08-24T14:15:22Z',\n      filter: {\n        type: 'DAILY',\n        nestingType: 'IN_PLACE',\n        from: 'string',\n        to: 'string',\n        inverted: false\n      }\n    },\n    filter: {\n      matching: true,\n      expressions: [\n        {\n          type: 'ATTRIBUTE',\n          name: 'string',\n          matching: true,\n          attribute: {\n            expressions: [\n              {\n                constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                attribute: {type: 'PARAM', param: 'string'}\n              }\n            ]\n          }\n        }\n      ],\n      expression: {type: 'EMPTY'},\n      groupBy: [{type: 'CONSTANT', constant: 'string'}]\n    },\n    eventFilters: [\n      {\n        title: 'string',\n        action: {id: 0, name: 'page.visit'},\n        expressions: [\n          {\n            constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n            attribute: {type: 'PARAM', param: 'string'}\n          }\n        ]\n      }\n    ],\n    excludeEvents: true,\n    firstOccurrenceOnly: true\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v2/sankeys/preview');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"layer\":0,\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"drillDownCount\":0,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v2/sankeys/preview\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"sourceEvent\\\":{\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]},\\\"reverseOrder\\\":true,\\\"numberOfSteps\\\":0,\\\"numberOfPaths\\\":0,\\\"drillDown\\\":[{\\\"layer\\\":0,\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"drillDownCount\\\":0,\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"eventFilters\\\":[{\\\"title\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"excludeEvents\\\":true,\\\"firstOccurrenceOnly\\\":true},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/analytics/v2/funnels/preview":{"post":{"tags":["Analytics: Funnels"],"summary":"Preview funnel calculation","description":"Preview the results of a funnel. This request doesn't save the funnel.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_FUNNEL_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-funnel-preview","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-FunnelRequest"}}},"required":true},"responses":{"200":{"description":"Preview of the results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-FunnelCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnel-preview"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v2/funnels/preview \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"title\":\"string\",\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"exact\":false},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"funnel\\\":{\\\"title\\\":\\\"string\\\",\\\"completedWithin\\\":{\\\"period\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"steps\\\":[{\\\"title\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"exact\\\":false},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v2/funnels/preview\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"funnel\": {\n      \"title\": \"string\",\n      \"completedWithin\": {\n        \"period\": \"YEARS\",\n        \"value\": 0\n      },\n      \"dateFilter\": {\n        \"type\": \"ABSOLUTE\",\n        \"from\": \"2019-08-24T14:15:22Z\",\n        \"to\": \"2019-08-24T14:15:22Z\",\n        \"filter\": {\n          \"type\": \"DAILY\",\n          \"nestingType\": \"IN_PLACE\",\n          \"from\": \"string\",\n          \"to\": \"string\",\n          \"inverted\": false\n        }\n      },\n      \"steps\": [\n        {\n          \"title\": \"string\",\n          \"action\": {\n            \"id\": 0,\n            \"name\": \"page.visit\"\n          },\n          \"expressions\": [\n            {\n              \"constraint\": {\n                \"type\": \"BOOL\",\n                \"logic\": \"IS_TRUE\"\n              },\n              \"attribute\": {\n                \"type\": \"PARAM\",\n                \"param\": \"string\"\n              }\n            }\n          ]\n        }\n      ],\n      \"exact\": false\n    },\n    \"filter\": {\n      \"matching\": true,\n      \"expressions\": [\n        {\n          \"type\": \"ATTRIBUTE\",\n          \"name\": \"string\",\n          \"matching\": true,\n          \"attribute\": {\n            \"expressions\": [\n              {\n                \"constraint\": {\n                  \"type\": \"BOOL\",\n                  \"logic\": \"IS_TRUE\"\n                },\n                \"attribute\": {\n                  \"type\": \"PARAM\",\n                  \"param\": \"string\"\n                }\n              }\n            ]\n          }\n        }\n      ],\n      \"expression\": {\n        \"type\": \"EMPTY\"\n      },\n      \"groupBy\": [\n        {\n          \"type\": \"CONSTANT\",\n          \"constant\": \"string\"\n        }\n      ]\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v2/funnels/preview\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v2/funnels/preview\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    title: 'string',\n    description: 'string',\n    funnel: {\n      title: 'string',\n      completedWithin: {period: 'YEARS', value: 0},\n      dateFilter: {\n        type: 'ABSOLUTE',\n        from: '2019-08-24T14:15:22Z',\n        to: '2019-08-24T14:15:22Z',\n        filter: {\n          type: 'DAILY',\n          nestingType: 'IN_PLACE',\n          from: 'string',\n          to: 'string',\n          inverted: false\n        }\n      },\n      steps: [\n        {\n          title: 'string',\n          action: {id: 0, name: 'page.visit'},\n          expressions: [\n            {\n              constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n              attribute: {type: 'PARAM', param: 'string'}\n            }\n          ]\n        }\n      ],\n      exact: false\n    },\n    filter: {\n      matching: true,\n      expressions: [\n        {\n          type: 'ATTRIBUTE',\n          name: 'string',\n          matching: true,\n          attribute: {\n            expressions: [\n              {\n                constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                attribute: {type: 'PARAM', param: 'string'}\n              }\n            ]\n          }\n        }\n      ],\n      expression: {type: 'EMPTY'},\n      groupBy: [{type: 'CONSTANT', constant: 'string'}]\n    }\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v2/funnels/preview');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"title\":\"string\",\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"exact\":false},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v2/funnels/preview\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"funnel\\\":{\\\"title\\\":\\\"string\\\",\\\"completedWithin\\\":{\\\"period\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"steps\\\":[{\\\"title\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"exact\\\":false},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/analytics/v2/funnels/{AnalysisId}/recalculate/override":{"post":{"tags":["Analytics: Funnels"],"summary":"Recalculate funnel with parameter override","description":"Recalculate a funnel with new parameters and/or variable (dynamic key) values.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_FUNNEL_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-funnel-preview-override","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-OverrideQueryRequest"}}},"required":true},"responses":{"200":{"description":"Funnel results","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/analytics-FunnelCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnel-preview-override"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v2/funnels/%7BAnalysisId%7D/recalculate/override \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"title\":\"string\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"title\\\":\\\"string\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}],\\\"overrideNested\\\":false}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v2/funnels/%7BAnalysisId%7D/recalculate/override\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"title\": \"string\",\n  \"dateFilter\": {\n    \"type\": \"ABSOLUTE\",\n    \"from\": \"2019-08-24T14:15:22Z\",\n    \"to\": \"2019-08-24T14:15:22Z\",\n    \"filter\": {\n      \"type\": \"DAILY\",\n      \"nestingType\": \"IN_PLACE\",\n      \"from\": \"string\",\n      \"to\": \"string\",\n      \"inverted\": false\n    }\n  },\n  \"aggregateDataBy\": {\n    \"type\": \"YEARS\",\n    \"value\": 0\n  },\n  \"filter\": {\n    \"matching\": true,\n    \"expressions\": [\n      {\n        \"type\": \"ATTRIBUTE\",\n        \"name\": \"string\",\n        \"matching\": true,\n        \"attribute\": {\n          \"expressions\": [\n            {\n              \"constraint\": {\n                \"type\": \"BOOL\",\n                \"logic\": \"IS_TRUE\"\n              },\n              \"attribute\": {\n                \"type\": \"PARAM\",\n                \"param\": \"string\"\n              }\n            }\n          ]\n        }\n      }\n    ],\n    \"expression\": {\n      \"type\": \"EMPTY\"\n    },\n    \"groupBy\": [\n      {\n        \"type\": \"CONSTANT\",\n        \"constant\": \"string\"\n      }\n    ]\n  },\n  \"variables\": [\n    {\n      \"name\": \"string\",\n      \"value\": \"example-string-value\"\n    }\n  ],\n  \"overrideNested\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v2/funnels/%7BAnalysisId%7D/recalculate/override\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v2/funnels/%7BAnalysisId%7D/recalculate/override\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  title: 'string',\n  dateFilter: {\n    type: 'ABSOLUTE',\n    from: '2019-08-24T14:15:22Z',\n    to: '2019-08-24T14:15:22Z',\n    filter: {\n      type: 'DAILY',\n      nestingType: 'IN_PLACE',\n      from: 'string',\n      to: 'string',\n      inverted: false\n    }\n  },\n  aggregateDataBy: {type: 'YEARS', value: 0},\n  filter: {\n    matching: true,\n    expressions: [\n      {\n        type: 'ATTRIBUTE',\n        name: 'string',\n        matching: true,\n        attribute: {\n          expressions: [\n            {\n              constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n              attribute: {type: 'PARAM', param: 'string'}\n            }\n          ]\n        }\n      }\n    ],\n    expression: {type: 'EMPTY'},\n    groupBy: [{type: 'CONSTANT', constant: 'string'}]\n  },\n  variables: [{name: 'string', value: 'example-string-value'}],\n  overrideNested: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v2/funnels/%7BAnalysisId%7D/recalculate/override');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"title\":\"string\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v2/funnels/%7BAnalysisId%7D/recalculate/override\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"title\\\":\\\"string\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}],\\\"overrideNested\\\":false}\")\n  .asString();"}]}},"/analytics/{Namespace}/funnels":{"get":{"tags":["Analytics: Funnels"],"summary":"List funnels","description":"Returns a paginated list of funnels.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_FUNNELS_LIST_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-funnels-list","parameters":[{"$ref":"#/components/parameters/analytics-page"},{"$ref":"#/components/parameters/analytics-limit"},{"$ref":"#/components/parameters/analytics-search"},{"$ref":"#/components/parameters/analytics-sortBy"},{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-directoryId"},{"$ref":"#/components/parameters/analytics-ids"}],"responses":{"200":{"description":"List of funnels","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"Array of funnels","items":{"$ref":"#/components/schemas/analytics-ListAnalyticsItemCommon"}},"meta":{"$ref":"#/components/schemas/analytics-Meta"}},"required":["data"]}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/analytics/%7BNamespace%7D/funnels?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/funnels?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/funnels?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/funnels?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/funnels');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'sortBy' => 'name:asc',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'ids' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/funnels?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Analytics: Funnels"],"summary":"Create a funnel","description":"Create a funnel.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_FUNNELS_CREATE`, `ANALYTICS_BACKEND_FUNNEL_CREATE`\n\n**User role permission required:** `analytics: create`\n","operationId":"analytics2-funnels-create","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-FunnelRequest"}}}},"responses":{"201":{"description":"Funnel created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-Id"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-create"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/funnels \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"title\":\"string\",\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"exact\":false},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"funnel\\\":{\\\"title\\\":\\\"string\\\",\\\"completedWithin\\\":{\\\"period\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"steps\\\":[{\\\"title\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"exact\\\":false},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/funnels\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"funnel\": {\n      \"title\": \"string\",\n      \"completedWithin\": {\n        \"period\": \"YEARS\",\n        \"value\": 0\n      },\n      \"dateFilter\": {\n        \"type\": \"ABSOLUTE\",\n        \"from\": \"2019-08-24T14:15:22Z\",\n        \"to\": \"2019-08-24T14:15:22Z\",\n        \"filter\": {\n          \"type\": \"DAILY\",\n          \"nestingType\": \"IN_PLACE\",\n          \"from\": \"string\",\n          \"to\": \"string\",\n          \"inverted\": false\n        }\n      },\n      \"steps\": [\n        {\n          \"title\": \"string\",\n          \"action\": {\n            \"id\": 0,\n            \"name\": \"page.visit\"\n          },\n          \"expressions\": [\n            {\n              \"constraint\": {\n                \"type\": \"BOOL\",\n                \"logic\": \"IS_TRUE\"\n              },\n              \"attribute\": {\n                \"type\": \"PARAM\",\n                \"param\": \"string\"\n              }\n            }\n          ]\n        }\n      ],\n      \"exact\": false\n    },\n    \"filter\": {\n      \"matching\": true,\n      \"expressions\": [\n        {\n          \"type\": \"ATTRIBUTE\",\n          \"name\": \"string\",\n          \"matching\": true,\n          \"attribute\": {\n            \"expressions\": [\n              {\n                \"constraint\": {\n                  \"type\": \"BOOL\",\n                  \"logic\": \"IS_TRUE\"\n                },\n                \"attribute\": {\n                  \"type\": \"PARAM\",\n                  \"param\": \"string\"\n                }\n              }\n            ]\n          }\n        }\n      ],\n      \"expression\": {\n        \"type\": \"EMPTY\"\n      },\n      \"groupBy\": [\n        {\n          \"type\": \"CONSTANT\",\n          \"constant\": \"string\"\n        }\n      ]\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/funnels\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/funnels\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    title: 'string',\n    description: 'string',\n    funnel: {\n      title: 'string',\n      completedWithin: {period: 'YEARS', value: 0},\n      dateFilter: {\n        type: 'ABSOLUTE',\n        from: '2019-08-24T14:15:22Z',\n        to: '2019-08-24T14:15:22Z',\n        filter: {\n          type: 'DAILY',\n          nestingType: 'IN_PLACE',\n          from: 'string',\n          to: 'string',\n          inverted: false\n        }\n      },\n      steps: [\n        {\n          title: 'string',\n          action: {id: 0, name: 'page.visit'},\n          expressions: [\n            {\n              constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n              attribute: {type: 'PARAM', param: 'string'}\n            }\n          ]\n        }\n      ],\n      exact: false\n    },\n    filter: {\n      matching: true,\n      expressions: [\n        {\n          type: 'ATTRIBUTE',\n          name: 'string',\n          matching: true,\n          attribute: {\n            expressions: [\n              {\n                constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                attribute: {type: 'PARAM', param: 'string'}\n              }\n            ]\n          }\n        }\n      ],\n      expression: {type: 'EMPTY'},\n      groupBy: [{type: 'CONSTANT', constant: 'string'}]\n    }\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/funnels');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"title\":\"string\",\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"exact\":false},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/funnels\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"funnel\\\":{\\\"title\\\":\\\"string\\\",\\\"completedWithin\\\":{\\\"period\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"steps\\\":[{\\\"title\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"exact\\\":false},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/funnels/{AnalysisId}":{"get":{"tags":["Analytics: Funnels"],"summary":"Get funnel details","description":"Retrieve the definition of a single funnel\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_FUNNELS_READ`, `ANALYTICS_BACKEND_FUNNEL_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-funnels-get","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"responses":{"200":{"description":"Details of the funnel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-FunnelView"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Analytics: Funnels"],"summary":"Update funnel","description":"Update a funnel definition\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_FUNNELS_UPDATE`, `ANALYTICS_BACKEND_FUNNEL_UPDATE`\n\n**User role permission required:** `analytics: update`\n","operationId":"analytics2-funnels-update","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-FunnelRequest"}}}},"responses":{"200":{"description":"Funnel updated"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-update"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"title\":\"string\",\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"exact\":false},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"funnel\\\":{\\\"title\\\":\\\"string\\\",\\\"completedWithin\\\":{\\\"period\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"steps\\\":[{\\\"title\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"exact\\\":false},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"funnel\": {\n      \"title\": \"string\",\n      \"completedWithin\": {\n        \"period\": \"YEARS\",\n        \"value\": 0\n      },\n      \"dateFilter\": {\n        \"type\": \"ABSOLUTE\",\n        \"from\": \"2019-08-24T14:15:22Z\",\n        \"to\": \"2019-08-24T14:15:22Z\",\n        \"filter\": {\n          \"type\": \"DAILY\",\n          \"nestingType\": \"IN_PLACE\",\n          \"from\": \"string\",\n          \"to\": \"string\",\n          \"inverted\": false\n        }\n      },\n      \"steps\": [\n        {\n          \"title\": \"string\",\n          \"action\": {\n            \"id\": 0,\n            \"name\": \"page.visit\"\n          },\n          \"expressions\": [\n            {\n              \"constraint\": {\n                \"type\": \"BOOL\",\n                \"logic\": \"IS_TRUE\"\n              },\n              \"attribute\": {\n                \"type\": \"PARAM\",\n                \"param\": \"string\"\n              }\n            }\n          ]\n        }\n      ],\n      \"exact\": false\n    },\n    \"filter\": {\n      \"matching\": true,\n      \"expressions\": [\n        {\n          \"type\": \"ATTRIBUTE\",\n          \"name\": \"string\",\n          \"matching\": true,\n          \"attribute\": {\n            \"expressions\": [\n              {\n                \"constraint\": {\n                  \"type\": \"BOOL\",\n                  \"logic\": \"IS_TRUE\"\n                },\n                \"attribute\": {\n                  \"type\": \"PARAM\",\n                  \"param\": \"string\"\n                }\n              }\n            ]\n          }\n        }\n      ],\n      \"expression\": {\n        \"type\": \"EMPTY\"\n      },\n      \"groupBy\": [\n        {\n          \"type\": \"CONSTANT\",\n          \"constant\": \"string\"\n        }\n      ]\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    title: 'string',\n    description: 'string',\n    funnel: {\n      title: 'string',\n      completedWithin: {period: 'YEARS', value: 0},\n      dateFilter: {\n        type: 'ABSOLUTE',\n        from: '2019-08-24T14:15:22Z',\n        to: '2019-08-24T14:15:22Z',\n        filter: {\n          type: 'DAILY',\n          nestingType: 'IN_PLACE',\n          from: 'string',\n          to: 'string',\n          inverted: false\n        }\n      },\n      steps: [\n        {\n          title: 'string',\n          action: {id: 0, name: 'page.visit'},\n          expressions: [\n            {\n              constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n              attribute: {type: 'PARAM', param: 'string'}\n            }\n          ]\n        }\n      ],\n      exact: false\n    },\n    filter: {\n      matching: true,\n      expressions: [\n        {\n          type: 'ATTRIBUTE',\n          name: 'string',\n          matching: true,\n          attribute: {\n            expressions: [\n              {\n                constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                attribute: {type: 'PARAM', param: 'string'}\n              }\n            ]\n          }\n        }\n      ],\n      expression: {type: 'EMPTY'},\n      groupBy: [{type: 'CONSTANT', constant: 'string'}]\n    }\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"title\":\"string\",\"description\":\"string\",\"funnel\":{\"title\":\"string\",\"completedWithin\":{\"period\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"steps\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"exact\":false},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"funnel\\\":{\\\"title\\\":\\\"string\\\",\\\"completedWithin\\\":{\\\"period\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"steps\\\":[{\\\"title\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"exact\\\":false},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]},"delete":{"tags":["Analytics: Funnels"],"summary":"Delete funnel","description":"Delete a funnel.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_FUNNELS_DELETE`, `ANALYTICS_BACKEND_FUNNEL_DELETE`\n\n**User role permission required:** `analytics: delete`\n","operationId":"analytics2-funnels-delete","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"responses":{"204":{"description":"Funnel deleted"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Funnels/operation/analytics2-funnels-delete"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/analytics/%7BNamespace%7D/funnels/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/analytics/{Namespace}/reports":{"get":{"tags":["Analytics: Reports"],"summary":"List reports","description":"Returns a paginated list of reports.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_REPORTS_LIST_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-reports-list","parameters":[{"$ref":"#/components/parameters/analytics-page"},{"$ref":"#/components/parameters/analytics-limit"},{"$ref":"#/components/parameters/analytics-search"},{"$ref":"#/components/parameters/analytics-sortBy"},{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-directoryId"},{"$ref":"#/components/parameters/analytics-ids"},{"$ref":"#/components/parameters/analytics-isMultiMetric"}],"responses":{"200":{"description":"List of reports","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"Array of reports","items":{"$ref":"#/components/schemas/analytics-ReportListItem"}},"meta":{"$ref":"#/components/schemas/analytics-Meta"}},"required":["data"]}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/analytics/%7BNamespace%7D/reports?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isMultiMetric=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/reports?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isMultiMetric=SOME_BOOLEAN_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/reports?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isMultiMetric=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/reports?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isMultiMetric=SOME_BOOLEAN_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/reports');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'sortBy' => 'name:asc',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'ids' => 'SOME_STRING_VALUE',\n  'isMultiMetric' => 'SOME_BOOLEAN_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/reports?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE&isMultiMetric=SOME_BOOLEAN_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Analytics: Reports"],"summary":"Create report analysis","operationId":"analytics2-reports-create","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-ReportRequest"}}}},"responses":{"200":{"description":"ID of the created report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-Id"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-create"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_REPORTS_CREATE`, `ANALYTICS_BACKEND_REPORT_CREATE`\n\n**User role permission required:** `analytics: create`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/reports \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"reportMetrics\\\":[{\\\"metricId\\\":\\\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"columnName\\\":\\\"string\\\",\\\"grouping\\\":{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0},\\\"groups\\\":[{\\\"title\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"type\\\":\\\"CLIENT\\\",\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"allowNull\\\":true,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/reports\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"reportMetrics\": [\n      {\n        \"metricId\": \"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\n        \"dateFilter\": {\n          \"type\": \"ABSOLUTE\",\n          \"from\": \"2019-08-24T14:15:22Z\",\n          \"to\": \"2019-08-24T14:15:22Z\",\n          \"filter\": {\n            \"type\": \"DAILY\",\n            \"nestingType\": \"IN_PLACE\",\n            \"from\": \"string\",\n            \"to\": \"string\",\n            \"inverted\": false\n          }\n        },\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"format\": {\n          \"compactNumbers\": false,\n          \"currency\": \"EUR\",\n          \"dataFormat\": \"cash\",\n          \"fixedLength\": 0,\n          \"useSeparator\": false\n        },\n        \"columnName\": \"string\",\n        \"grouping\": {\n          \"type\": \"TOP\",\n          \"top\": 0\n        },\n        \"groups\": [\n          {\n            \"title\": \"string\",\n            \"format\": {\n              \"compactNumbers\": false,\n              \"currency\": \"EUR\",\n              \"dataFormat\": \"cash\",\n              \"fixedLength\": 0,\n              \"useSeparator\": false\n            },\n            \"type\": \"CLIENT\",\n            \"attribute\": {\n              \"type\": \"PARAM\",\n              \"param\": \"string\"\n            }\n          }\n        ]\n      }\n    ],\n    \"filter\": {\n      \"matching\": true,\n      \"expressions\": [\n        {\n          \"type\": \"ATTRIBUTE\",\n          \"name\": \"string\",\n          \"matching\": true,\n          \"attribute\": {\n            \"expressions\": [\n              {\n                \"constraint\": {\n                  \"type\": \"BOOL\",\n                  \"logic\": \"IS_TRUE\"\n                },\n                \"attribute\": {\n                  \"type\": \"PARAM\",\n                  \"param\": \"string\"\n                }\n              }\n            ]\n          }\n        }\n      ],\n      \"expression\": {\n        \"type\": \"EMPTY\"\n      },\n      \"groupBy\": [\n        {\n          \"type\": \"CONSTANT\",\n          \"constant\": \"string\"\n        }\n      ]\n    }\n  },\n  \"allowNull\": true,\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/reports\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/reports\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    reportMetrics: [\n      {\n        metricId: 'c2cc9ad9-a69d-40a3-8e01-a95e09e71978',\n        dateFilter: {\n          type: 'ABSOLUTE',\n          from: '2019-08-24T14:15:22Z',\n          to: '2019-08-24T14:15:22Z',\n          filter: {\n            type: 'DAILY',\n            nestingType: 'IN_PLACE',\n            from: 'string',\n            to: 'string',\n            inverted: false\n          }\n        },\n        action: {id: 0, name: 'page.visit'},\n        format: {\n          compactNumbers: false,\n          currency: 'EUR',\n          dataFormat: 'cash',\n          fixedLength: 0,\n          useSeparator: false\n        },\n        columnName: 'string',\n        grouping: {type: 'TOP', top: 0},\n        groups: [\n          {\n            title: 'string',\n            format: {\n              compactNumbers: false,\n              currency: 'EUR',\n              dataFormat: 'cash',\n              fixedLength: 0,\n              useSeparator: false\n            },\n            type: 'CLIENT',\n            attribute: {type: 'PARAM', param: 'string'}\n          }\n        ]\n      }\n    ],\n    filter: {\n      matching: true,\n      expressions: [\n        {\n          type: 'ATTRIBUTE',\n          name: 'string',\n          matching: true,\n          attribute: {\n            expressions: [\n              {\n                constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                attribute: {type: 'PARAM', param: 'string'}\n              }\n            ]\n          }\n        }\n      ],\n      expression: {type: 'EMPTY'},\n      groupBy: [{type: 'CONSTANT', constant: 'string'}]\n    }\n  },\n  allowNull: true,\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/reports');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/reports\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"reportMetrics\\\":[{\\\"metricId\\\":\\\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"columnName\\\":\\\"string\\\",\\\"grouping\\\":{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0},\\\"groups\\\":[{\\\"title\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"type\\\":\\\"CLIENT\\\",\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"allowNull\\\":true,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/reports/{AnalysisId}":{"get":{"tags":["Analytics: Reports"],"summary":"Get report analysis details","operationId":"analytics2-reports-get","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"responses":{"200":{"description":"Get report analysis details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-ReportView"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-get"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_REPORTS_READ`, `ANALYTICS_BACKEND_REPORT_READ`\n\n**User role permission required:** `analytics: read`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Analytics: Reports"],"summary":"Update report analysis","operationId":"analytics2-reports-update","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"},{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-ReportRequest"}}}},"responses":{"200":{"description":"Report analysis updated"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-update"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_REPORTS_UPDATE`, `ANALYTICS_BACKEND_REPORT_UPDATE`\n\n**User role permission required:** `analytics: update`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"reportMetrics\\\":[{\\\"metricId\\\":\\\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"columnName\\\":\\\"string\\\",\\\"grouping\\\":{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0},\\\"groups\\\":[{\\\"title\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"type\\\":\\\"CLIENT\\\",\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"allowNull\\\":true,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"reportMetrics\": [\n      {\n        \"metricId\": \"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\n        \"dateFilter\": {\n          \"type\": \"ABSOLUTE\",\n          \"from\": \"2019-08-24T14:15:22Z\",\n          \"to\": \"2019-08-24T14:15:22Z\",\n          \"filter\": {\n            \"type\": \"DAILY\",\n            \"nestingType\": \"IN_PLACE\",\n            \"from\": \"string\",\n            \"to\": \"string\",\n            \"inverted\": false\n          }\n        },\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"format\": {\n          \"compactNumbers\": false,\n          \"currency\": \"EUR\",\n          \"dataFormat\": \"cash\",\n          \"fixedLength\": 0,\n          \"useSeparator\": false\n        },\n        \"columnName\": \"string\",\n        \"grouping\": {\n          \"type\": \"TOP\",\n          \"top\": 0\n        },\n        \"groups\": [\n          {\n            \"title\": \"string\",\n            \"format\": {\n              \"compactNumbers\": false,\n              \"currency\": \"EUR\",\n              \"dataFormat\": \"cash\",\n              \"fixedLength\": 0,\n              \"useSeparator\": false\n            },\n            \"type\": \"CLIENT\",\n            \"attribute\": {\n              \"type\": \"PARAM\",\n              \"param\": \"string\"\n            }\n          }\n        ]\n      }\n    ],\n    \"filter\": {\n      \"matching\": true,\n      \"expressions\": [\n        {\n          \"type\": \"ATTRIBUTE\",\n          \"name\": \"string\",\n          \"matching\": true,\n          \"attribute\": {\n            \"expressions\": [\n              {\n                \"constraint\": {\n                  \"type\": \"BOOL\",\n                  \"logic\": \"IS_TRUE\"\n                },\n                \"attribute\": {\n                  \"type\": \"PARAM\",\n                  \"param\": \"string\"\n                }\n              }\n            ]\n          }\n        }\n      ],\n      \"expression\": {\n        \"type\": \"EMPTY\"\n      },\n      \"groupBy\": [\n        {\n          \"type\": \"CONSTANT\",\n          \"constant\": \"string\"\n        }\n      ]\n    }\n  },\n  \"allowNull\": true,\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    reportMetrics: [\n      {\n        metricId: 'c2cc9ad9-a69d-40a3-8e01-a95e09e71978',\n        dateFilter: {\n          type: 'ABSOLUTE',\n          from: '2019-08-24T14:15:22Z',\n          to: '2019-08-24T14:15:22Z',\n          filter: {\n            type: 'DAILY',\n            nestingType: 'IN_PLACE',\n            from: 'string',\n            to: 'string',\n            inverted: false\n          }\n        },\n        action: {id: 0, name: 'page.visit'},\n        format: {\n          compactNumbers: false,\n          currency: 'EUR',\n          dataFormat: 'cash',\n          fixedLength: 0,\n          useSeparator: false\n        },\n        columnName: 'string',\n        grouping: {type: 'TOP', top: 0},\n        groups: [\n          {\n            title: 'string',\n            format: {\n              compactNumbers: false,\n              currency: 'EUR',\n              dataFormat: 'cash',\n              fixedLength: 0,\n              useSeparator: false\n            },\n            type: 'CLIENT',\n            attribute: {type: 'PARAM', param: 'string'}\n          }\n        ]\n      }\n    ],\n    filter: {\n      matching: true,\n      expressions: [\n        {\n          type: 'ATTRIBUTE',\n          name: 'string',\n          matching: true,\n          attribute: {\n            expressions: [\n              {\n                constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                attribute: {type: 'PARAM', param: 'string'}\n              }\n            ]\n          }\n        }\n      ],\n      expression: {type: 'EMPTY'},\n      groupBy: [{type: 'CONSTANT', constant: 'string'}]\n    }\n  },\n  allowNull: true,\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"reportMetrics\":[{\"metricId\":\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"action\":{\"id\":0,\"name\":\"page.visit\"},\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"columnName\":\"string\",\"grouping\":{\"type\":\"TOP\",\"top\":0},\"groups\":[{\"title\":\"string\",\"format\":{\"compactNumbers\":false,\"currency\":\"EUR\",\"dataFormat\":\"cash\",\"fixedLength\":0,\"useSeparator\":false},\"type\":\"CLIENT\",\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]}},\"allowNull\":true,\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"reportMetrics\\\":[{\\\"metricId\\\":\\\"c2cc9ad9-a69d-40a3-8e01-a95e09e71978\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"columnName\\\":\\\"string\\\",\\\"grouping\\\":{\\\"type\\\":\\\"TOP\\\",\\\"top\\\":0},\\\"groups\\\":[{\\\"title\\\":\\\"string\\\",\\\"format\\\":{\\\"compactNumbers\\\":false,\\\"currency\\\":\\\"EUR\\\",\\\"dataFormat\\\":\\\"cash\\\",\\\"fixedLength\\\":0,\\\"useSeparator\\\":false},\\\"type\\\":\\\"CLIENT\\\",\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]}},\\\"allowNull\\\":true,\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]},"delete":{"tags":["Analytics: Reports"],"summary":"Delete report analysis","operationId":"analytics2-reports-delete","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"},{"$ref":"#/components/parameters/analytics-pathNamespace"}],"responses":{"204":{"description":"Report analysis deleted"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Reports/operation/analytics2-reports-delete"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_REPORTS_DELETE`, `ANALYTICS_BACKEND_REPORT_DELETE`\n\n**User role permission required:** `analytics: delete`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/analytics/%7BNamespace%7D/reports/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/analytics/{Namespace}/trends":{"get":{"tags":["Analytics: Trends"],"summary":"List trends","description":"Returns a paginated list of trends.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_TRENDS_LIST_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-trends-list","parameters":[{"$ref":"#/components/parameters/analytics-page"},{"$ref":"#/components/parameters/analytics-limit"},{"$ref":"#/components/parameters/analytics-search"},{"$ref":"#/components/parameters/analytics-sortBy"},{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-directoryId"},{"$ref":"#/components/parameters/analytics-ids"}],"responses":{"200":{"description":"List of trends","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"Array of trends","items":{"$ref":"#/components/schemas/analytics-ListAnalyticsItemCommon"}},"meta":{"$ref":"#/components/schemas/analytics-Meta"}}}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trends-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/analytics/%7BNamespace%7D/trends?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/trends?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/trends?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/trends?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/trends');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'sortBy' => 'name:asc',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'ids' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/trends?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Analytics: Trends"],"summary":"Create a trend","description":"Create a trend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_TRENDS_CREATE`\n\n**User role permission required:** `analytics_trends: create`\n","operationId":"analytics2-trend-create","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-TrendRequest"}}}},"responses":{"200":{"description":"Trend created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-Id"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trend-create"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/trends \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"trend\":{\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"trendDefinitions\":[{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"trend\\\":{\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"trendDefinitions\\\":[{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"tabIndex\\\":0,\\\"aggregationType\\\":\\\"EVENT\\\",\\\"chartType\\\":\\\"COLUMN\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/trends\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"filter\": {\n      \"matching\": true,\n      \"expressions\": [\n        {\n          \"type\": \"ATTRIBUTE\",\n          \"name\": \"string\",\n          \"matching\": true,\n          \"attribute\": {\n            \"expressions\": [\n              {\n                \"constraint\": {\n                  \"type\": \"BOOL\",\n                  \"logic\": \"IS_TRUE\"\n                },\n                \"attribute\": {\n                  \"type\": \"PARAM\",\n                  \"param\": \"string\"\n                }\n              }\n            ]\n          }\n        }\n      ],\n      \"expression\": {\n        \"type\": \"EMPTY\"\n      },\n      \"groupBy\": [\n        {\n          \"type\": \"CONSTANT\",\n          \"constant\": \"string\"\n        }\n      ]\n    },\n    \"trend\": {\n      \"aggregateDataBy\": {\n        \"type\": \"YEARS\",\n        \"value\": 0\n      },\n      \"dateFilter\": {\n        \"type\": \"ABSOLUTE\",\n        \"from\": \"2019-08-24T14:15:22Z\",\n        \"to\": \"2019-08-24T14:15:22Z\",\n        \"filter\": {\n          \"type\": \"DAILY\",\n          \"nestingType\": \"IN_PLACE\",\n          \"from\": \"string\",\n          \"to\": \"string\",\n          \"inverted\": false\n        }\n      },\n      \"trendDefinitions\": [\n        {\n          \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n          \"title\": \"string\",\n          \"description\": \"string\",\n          \"action\": {\n            \"id\": 0,\n            \"name\": \"page.visit\"\n          },\n          \"expressions\": [\n            {\n              \"constraint\": {\n                \"type\": \"BOOL\",\n                \"logic\": \"IS_TRUE\"\n              },\n              \"attribute\": {\n                \"type\": \"PARAM\",\n                \"param\": \"string\"\n              }\n            }\n          ],\n          \"tabIndex\": 0,\n          \"aggregationType\": \"EVENT\",\n          \"chartType\": \"COLUMN\"\n        }\n      ]\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/trends\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/trends\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    filter: {\n      matching: true,\n      expressions: [\n        {\n          type: 'ATTRIBUTE',\n          name: 'string',\n          matching: true,\n          attribute: {\n            expressions: [\n              {\n                constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                attribute: {type: 'PARAM', param: 'string'}\n              }\n            ]\n          }\n        }\n      ],\n      expression: {type: 'EMPTY'},\n      groupBy: [{type: 'CONSTANT', constant: 'string'}]\n    },\n    trend: {\n      aggregateDataBy: {type: 'YEARS', value: 0},\n      dateFilter: {\n        type: 'ABSOLUTE',\n        from: '2019-08-24T14:15:22Z',\n        to: '2019-08-24T14:15:22Z',\n        filter: {\n          type: 'DAILY',\n          nestingType: 'IN_PLACE',\n          from: 'string',\n          to: 'string',\n          inverted: false\n        }\n      },\n      trendDefinitions: [\n        {\n          id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n          title: 'string',\n          description: 'string',\n          action: {id: 0, name: 'page.visit'},\n          expressions: [\n            {\n              constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n              attribute: {type: 'PARAM', param: 'string'}\n            }\n          ],\n          tabIndex: 0,\n          aggregationType: 'EVENT',\n          chartType: 'COLUMN'\n        }\n      ]\n    }\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/trends');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"trend\":{\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"trendDefinitions\":[{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/trends\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"trend\\\":{\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"trendDefinitions\\\":[{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"tabIndex\\\":0,\\\"aggregationType\\\":\\\"EVENT\\\",\\\"chartType\\\":\\\"COLUMN\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/trends/{AnalysisId}":{"get":{"tags":["Analytics: Trends"],"summary":"Get trend details","description":"Retrieve the definition of a single trend\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_TRENDS_READ`, `ANALYTICS_BACKEND_TREND_READ`\n\n**User role permission required:** `analytics_trends: read`\n","operationId":"analytics2-trend-get","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"responses":{"200":{"description":"Details of a trend","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-TrendView"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trend-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Analytics: Trends"],"summary":"Update trend","description":"Update an existing trend\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_TRENDS_UPDATE`, `ANALYTICS_BACKEND_TREND_UPDATE`\n\n**User role permission required:** `analytics_trends: update`\n","operationId":"analytics2-trend-update","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-TrendRequest"}}}},"responses":{"200":{"description":"Trend updated"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trend-update"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"trend\":{\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"trendDefinitions\":[{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"trend\\\":{\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"trendDefinitions\\\":[{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"tabIndex\\\":0,\\\"aggregationType\\\":\\\"EVENT\\\",\\\"chartType\\\":\\\"COLUMN\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"filter\": {\n      \"matching\": true,\n      \"expressions\": [\n        {\n          \"type\": \"ATTRIBUTE\",\n          \"name\": \"string\",\n          \"matching\": true,\n          \"attribute\": {\n            \"expressions\": [\n              {\n                \"constraint\": {\n                  \"type\": \"BOOL\",\n                  \"logic\": \"IS_TRUE\"\n                },\n                \"attribute\": {\n                  \"type\": \"PARAM\",\n                  \"param\": \"string\"\n                }\n              }\n            ]\n          }\n        }\n      ],\n      \"expression\": {\n        \"type\": \"EMPTY\"\n      },\n      \"groupBy\": [\n        {\n          \"type\": \"CONSTANT\",\n          \"constant\": \"string\"\n        }\n      ]\n    },\n    \"trend\": {\n      \"aggregateDataBy\": {\n        \"type\": \"YEARS\",\n        \"value\": 0\n      },\n      \"dateFilter\": {\n        \"type\": \"ABSOLUTE\",\n        \"from\": \"2019-08-24T14:15:22Z\",\n        \"to\": \"2019-08-24T14:15:22Z\",\n        \"filter\": {\n          \"type\": \"DAILY\",\n          \"nestingType\": \"IN_PLACE\",\n          \"from\": \"string\",\n          \"to\": \"string\",\n          \"inverted\": false\n        }\n      },\n      \"trendDefinitions\": [\n        {\n          \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n          \"title\": \"string\",\n          \"description\": \"string\",\n          \"action\": {\n            \"id\": 0,\n            \"name\": \"page.visit\"\n          },\n          \"expressions\": [\n            {\n              \"constraint\": {\n                \"type\": \"BOOL\",\n                \"logic\": \"IS_TRUE\"\n              },\n              \"attribute\": {\n                \"type\": \"PARAM\",\n                \"param\": \"string\"\n              }\n            }\n          ],\n          \"tabIndex\": 0,\n          \"aggregationType\": \"EVENT\",\n          \"chartType\": \"COLUMN\"\n        }\n      ]\n    }\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    filter: {\n      matching: true,\n      expressions: [\n        {\n          type: 'ATTRIBUTE',\n          name: 'string',\n          matching: true,\n          attribute: {\n            expressions: [\n              {\n                constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                attribute: {type: 'PARAM', param: 'string'}\n              }\n            ]\n          }\n        }\n      ],\n      expression: {type: 'EMPTY'},\n      groupBy: [{type: 'CONSTANT', constant: 'string'}]\n    },\n    trend: {\n      aggregateDataBy: {type: 'YEARS', value: 0},\n      dateFilter: {\n        type: 'ABSOLUTE',\n        from: '2019-08-24T14:15:22Z',\n        to: '2019-08-24T14:15:22Z',\n        filter: {\n          type: 'DAILY',\n          nestingType: 'IN_PLACE',\n          from: 'string',\n          to: 'string',\n          inverted: false\n        }\n      },\n      trendDefinitions: [\n        {\n          id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n          title: 'string',\n          description: 'string',\n          action: {id: 0, name: 'page.visit'},\n          expressions: [\n            {\n              constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n              attribute: {type: 'PARAM', param: 'string'}\n            }\n          ],\n          tabIndex: 0,\n          aggregationType: 'EVENT',\n          chartType: 'COLUMN'\n        }\n      ]\n    }\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"trend\":{\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"trendDefinitions\":[{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"trend\\\":{\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"trendDefinitions\\\":[{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"tabIndex\\\":0,\\\"aggregationType\\\":\\\"EVENT\\\",\\\"chartType\\\":\\\"COLUMN\\\"}]}},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]},"delete":{"tags":["Analytics: Trends"],"summary":"Delete trend","description":"Delete a trend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_TRENDS_DELETE`, `ANALYTICS_BACKEND_TREND_DELETE`\n\n**User role permission required:** `analytics_trends: delete`\n","operationId":"analytics2-trend-delete","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"responses":{"204":{"description":"Trend deleted"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-trend-delete"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/analytics/%7BNamespace%7D/trends/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/analytics/analytics/v2/trends/{AnalysisId}/recalculate/override":{"post":{"tags":["Analytics: Trends"],"summary":"Calculate trend with parameter override","description":"Recalculate a trend with new parameters and/or variable (dynamic key) values.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_TREND_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-calculate-trend-with-override","parameters":[{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-OverrideQueryRequest"}}}},"responses":{"200":{"description":"Trend calculation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-TrendSignedCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-calculate-trend-with-override"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v2/trends/%7BAnalysisId%7D/recalculate/override \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"title\":\"string\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"title\\\":\\\"string\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}],\\\"overrideNested\\\":false}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v2/trends/%7BAnalysisId%7D/recalculate/override\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"title\": \"string\",\n  \"dateFilter\": {\n    \"type\": \"ABSOLUTE\",\n    \"from\": \"2019-08-24T14:15:22Z\",\n    \"to\": \"2019-08-24T14:15:22Z\",\n    \"filter\": {\n      \"type\": \"DAILY\",\n      \"nestingType\": \"IN_PLACE\",\n      \"from\": \"string\",\n      \"to\": \"string\",\n      \"inverted\": false\n    }\n  },\n  \"aggregateDataBy\": {\n    \"type\": \"YEARS\",\n    \"value\": 0\n  },\n  \"filter\": {\n    \"matching\": true,\n    \"expressions\": [\n      {\n        \"type\": \"ATTRIBUTE\",\n        \"name\": \"string\",\n        \"matching\": true,\n        \"attribute\": {\n          \"expressions\": [\n            {\n              \"constraint\": {\n                \"type\": \"BOOL\",\n                \"logic\": \"IS_TRUE\"\n              },\n              \"attribute\": {\n                \"type\": \"PARAM\",\n                \"param\": \"string\"\n              }\n            }\n          ]\n        }\n      }\n    ],\n    \"expression\": {\n      \"type\": \"EMPTY\"\n    },\n    \"groupBy\": [\n      {\n        \"type\": \"CONSTANT\",\n        \"constant\": \"string\"\n      }\n    ]\n  },\n  \"variables\": [\n    {\n      \"name\": \"string\",\n      \"value\": \"example-string-value\"\n    }\n  ],\n  \"overrideNested\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v2/trends/%7BAnalysisId%7D/recalculate/override\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v2/trends/%7BAnalysisId%7D/recalculate/override\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  title: 'string',\n  dateFilter: {\n    type: 'ABSOLUTE',\n    from: '2019-08-24T14:15:22Z',\n    to: '2019-08-24T14:15:22Z',\n    filter: {\n      type: 'DAILY',\n      nestingType: 'IN_PLACE',\n      from: 'string',\n      to: 'string',\n      inverted: false\n    }\n  },\n  aggregateDataBy: {type: 'YEARS', value: 0},\n  filter: {\n    matching: true,\n    expressions: [\n      {\n        type: 'ATTRIBUTE',\n        name: 'string',\n        matching: true,\n        attribute: {\n          expressions: [\n            {\n              constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n              attribute: {type: 'PARAM', param: 'string'}\n            }\n          ]\n        }\n      }\n    ],\n    expression: {type: 'EMPTY'},\n    groupBy: [{type: 'CONSTANT', constant: 'string'}]\n  },\n  variables: [{name: 'string', value: 'example-string-value'}],\n  overrideNested: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v2/trends/%7BAnalysisId%7D/recalculate/override');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"title\":\"string\",\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"overrideNested\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v2/trends/%7BAnalysisId%7D/recalculate/override\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"title\\\":\\\"string\\\",\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"variables\\\":[{\\\"name\\\":\\\"string\\\",\\\"value\\\":\\\"example-string-value\\\"}],\\\"overrideNested\\\":false}\")\n  .asString();"}]}},"/analytics/analytics/v2/trends/preview":{"post":{"tags":["Analytics: Trends"],"summary":"Preview trend calculation","operationId":"analytics2-preview-trend","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"analysis":{"$ref":"#/components/schemas/analytics-TrendAnalysisRequest"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["analysis"]}}}},"responses":{"200":{"description":"Calculation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-TrendSignedCalculationResponse"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Trends/operation/analytics2-preview-trend"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_TREND_READ`\n\n**User role permission required:** `analytics: read`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/analytics/v2/trends/preview \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"trend\":{\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"trendDefinitions\":[{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}},\"tags\":[\"string\"]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"trend\\\":{\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"trendDefinitions\\\":[{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"tabIndex\\\":0,\\\"aggregationType\\\":\\\"EVENT\\\",\\\"chartType\\\":\\\"COLUMN\\\"}]}},\\\"tags\\\":[\\\"string\\\"]},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/analytics/v2/trends/preview\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"analysis\": {\n      \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n      \"title\": \"string\",\n      \"description\": \"string\",\n      \"filter\": {\n        \"matching\": true,\n        \"expressions\": [\n          {\n            \"type\": \"ATTRIBUTE\",\n            \"name\": \"string\",\n            \"matching\": true,\n            \"attribute\": {\n              \"expressions\": [\n                {\n                  \"constraint\": {\n                    \"type\": \"BOOL\",\n                    \"logic\": \"IS_TRUE\"\n                  },\n                  \"attribute\": {\n                    \"type\": \"PARAM\",\n                    \"param\": \"string\"\n                  }\n                }\n              ]\n            }\n          }\n        ],\n        \"expression\": {\n          \"type\": \"EMPTY\"\n        },\n        \"groupBy\": [\n          {\n            \"type\": \"CONSTANT\",\n            \"constant\": \"string\"\n          }\n        ]\n      },\n      \"trend\": {\n        \"aggregateDataBy\": {\n          \"type\": \"YEARS\",\n          \"value\": 0\n        },\n        \"dateFilter\": {\n          \"type\": \"ABSOLUTE\",\n          \"from\": \"2019-08-24T14:15:22Z\",\n          \"to\": \"2019-08-24T14:15:22Z\",\n          \"filter\": {\n            \"type\": \"DAILY\",\n            \"nestingType\": \"IN_PLACE\",\n            \"from\": \"string\",\n            \"to\": \"string\",\n            \"inverted\": false\n          }\n        },\n        \"trendDefinitions\": [\n          {\n            \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n            \"title\": \"string\",\n            \"description\": \"string\",\n            \"action\": {\n              \"id\": 0,\n              \"name\": \"page.visit\"\n            },\n            \"expressions\": [\n              {\n                \"constraint\": {\n                  \"type\": \"BOOL\",\n                  \"logic\": \"IS_TRUE\"\n                },\n                \"attribute\": {\n                  \"type\": \"PARAM\",\n                  \"param\": \"string\"\n                }\n              }\n            ],\n            \"tabIndex\": 0,\n            \"aggregationType\": \"EVENT\",\n            \"chartType\": \"COLUMN\"\n          }\n        ]\n      }\n    },\n    \"tags\": [\n      \"string\"\n    ]\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/analytics/v2/trends/preview\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/analytics/v2/trends/preview\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    analysis: {\n      id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n      title: 'string',\n      description: 'string',\n      filter: {\n        matching: true,\n        expressions: [\n          {\n            type: 'ATTRIBUTE',\n            name: 'string',\n            matching: true,\n            attribute: {\n              expressions: [\n                {\n                  constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                  attribute: {type: 'PARAM', param: 'string'}\n                }\n              ]\n            }\n          }\n        ],\n        expression: {type: 'EMPTY'},\n        groupBy: [{type: 'CONSTANT', constant: 'string'}]\n      },\n      trend: {\n        aggregateDataBy: {type: 'YEARS', value: 0},\n        dateFilter: {\n          type: 'ABSOLUTE',\n          from: '2019-08-24T14:15:22Z',\n          to: '2019-08-24T14:15:22Z',\n          filter: {\n            type: 'DAILY',\n            nestingType: 'IN_PLACE',\n            from: 'string',\n            to: 'string',\n            inverted: false\n          }\n        },\n        trendDefinitions: [\n          {\n            id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n            title: 'string',\n            description: 'string',\n            action: {id: 0, name: 'page.visit'},\n            expressions: [\n              {\n                constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                attribute: {type: 'PARAM', param: 'string'}\n              }\n            ],\n            tabIndex: 0,\n            aggregationType: 'EVENT',\n            chartType: 'COLUMN'\n          }\n        ]\n      }\n    },\n    tags: ['string']\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/analytics/v2/trends/preview');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"trend\":{\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0},\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"trendDefinitions\":[{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"tabIndex\":0,\"aggregationType\":\"EVENT\",\"chartType\":\"COLUMN\"}]}},\"tags\":[\"string\"]},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/analytics/v2/trends/preview\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"trend\\\":{\\\"aggregateDataBy\\\":{\\\"type\\\":\\\"YEARS\\\",\\\"value\\\":0},\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"trendDefinitions\\\":[{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"tabIndex\\\":0,\\\"aggregationType\\\":\\\"EVENT\\\",\\\"chartType\\\":\\\"COLUMN\\\"}]}},\\\"tags\\\":[\\\"string\\\"]},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/sankeys":{"get":{"tags":["Analytics: Sankeys"],"summary":"List Sankeys","description":"Returns a paginated list of Sankey analyses.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_SANKEYS_LIST_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-sankeys-list","parameters":[{"$ref":"#/components/parameters/analytics-page"},{"$ref":"#/components/parameters/analytics-limit"},{"$ref":"#/components/parameters/analytics-search"},{"$ref":"#/components/parameters/analytics-sortBy"},{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-directoryId"},{"$ref":"#/components/parameters/analytics-ids"}],"responses":{"200":{"description":"List of sankeys","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"List of sankeys","items":{"$ref":"#/components/schemas/analytics-ListAnalyticsItemCommon"}},"meta":{"$ref":"#/components/schemas/analytics-Meta"}},"required":["data"]}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/analytics/%7BNamespace%7D/sankeys?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/sankeys?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/sankeys?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/sankeys?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/sankeys');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'sortBy' => 'name:asc',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'ids' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/sankeys?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=name%3Aasc&directoryId=SOME_STRING_VALUE&ids=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Analytics: Sankeys"],"summary":"Create Sankey analysis","description":"Create sankey analysis\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_SANKEYS_CREATE`, `ANALYTICS_BACKEND_SANKEY_CREATE`\n\n**User role permission required:** `analytics: create`\n","operationId":"analytics2-sankeys-create","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-CreateRequestSankeyAnalysis"}}}},"responses":{"200":{"description":"ID of the created analysis","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-Id"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-create"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/sankeys \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"layer\":0,\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"drillDownCount\":0,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"sourceEvent\\\":{\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]},\\\"reverseOrder\\\":true,\\\"numberOfSteps\\\":0,\\\"numberOfPaths\\\":0,\\\"drillDown\\\":[{\\\"layer\\\":0,\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"drillDownCount\\\":0,\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"eventFilters\\\":[{\\\"title\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"excludeEvents\\\":true,\\\"firstOccurrenceOnly\\\":true},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/analytics/%7BNamespace%7D/sankeys\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"sourceEvent\": {\n      \"action\": {\n        \"id\": 0,\n        \"name\": \"page.visit\"\n      },\n      \"expressions\": [\n        {\n          \"constraint\": {\n            \"type\": \"BOOL\",\n            \"logic\": \"IS_TRUE\"\n          },\n          \"attribute\": {\n            \"type\": \"PARAM\",\n            \"param\": \"string\"\n          }\n        }\n      ]\n    },\n    \"reverseOrder\": true,\n    \"numberOfSteps\": 0,\n    \"numberOfPaths\": 0,\n    \"drillDown\": [\n      {\n        \"layer\": 0,\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"attribute\": {\n          \"type\": \"PARAM\",\n          \"param\": \"string\"\n        }\n      }\n    ],\n    \"drillDownCount\": 0,\n    \"dateFilter\": {\n      \"type\": \"ABSOLUTE\",\n      \"from\": \"2019-08-24T14:15:22Z\",\n      \"to\": \"2019-08-24T14:15:22Z\",\n      \"filter\": {\n        \"type\": \"DAILY\",\n        \"nestingType\": \"IN_PLACE\",\n        \"from\": \"string\",\n        \"to\": \"string\",\n        \"inverted\": false\n      }\n    },\n    \"filter\": {\n      \"matching\": true,\n      \"expressions\": [\n        {\n          \"type\": \"ATTRIBUTE\",\n          \"name\": \"string\",\n          \"matching\": true,\n          \"attribute\": {\n            \"expressions\": [\n              {\n                \"constraint\": {\n                  \"type\": \"BOOL\",\n                  \"logic\": \"IS_TRUE\"\n                },\n                \"attribute\": {\n                  \"type\": \"PARAM\",\n                  \"param\": \"string\"\n                }\n              }\n            ]\n          }\n        }\n      ],\n      \"expression\": {\n        \"type\": \"EMPTY\"\n      },\n      \"groupBy\": [\n        {\n          \"type\": \"CONSTANT\",\n          \"constant\": \"string\"\n        }\n      ]\n    },\n    \"eventFilters\": [\n      {\n        \"title\": \"string\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"expressions\": [\n          {\n            \"constraint\": {\n              \"type\": \"BOOL\",\n              \"logic\": \"IS_TRUE\"\n            },\n            \"attribute\": {\n              \"type\": \"PARAM\",\n              \"param\": \"string\"\n            }\n          }\n        ]\n      }\n    ],\n    \"excludeEvents\": true,\n    \"firstOccurrenceOnly\": true\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/analytics/%7BNamespace%7D/sankeys\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/sankeys\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    sourceEvent: {\n      action: {id: 0, name: 'page.visit'},\n      expressions: [\n        {\n          constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n          attribute: {type: 'PARAM', param: 'string'}\n        }\n      ]\n    },\n    reverseOrder: true,\n    numberOfSteps: 0,\n    numberOfPaths: 0,\n    drillDown: [\n      {\n        layer: 0,\n        action: {id: 0, name: 'page.visit'},\n        attribute: {type: 'PARAM', param: 'string'}\n      }\n    ],\n    drillDownCount: 0,\n    dateFilter: {\n      type: 'ABSOLUTE',\n      from: '2019-08-24T14:15:22Z',\n      to: '2019-08-24T14:15:22Z',\n      filter: {\n        type: 'DAILY',\n        nestingType: 'IN_PLACE',\n        from: 'string',\n        to: 'string',\n        inverted: false\n      }\n    },\n    filter: {\n      matching: true,\n      expressions: [\n        {\n          type: 'ATTRIBUTE',\n          name: 'string',\n          matching: true,\n          attribute: {\n            expressions: [\n              {\n                constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                attribute: {type: 'PARAM', param: 'string'}\n              }\n            ]\n          }\n        }\n      ],\n      expression: {type: 'EMPTY'},\n      groupBy: [{type: 'CONSTANT', constant: 'string'}]\n    },\n    eventFilters: [\n      {\n        title: 'string',\n        action: {id: 0, name: 'page.visit'},\n        expressions: [\n          {\n            constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n            attribute: {type: 'PARAM', param: 'string'}\n          }\n        ]\n      }\n    ],\n    excludeEvents: true,\n    firstOccurrenceOnly: true\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/sankeys');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"layer\":0,\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"drillDownCount\":0,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/analytics/%7BNamespace%7D/sankeys\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"sourceEvent\\\":{\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]},\\\"reverseOrder\\\":true,\\\"numberOfSteps\\\":0,\\\"numberOfPaths\\\":0,\\\"drillDown\\\":[{\\\"layer\\\":0,\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"drillDownCount\\\":0,\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"eventFilters\\\":[{\\\"title\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"excludeEvents\\\":true,\\\"firstOccurrenceOnly\\\":true},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]}},"/analytics/{Namespace}/sankeys/{AnalysisId}":{"get":{"tags":["Analytics: Sankeys"],"summary":"Get Sankey details","description":"Retrieve the details of a Sankey analysis\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ANALYTICS_BACKEND_SANKEYS_LIST_READ`\n\n**User role permission required:** `analytics: read`\n","operationId":"analytics2-sankeys-get","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"responses":{"200":{"description":"Sankey analysis details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-SankeyView"}}}},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Analytics: Sankeys"],"summary":"Update Sankey","description":"Update an existing Sankey analysis\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_SANKEYS_UPDATE`, `ANALYTICS_BACKEND_SANKEY_UPDATE`\n\n**User role permission required:** `analytics: update`\n","operationId":"analytics2-sankeys-update","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-CreateRequestSankeyAnalysis"}}}},"responses":{"200":{"description":"Analysis updated"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-update"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"layer\":0,\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"drillDownCount\":0,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"sourceEvent\\\":{\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]},\\\"reverseOrder\\\":true,\\\"numberOfSteps\\\":0,\\\"numberOfPaths\\\":0,\\\"drillDown\\\":[{\\\"layer\\\":0,\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"drillDownCount\\\":0,\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"eventFilters\\\":[{\\\"title\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"excludeEvents\\\":true,\\\"firstOccurrenceOnly\\\":true},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"analysis\": {\n    \"id\": \"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\n    \"title\": \"string\",\n    \"description\": \"string\",\n    \"sourceEvent\": {\n      \"action\": {\n        \"id\": 0,\n        \"name\": \"page.visit\"\n      },\n      \"expressions\": [\n        {\n          \"constraint\": {\n            \"type\": \"BOOL\",\n            \"logic\": \"IS_TRUE\"\n          },\n          \"attribute\": {\n            \"type\": \"PARAM\",\n            \"param\": \"string\"\n          }\n        }\n      ]\n    },\n    \"reverseOrder\": true,\n    \"numberOfSteps\": 0,\n    \"numberOfPaths\": 0,\n    \"drillDown\": [\n      {\n        \"layer\": 0,\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"attribute\": {\n          \"type\": \"PARAM\",\n          \"param\": \"string\"\n        }\n      }\n    ],\n    \"drillDownCount\": 0,\n    \"dateFilter\": {\n      \"type\": \"ABSOLUTE\",\n      \"from\": \"2019-08-24T14:15:22Z\",\n      \"to\": \"2019-08-24T14:15:22Z\",\n      \"filter\": {\n        \"type\": \"DAILY\",\n        \"nestingType\": \"IN_PLACE\",\n        \"from\": \"string\",\n        \"to\": \"string\",\n        \"inverted\": false\n      }\n    },\n    \"filter\": {\n      \"matching\": true,\n      \"expressions\": [\n        {\n          \"type\": \"ATTRIBUTE\",\n          \"name\": \"string\",\n          \"matching\": true,\n          \"attribute\": {\n            \"expressions\": [\n              {\n                \"constraint\": {\n                  \"type\": \"BOOL\",\n                  \"logic\": \"IS_TRUE\"\n                },\n                \"attribute\": {\n                  \"type\": \"PARAM\",\n                  \"param\": \"string\"\n                }\n              }\n            ]\n          }\n        }\n      ],\n      \"expression\": {\n        \"type\": \"EMPTY\"\n      },\n      \"groupBy\": [\n        {\n          \"type\": \"CONSTANT\",\n          \"constant\": \"string\"\n        }\n      ]\n    },\n    \"eventFilters\": [\n      {\n        \"title\": \"string\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"expressions\": [\n          {\n            \"constraint\": {\n              \"type\": \"BOOL\",\n              \"logic\": \"IS_TRUE\"\n            },\n            \"attribute\": {\n              \"type\": \"PARAM\",\n              \"param\": \"string\"\n            }\n          }\n        ]\n      }\n    ],\n    \"excludeEvents\": true,\n    \"firstOccurrenceOnly\": true\n  },\n  \"inlineAnalytics\": [\n    {\n      \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n      \"analyticType\": \"EXPRESSION\",\n      \"analysis\": {\n        \"type\": \"EVENT\",\n        \"action\": {\n          \"id\": 0,\n          \"name\": \"page.visit\"\n        },\n        \"name\": \"string\",\n        \"description\": \"string\",\n        \"expression\": {\n          \"type\": \"VALUE\",\n          \"title\": \"title\",\n          \"value\": {\n            \"type\": \"CONSTANT\",\n            \"constant\": 10\n          }\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  analysis: {\n    id: '5370bf3c-2dfa-4e89-98ff-07100cffee6c',\n    title: 'string',\n    description: 'string',\n    sourceEvent: {\n      action: {id: 0, name: 'page.visit'},\n      expressions: [\n        {\n          constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n          attribute: {type: 'PARAM', param: 'string'}\n        }\n      ]\n    },\n    reverseOrder: true,\n    numberOfSteps: 0,\n    numberOfPaths: 0,\n    drillDown: [\n      {\n        layer: 0,\n        action: {id: 0, name: 'page.visit'},\n        attribute: {type: 'PARAM', param: 'string'}\n      }\n    ],\n    drillDownCount: 0,\n    dateFilter: {\n      type: 'ABSOLUTE',\n      from: '2019-08-24T14:15:22Z',\n      to: '2019-08-24T14:15:22Z',\n      filter: {\n        type: 'DAILY',\n        nestingType: 'IN_PLACE',\n        from: 'string',\n        to: 'string',\n        inverted: false\n      }\n    },\n    filter: {\n      matching: true,\n      expressions: [\n        {\n          type: 'ATTRIBUTE',\n          name: 'string',\n          matching: true,\n          attribute: {\n            expressions: [\n              {\n                constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n                attribute: {type: 'PARAM', param: 'string'}\n              }\n            ]\n          }\n        }\n      ],\n      expression: {type: 'EMPTY'},\n      groupBy: [{type: 'CONSTANT', constant: 'string'}]\n    },\n    eventFilters: [\n      {\n        title: 'string',\n        action: {id: 0, name: 'page.visit'},\n        expressions: [\n          {\n            constraint: {type: 'BOOL', logic: 'IS_TRUE'},\n            attribute: {type: 'PARAM', param: 'string'}\n          }\n        ]\n      }\n    ],\n    excludeEvents: true,\n    firstOccurrenceOnly: true\n  },\n  inlineAnalytics: [\n    {\n      id: '497f6eca-6276-4993-bfeb-53cbbbba6f08',\n      analyticType: 'EXPRESSION',\n      analysis: {\n        type: 'EVENT',\n        action: {id: 0, name: 'page.visit'},\n        name: 'string',\n        description: 'string',\n        expression: {type: 'VALUE', title: 'title', value: {type: 'CONSTANT', constant: 10}}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"analysis\":{\"id\":\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\",\"title\":\"string\",\"description\":\"string\",\"sourceEvent\":{\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]},\"reverseOrder\":true,\"numberOfSteps\":0,\"numberOfPaths\":0,\"drillDown\":[{\"layer\":0,\"action\":{\"id\":0,\"name\":\"page.visit\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}],\"drillDownCount\":0,\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"filter\":{\"matching\":true,\"expressions\":[{\"type\":\"ATTRIBUTE\",\"name\":\"string\",\"matching\":true,\"attribute\":{\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}}],\"expression\":{\"type\":\"EMPTY\"},\"groupBy\":[{\"type\":\"CONSTANT\",\"constant\":\"string\"}]},\"eventFilters\":[{\"title\":\"string\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"expressions\":[{\"constraint\":{\"type\":\"BOOL\",\"logic\":\"IS_TRUE\"},\"attribute\":{\"type\":\"PARAM\",\"param\":\"string\"}}]}],\"excludeEvents\":true,\"firstOccurrenceOnly\":true},\"inlineAnalytics\":[{\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\"analyticType\":\"EXPRESSION\",\"analysis\":{\"type\":\"EVENT\",\"action\":{\"id\":0,\"name\":\"page.visit\"},\"name\":\"string\",\"description\":\"string\",\"expression\":{\"type\":\"VALUE\",\"title\":\"title\",\"value\":{\"type\":\"CONSTANT\",\"constant\":10}}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"analysis\\\":{\\\"id\\\":\\\"5370bf3c-2dfa-4e89-98ff-07100cffee6c\\\",\\\"title\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"sourceEvent\\\":{\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]},\\\"reverseOrder\\\":true,\\\"numberOfSteps\\\":0,\\\"numberOfPaths\\\":0,\\\"drillDown\\\":[{\\\"layer\\\":0,\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}],\\\"drillDownCount\\\":0,\\\"dateFilter\\\":{\\\"type\\\":\\\"ABSOLUTE\\\",\\\"from\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"to\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"filter\\\":{\\\"type\\\":\\\"DAILY\\\",\\\"nestingType\\\":\\\"IN_PLACE\\\",\\\"from\\\":\\\"string\\\",\\\"to\\\":\\\"string\\\",\\\"inverted\\\":false}},\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"name\\\":\\\"string\\\",\\\"matching\\\":true,\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}}],\\\"expression\\\":{\\\"type\\\":\\\"EMPTY\\\"},\\\"groupBy\\\":[{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":\\\"string\\\"}]},\\\"eventFilters\\\":[{\\\"title\\\":\\\"string\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"string\\\"}}]}],\\\"excludeEvents\\\":true,\\\"firstOccurrenceOnly\\\":true},\\\"inlineAnalytics\\\":[{\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\",\\\"analyticType\\\":\\\"EXPRESSION\\\",\\\"analysis\\\":{\\\"type\\\":\\\"EVENT\\\",\\\"action\\\":{\\\"id\\\":0,\\\"name\\\":\\\"page.visit\\\"},\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"expression\\\":{\\\"type\\\":\\\"VALUE\\\",\\\"title\\\":\\\"title\\\",\\\"value\\\":{\\\"type\\\":\\\"CONSTANT\\\",\\\"constant\\\":10}}}}]}\")\n  .asString();"}]},"delete":{"tags":["Analytics: Sankeys"],"summary":"Delete Sankey","description":"Delete a Sankey analysis\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `ANALYTICS_BACKEND_SANKEYS_DELETE`, `ANALYTICS_BACKEND_SANKEY_DELETE`\n\n**User role permission required:** `analytics: delete`\n","operationId":"analytics2-sankeys-delete","parameters":[{"$ref":"#/components/parameters/analytics-pathNamespace"},{"$ref":"#/components/parameters/analytics-AnalyticIdPathParam"}],"responses":{"204":{"description":"Deleted sankeys analysis"},"4XX":{"$ref":"#/components/responses/analytics-genericError"},"5XX":{"$ref":"#/components/responses/analytics-genericError"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/analytics-suite#tag/Analytics:-Sankeys/operation/analytics2-sankeys-delete"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/analytics/%7BNamespace%7D/sankeys/%7BAnalysisId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/transactions":{"post":{"summary":"Create a transaction","description":"Create a transaction record in the database.\n\nFor each transaction, a `transaction.charge` event is generated automatically. In addition, each item in the `products` array produces a `product.buy` event.\n\nAll monetary values must use the same currency and be greater\nthan or equal to zero. `discountAmount` must be greater than zero\nor omitted.\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_TRANSACTION_CREATE`\n","operationId":"CreateATransaction","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-CreateatransactionRequest-apiv4"}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"timestamp":"2020-10-28T12:14:45.364+00:00","status":400,"error":"Bad Request","message":"JSON parse error: Missing property: 'currency'; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Missing property: 'currency'\n at [Source: (PushbackInputStream); line: 13, column: 14] (through reference chain: com.synerise.api.endpoint.transactions.domain.model.IdentifiedTransactionData[\"products\"]->java.util.ArrayList[0]->com.synerise.api.endpoint.transactions.domain.model.ProductData[\"finalUnitPrice\"])","path":"/transactions"}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"$ref":"#/components/responses/api-service-404-pii"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/CreateATransaction"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/transactions \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"discountAmount\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"metadata\\\":{\\\"promotionCode\\\":\\\"string\\\",\\\"quantityToRedeem\\\":0},\\\"orderId\\\":\\\"be466362-71e9-4bdd-ad11-bfacead5276b\\\",\\\"paymentInfo\\\":{\\\"method\\\":\\\"CASH\\\"},\\\"products\\\":[{\\\"finalUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"name\\\":\\\"Soft drink\\\",\\\"sku\\\":\\\"189784563455\\\",\\\"categories\\\":[\\\"string\\\"],\\\"image\\\":\\\"string\\\",\\\"url\\\":\\\"string\\\",\\\"netUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"tax\\\":0.1,\\\"quantity\\\":2.5,\\\"regularPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"discountPrice\\\":{\\\"amount\\\":15.5,\\\"currency\\\":\\\"USD\\\"},\\\"discountPercent\\\":0.1,\\\"property1\\\":null,\\\"property2\\\":null}],\\\"recordedAt\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"revenue\\\":{\\\"amount\\\":64.25,\\\"currency\\\":\\\"USD\\\"},\\\"value\\\":{\\\"amount\\\":112.25,\\\"currency\\\":\\\"USD\\\"},\\\"source\\\":\\\"MOBILE\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\"}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/transactions\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"discountAmount\": {\n    \"amount\": 0,\n    \"currency\": \"USD\"\n  },\n  \"metadata\": {\n    \"promotionCode\": \"string\",\n    \"quantityToRedeem\": 0\n  },\n  \"orderId\": \"be466362-71e9-4bdd-ad11-bfacead5276b\",\n  \"paymentInfo\": {\n    \"method\": \"CASH\"\n  },\n  \"products\": [\n    {\n      \"finalUnitPrice\": {\n        \"amount\": 3.25,\n        \"currency\": \"USD\"\n      },\n      \"name\": \"Soft drink\",\n      \"sku\": \"189784563455\",\n      \"categories\": [\n        \"string\"\n      ],\n      \"image\": \"string\",\n      \"url\": \"string\",\n      \"netUnitPrice\": {\n        \"amount\": 3.25,\n        \"currency\": \"USD\"\n      },\n      \"tax\": 0.1,\n      \"quantity\": 2.5,\n      \"regularPrice\": {\n        \"amount\": 3.25,\n        \"currency\": \"USD\"\n      },\n      \"discountPrice\": {\n        \"amount\": 15.5,\n        \"currency\": \"USD\"\n      },\n      \"discountPercent\": 0.1,\n      \"property1\": null,\n      \"property2\": null\n    }\n  ],\n  \"recordedAt\": \"2019-02-07T09:53:56.999+00:00\",\n  \"revenue\": {\n    \"amount\": 64.25,\n    \"currency\": \"USD\"\n  },\n  \"value\": {\n    \"amount\": 112.25,\n    \"currency\": \"USD\"\n  },\n  \"source\": \"MOBILE\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/transactions\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/transactions\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  discountAmount: {amount: 0, currency: 'USD'},\n  metadata: {promotionCode: 'string', quantityToRedeem: 0},\n  orderId: 'be466362-71e9-4bdd-ad11-bfacead5276b',\n  paymentInfo: {method: 'CASH'},\n  products: [\n    {\n      finalUnitPrice: {amount: 3.25, currency: 'USD'},\n      name: 'Soft drink',\n      sku: '189784563455',\n      categories: ['string'],\n      image: 'string',\n      url: 'string',\n      netUnitPrice: {amount: 3.25, currency: 'USD'},\n      tax: 0.1,\n      quantity: 2.5,\n      regularPrice: {amount: 3.25, currency: 'USD'},\n      discountPrice: {amount: 15.5, currency: 'USD'},\n      discountPercent: 0.1,\n      property1: null,\n      property2: null\n    }\n  ],\n  recordedAt: '2019-02-07T09:53:56.999+00:00',\n  revenue: {amount: 64.25, currency: 'USD'},\n  value: {amount: 112.25, currency: 'USD'},\n  source: 'MOBILE',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/transactions');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/transactions\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"discountAmount\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"metadata\\\":{\\\"promotionCode\\\":\\\"string\\\",\\\"quantityToRedeem\\\":0},\\\"orderId\\\":\\\"be466362-71e9-4bdd-ad11-bfacead5276b\\\",\\\"paymentInfo\\\":{\\\"method\\\":\\\"CASH\\\"},\\\"products\\\":[{\\\"finalUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"name\\\":\\\"Soft drink\\\",\\\"sku\\\":\\\"189784563455\\\",\\\"categories\\\":[\\\"string\\\"],\\\"image\\\":\\\"string\\\",\\\"url\\\":\\\"string\\\",\\\"netUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"tax\\\":0.1,\\\"quantity\\\":2.5,\\\"regularPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"discountPrice\\\":{\\\"amount\\\":15.5,\\\"currency\\\":\\\"USD\\\"},\\\"discountPercent\\\":0.1,\\\"property1\\\":null,\\\"property2\\\":null}],\\\"recordedAt\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"revenue\\\":{\\\"amount\\\":64.25,\\\"currency\\\":\\\"USD\\\"},\\\"value\\\":{\\\"amount\\\":112.25,\\\"currency\\\":\\\"USD\\\"},\\\"source\\\":\\\"MOBILE\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\"}\")\n  .asString();"}]}},"/v4/transactions/batch":{"post":{"summary":"Batch add or update transactions","description":"Enqueue a number of add/update operations in the Synerise\napplication database. \n\nFor each transaction, a `transaction.charge` event is generated automatically. In addition, each item in the `products` array produces a `product.buy` event.\n\nIf you don't have some information about a transaction, don't insert a null-value parameter - omit the parameter entirely. Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).\n\n\n\nThe body contains an array of objects to update. The objects are\nthe same as in the *Update transaction* and *Create transaction*\nendpoints.\n\n\n\nAll monetary values must use the same currency and be greater\nthan or equal to zero. `discountAmount` must be greater than zero\nor omitted.\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_BATCH_TRANSACTION_CREATE`\n","operationId":"BatchAddOrUpdateTransactions","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"An array of transactions to post or update","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/api-service-CreateatransactionRequest-apiv4"},"description":""}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"error":"Bad Request","status":400,"timestamp":"2020-10-28T12:24:24.444Z","path":"/transactions","message":"Some fields did not pass validation","errors":[{"code":14191,"field":"client","message":"Client cannot have null value"}]}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/BatchAddOrUpdateTransactions"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/transactions/batch \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[{\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"discountAmount\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"metadata\\\":{\\\"promotionCode\\\":\\\"string\\\",\\\"quantityToRedeem\\\":0},\\\"orderId\\\":\\\"be466362-71e9-4bdd-ad11-bfacead5276b\\\",\\\"paymentInfo\\\":{\\\"method\\\":\\\"CASH\\\"},\\\"products\\\":[{\\\"finalUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"name\\\":\\\"Soft drink\\\",\\\"sku\\\":\\\"189784563455\\\",\\\"categories\\\":[\\\"string\\\"],\\\"image\\\":\\\"string\\\",\\\"url\\\":\\\"string\\\",\\\"netUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"tax\\\":0.1,\\\"quantity\\\":2.5,\\\"regularPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"discountPrice\\\":{\\\"amount\\\":15.5,\\\"currency\\\":\\\"USD\\\"},\\\"discountPercent\\\":0.1,\\\"property1\\\":null,\\\"property2\\\":null}],\\\"recordedAt\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"revenue\\\":{\\\"amount\\\":64.25,\\\"currency\\\":\\\"USD\\\"},\\\"value\\\":{\\\"amount\\\":112.25,\\\"currency\\\":\\\"USD\\\"},\\\"source\\\":\\\"MOBILE\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\"}]\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/transactions/batch\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  {\n    \"client\": {\n      \"customId\": \"string\",\n      \"id\": 433230297,\n      \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n      \"email\": \"string\"\n    },\n    \"discountAmount\": {\n      \"amount\": 0,\n      \"currency\": \"USD\"\n    },\n    \"metadata\": {\n      \"promotionCode\": \"string\",\n      \"quantityToRedeem\": 0\n    },\n    \"orderId\": \"be466362-71e9-4bdd-ad11-bfacead5276b\",\n    \"paymentInfo\": {\n      \"method\": \"CASH\"\n    },\n    \"products\": [\n      {\n        \"finalUnitPrice\": {\n          \"amount\": 3.25,\n          \"currency\": \"USD\"\n        },\n        \"name\": \"Soft drink\",\n        \"sku\": \"189784563455\",\n        \"categories\": [\n          \"string\"\n        ],\n        \"image\": \"string\",\n        \"url\": \"string\",\n        \"netUnitPrice\": {\n          \"amount\": 3.25,\n          \"currency\": \"USD\"\n        },\n        \"tax\": 0.1,\n        \"quantity\": 2.5,\n        \"regularPrice\": {\n          \"amount\": 3.25,\n          \"currency\": \"USD\"\n        },\n        \"discountPrice\": {\n          \"amount\": 15.5,\n          \"currency\": \"USD\"\n        },\n        \"discountPercent\": 0.1,\n        \"property1\": null,\n        \"property2\": null\n      }\n    ],\n    \"recordedAt\": \"2019-02-07T09:53:56.999+00:00\",\n    \"revenue\": {\n      \"amount\": 64.25,\n      \"currency\": \"USD\"\n    },\n    \"value\": {\n      \"amount\": 112.25,\n      \"currency\": \"USD\"\n    },\n    \"source\": \"MOBILE\",\n    \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\"\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/transactions/batch\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/transactions/batch\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([\n  {\n    client: {\n      customId: 'string',\n      id: 433230297,\n      uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n      email: 'string'\n    },\n    discountAmount: {amount: 0, currency: 'USD'},\n    metadata: {promotionCode: 'string', quantityToRedeem: 0},\n    orderId: 'be466362-71e9-4bdd-ad11-bfacead5276b',\n    paymentInfo: {method: 'CASH'},\n    products: [\n      {\n        finalUnitPrice: {amount: 3.25, currency: 'USD'},\n        name: 'Soft drink',\n        sku: '189784563455',\n        categories: ['string'],\n        image: 'string',\n        url: 'string',\n        netUnitPrice: {amount: 3.25, currency: 'USD'},\n        tax: 0.1,\n        quantity: 2.5,\n        regularPrice: {amount: 3.25, currency: 'USD'},\n        discountPrice: {amount: 15.5, currency: 'USD'},\n        discountPercent: 0.1,\n        property1: null,\n        property2: null\n      }\n    ],\n    recordedAt: '2019-02-07T09:53:56.999+00:00',\n    revenue: {amount: 64.25, currency: 'USD'},\n    value: {amount: 112.25, currency: 'USD'},\n    source: 'MOBILE',\n    eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'\n  }\n]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/transactions/batch');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/transactions/batch\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[{\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"discountAmount\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"metadata\\\":{\\\"promotionCode\\\":\\\"string\\\",\\\"quantityToRedeem\\\":0},\\\"orderId\\\":\\\"be466362-71e9-4bdd-ad11-bfacead5276b\\\",\\\"paymentInfo\\\":{\\\"method\\\":\\\"CASH\\\"},\\\"products\\\":[{\\\"finalUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"name\\\":\\\"Soft drink\\\",\\\"sku\\\":\\\"189784563455\\\",\\\"categories\\\":[\\\"string\\\"],\\\"image\\\":\\\"string\\\",\\\"url\\\":\\\"string\\\",\\\"netUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"tax\\\":0.1,\\\"quantity\\\":2.5,\\\"regularPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"discountPrice\\\":{\\\"amount\\\":15.5,\\\"currency\\\":\\\"USD\\\"},\\\"discountPercent\\\":0.1,\\\"property1\\\":null,\\\"property2\\\":null}],\\\"recordedAt\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"revenue\\\":{\\\"amount\\\":64.25,\\\"currency\\\":\\\"USD\\\"},\\\"value\\\":{\\\"amount\\\":112.25,\\\"currency\\\":\\\"USD\\\"},\\\"source\\\":\\\"MOBILE\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\"}]\")\n  .asString();"}]}},"/v4/clients":{"post":{"summary":"Create or update a Profile","description":"Create a new profile in the Synerise application database or update an existing one. If you don't have some information about the profile, don't insert a null-value parameter - omit the parameter entirely.\n\nThis is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_CLIENT_CREATE`\n\n**User role permission required:** `client_management: create`\n","operationId":"CreateAClientInCrm","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"\nIn the request body, you must provide at least one of those identifiers: \n- `email`  \n  If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, email is NOT an identifier.\n- `phone`  \n  Phone is treated as an identifier only if no other identifier is provided. If this is the case and non-unique emails are disabled, an anonymous profile is created with a randomized email placeholder.\n- `customId`\n- `uuid`\n","content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/api-service-CreateClientRequestBody-apiv4"}]}}}},"responses":{"202":{"description":"Accepted, queued for processing"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"error":"Bad Request","status":400,"timestamp":"2019-03-18T13:15:39.84Z","path":"/clients","message":"Some fields did not pass validation","errors":[{"code":12082,"field":"countryCode","message":"Country Code must have 0 or 3 characters as per ISO format.","rejectedValue":"string"},{"code":120,"field":"avatarUrl","message":"120","rejectedValue":"string"}]}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile management"],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/CreateAClientInCrm"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/clients \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"customId\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"birthDate\\\":\\\"1987-10-24\\\",\\\"company\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"whatsAppId\\\":\\\"TestWhatsappId\\\",\\\"agreements\\\":{\\\"email\\\":false,\\\"sms\\\":false,\\\"push\\\":false,\\\"webPush\\\":false,\\\"whatsApp\\\":false,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/clients\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\",\n  \"phone\": \"+48111222333\",\n  \"customId\": \"string\",\n  \"firstName\": \"string\",\n  \"lastName\": \"string\",\n  \"displayName\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"avatarUrl\": \"string\",\n  \"birthDate\": \"1987-10-24\",\n  \"company\": \"string\",\n  \"city\": \"string\",\n  \"address\": \"string\",\n  \"zipCode\": \"string\",\n  \"province\": \"string\",\n  \"countryCode\": \"PL\",\n  \"sex\": \"FEMALE\",\n  \"whatsAppId\": \"TestWhatsappId\",\n  \"agreements\": {\n    \"email\": false,\n    \"sms\": false,\n    \"push\": false,\n    \"webPush\": false,\n    \"whatsApp\": false,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/clients\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  email: 'string',\n  phone: '+48111222333',\n  customId: 'string',\n  firstName: 'string',\n  lastName: 'string',\n  displayName: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  avatarUrl: 'string',\n  birthDate: '1987-10-24',\n  company: 'string',\n  city: 'string',\n  address: 'string',\n  zipCode: 'string',\n  province: 'string',\n  countryCode: 'PL',\n  sex: 'FEMALE',\n  whatsAppId: 'TestWhatsappId',\n  agreements: {\n    email: false,\n    sms: false,\n    push: false,\n    webPush: false,\n    whatsApp: false,\n    bluetooth: false,\n    rfid: false,\n    wifi: false\n  },\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/clients\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"customId\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"birthDate\\\":\\\"1987-10-24\\\",\\\"company\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"whatsAppId\\\":\\\"TestWhatsappId\\\",\\\"agreements\\\":{\\\"email\\\":false,\\\"sms\\\":false,\\\"push\\\":false,\\\"webPush\\\":false,\\\"whatsApp\\\":false,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/v4/clients/merge/from/custom-ids/{sourceCustomIDs}/to/custom-id/{targetCustomID}":{"post":{"summary":"Merge profiles by customId","description":"Moves profile UUIDs to a single profile (which must already exist) and removes the profiles that were merged.  \n\nThe event history of the source profiles is moved to the target profile.\n\nThe attributes (data from the `attributes` object) that don't exist in the target profile are copied to the target profile. If an attribute already exists in the target profile, the value from the source profile is lost.\n\nThe properties and tags of the source profiles are lost, even if they don't have a value in the target profile.\n\n <p style='color:red'><strong>WARNING:</strong> This operation is irreversible. Use it carefully.</p>\n <p style='color:red'><strong>WARNING:</strong> You should not try to merge more than 10-20 profiles at once.</p>\n\n For more details, see the [Developer Guide](https://hub.synerise.com/developers/api/clients/profiles/merging-profiles/).\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_MERGEBYCUSTOMID_CLIENT_UPDATE`\n","operationId":"MergeClientsByCustomId","parameters":[{"$ref":"#/components/parameters/api-service-pathClientCustomIds-apiv4"},{"$ref":"#/components/parameters/api-service-pathTargetCustomId-apiv4"},{"$ref":"#/components/parameters/api-service-acceptHeader-apiv4"},{"$ref":"#/components/parameters/api-service-contentTypeHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"responses":{"200":{"description":"Request completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-inResponseClientDetails-apiv4"}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"description":"Source and/or target profile(s) not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"}}}}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile management"],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/MergeClientsByCustomId"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample' \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"POST\", \"/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/clients/merge/from/ids/{fromClientIds}/to/id/{toClientId}":{"post":{"summary":"Merge profiles by clientId","description":"Moves profile UUIDs to a single profile (which must already exist) and removes the profiles that were merged.  \n\nThe event history of the source profiles is moved to the target profile.\n\nThe attributes (data from the `attributes` object) that don't exist in the target profile are copied to the target profile. If an attribute already exists in the target profile, the value from the source profile is lost.\n\nThe properties and tags of the source profiles are lost, even if they don't have a value in the target profile.\n\n <p style='color:red'><strong>WARNING:</strong> This operation is irreversible. Use it carefully.</p>\n <p style='color:red'><strong>WARNING:</strong> You should not try to merge more than 10-20 profiles at once.</p>\n\n For more details, see the [Developer Guide](https://hub.synerise.com/developers/api/clients/profiles/merging-profiles/).\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_MERGE_BY_ID_CLIENT_UPDATE`\n","operationId":"MergeClientsByClientId","parameters":[{"$ref":"#/components/parameters/api-service-pathFromClientIds-apiv4"},{"$ref":"#/components/parameters/api-service-pathToClientId-apiv4"},{"$ref":"#/components/parameters/api-service-acceptHeader-apiv4"},{"$ref":"#/components/parameters/api-service-contentTypeHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"responses":{"200":{"description":"Request completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-inResponseClientDetails-apiv4"}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"description":"Source and/or target profile(s) not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"}}}}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile management"],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/MergeClientsByClientId"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563' \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"POST\", \"/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/clients/batch":{"post":{"summary":"Batch add or update profiles","description":" Enqueue a number of add/update operations in the Synerise application database. <br/><br/>If you don't have some information about a profile, don't insert a null-value parameter - omit the parameter entirely. Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).\n\n\nThe body contains an array of objects to update. The objects are the same as in the *Create a Profile* and *Update a Profile* endpoints.\n\n<span style='color:red'><strong>IMPORTANT:</strong></span> The request body cannot contain more than 1000 items or exceed 1 MB in size.\n\nThis is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_BATCH_CLIENT_CREATE`\n\n**User role permission required:** `client_management: create`\n","operationId":"BatchAddOrUpdateClients","parameters":[{"$ref":"#/components/parameters/api-service-acceptHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"\nEach profile must have at least one of the following identifiers:\n- `email`  \n  If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, email is NOT an identifier.\n- `phone`  \n  Phone number is treated as an identifier only if no other identifier is provided. Then, if a profile with this phone number does not exist and non-unique emails are disabled, an anonymous profile is created.\n- `customId`\n- `uuid`\n- `clientId` (can be used only when updating an existing profile)\n","content":{"application/json":{"schema":{"type":"array","minItems":1,"maxItems":1000,"items":{"type":"object","properties":{"clientId":{"type":"integer","format":"int64","description":"This ID can be used only for updating an existing profile.\n\n\nIf a profile does not exist and `clientId` is the only provided identifier, the operation returns HTTP 202 and **a profile is not created**. If another identifier is provided, a profile is created with that identifier and a `clientId` generated by the system.\n"}},"allOf":[{"$ref":"#/components/schemas/api-service-CreateClientRequestBody-apiv4"}]}}}},"required":true},"responses":{"202":{"description":"Request accepted. IMPORTANT: this does not mean that all profiles were created/updated successfully. The data is sent for further processing in other elements of the infrastructure."},"207":{"description":"Invalid data in some entries. Correct entries are sent for further processing, the invalid ones are rejected.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/api-service-Error-apiv4"}},"example":[{"rejectedValue":"de73b3490c4-bb8c0d8","field":"list[0].uuid","status":400,"message":"UUID must be well-formed value as per RFC 4122"}]}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile management"],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/BatchAddOrUpdateClients"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/clients/batch \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"clientId\":0,\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[{\\\"clientId\\\":0,\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"customId\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"birthDate\\\":\\\"1987-10-24\\\",\\\"company\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"whatsAppId\\\":\\\"TestWhatsappId\\\",\\\"agreements\\\":{\\\"email\\\":false,\\\"sms\\\":false,\\\"push\\\":false,\\\"webPush\\\":false,\\\"whatsApp\\\":false,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}]\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/clients/batch\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  {\n    \"clientId\": 0,\n    \"email\": \"string\",\n    \"phone\": \"+48111222333\",\n    \"customId\": \"string\",\n    \"firstName\": \"string\",\n    \"lastName\": \"string\",\n    \"displayName\": \"string\",\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"avatarUrl\": \"string\",\n    \"birthDate\": \"1987-10-24\",\n    \"company\": \"string\",\n    \"city\": \"string\",\n    \"address\": \"string\",\n    \"zipCode\": \"string\",\n    \"province\": \"string\",\n    \"countryCode\": \"PL\",\n    \"sex\": \"FEMALE\",\n    \"whatsAppId\": \"TestWhatsappId\",\n    \"agreements\": {\n      \"email\": false,\n      \"sms\": false,\n      \"push\": false,\n      \"webPush\": false,\n      \"whatsApp\": false,\n      \"bluetooth\": false,\n      \"rfid\": false,\n      \"wifi\": false\n    },\n    \"attributes\": {\n      \"property1\": null,\n      \"property2\": null\n    },\n    \"tags\": [\n      \"string\"\n    ]\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/clients/batch\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/batch\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([\n  {\n    clientId: 0,\n    email: 'string',\n    phone: '+48111222333',\n    customId: 'string',\n    firstName: 'string',\n    lastName: 'string',\n    displayName: 'string',\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    avatarUrl: 'string',\n    birthDate: '1987-10-24',\n    company: 'string',\n    city: 'string',\n    address: 'string',\n    zipCode: 'string',\n    province: 'string',\n    countryCode: 'PL',\n    sex: 'FEMALE',\n    whatsAppId: 'TestWhatsappId',\n    agreements: {\n      email: false,\n      sms: false,\n      push: false,\n      webPush: false,\n      whatsApp: false,\n      bluetooth: false,\n      rfid: false,\n      wifi: false\n    },\n    attributes: {property1: null, property2: null},\n    tags: ['string']\n  }\n]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/batch');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[{\"clientId\":0,\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/clients/batch\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[{\\\"clientId\\\":0,\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"customId\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"birthDate\\\":\\\"1987-10-24\\\",\\\"company\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"whatsAppId\\\":\\\"TestWhatsappId\\\",\\\"agreements\\\":{\\\"email\\\":false,\\\"sms\\\":false,\\\"push\\\":false,\\\"webPush\\\":false,\\\"whatsApp\\\":false,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}]\")\n  .asString();"}]}},"/v4/clients/tags":{"get":{"summary":"Get all tags","description":"\nRetrieve all tags that can be assigned to profiles.\n\nThis endpoint is available from version 4.1.0\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_TAGS_CLIENT_READ`\n\n**User role permission required:** `client_tags: read`\n","operationId":"GetAllTags","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"responses":{"200":{"description":"A list of tags","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/api-service-Tag-apiv4"}}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Tags"],"x-snr-doc-urls":["/api-reference/data-management#tag/Tags/operation/GetAllTags"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/clients/tags \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/clients/tags\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/clients/tags\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/tags\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/tags');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/clients/tags\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/clients/{clientId}":{"get":{"summary":"Get profile data","description":"Retrieve profile data by profile ID. If PII protection is enabled and your API key/user doesn't have the required permissions, this endpoint can only return test profiles; other profiles return error 404.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_BY_ID_CLIENT_READ`\n\n**User role permission required:** `client_info: read`\n","operationId":"GetClientData","parameters":[{"$ref":"#/components/parameters/api-service-pathClientId-apiv4"},{"$ref":"#/components/parameters/api-service-contentTypeHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"responses":{"200":{"description":"Details of a single profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-inResponseClientDetails-apiv4"}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"$ref":"#/components/responses/api-service-404-pii"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile management"],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/GetClientData"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/clients/434428563 \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/clients/434428563\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/clients/434428563\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/434428563\",\n  \"headers\": {\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/434428563');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/clients/434428563\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Update a profile (identify by ID)","description":"Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).\n\nThe `attributes` object can be used to add custom attributes of your choice. For example, `\"hasDog\":true`.\n\nThe `tags` array contains custom tags of your choice.\n\nThis is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_BY_ID_CLIENT_UPDATE`\n\n**User role permission required:** `client_info: update`\n","operationId":"UpdateAClient","parameters":[{"$ref":"#/components/parameters/api-service-pathClientId-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-CreateClientRequestBody-apiv4"}}},"required":true},"responses":{"202":{"description":"Accepted, queued for processing"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"error":"Bad Request","status":400,"timestamp":"2019-03-21T08:37:34.526Z","path":"/clients/1234","message":"Some fields did not pass validation","errors":[{"code":12053,"field":"uuid","message":"UUID must be well-formed value as per RFC 4122","rejectedValue":"4321"}]}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"timestamp":"2018-06-07T09:48:56.522+00:00","status":404,"error":"Not Found","message":"Client 525446575 not found","path":"/clients/525446575"}}}},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile management"],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/UpdateAClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/clients/434428563 \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"customId\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"birthDate\\\":\\\"1987-10-24\\\",\\\"company\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"whatsAppId\\\":\\\"TestWhatsappId\\\",\\\"agreements\\\":{\\\"email\\\":false,\\\"sms\\\":false,\\\"push\\\":false,\\\"webPush\\\":false,\\\"whatsApp\\\":false,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/clients/434428563\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\",\n  \"phone\": \"+48111222333\",\n  \"customId\": \"string\",\n  \"firstName\": \"string\",\n  \"lastName\": \"string\",\n  \"displayName\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"avatarUrl\": \"string\",\n  \"birthDate\": \"1987-10-24\",\n  \"company\": \"string\",\n  \"city\": \"string\",\n  \"address\": \"string\",\n  \"zipCode\": \"string\",\n  \"province\": \"string\",\n  \"countryCode\": \"PL\",\n  \"sex\": \"FEMALE\",\n  \"whatsAppId\": \"TestWhatsappId\",\n  \"agreements\": {\n    \"email\": false,\n    \"sms\": false,\n    \"push\": false,\n    \"webPush\": false,\n    \"whatsApp\": false,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/clients/434428563\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/434428563\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  email: 'string',\n  phone: '+48111222333',\n  customId: 'string',\n  firstName: 'string',\n  lastName: 'string',\n  displayName: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  avatarUrl: 'string',\n  birthDate: '1987-10-24',\n  company: 'string',\n  city: 'string',\n  address: 'string',\n  zipCode: 'string',\n  province: 'string',\n  countryCode: 'PL',\n  sex: 'FEMALE',\n  whatsAppId: 'TestWhatsappId',\n  agreements: {\n    email: false,\n    sms: false,\n    push: false,\n    webPush: false,\n    whatsApp: false,\n    bluetooth: false,\n    rfid: false,\n    wifi: false\n  },\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/434428563');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/clients/434428563\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"customId\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"birthDate\\\":\\\"1987-10-24\\\",\\\"company\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"whatsAppId\\\":\\\"TestWhatsappId\\\",\\\"agreements\\\":{\\\"email\\\":false,\\\"sms\\\":false,\\\"push\\\":false,\\\"webPush\\\":false,\\\"whatsApp\\\":false,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]},"delete":{"summary":"Delete a profile","description":"Delete a profile from the database.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_BY_ID_CLIENT_DELETE`\n\n**User role permission required:** `client_info: delete`\n","operationId":"DeleteAClient","parameters":[{"$ref":"#/components/parameters/api-service-pathClientId-apiv4"},{"$ref":"#/components/parameters/api-service-acceptHeader-apiv4"},{"$ref":"#/components/parameters/api-service-contentTypeHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"responses":{"202":{"description":"Accepted"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"timestamp":"2018-06-07T09:48:56.522+00:00","status":404,"error":"Not Found","message":"Client 525446575 not found","path":"/clients/525446575"}}}}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile management"],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/DeleteAClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/v4/clients/434428563 \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"DELETE\", \"/v4/clients/434428563\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/v4/clients/434428563\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/434428563\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/434428563');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/v4/clients/434428563\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/clients/by-email/{clientEmail}":{"post":{"summary":"Update a profile (identify by email)","description":"Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).\n\nThe `attributes` object can be used to add custom attributes of your choice. For example, `\"hasDog\":true`.\n\nThe `tags` array contains custom tags of your choice.\n\nThis is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_BY_EMAIL_CLIENT_UPDATE`\n\n**User role permission required:** `client_info: update`\n","operationId":"UpdateAClientByEmail","parameters":[{"$ref":"#/components/parameters/api-service-pathClientEmail-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-CreateClientRequestBody-apiv4"}}},"required":true},"responses":{"202":{"description":"Accepted, queued for processing"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"error":"Bad Request","status":400,"timestamp":"2019-03-21T08:37:34.526Z","path":"/clients/by-email/client@synerise.com","message":"Some fields did not pass validation","errors":[{"code":12053,"field":"uuid","message":"UUID must be well-formed value as per RFC 4122","rejectedValue":"4321"}]}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"timestamp":"2018-06-07T09:48:56.522+00:00","status":404,"error":"Not Found","message":"No client record found for email: client@synerise.com","path":"/clients/by-email/client@synerise.com"}}}},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile management"],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/UpdateAClientByEmail"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/clients/by-email/clientemail@synerise.com \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"customId\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"birthDate\\\":\\\"1987-10-24\\\",\\\"company\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"whatsAppId\\\":\\\"TestWhatsappId\\\",\\\"agreements\\\":{\\\"email\\\":false,\\\"sms\\\":false,\\\"push\\\":false,\\\"webPush\\\":false,\\\"whatsApp\\\":false,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/clients/by-email/clientemail@synerise.com\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\",\n  \"phone\": \"+48111222333\",\n  \"customId\": \"string\",\n  \"firstName\": \"string\",\n  \"lastName\": \"string\",\n  \"displayName\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"avatarUrl\": \"string\",\n  \"birthDate\": \"1987-10-24\",\n  \"company\": \"string\",\n  \"city\": \"string\",\n  \"address\": \"string\",\n  \"zipCode\": \"string\",\n  \"province\": \"string\",\n  \"countryCode\": \"PL\",\n  \"sex\": \"FEMALE\",\n  \"whatsAppId\": \"TestWhatsappId\",\n  \"agreements\": {\n    \"email\": false,\n    \"sms\": false,\n    \"push\": false,\n    \"webPush\": false,\n    \"whatsApp\": false,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/clients/by-email/clientemail@synerise.com\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/by-email/clientemail@synerise.com\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  email: 'string',\n  phone: '+48111222333',\n  customId: 'string',\n  firstName: 'string',\n  lastName: 'string',\n  displayName: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  avatarUrl: 'string',\n  birthDate: '1987-10-24',\n  company: 'string',\n  city: 'string',\n  address: 'string',\n  zipCode: 'string',\n  province: 'string',\n  countryCode: 'PL',\n  sex: 'FEMALE',\n  whatsAppId: 'TestWhatsappId',\n  agreements: {\n    email: false,\n    sms: false,\n    push: false,\n    webPush: false,\n    whatsApp: false,\n    bluetooth: false,\n    rfid: false,\n    wifi: false\n  },\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/by-email/clientemail@synerise.com');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/clients/by-email/clientemail@synerise.com\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"customId\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"birthDate\\\":\\\"1987-10-24\\\",\\\"company\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"whatsAppId\\\":\\\"TestWhatsappId\\\",\\\"agreements\\\":{\\\"email\\\":false,\\\"sms\\\":false,\\\"push\\\":false,\\\"webPush\\\":false,\\\"whatsApp\\\":false,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/v4/clients/by-customid/{customId}":{"post":{"summary":"Update a profile (identify by customId)","description":"Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).\n \nThe `attributes` object can be used to add custom attributes of your choice. For example, `\"hasDog\":true`.\n\nThe `tags` array contains custom tags of your choice.\n\nThis is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_BY_CUSTOM_ID_CLIENT_UPDATE`\n\n**User role permission required:** `client_info: update`\n","operationId":"UpdateAClientByCustomId","parameters":[{"$ref":"#/components/parameters/api-service-pathClientCustomId-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-CreateClientRequestBody-apiv4"}}},"required":true},"responses":{"202":{"description":"Accepted, queued for processing"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"error":"Bad Request","status":400,"timestamp":"2019-03-21T08:37:34.526Z","path":"/clients/by-customid/customId1234","message":"Some fields did not pass validation","errors":[{"code":12053,"field":"uuid","message":"UUID must be well-formed value as per RFC 4122","rejectedValue":"4321"}]}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"timestamp":"2018-06-07T09:48:56.522+00:00","status":404,"error":"Not Found","message":"No client record found for customId: customId1234","path":"/clients/by-customid/customId1234"}}}},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile management"],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/UpdateAClientByCustomId"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/clients/by-customid/customIdExample \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"customId\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"birthDate\\\":\\\"1987-10-24\\\",\\\"company\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"whatsAppId\\\":\\\"TestWhatsappId\\\",\\\"agreements\\\":{\\\"email\\\":false,\\\"sms\\\":false,\\\"push\\\":false,\\\"webPush\\\":false,\\\"whatsApp\\\":false,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/clients/by-customid/customIdExample\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\",\n  \"phone\": \"+48111222333\",\n  \"customId\": \"string\",\n  \"firstName\": \"string\",\n  \"lastName\": \"string\",\n  \"displayName\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"avatarUrl\": \"string\",\n  \"birthDate\": \"1987-10-24\",\n  \"company\": \"string\",\n  \"city\": \"string\",\n  \"address\": \"string\",\n  \"zipCode\": \"string\",\n  \"province\": \"string\",\n  \"countryCode\": \"PL\",\n  \"sex\": \"FEMALE\",\n  \"whatsAppId\": \"TestWhatsappId\",\n  \"agreements\": {\n    \"email\": false,\n    \"sms\": false,\n    \"push\": false,\n    \"webPush\": false,\n    \"whatsApp\": false,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/clients/by-customid/customIdExample\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/by-customid/customIdExample\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  email: 'string',\n  phone: '+48111222333',\n  customId: 'string',\n  firstName: 'string',\n  lastName: 'string',\n  displayName: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  avatarUrl: 'string',\n  birthDate: '1987-10-24',\n  company: 'string',\n  city: 'string',\n  address: 'string',\n  zipCode: 'string',\n  province: 'string',\n  countryCode: 'PL',\n  sex: 'FEMALE',\n  whatsAppId: 'TestWhatsappId',\n  agreements: {\n    email: false,\n    sms: false,\n    push: false,\n    webPush: false,\n    whatsApp: false,\n    bluetooth: false,\n    rfid: false,\n    wifi: false\n  },\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/by-customid/customIdExample');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"whatsAppId\":\"TestWhatsappId\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/clients/by-customid/customIdExample\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"customId\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"birthDate\\\":\\\"1987-10-24\\\",\\\"company\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"whatsAppId\\\":\\\"TestWhatsappId\\\",\\\"agreements\\\":{\\\"email\\\":false,\\\"sms\\\":false,\\\"push\\\":false,\\\"webPush\\\":false,\\\"whatsApp\\\":false,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/v4/clients/by-custom-id/{customId}":{"delete":{"summary":"Delete a profile (identify by customId)","description":"Delete a profile from the database.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_BY_ID_CLIENT_DELETE`\n\n**User role permission required:** `client_info: delete`\n","operationId":"DeleteAClientByCustomId","parameters":[{"$ref":"#/components/parameters/api-service-pathClientCustomId-apiv4"},{"$ref":"#/components/parameters/api-service-contentTypeHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"responses":{"202":{"description":"Accepted"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"timestamp":"2018-06-07T09:48:56.522+00:00","status":404,"error":"Not Found","message":"No client record found for customId: customId1234","path":"/clients/by-customid/customId1234"}}}}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile management"],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/DeleteAClientByCustomId"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/v4/clients/by-custom-id/customIdExample \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"DELETE\", \"/v4/clients/by-custom-id/customIdExample\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/v4/clients/by-custom-id/customIdExample\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/by-custom-id/customIdExample\",\n  \"headers\": {\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/by-custom-id/customIdExample');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/v4/clients/by-custom-id/customIdExample\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/clients/{clientId}/linked-devices":{"post":{"summary":"Link a device by profile ID","description":" Assign a device to a profile ID. A profile may have many devices assigned.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_DEVICE_CLIENT_UPDATE`\n\n**User role permission required:** `client_info: update`\n","operationId":"LinkAClientDeviceByClientId","parameters":[{"$ref":"#/components/parameters/api-service-pathClientId-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-LinkaClientdeviceRequest-apiv4"}}},"required":true},"responses":{"200":{"description":"Request accepted","headers":{}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"error":"Bad Request","status":400,"timestamp":"2020-10-29T12:34:02.222Z","path":"/clients/1245757/linked-devices","message":"Some fields did not pass validation","errors":[{"code":12301,"field":"deviceId","message":"12301"}]}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"description":"Profile not found"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile devices"],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceByClientId"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/clients/434428563/linked-devices \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"deviceId\\\":\\\"string\\\",\\\"registrationId\\\":\\\"string\\\",\\\"type\\\":\\\"android\\\",\\\"bluetoothAddress\\\":\\\"string\\\",\\\"macAddress\\\":\\\"string\\\",\\\"manufacturer\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"osVersion\\\":\\\"string\\\",\\\"product\\\":\\\"a51ul_htc_europe\\\",\\\"screenHeight\\\":0,\\\"screenWidth\\\":0,\\\"publicKey\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/clients/434428563/linked-devices\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"deviceId\": \"string\",\n  \"registrationId\": \"string\",\n  \"type\": \"android\",\n  \"bluetoothAddress\": \"string\",\n  \"macAddress\": \"string\",\n  \"manufacturer\": \"string\",\n  \"model\": \"string\",\n  \"osVersion\": \"string\",\n  \"product\": \"a51ul_htc_europe\",\n  \"screenHeight\": 0,\n  \"screenWidth\": 0,\n  \"publicKey\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/clients/434428563/linked-devices\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/434428563/linked-devices\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  deviceId: 'string',\n  registrationId: 'string',\n  type: 'android',\n  bluetoothAddress: 'string',\n  macAddress: 'string',\n  manufacturer: 'string',\n  model: 'string',\n  osVersion: 'string',\n  product: 'a51ul_htc_europe',\n  screenHeight: 0,\n  screenWidth: 0,\n  publicKey: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/434428563/linked-devices');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/clients/434428563/linked-devices\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"deviceId\\\":\\\"string\\\",\\\"registrationId\\\":\\\"string\\\",\\\"type\\\":\\\"android\\\",\\\"bluetoothAddress\\\":\\\"string\\\",\\\"macAddress\\\":\\\"string\\\",\\\"manufacturer\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"osVersion\\\":\\\"string\\\",\\\"product\\\":\\\"a51ul_htc_europe\\\",\\\"screenHeight\\\":0,\\\"screenWidth\\\":0,\\\"publicKey\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/v4/clients/{identifierType}/{identifierValue}":{"get":{"summary":"Fetch profile data","description":" Get the details of a single profile. If PII protection is enabled and your API key/user doesn't have the required permissions, this endpoint can only return test profiles; other profiles return error 404.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_BY_IDENTIFIER_CLIENT_READ`\n\n**User role permission required:** `client_info: read`\n","operationId":"FindAClient","parameters":[{"name":"identifierType","in":"path","description":"The type of profile identifier to use for the request","required":true,"schema":{"type":"string","example":"by-email","enum":["by-custom-id","by-phone","by-uuid","by-email"]}},{"name":"identifierValue","in":"path","description":"The value of the selected identifier. The value must be URL-encoded.","required":true,"schema":{"type":"string","example":"address@domain.com"}},{"$ref":"#/components/parameters/api-service-contentTypeHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"responses":{"200":{"description":"Details of a single profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-inResponseClientDetails-apiv4"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"path":"/clients/by-custom-id/444555","message":"Api-Version header is required","error":"Bad Request","timestamp":"2018-06-07T09:33:59.183Z","status":400}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"$ref":"#/components/responses/api-service-404-pii"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile management"],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/FindAClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/clients/by-email/address@domain.com \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/clients/by-email/address@domain.com\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/clients/by-email/address@domain.com\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/by-email/address@domain.com\",\n  \"headers\": {\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/by-email/address@domain.com');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/clients/by-email/address@domain.com\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/clients/batch/by-phone/{phoneNumber}":{"get":{"summary":"Batch fetch profiles by phone number","description":" Returns a detailed list of profiles associated with the provided phone number. The number saved in the profile must exactly match the number from the request. If no profiles match the criteria, an empty list is returned.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_BY_IDENTIFIER_CLIENT_READ`\n\n**User role permission required:** `client_info: read`\n","operationId":"FindClientsByPhone","parameters":[{"name":"phoneNumber","in":"path","description":"The phone number to search for in profiles. Must be an exact match. The value must be URL-encoded.\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n","required":true,"schema":{"type":"string","example":12065550100}},{"$ref":"#/components/parameters/api-service-contentTypeHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"responses":{"200":{"description":"Returns an array of profile details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-inResponseClientDetailsArray-apiv4"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"path":"/clients/by-phone/+12065550100/batch","message":"Api-Version header is required","error":"Bad Request","timestamp":"2018-06-07T09:33:59.183Z","status":400}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"$ref":"#/components/responses/api-service-404-pii"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile management"],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/FindClientsByPhone"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/clients/batch/by-phone/12065550100 \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/clients/batch/by-phone/12065550100\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/clients/batch/by-phone/12065550100\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/batch/by-phone/12065550100\",\n  \"headers\": {\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/batch/by-phone/12065550100');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/clients/batch/by-phone/12065550100\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/clients/{identifierType}/{identifierValue}/linked-devices":{"post":{"summary":"Link a device by other parameters","description":" Assign a device to a profile UUID. A profile may have many devices assigned.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_BY_IDENTIFY_DEVICE_CLIENT_UPDATE`\n\n**User role permission required:** `client_info: update`\n","operationId":"LinkAClientDeviceByClientUuid","parameters":[{"name":"identifierType","in":"path","required":true,"description":"The profile identifier to use for the request","schema":{"type":"string","enum":["by-customId","by-uuid"]}},{"$ref":"#/components/parameters/api-service-pathIdentifierValue-apiv4"},{"$ref":"#/components/parameters/api-service-acceptHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-LinkaClientdeviceRequest-apiv4"}}},"required":true},"responses":{"200":{"description":"Request accepted","headers":{}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"error":"Bad Request","status":400,"timestamp":"2020-10-29T12:34:02.222Z","path":"/clients/by-uuid/779465fc-a0c5-41e5-9be2-51c00b2588b4/linked-devices","message":"Some fields did not pass validation","errors":[{"code":12301,"field":"deviceId","message":"12301"}]}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"description":"Profile not found"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile devices"],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceByClientUuid"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"deviceId\\\":\\\"string\\\",\\\"registrationId\\\":\\\"string\\\",\\\"type\\\":\\\"android\\\",\\\"bluetoothAddress\\\":\\\"string\\\",\\\"macAddress\\\":\\\"string\\\",\\\"manufacturer\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"osVersion\\\":\\\"string\\\",\\\"product\\\":\\\"a51ul_htc_europe\\\",\\\"screenHeight\\\":0,\\\"screenWidth\\\":0,\\\"publicKey\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"deviceId\": \"string\",\n  \"registrationId\": \"string\",\n  \"type\": \"android\",\n  \"bluetoothAddress\": \"string\",\n  \"macAddress\": \"string\",\n  \"manufacturer\": \"string\",\n  \"model\": \"string\",\n  \"osVersion\": \"string\",\n  \"product\": \"a51ul_htc_europe\",\n  \"screenHeight\": 0,\n  \"screenWidth\": 0,\n  \"publicKey\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  deviceId: 'string',\n  registrationId: 'string',\n  type: 'android',\n  bluetoothAddress: 'string',\n  macAddress: 'string',\n  manufacturer: 'string',\n  model: 'string',\n  osVersion: 'string',\n  product: 'a51ul_htc_europe',\n  screenHeight: 0,\n  screenWidth: 0,\n  publicKey: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"deviceId\\\":\\\"string\\\",\\\"registrationId\\\":\\\"string\\\",\\\"type\\\":\\\"android\\\",\\\"bluetoothAddress\\\":\\\"string\\\",\\\"macAddress\\\":\\\"string\\\",\\\"manufacturer\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"osVersion\\\":\\\"string\\\",\\\"product\\\":\\\"a51ul_htc_europe\\\",\\\"screenHeight\\\":0,\\\"screenWidth\\\":0,\\\"publicKey\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/v4/my-account/linked-devices":{"post":{"summary":"Link a device to currently logged in profile","description":" Assign a device to the profile that is currently logged in. A Profile may have many devices assigned.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"LinkAClientDeviceToCurrentlyLoggedInClient","parameters":[{"$ref":"#/components/parameters/api-service-acceptHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-LinkaClientdeviceRequest-apiv4"}}},"required":true},"responses":{"200":{"description":"Request accepted","headers":{}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile devices"],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceToCurrentlyLoggedInClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/my-account/linked-devices \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"deviceId\\\":\\\"string\\\",\\\"registrationId\\\":\\\"string\\\",\\\"type\\\":\\\"android\\\",\\\"bluetoothAddress\\\":\\\"string\\\",\\\"macAddress\\\":\\\"string\\\",\\\"manufacturer\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"osVersion\\\":\\\"string\\\",\\\"product\\\":\\\"a51ul_htc_europe\\\",\\\"screenHeight\\\":0,\\\"screenWidth\\\":0,\\\"publicKey\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/my-account/linked-devices\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"deviceId\": \"string\",\n  \"registrationId\": \"string\",\n  \"type\": \"android\",\n  \"bluetoothAddress\": \"string\",\n  \"macAddress\": \"string\",\n  \"manufacturer\": \"string\",\n  \"model\": \"string\",\n  \"osVersion\": \"string\",\n  \"product\": \"a51ul_htc_europe\",\n  \"screenHeight\": 0,\n  \"screenWidth\": 0,\n  \"publicKey\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/my-account/linked-devices\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/my-account/linked-devices\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  deviceId: 'string',\n  registrationId: 'string',\n  type: 'android',\n  bluetoothAddress: 'string',\n  macAddress: 'string',\n  manufacturer: 'string',\n  model: 'string',\n  osVersion: 'string',\n  product: 'a51ul_htc_europe',\n  screenHeight: 0,\n  screenWidth: 0,\n  publicKey: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/my-account/linked-devices');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/my-account/linked-devices\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"deviceId\\\":\\\"string\\\",\\\"registrationId\\\":\\\"string\\\",\\\"type\\\":\\\"android\\\",\\\"bluetoothAddress\\\":\\\"string\\\",\\\"macAddress\\\":\\\"string\\\",\\\"manufacturer\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"osVersion\\\":\\\"string\\\",\\\"product\\\":\\\"a51ul_htc_europe\\\",\\\"screenHeight\\\":0,\\\"screenWidth\\\":0,\\\"publicKey\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/v4/my-account/personal-information":{"get":{"tags":["Profile account management"],"summary":"Get Profile's own data","description":"A Profile can retrieve its details from the database.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, ANONYMOUS_CLIENT_CONDITIONAL\n","operationId":"getAccountDataGET","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"},{"$ref":"#/components/parameters/api-service-contentTypeHeader-apiv4"}],"responses":{"200":{"description":"Profile information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-inResponseClientDetails-apiv4"}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/getAccountDataGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/my-account/personal-information \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/my-account/personal-information\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/my-account/personal-information\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/my-account/personal-information\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/my-account/personal-information');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/my-account/personal-information\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Profile account management"],"summary":"Update Profile's own data","description":"A Profile can update its own details.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"updateAccountDataUsingPOST","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-ClientChangeset-apiv4"}}}},"responses":{"202":{"description":"Accepted"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"error":"Bad Request","status":400,"timestamp":"2020-10-29T13:08:16.235Z","path":"/my-account/personal-information","message":"Some fields did not pass validation","errors":[{"code":120,"field":"avatarUrl","message":"120","rejectedValue":"548869"}]}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/updateAccountDataUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/my-account/personal-information \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"address\":\"string\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"city\":\"string\",\"company\":\"string\",\"countryCode\":\"PL\",\"customId\":\"string\",\"displayName\":\"string\",\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"phone\":\"+48111222333\",\"province\":\"string\",\"sex\":\"FEMALE\",\"whatsAppId\":\"TestWhatsappId\",\"zipCode\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"address\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":false,\\\"sms\\\":false,\\\"push\\\":false,\\\"webPush\\\":false,\\\"whatsApp\\\":false,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"avatarUrl\\\":\\\"string\\\",\\\"birthDate\\\":\\\"1987-10-24\\\",\\\"city\\\":\\\"string\\\",\\\"company\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"customId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"province\\\":\\\"string\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"whatsAppId\\\":\\\"TestWhatsappId\\\",\\\"zipCode\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/my-account/personal-information\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"address\": \"string\",\n  \"agreements\": {\n    \"email\": false,\n    \"sms\": false,\n    \"push\": false,\n    \"webPush\": false,\n    \"whatsApp\": false,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"avatarUrl\": \"string\",\n  \"birthDate\": \"1987-10-24\",\n  \"city\": \"string\",\n  \"company\": \"string\",\n  \"countryCode\": \"PL\",\n  \"customId\": \"string\",\n  \"displayName\": \"string\",\n  \"email\": \"string\",\n  \"firstName\": \"string\",\n  \"lastName\": \"string\",\n  \"phone\": \"+48111222333\",\n  \"province\": \"string\",\n  \"sex\": \"FEMALE\",\n  \"whatsAppId\": \"TestWhatsappId\",\n  \"zipCode\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/my-account/personal-information\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/my-account/personal-information\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  address: 'string',\n  agreements: {\n    email: false,\n    sms: false,\n    push: false,\n    webPush: false,\n    whatsApp: false,\n    bluetooth: false,\n    rfid: false,\n    wifi: false\n  },\n  attributes: {property1: null, property2: null},\n  avatarUrl: 'string',\n  birthDate: '1987-10-24',\n  city: 'string',\n  company: 'string',\n  countryCode: 'PL',\n  customId: 'string',\n  displayName: 'string',\n  email: 'string',\n  firstName: 'string',\n  lastName: 'string',\n  phone: '+48111222333',\n  province: 'string',\n  sex: 'FEMALE',\n  whatsAppId: 'TestWhatsappId',\n  zipCode: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/my-account/personal-information');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"address\":\"string\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"whatsApp\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"city\":\"string\",\"company\":\"string\",\"countryCode\":\"PL\",\"customId\":\"string\",\"displayName\":\"string\",\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"phone\":\"+48111222333\",\"province\":\"string\",\"sex\":\"FEMALE\",\"whatsAppId\":\"TestWhatsappId\",\"zipCode\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/my-account/personal-information\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"address\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":false,\\\"sms\\\":false,\\\"push\\\":false,\\\"webPush\\\":false,\\\"whatsApp\\\":false,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"avatarUrl\\\":\\\"string\\\",\\\"birthDate\\\":\\\"1987-10-24\\\",\\\"city\\\":\\\"string\\\",\\\"company\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"customId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"province\\\":\\\"string\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"whatsAppId\\\":\\\"TestWhatsappId\\\",\\\"zipCode\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/v4/my-account/phone-update/request":{"post":{"summary":"Request profile phone number change","description":"A Profile can request a phone number update. The confirmation code is sent in a text message.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"RequestClientPhoneNumberChange","parameters":[{"$ref":"#/components/parameters/api-service-acceptHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"required":["phone"],"type":"object","properties":{"phone":{"type":"string","description":"Current phone number of the profile. \n\nMust match the pattern (ECMA flavor): `/(^\\+[0-9 \\-()/]{6,19}$)|(^[0-9 \\-()/]{6,20}$)/`\n","example":"+48111222333"}}}}},"required":true},"responses":{"202":{"description":"Request accepted'"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile account management"],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/RequestClientPhoneNumberChange"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/my-account/phone-update/request \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"phone\":\"+48111222333\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"phone\\\":\\\"+48111222333\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/my-account/phone-update/request\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"phone\": \"+48111222333\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/my-account/phone-update/request\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/my-account/phone-update/request\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({phone: '+48111222333'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/my-account/phone-update/request');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"phone\":\"+48111222333\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/my-account/phone-update/request\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"phone\\\":\\\"+48111222333\\\"}\")\n  .asString();"}]}},"/v4/my-account/phone-update/confirmation":{"post":{"summary":"Confirm profile phone number change","description":"Use a code to confirm the phone number change and provide the new number.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"ConfirmClientPhoneNumberChange","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"required":["phone","confirmationCode"],"type":"object","properties":{"phone":{"type":"string","description":"New phone number\n\nMust match the pattern (ECMA flavor): `/(^\\+[0-9 \\-()/]{6,19}$)|(^[0-9 \\-()/]{6,20}$)/`\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n","example":"+48111222333"},"confirmationCode":{"description":"Confirmation code received by text message","type":"string","example":"73AC1"},"deviceId":{"$ref":"#/components/schemas/api-service-inBodyClientDeviceId-apiv4"},"smsAgreement":{"type":"boolean","description":"Permission to receive marketing information by SMS"}}}}},"required":true},"responses":{"202":{"description":"Request accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Profile account management"],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/ConfirmClientPhoneNumberChange"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/my-account/phone-update/confirmation \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"phone\":\"+48111222333\",\"confirmationCode\":\"73AC1\",\"deviceId\":\"string\",\"smsAgreement\":true}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"phone\\\":\\\"+48111222333\\\",\\\"confirmationCode\\\":\\\"73AC1\\\",\\\"deviceId\\\":\\\"string\\\",\\\"smsAgreement\\\":true}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/my-account/phone-update/confirmation\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"phone\": \"+48111222333\",\n  \"confirmationCode\": \"73AC1\",\n  \"deviceId\": \"string\",\n  \"smsAgreement\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/my-account/phone-update/confirmation\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/my-account/phone-update/confirmation\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  phone: '+48111222333',\n  confirmationCode: '73AC1',\n  deviceId: 'string',\n  smsAgreement: true\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/my-account/phone-update/confirmation');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"phone\":\"+48111222333\",\"confirmationCode\":\"73AC1\",\"deviceId\":\"string\",\"smsAgreement\":true}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/my-account/phone-update/confirmation\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"phone\\\":\\\"+48111222333\\\",\\\"confirmationCode\\\":\\\"73AC1\\\",\\\"deviceId\\\":\\\"string\\\",\\\"smsAgreement\\\":true}\")\n  .asString();"}]}},"/v4/tags":{"post":{"tags":["Tags"],"summary":"Create a tag","description":"Create a new tag that can be assigned to profiles. If you try to create a tag that already exists, the response is the existing tag.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `API_TAGS_CREATE`\n\n**User role permission required:** `client_tags: create`\n","operationId":"createTagUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-TagCreate-apiv4"}}}},"responses":{"200":{"description":"Tag created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-TagResponse-apiv4"}}}},"400":{"description":"Invalid or incomplete data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"error":"Bad Request","status":400,"timestamp":"2020-10-29T11:02:25.939Z","path":"/tags","message":"Some fields did not pass validation","errors":[{"code":16213,"field":"name","message":"Scripts are not allowed"}]}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Tags/operation/createTagUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/tags \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"nice tag\",\"color\":\"#0768ff\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"nice tag\\\",\\\"color\\\":\\\"#0768ff\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/tags\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"nice tag\",\n  \"color\": \"#0768ff\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/tags\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/tags\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'nice tag', color: '#0768ff'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/tags');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"nice tag\",\"color\":\"#0768ff\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/tags\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"nice tag\\\",\\\"color\\\":\\\"#0768ff\\\"}\")\n  .asString();"}]}},"/v4/tags/{tagID}":{"put":{"tags":["Tags"],"summary":"Update a tag","description":"Update a tag. This method currently only allows modifying the `color` field.\n\nIf the tag has been already deleted, the response is a 404 error.\n\n**Important**: This method doesn't update global tags (not related to any workspace). If you try to update a global tag, the response is a 404 error.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `API_TAGS_CREATE`\n\n**User role permission required:** `client_tags: create`\n","operationId":"updateTagPUT","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-TagUpdate-apiv4"}}}},"parameters":[{"$ref":"#/components/parameters/api-service-pathTagId-apiv4"}],"responses":{"200":{"description":"Tag updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-TagResponse-apiv4"}}}},"400":{"description":"Invalid or incomplete data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"description":"Tag doesn't exist or it is a global tag (not related to any workspace).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"}}}},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Tags/operation/updateTagPUT"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/v4/tags/645 \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"color\":\"#0768ff\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"color\\\":\\\"#0768ff\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/v4/tags/645\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"color\": \"#0768ff\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/v4/tags/645\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/tags/645\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({color: '#0768ff'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/tags/645');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"color\":\"#0768ff\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/v4/tags/645\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"color\\\":\\\"#0768ff\\\"}\")\n  .asString();"}]},"delete":{"tags":["Tags"],"summary":"Remove a tag","description":"Remove a tag definition from the workspace.\n\nIf the tag has been already deleted, the response is a 404 error.\n\n**Important**: This method does not remove global tag (not related to any workspace). In this case, the response is a 404 error.\n\n**Note**: After removing a tag definition, the tag is still cached for a while. In that time, it is still possible for a while to remove or add this tag in profiles.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `API_TAGS_CREATE`\n\n**User role permission required:** `client_tags: create`\n","operationId":"deleteTagDELETE","parameters":[{"$ref":"#/components/parameters/api-service-pathTagId-apiv4"}],"responses":{"202":{"description":"Tag removed"},"400":{"description":"Invalid or incomplete data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"description":"Tag doesn't exist, was already deleted, or is a global tag (not related to any workspace).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"}}}},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Tags/operation/deleteTagDELETE"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/v4/tags/645 \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/v4/tags/645\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/v4/tags/645\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/tags/645\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/tags/645');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/v4/tags/645\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/clients/{clientId}/tags":{"get":{"tags":["Tags"],"summary":"Get profile tags","description":"Retrieve a list of tags assigned to a profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `API_TAGS_READ`\n\n**User role permission required:** `client_tags: read`\n","operationId":"getClientTagsUsingGET","parameters":[{"$ref":"#/components/parameters/api-service-pathClientId-apiv4"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/api-service-Tag-apiv4"}}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Tags/operation/getClientTagsUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/clients/434428563/tags \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/clients/434428563/tags\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/clients/434428563/tags\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/434428563/tags\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/434428563/tags');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/clients/434428563/tags\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/clients/{clientId}/tags/{tagID}":{"post":{"tags":["Tags"],"summary":"Assign tag to profile","description":"Assign a tag to a profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `API_ASSIGN_TAGS_EXECUTE`\n\n**User role permission required:** `client_tags: execute`\n","operationId":"assignTagPOST","parameters":[{"$ref":"#/components/parameters/api-service-pathClientId-apiv4"},{"$ref":"#/components/parameters/api-service-pathTagId-apiv4"}],"responses":{"200":{"description":"Tag assigned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-TagAssociation-apiv4"}}}},"400":{"description":"Profile not found or data malformed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"description":"Tag not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"}}}},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Tags/operation/assignTagPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/clients/434428563/tags/645"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"POST\", \"/v4/clients/434428563/tags/645\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/clients/434428563/tags/645\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/434428563/tags/645\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/434428563/tags/645');\n$request->setMethod(HTTP_METH_POST);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/clients/434428563/tags/645\")\n  .asString();"}]},"delete":{"tags":["Tags"],"summary":"Remove tag from profile","operationId":"removeClientTagDELETE","parameters":[{"$ref":"#/components/parameters/api-service-pathClientId-apiv4"},{"$ref":"#/components/parameters/api-service-pathTagId-apiv4"}],"responses":{"202":{"description":"Tag removed"},"400":{"description":"Profile not found or data malformed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"404":{"description":"Tag not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Tags/operation/removeClientTagDELETE"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `API_ASSIGN_TAGS_EXECUTE`\n\n**User role permission required:** `client_tags: execute`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/v4/clients/434428563/tags/645"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"DELETE\", \"/v4/clients/434428563/tags/645\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/v4/clients/434428563/tags/645\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/clients/434428563/tags/645\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/clients/434428563/tags/645');\n$request->setMethod(HTTP_METH_DELETE);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/v4/clients/434428563/tags/645\")\n  .asString();"}]}},"/v4/events/by-client/{clientId}":{"get":{"deprecated":true,"summary":"Get Profile events as Workspace","description":"**This endpoint is deprecated. Use [/activities-api/events/by/{identifierType}](https://developers.synerise.com/DataManagement/DataManagement.html#operation/getEventsByIdentifier) instead.**  \n\nRetrieve a list of events saved in a Profile.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `API_LISTING_BY_CLIENT_EVENTS_READ`\n\n**User role permission required:** `client_activities: read`\n","operationId":"GetClientEvents","parameters":[{"$ref":"#/components/parameters/api-service-pathClientId-apiv4"},{"$ref":"#/components/parameters/api-service-contentTypeHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"},{"$ref":"#/components/parameters/api-service-queryDateFrom-apiv4"},{"$ref":"#/components/parameters/api-service-queryDateTo-apiv4"},{"$ref":"#/components/parameters/api-service-queryAction-apiv4"},{"$ref":"#/components/parameters/api-service-queryEventsLimit-apiv4"}],"responses":{"200":{"description":"A list of events","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/api-service-GetClientevents-HTTP200-apiv4"}}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"}},"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/GetClientEvents"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/by-client/434428563');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'time[from]' => 'SOME_STRING_VALUE',\n  'time[to]' => 'SOME_STRING_VALUE',\n  'action' => 'transaction.charge',\n  'limit' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/events":{"get":{"deprecated":true,"summary":"Get Profile's own events","description":"**This endpoint is deprecated. Use [/activities-api/events](https://developers.synerise.com/DataManagement/DataManagement.html#operation/getEvents) instead.**  \n\nA Profile can retrieve a list of its own events saved in the database.\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"GetClientOwnEvents","parameters":[{"$ref":"#/components/parameters/api-service-contentTypeHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"},{"$ref":"#/components/parameters/api-service-queryDateFrom-apiv4"},{"$ref":"#/components/parameters/api-service-queryDateTo-apiv4"},{"$ref":"#/components/parameters/api-service-queryAction-apiv4"},{"$ref":"#/components/parameters/api-service-queryEventsLimit-apiv4"}],"responses":{"200":{"description":"A list of events","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/api-service-GetClientevents-HTTP200-apiv4"}}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"timestamp":"2018-06-07T09:50:43.947+00:00","status":500,"error":"Internal Server Error","message":"Duration between time[from] and time[to] cannot be greater than 7 days","path":"/events/by-client/525446574"}}}}},"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/GetClientOwnEvents"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'time[from]' => 'SOME_STRING_VALUE',\n  'time[to]' => 'SOME_STRING_VALUE',\n  'action' => 'transaction.charge',\n  'limit' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/events/application-started":{"post":{"summary":"Application started","description":"Send a 'client application started' event.\n\nThis endpoint is available from API version 4.1.2.\n\nWhen you send an event to this endpoint, the `action` field is set to `client.applicationStarted` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_APPLICATION_STARTED_EVENTS_CREATE`\n","operationId":"ApplicationStarted","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-ApplicationstartedRequest-apiv4"}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"timestamp":"2018-06-07T09:53:56.999+00:00","status":500,"error":"Internal Server Error","message":"Error occurred during event publication","path":"/events/application-started"}}}}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ApplicationStarted"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/application-started \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"applicationName\":\"string\",\"version\":\"string\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"applicationName\\\":\\\"string\\\",\\\"version\\\":\\\"string\\\"}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/application-started\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {\n    \"applicationName\": \"string\",\n    \"version\": \"string\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/application-started\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/application-started\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {applicationName: 'string', version: 'string'}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/application-started');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"applicationName\":\"string\",\"version\":\"string\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/application-started\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"applicationName\\\":\\\"string\\\",\\\"version\\\":\\\"string\\\"}}\")\n  .asString();"}]}},"/v4/events/registered":{"post":{"summary":"Profile account registered","description":"Send a 'profile account registered' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.\n\nWhen you send an event to this endpoint, the `action` field is set to `client.register` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_REGISTERED_EVENTS_CREATE`\n","operationId":"ClientRegistered","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientRegistered"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/registered \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/registered\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/registered\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/registered\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/registered');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/registered\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\")\n  .asString();"}]}},"/v4/events/logged-in":{"post":{"summary":"Profile logged in","description":"Send a 'profile logged in' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.\n\nWhen you send an event to this endpoint, the `action` field is set to `client.login` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_LOGGED_IN_EVENTS_CREATE`\n","operationId":"ClientLoggedIn","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientLoggedIn"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/logged-in \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/logged-in\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/logged-in\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/logged-in\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/logged-in');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/logged-in\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\")\n  .asString();"}]}},"/v4/events/logged-out":{"post":{"summary":"Profile logged out","description":"Send a 'profile logged out' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.\n\nWhen you send an event to this endpoint, the `action` field is set to `client.logout` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_LOGGED_OUT_EVENTS_CREATE`\n","operationId":"ClientLoggedOut","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientLoggedOut"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/logged-out \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/logged-out\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/logged-out\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/logged-out\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/logged-out');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/logged-out\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\")\n  .asString();"}]}},"/v4/events/added-to-cart":{"post":{"summary":"Item added to cart","description":"Send an 'item added to cart' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.\n\n\nWhen you send an event to this endpoint, the `action` field is set to `product.addToCart` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_ADDED_TO_CART_EVENTS_CREATE`\n","operationId":"ClientAddedProductToCart","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-ClientCartEventRequest-apiv4"}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"description":"Bad request: input data missing or malformed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"error":"Bad Request","status":400,"timestamp":"2018-06-07T09:55:20.563Z","message":"Some fields did not pass validation","path":"/events/added-to-cart","errors":[{"path":"label","message":"cannot be empty","rejectedValue":""},{"path":"label","message":"length must be between 1 and 64","rejectedValue":""}]}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientAddedProductToCart"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/added-to-cart \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"sku\":\"189784563455\",\"name\":\"Soft drink\",\"category\":\"Beverages\",\"categories\":[\"string\"],\"offline\":true,\"source\":\"MOBILE\",\"regularUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"discountedUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"ItemUrlAddress\":\"string\",\"producer\":\"string\",\"quantity\":0}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"sku\\\":\\\"189784563455\\\",\\\"name\\\":\\\"Soft drink\\\",\\\"category\\\":\\\"Beverages\\\",\\\"categories\\\":[\\\"string\\\"],\\\"offline\\\":true,\\\"source\\\":\\\"MOBILE\\\",\\\"regularUnitPrice\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"discountedUnitPrice\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"finalUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"ItemUrlAddress\\\":\\\"string\\\",\\\"producer\\\":\\\"string\\\",\\\"quantity\\\":0}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/added-to-cart\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {\n    \"sku\": \"189784563455\",\n    \"name\": \"Soft drink\",\n    \"category\": \"Beverages\",\n    \"categories\": [\n      \"string\"\n    ],\n    \"offline\": true,\n    \"source\": \"MOBILE\",\n    \"regularUnitPrice\": {\n      \"amount\": 0,\n      \"currency\": \"USD\"\n    },\n    \"discountedUnitPrice\": {\n      \"amount\": 0,\n      \"currency\": \"USD\"\n    },\n    \"finalUnitPrice\": {\n      \"amount\": 3.25,\n      \"currency\": \"USD\"\n    },\n    \"ItemUrlAddress\": \"string\",\n    \"producer\": \"string\",\n    \"quantity\": 0\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/added-to-cart\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/added-to-cart\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {\n    sku: '189784563455',\n    name: 'Soft drink',\n    category: 'Beverages',\n    categories: ['string'],\n    offline: true,\n    source: 'MOBILE',\n    regularUnitPrice: {amount: 0, currency: 'USD'},\n    discountedUnitPrice: {amount: 0, currency: 'USD'},\n    finalUnitPrice: {amount: 3.25, currency: 'USD'},\n    ItemUrlAddress: 'string',\n    producer: 'string',\n    quantity: 0\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/added-to-cart');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"sku\":\"189784563455\",\"name\":\"Soft drink\",\"category\":\"Beverages\",\"categories\":[\"string\"],\"offline\":true,\"source\":\"MOBILE\",\"regularUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"discountedUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"ItemUrlAddress\":\"string\",\"producer\":\"string\",\"quantity\":0}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/added-to-cart\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"sku\\\":\\\"189784563455\\\",\\\"name\\\":\\\"Soft drink\\\",\\\"category\\\":\\\"Beverages\\\",\\\"categories\\\":[\\\"string\\\"],\\\"offline\\\":true,\\\"source\\\":\\\"MOBILE\\\",\\\"regularUnitPrice\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"discountedUnitPrice\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"finalUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"ItemUrlAddress\\\":\\\"string\\\",\\\"producer\\\":\\\"string\\\",\\\"quantity\\\":0}}\")\n  .asString();"}]}},"/v4/events/removed-from-cart":{"post":{"summary":"Item removed from cart","description":"Send an 'item removed from cart' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.\n\n\nWhen you send an event to this endpoint, the `action` field is set to `product.removeFromCart` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_REMOVED_FROM_CART_EVENTS_CREATE`\n","operationId":"ClientRemovedProductFromCart","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-ClientCartEventRequest-apiv4"}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientRemovedProductFromCart"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/removed-from-cart \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"sku\":\"189784563455\",\"name\":\"Soft drink\",\"category\":\"Beverages\",\"categories\":[\"string\"],\"offline\":true,\"source\":\"MOBILE\",\"regularUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"discountedUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"ItemUrlAddress\":\"string\",\"producer\":\"string\",\"quantity\":0}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"sku\\\":\\\"189784563455\\\",\\\"name\\\":\\\"Soft drink\\\",\\\"category\\\":\\\"Beverages\\\",\\\"categories\\\":[\\\"string\\\"],\\\"offline\\\":true,\\\"source\\\":\\\"MOBILE\\\",\\\"regularUnitPrice\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"discountedUnitPrice\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"finalUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"ItemUrlAddress\\\":\\\"string\\\",\\\"producer\\\":\\\"string\\\",\\\"quantity\\\":0}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/removed-from-cart\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {\n    \"sku\": \"189784563455\",\n    \"name\": \"Soft drink\",\n    \"category\": \"Beverages\",\n    \"categories\": [\n      \"string\"\n    ],\n    \"offline\": true,\n    \"source\": \"MOBILE\",\n    \"regularUnitPrice\": {\n      \"amount\": 0,\n      \"currency\": \"USD\"\n    },\n    \"discountedUnitPrice\": {\n      \"amount\": 0,\n      \"currency\": \"USD\"\n    },\n    \"finalUnitPrice\": {\n      \"amount\": 3.25,\n      \"currency\": \"USD\"\n    },\n    \"ItemUrlAddress\": \"string\",\n    \"producer\": \"string\",\n    \"quantity\": 0\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/removed-from-cart\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/removed-from-cart\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {\n    sku: '189784563455',\n    name: 'Soft drink',\n    category: 'Beverages',\n    categories: ['string'],\n    offline: true,\n    source: 'MOBILE',\n    regularUnitPrice: {amount: 0, currency: 'USD'},\n    discountedUnitPrice: {amount: 0, currency: 'USD'},\n    finalUnitPrice: {amount: 3.25, currency: 'USD'},\n    ItemUrlAddress: 'string',\n    producer: 'string',\n    quantity: 0\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/removed-from-cart');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"sku\":\"189784563455\",\"name\":\"Soft drink\",\"category\":\"Beverages\",\"categories\":[\"string\"],\"offline\":true,\"source\":\"MOBILE\",\"regularUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"discountedUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"ItemUrlAddress\":\"string\",\"producer\":\"string\",\"quantity\":0}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/removed-from-cart\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"sku\\\":\\\"189784563455\\\",\\\"name\\\":\\\"Soft drink\\\",\\\"category\\\":\\\"Beverages\\\",\\\"categories\\\":[\\\"string\\\"],\\\"offline\\\":true,\\\"source\\\":\\\"MOBILE\\\",\\\"regularUnitPrice\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"discountedUnitPrice\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"finalUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"ItemUrlAddress\\\":\\\"string\\\",\\\"producer\\\":\\\"string\\\",\\\"quantity\\\":0}}\")\n  .asString();"}]}},"/v4/events/added-to-favorites":{"post":{"summary":"Product added to favorites","description":"Send an 'item added to favorites' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.\n\n\nWhen you send an event to this endpoint, the `action` field is set to `product.addToFavorite` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_ADDED_TO_FAVORITES_EVENTS_CREATE`\n","operationId":"ClientAddedProductToFavorites","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientAddedProductToFavorites"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/added-to-favorites \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/added-to-favorites\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/added-to-favorites\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/added-to-favorites\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/added-to-favorites');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/added-to-favorites\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\")\n  .asString();"}]}},"/v4/events/product-view":{"post":{"summary":"Item viewed","description":"Send an 'item viewed' event.\n\nWhen you send an event to this endpoint, the `action` field is set to `product.view` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_PRODUCT_VIEW_EVENTS_CREATE`\n","operationId":"ClientViewedProduct","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"type":"object","additionalProperties":true,"description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nAside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:\n\n  <span style=\"color:red\"><strong>WARNING:</strong></span>\n  - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.\n  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>\n  <code>modifiedBy</code><br>\n  <code>apiKey</code><br>\n  <code>eventUUID</code><br>\n  <code>ip</code><br>\n  <code>time</code><br>\n  <code>businessProfileId</code>\n","properties":{"productId":{"$ref":"#/components/schemas/api-service-ItemSku-apiv4"},"name":{"$ref":"#/components/schemas/api-service-ItemName-apiv4"},"fromRecommendation":{"$ref":"#/components/schemas/api-service-FromRecommendation-apiv4"},"source":{"$ref":"#/components/schemas/api-service-eventSource-apiv4"},"category":{"$ref":"#/components/schemas/api-service-ItemCategory-apiv4"},"url":{"$ref":"#/components/schemas/api-service-ItemUrlAddress-apiv4"},"campaignHash":{"$ref":"#/components/schemas/api-service-CampaignHash-apiv4"}}}}}]}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientViewedProduct"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/product-view \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"fromRecommendation\":true,\"source\":\"MOBILE\",\"category\":\"Beverages\",\"url\":\"string\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"productId\\\":\\\"189784563455\\\",\\\"name\\\":\\\"Soft drink\\\",\\\"fromRecommendation\\\":true,\\\"source\\\":\\\"MOBILE\\\",\\\"category\\\":\\\"Beverages\\\",\\\"url\\\":\\\"string\\\",\\\"campaignHash\\\":\\\"21e0d4b0-bd4e-497b-817b-4fr660284918\\\"}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/product-view\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {\n    \"productId\": \"189784563455\",\n    \"name\": \"Soft drink\",\n    \"fromRecommendation\": true,\n    \"source\": \"MOBILE\",\n    \"category\": \"Beverages\",\n    \"url\": \"string\",\n    \"campaignHash\": \"21e0d4b0-bd4e-497b-817b-4fr660284918\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/product-view\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/product-view\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {\n    productId: '189784563455',\n    name: 'Soft drink',\n    fromRecommendation: true,\n    source: 'MOBILE',\n    category: 'Beverages',\n    url: 'string',\n    campaignHash: '21e0d4b0-bd4e-497b-817b-4fr660284918'\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/product-view');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"fromRecommendation\":true,\"source\":\"MOBILE\",\"category\":\"Beverages\",\"url\":\"string\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/product-view\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"productId\\\":\\\"189784563455\\\",\\\"name\\\":\\\"Soft drink\\\",\\\"fromRecommendation\\\":true,\\\"source\\\":\\\"MOBILE\\\",\\\"category\\\":\\\"Beverages\\\",\\\"url\\\":\\\"string\\\",\\\"campaignHash\\\":\\\"21e0d4b0-bd4e-497b-817b-4fr660284918\\\"}}\")\n  .asString();"}]}},"/v4/events/assigned-to-company":{"post":{"summary":"Profile assigned to company","description":"Send a 'profile assigned to company' event.\n\nWhen you send an event to this endpoint, the `action` field is set to `client.assignToCompany` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_ASSIGNED_TO_COMPANY_EVENTS_CREATE`\n\n**User role permission required:** `client_activities: create`\n","operationId":"ClientAssignedToCompany","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","required":["params"],"properties":{"params":{"type":"object","additionalProperties":true,"description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nAside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:\n\n  <span style=\"color:red\"><strong>WARNING:</strong></span>\n  - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.\n  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>\n  <code>modifiedBy</code><br>\n  <code>apiKey</code><br>\n  <code>eventUUID</code><br>\n  <code>ip</code><br>\n  <code>time</code><br>\n  <code>businessProfileId</code>\n","properties":{"companyId":{"type":"number","description":"Company ID"}}}}}]}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientAssignedToCompany"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/assigned-to-company \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"companyId\":0}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"companyId\\\":0}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/assigned-to-company\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {\n    \"companyId\": 0\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/assigned-to-company\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/assigned-to-company\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {companyId: 0}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/assigned-to-company');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"companyId\":0}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/assigned-to-company\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"companyId\\\":0}}\")\n  .asString();"}]}},"/v4/events/appeared-in-location":{"post":{"summary":"Profile logged location","description":"Send an event when a profile submits its location. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.\n\nWhen you send an event to this endpoint, the `action` field is set to `client.location` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_APPEARED_IN_LOCATION_EVENTS_CREATE`\n","operationId":"ClientAppearedInLocation","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"type":"object","additionalProperties":true,"description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nAside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:\n\n  <span style=\"color:red\"><strong>WARNING:</strong></span>\n  - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.\n  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>\n  <code>modifiedBy</code><br>\n  <code>apiKey</code><br>\n  <code>eventUUID</code><br>\n  <code>ip</code><br>\n  <code>time</code><br>\n  <code>businessProfileId</code>\n","required":["lat","lon"],"properties":{"lat":{"type":"number","description":"Latitude","example":50.021102},"lon":{"type":"number","description":"Longitude","example":19.886218}}}}}]}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientAppearedInLocation"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/appeared-in-location \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"lat\":50.021102,\"lon\":19.886218}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"lat\\\":50.021102,\\\"lon\\\":19.886218}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/appeared-in-location\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {\n    \"lat\": 50.021102,\n    \"lon\": 19.886218\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/appeared-in-location\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/appeared-in-location\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {lat: 50.021102, lon: 19.886218}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/appeared-in-location');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"lat\":50.021102,\"lon\":19.886218}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/appeared-in-location\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"lat\\\":50.021102,\\\"lon\\\":19.886218}}\")\n  .asString();"}]}},"/v4/events/push/received":{"post":{"summary":"Push notification received","description":"Record a 'push notification was received' event. It is used for push message interaction tracking.\n\nThis endpoint is available from API version 4.1.2.\n\nWhen you send an event to this endpoint, the `action` field is set to `push.receiveInBackground` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_PUSH_RECIVED_EVENTS_CREATE`\n","operationId":"ClientReceivedPushNotification","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientReceivedPushNotification"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/push/received \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/push/received\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/push/received\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/push/received\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/push/received');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/push/received\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\")\n  .asString();"}]}},"/v4/events/push/viewed":{"post":{"summary":"Push notification viewed","description":"Record a 'push notification was viewed' event. It is used for push message interaction tracking.\n\nWhen you send an event to this endpoint, the `action` field is set to `push.view` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_PUSH_VIEWED_EVENTS_CREATE`\n","operationId":"ClientViewedPushNotification","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientViewedPushNotification"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/push/viewed \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/push/viewed\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/push/viewed\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/push/viewed\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/push/viewed');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/push/viewed\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\")\n  .asString();"}]}},"/v4/events/push/clicked":{"post":{"summary":"Push notification clicked","description":"Send a 'Push notification was clicked' event. It's used for push message interaction tracking.\n\nWhen you send an event to this endpoint, the `action` field is set to `push.click` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_PUSH_CLICKED_EVENTS_CREATE`\n","operationId":"ClientClickedPushNotification","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientClickedPushNotification"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/push/clicked \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/push/clicked\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/push/clicked\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/push/clicked\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/push/clicked');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/push/clicked\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\")\n  .asString();"}]}},"/v4/events/push/cancelled":{"post":{"summary":"Push notifications cancelled","description":"Send a 'push notifications cancelled' event. It's used for push message interaction tracking.\n\nWhen you send an event to this endpoint, the `action` field is set to `push.cancel` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_PUSH_CANCELLED_EVENTS_CREATE`\n","operationId":"ClientCancelledPushNotifications","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientCancelledPushNotifications"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/push/cancelled \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/push/cancelled\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/push/cancelled\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/push/cancelled\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/push/cancelled');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/push/cancelled\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\")\n  .asString();"}]}},"/v4/events/cancelled-transaction":{"post":{"summary":"Transaction cancelled","description":"Send a 'transaction cancelled' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.\n\nWhen you send an event to this endpoint, the `action` field is set to `transaction.cancel` by the backend.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_CANCELLED_TRANSACTION_EVENTS_CREATE`\n","operationId":"ClientCancelledTransaction","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"type":"object","description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nAside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:\n\n  <span style=\"color:red\"><strong>WARNING:</strong></span>\n  - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.\n  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>\n  <code>modifiedBy</code><br>\n  <code>apiKey</code><br>\n  <code>eventUUID</code><br>\n  <code>ip</code><br>\n  <code>time</code><br>\n  <code>businessProfileId</code>\n","additionalProperties":true,"properties":{"orderId":{"$ref":"#/components/schemas/api-service-OrderId-apiv4"},"orderStatus":{"$ref":"#/components/schemas/api-service-OrderStatus-apiv4"},"discountAmount":{"$ref":"#/components/schemas/api-service-DiscountAmount-apiv4"},"discountPercent":{"$ref":"#/components/schemas/api-service-DiscountPercent-apiv4"},"discountCode":{"$ref":"#/components/schemas/api-service-DiscountCode-apiv4"},"value":{"$ref":"#/components/schemas/api-service-Value-apiv4"},"revenue":{"$ref":"#/components/schemas/api-service-Revenue-apiv4"},"products":{"$ref":"#/components/schemas/api-service-Products-apiv4"},"source":{"$ref":"#/components/schemas/api-service-eventSource-apiv4"},"paymentInfo":{"$ref":"#/components/schemas/api-service-PaymentInfo-apiv4"}}}}}]}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientCancelledTransaction"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/cancelled-transaction \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"orderStatus\":\"string\",\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"discountPercent\":0.1,\"discountCode\":\"string\",\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"source\":\"MOBILE\",\"paymentInfo\":{\"method\":\"CASH\"}}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"orderId\\\":\\\"be466362-71e9-4bdd-ad11-bfacead5276b\\\",\\\"orderStatus\\\":\\\"string\\\",\\\"discountAmount\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"discountPercent\\\":0.1,\\\"discountCode\\\":\\\"string\\\",\\\"value\\\":{\\\"amount\\\":112.25,\\\"currency\\\":\\\"USD\\\"},\\\"revenue\\\":{\\\"amount\\\":64.25,\\\"currency\\\":\\\"USD\\\"},\\\"products\\\":[{\\\"finalUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"name\\\":\\\"Soft drink\\\",\\\"sku\\\":\\\"189784563455\\\",\\\"categories\\\":[\\\"string\\\"],\\\"image\\\":\\\"string\\\",\\\"url\\\":\\\"string\\\",\\\"netUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"tax\\\":0.1,\\\"quantity\\\":2.5,\\\"regularPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"discountPrice\\\":{\\\"amount\\\":15.5,\\\"currency\\\":\\\"USD\\\"},\\\"discountPercent\\\":0.1,\\\"property1\\\":null,\\\"property2\\\":null}],\\\"source\\\":\\\"MOBILE\\\",\\\"paymentInfo\\\":{\\\"method\\\":\\\"CASH\\\"}}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/cancelled-transaction\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {\n    \"orderId\": \"be466362-71e9-4bdd-ad11-bfacead5276b\",\n    \"orderStatus\": \"string\",\n    \"discountAmount\": {\n      \"amount\": 0,\n      \"currency\": \"USD\"\n    },\n    \"discountPercent\": 0.1,\n    \"discountCode\": \"string\",\n    \"value\": {\n      \"amount\": 112.25,\n      \"currency\": \"USD\"\n    },\n    \"revenue\": {\n      \"amount\": 64.25,\n      \"currency\": \"USD\"\n    },\n    \"products\": [\n      {\n        \"finalUnitPrice\": {\n          \"amount\": 3.25,\n          \"currency\": \"USD\"\n        },\n        \"name\": \"Soft drink\",\n        \"sku\": \"189784563455\",\n        \"categories\": [\n          \"string\"\n        ],\n        \"image\": \"string\",\n        \"url\": \"string\",\n        \"netUnitPrice\": {\n          \"amount\": 3.25,\n          \"currency\": \"USD\"\n        },\n        \"tax\": 0.1,\n        \"quantity\": 2.5,\n        \"regularPrice\": {\n          \"amount\": 3.25,\n          \"currency\": \"USD\"\n        },\n        \"discountPrice\": {\n          \"amount\": 15.5,\n          \"currency\": \"USD\"\n        },\n        \"discountPercent\": 0.1,\n        \"property1\": null,\n        \"property2\": null\n      }\n    ],\n    \"source\": \"MOBILE\",\n    \"paymentInfo\": {\n      \"method\": \"CASH\"\n    }\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/cancelled-transaction\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/cancelled-transaction\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {\n    orderId: 'be466362-71e9-4bdd-ad11-bfacead5276b',\n    orderStatus: 'string',\n    discountAmount: {amount: 0, currency: 'USD'},\n    discountPercent: 0.1,\n    discountCode: 'string',\n    value: {amount: 112.25, currency: 'USD'},\n    revenue: {amount: 64.25, currency: 'USD'},\n    products: [\n      {\n        finalUnitPrice: {amount: 3.25, currency: 'USD'},\n        name: 'Soft drink',\n        sku: '189784563455',\n        categories: ['string'],\n        image: 'string',\n        url: 'string',\n        netUnitPrice: {amount: 3.25, currency: 'USD'},\n        tax: 0.1,\n        quantity: 2.5,\n        regularPrice: {amount: 3.25, currency: 'USD'},\n        discountPrice: {amount: 15.5, currency: 'USD'},\n        discountPercent: 0.1,\n        property1: null,\n        property2: null\n      }\n    ],\n    source: 'MOBILE',\n    paymentInfo: {method: 'CASH'}\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/cancelled-transaction');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"orderStatus\":\"string\",\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"discountPercent\":0.1,\"discountCode\":\"string\",\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"source\":\"MOBILE\",\"paymentInfo\":{\"method\":\"CASH\"}}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/cancelled-transaction\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"orderId\\\":\\\"be466362-71e9-4bdd-ad11-bfacead5276b\\\",\\\"orderStatus\\\":\\\"string\\\",\\\"discountAmount\\\":{\\\"amount\\\":0,\\\"currency\\\":\\\"USD\\\"},\\\"discountPercent\\\":0.1,\\\"discountCode\\\":\\\"string\\\",\\\"value\\\":{\\\"amount\\\":112.25,\\\"currency\\\":\\\"USD\\\"},\\\"revenue\\\":{\\\"amount\\\":64.25,\\\"currency\\\":\\\"USD\\\"},\\\"products\\\":[{\\\"finalUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"name\\\":\\\"Soft drink\\\",\\\"sku\\\":\\\"189784563455\\\",\\\"categories\\\":[\\\"string\\\"],\\\"image\\\":\\\"string\\\",\\\"url\\\":\\\"string\\\",\\\"netUnitPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"tax\\\":0.1,\\\"quantity\\\":2.5,\\\"regularPrice\\\":{\\\"amount\\\":3.25,\\\"currency\\\":\\\"USD\\\"},\\\"discountPrice\\\":{\\\"amount\\\":15.5,\\\"currency\\\":\\\"USD\\\"},\\\"discountPercent\\\":0.1,\\\"property1\\\":null,\\\"property2\\\":null}],\\\"source\\\":\\\"MOBILE\\\",\\\"paymentInfo\\\":{\\\"method\\\":\\\"CASH\\\"}}}\")\n  .asString();"}]}},"/v4/events/hit-timer":{"post":{"summary":"Timer hit","description":"Send a 'timer' event.\n\n\nTimers are used for analytics. For example, if you send a event when a profiles starts doing something and another one when they finish, you can collect data about average activity time. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.\n\n\nWhen you send an event to this endpoint, the `action` field is set to `client.hitTimer` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_HIT_TIMER_EVENTS_CREATE`\n","operationId":"ClientHitTimer","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientHitTimer"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/hit-timer \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/hit-timer\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/hit-timer\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/hit-timer\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/hit-timer');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/hit-timer\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\")\n  .asString();"}]}},"/v4/events/searched":{"post":{"summary":"Search requested","description":"Send a 'search requested' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.\n\n\nWhen you send an event to this endpoint, the `action` field is set to `client.search` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_SEARCHED_EVENTS_CREATE`\n","operationId":"ClientSearched","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientSearched"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/searched \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/searched\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/searched\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/searched\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/searched');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/searched\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\")\n  .asString();"}]}},"/v4/events/shared":{"post":{"summary":"Content shared","description":"Send a 'content shared' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.\n\n\nWhen you send an event to this endpoint, the `action` field is set to `client.shared` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_SHARED_EVENTS_CREATE`\n","operationId":"ClientShared","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientShared"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/shared \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/shared\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/shared\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/shared\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/shared');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/shared\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\")\n  .asString();"}]}},"/v4/events/recommendation-seen":{"post":{"summary":"Recommendation viewed","deprecated":true,"description":"This endpoint is deprecated. Use the [AI Events](https://developers.synerise.com/DataManagement/DataManagement.html#tag/AI-Events) endpoints instead.\n\nSend a 'recommendation was viewed' event.\n\n\nWhen you send an event to this endpoint, the `action` field is set to `recommendation.view` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <span title=\"Deprecated\">AI API key (legacy)</span>\n\n**API key permission required:** `API_RECOMENDATION_SEEN_EVENTS_CREATE`\n","operationId":"RecommendationSeen","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-recommendationEventParams-apiv4"}}}]}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/RecommendationSeen"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/recommendation-seen \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"source\":\"MOBILE\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\",\"url\":\"string\",\"category\":\"Beverages\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"productId\\\":\\\"189784563455\\\",\\\"name\\\":\\\"Soft drink\\\",\\\"source\\\":\\\"MOBILE\\\",\\\"campaignHash\\\":\\\"21e0d4b0-bd4e-497b-817b-4fr660284918\\\",\\\"url\\\":\\\"string\\\",\\\"category\\\":\\\"Beverages\\\"}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/recommendation-seen\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {\n    \"productId\": \"189784563455\",\n    \"name\": \"Soft drink\",\n    \"source\": \"MOBILE\",\n    \"campaignHash\": \"21e0d4b0-bd4e-497b-817b-4fr660284918\",\n    \"url\": \"string\",\n    \"category\": \"Beverages\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/recommendation-seen\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/recommendation-seen\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {\n    productId: '189784563455',\n    name: 'Soft drink',\n    source: 'MOBILE',\n    campaignHash: '21e0d4b0-bd4e-497b-817b-4fr660284918',\n    url: 'string',\n    category: 'Beverages'\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/recommendation-seen');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"source\":\"MOBILE\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\",\"url\":\"string\",\"category\":\"Beverages\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/recommendation-seen\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"productId\\\":\\\"189784563455\\\",\\\"name\\\":\\\"Soft drink\\\",\\\"source\\\":\\\"MOBILE\\\",\\\"campaignHash\\\":\\\"21e0d4b0-bd4e-497b-817b-4fr660284918\\\",\\\"url\\\":\\\"string\\\",\\\"category\\\":\\\"Beverages\\\"}}\")\n  .asString();"}]}},"/v4/events/recommendation-click":{"post":{"summary":"Recommendation clicked","deprecated":true,"description":"Send a 'recommendation clicked' event.\nThis endpoint is deprecated. Use the [AI Events](https://developers.synerise.com/DataManagement/DataManagement.html#tag/AI-Events) endpoints instead.\n\n\nWhen you send an event to this endpoint, the `action` field is set to `recommendation.click` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <span title=\"Deprecated\">AI API key (legacy)</span>\n\n**API key permission required:** `API_RECOMMENDATION_CLICK_EVENTS_CREATE`\n","operationId":"RecommendationClicked","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-recommendationEventParams-apiv4"}}}]}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/RecommendationClicked"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/recommendation-click \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"source\":\"MOBILE\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\",\"url\":\"string\",\"category\":\"Beverages\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"productId\\\":\\\"189784563455\\\",\\\"name\\\":\\\"Soft drink\\\",\\\"source\\\":\\\"MOBILE\\\",\\\"campaignHash\\\":\\\"21e0d4b0-bd4e-497b-817b-4fr660284918\\\",\\\"url\\\":\\\"string\\\",\\\"category\\\":\\\"Beverages\\\"}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/recommendation-click\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {\n    \"productId\": \"189784563455\",\n    \"name\": \"Soft drink\",\n    \"source\": \"MOBILE\",\n    \"campaignHash\": \"21e0d4b0-bd4e-497b-817b-4fr660284918\",\n    \"url\": \"string\",\n    \"category\": \"Beverages\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/recommendation-click\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/recommendation-click\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {\n    productId: '189784563455',\n    name: 'Soft drink',\n    source: 'MOBILE',\n    campaignHash: '21e0d4b0-bd4e-497b-817b-4fr660284918',\n    url: 'string',\n    category: 'Beverages'\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/recommendation-click');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"source\":\"MOBILE\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\",\"url\":\"string\",\"category\":\"Beverages\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/recommendation-click\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{\\\"productId\\\":\\\"189784563455\\\",\\\"name\\\":\\\"Soft drink\\\",\\\"source\\\":\\\"MOBILE\\\",\\\"campaignHash\\\":\\\"21e0d4b0-bd4e-497b-817b-4fr660284918\\\",\\\"url\\\":\\\"string\\\",\\\"category\\\":\\\"Beverages\\\"}}\")\n  .asString();"}]}},"/v4/events/visited-screen":{"post":{"summary":"Mobile app screen visited","description":"Send a 'screen in a mobile app was visited' event. This can be used for mobile screen usage tracking. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.\n\nWhen you send an event to this endpoint, the `action` field is set to `screen.view` by the backend.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_VISITED_SCREEN_EVENTS_CREATE`\n","operationId":"ClientVisitedScreen","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/ClientVisitedScreen"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/visited-screen \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/visited-screen\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"params\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/visited-screen\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/visited-screen\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  params: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/visited-screen');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/visited-screen\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"params\\\":{}}\")\n  .asString();"}]}},"/v4/events/custom":{"post":{"summary":"Custom event","description":"Send a custom event.\n\n<span style=\"color:red\"><strong>WARNING:</strong></span> This endpoint doesn't create `product.buy` events from `transaction.charge` events! Use [Create a transaction](#operation/CreateATransaction) or [Batch add or update transactions](#operation/BatchAddOrUpdateTransactions) instead.\n\nIf you don't have a value for a field, omit that field. Do not send null values.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `API_CUSTOM_EVENTS_CREATE`\n\n**User role permission required:** `client_activities: create`\n","operationId":"CustomEvent","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","required":["action"],"properties":{"action":{"$ref":"#/components/schemas/api-service-EventAction-apiv4"},"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/CustomEvent"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/custom \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"action\":\"context.action\",\"params\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"action\\\":\\\"context.action\\\",\\\"params\\\":{}}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/custom\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n  \"action\": \"context.action\",\n  \"params\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/custom\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/custom\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n  action: 'context.action',\n  params: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/custom');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"action\":\"context.action\",\"params\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/custom\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"action\\\":\\\"context.action\\\",\\\"params\\\":{}}\")\n  .asString();"}]}},"/v4/events/batch":{"post":{"summary":"Batch send events","description":"Send a batch of events as an array of objects. You can send up to a 1000 events and the size of the request can't be more than 1 MB.\n\n<span style=\"color:red\"><strong>WARNING:</strong></span> This endpoint doesn't create `product.buy` events from `transaction.charge` events! Use [Create a transaction](#operation/CreateATransaction) or [Batch add or update transactions](#operation/BatchAddOrUpdateTransactions) instead.\n\nIf you don't have a value for a field, omit that field. Do not\nsend null values.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_BATCH_EVENTS_CREATE`\n","operationId":"BatchSendEvents","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"<span style=\"color:red\"><strong>IMPORTANT:</strong> In a request, all events must use the same type of profile identifier. For example, if you want to send some events identified by email and others by customId, you must send them in separate batches.<span>","content":{"application/json":{"schema":{"type":"array","maxItems":1000,"items":{"anyOf":[{"title":"Custom event","allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","required":["action","type"],"properties":{"type":{"$ref":"#/components/schemas/api-service-EventType-apiv4"},"action":{"$ref":"#/components/schemas/api-service-EventAction-apiv4"},"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]},{"title":"Pre-defined event","allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/api-service-EventType-apiv4"},"params":{"$ref":"#/components/schemas/api-service-DefaultParamSource-apiv4"}}}]}]}}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/BatchSendEvents"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/batch \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"type\":\"string\",\"action\":\"context.action\",\"params\":{}}]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"type\\\":\\\"string\\\",\\\"action\\\":\\\"context.action\\\",\\\"params\\\":{}}]\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/batch\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  {\n    \"label\": \"Human-readable label\",\n    \"client\": {\n      \"customId\": \"string\",\n      \"id\": 433230297,\n      \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n      \"email\": \"string\"\n    },\n    \"time\": \"2019-02-07T09:53:56.999+00:00\",\n    \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\",\n    \"type\": \"string\",\n    \"action\": \"context.action\",\n    \"params\": {}\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/batch\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/batch\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([\n  {\n    label: 'Human-readable label',\n    client: {\n      customId: 'string',\n      id: 433230297,\n      uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n      email: 'string'\n    },\n    time: '2019-02-07T09:53:56.999+00:00',\n    eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',\n    type: 'string',\n    action: 'context.action',\n    params: {}\n  }\n]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/batch');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"type\":\"string\",\"action\":\"context.action\",\"params\":{}}]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/batch\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[{\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\",\\\"type\\\":\\\"string\\\",\\\"action\\\":\\\"context.action\\\",\\\"params\\\":{}}]\")\n  .asString();"}]}},"/v4/server/time":{"get":{"summary":"Get server time","description":"Get current server time, needed to send events with a correct timestamp.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**Authentication:** Not required\n","operationId":"getServerTime","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"serverTime":{"type":"string","format":"date-time","description":"Current server time in ISO 8601"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"}},"deprecated":false,"security":[{"JWT":[]}],"tags":["Events"],"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/getServerTime"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/server/time \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/server/time\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/server/time\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/server/time\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/server/time');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/server/time\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/auth/refresh/profile":{"get":{"summary":"Refresh a Workspace token","description":"Retrieve a refreshed JWT Token to prolong the Workspace session.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**Authentication:** Not required\n","operationId":"RefreshABusinessProfileToken","parameters":[{"$ref":"#/components/parameters/api-service-contentTypeHeader-apiv4"},{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"responses":{"200":{"description":"New authorization token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-JWTtoken-apiv4"}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"}},"deprecated":true,"security":[{"JWT":[]}],"tags":["Authorization (deprecated)"],"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/RefreshABusinessProfileToken"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/auth/refresh/profile \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/auth/refresh/profile\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/auth/refresh/profile\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/auth/refresh/profile\",\n  \"headers\": {\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/auth/refresh/profile');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/auth/refresh/profile\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/auth/login/profile":{"post":{"summary":"Log in as Workspace","description":"This endpoint is deprecated. Use [this endpoint](#operation/profileLogin) instead.\n\n---\n\n**Authentication:** Not required\n","operationId":"LogInAsBusinessProfile","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"required":["apiKey"],"type":"object","properties":{"apiKey":{"type":"string","description":"Workspace (formerly Business Profile) API key","example":"64c09614-1b2a-42f7-804d-f647243eb1ab"}}}}},"required":true},"responses":{"200":{"description":"Workspace authorization token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-JWTtoken-apiv4"}}}},"401":{"$ref":"#/components/responses/api-service-401-apiv4"}},"deprecated":true,"tags":["Authorization (deprecated)"],"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/LogInAsBusinessProfile"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/auth/login/profile \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"apiKey\":\"64c09614-1b2a-42f7-804d-f647243eb1ab\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"apiKey\\\":\\\"64c09614-1b2a-42f7-804d-f647243eb1ab\\\"}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/auth/login/profile\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"apiKey\": \"64c09614-1b2a-42f7-804d-f647243eb1ab\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/auth/login/profile\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/auth/login/profile\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({apiKey: '64c09614-1b2a-42f7-804d-f647243eb1ab'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/auth/login/profile');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"apiKey\":\"64c09614-1b2a-42f7-804d-f647243eb1ab\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/auth/login/profile\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"apiKey\\\":\\\"64c09614-1b2a-42f7-804d-f647243eb1ab\\\"}\")\n  .asString();"}]}},"/v4/events/ai-compat/batch":{"post":{"security":[{"JWT":[]},{"TrackerKey":[]}],"tags":["AI Events"],"summary":"Batch upload AI events","description":"Upload a batch of events to the AI engine. A request can only include events of one type.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <span title=\"Deprecated\">AI API key (legacy)</span>\n\n**API key permission required:** `API_BATCH_EVENTS_CREATE`\n","operationId":"publishAiCompatBatchUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-AiCompatBatchEventRequest-apiv4"}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"x-snr-doc-urls":["/api-reference/data-management#tag/AI-Events/operation/publishAiCompatBatchUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/ai-compat/batch \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"eventType\":\"item.search.click\",\"items\":[{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"item\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"eventType\\\":\\\"item.search.click\\\",\\\"items\\\":[{\\\"correlationId\\\":\\\"string\\\",\\\"clientUUID\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"position\\\":0,\\\"searchType\\\":\\\"full-text-search\\\",\\\"item\\\":\\\"string\\\",\\\"EventTimestamp\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"property1\\\":null,\\\"property2\\\":null}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/ai-compat/batch\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"eventType\": \"item.search.click\",\n  \"items\": [\n    {\n      \"correlationId\": \"string\",\n      \"clientUUID\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n      \"position\": 0,\n      \"searchType\": \"full-text-search\",\n      \"item\": \"string\",\n      \"EventTimestamp\": \"2019-02-07T09:53:56.999+00:00\",\n      \"property1\": null,\n      \"property2\": null\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/ai-compat/batch\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/ai-compat/batch\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  eventType: 'item.search.click',\n  items: [\n    {\n      correlationId: 'string',\n      clientUUID: '07243772-008a-42e1-ba37-c3807cebde8f',\n      position: 0,\n      searchType: 'full-text-search',\n      item: 'string',\n      EventTimestamp: '2019-02-07T09:53:56.999+00:00',\n      property1: null,\n      property2: null\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/ai-compat/batch');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"eventType\":\"item.search.click\",\"items\":[{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"item\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/ai-compat/batch\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"eventType\\\":\\\"item.search.click\\\",\\\"items\\\":[{\\\"correlationId\\\":\\\"string\\\",\\\"clientUUID\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"position\\\":0,\\\"searchType\\\":\\\"full-text-search\\\",\\\"item\\\":\\\"string\\\",\\\"EventTimestamp\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"property1\\\":null,\\\"property2\\\":null}]}\")\n  .asString();"}]}},"/v4/events/ai-compat/item.search.click":{"post":{"security":[{"JWT":[]},{"TrackerKey":[]}],"tags":["AI Events"],"summary":"Item clicked in search","description":"Upload an item.search.click event to the AI engine.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <span title=\"Deprecated\">AI API key (legacy)</span>\n\n**API key permission required:** `API_ITEM_SEARCH_CLICK_EVENT_CREATE`\n","operationId":"publishAiCompatItemSearchClickUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-ItemSearchClickEventDataCompat-apiv4"}}}},"responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"x-snr-doc-urls":["/api-reference/data-management#tag/AI-Events/operation/publishAiCompatItemSearchClickUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/ai-compat/item.search.click \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"item\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"correlationId\\\":\\\"string\\\",\\\"clientUUID\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"position\\\":0,\\\"searchType\\\":\\\"full-text-search\\\",\\\"item\\\":\\\"string\\\",\\\"EventTimestamp\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"property1\\\":null,\\\"property2\\\":null}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/ai-compat/item.search.click\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"correlationId\": \"string\",\n  \"clientUUID\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"position\": 0,\n  \"searchType\": \"full-text-search\",\n  \"item\": \"string\",\n  \"EventTimestamp\": \"2019-02-07T09:53:56.999+00:00\",\n  \"property1\": null,\n  \"property2\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/ai-compat/item.search.click\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/ai-compat/item.search.click\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  correlationId: 'string',\n  clientUUID: '07243772-008a-42e1-ba37-c3807cebde8f',\n  position: 0,\n  searchType: 'full-text-search',\n  item: 'string',\n  EventTimestamp: '2019-02-07T09:53:56.999+00:00',\n  property1: null,\n  property2: null\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/ai-compat/item.search.click');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"item\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/ai-compat/item.search.click\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"correlationId\\\":\\\"string\\\",\\\"clientUUID\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"position\\\":0,\\\"searchType\\\":\\\"full-text-search\\\",\\\"item\\\":\\\"string\\\",\\\"EventTimestamp\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"property1\\\":null,\\\"property2\\\":null}\")\n  .asString();"}]}},"/v4/events/ai-compat/suggestion.search.click":{"post":{"security":[{"JWT":[]},{"TrackerKey":[]}],"tags":["AI Events"],"summary":"Suggestion clicked in search","description":"Upload a suggestion.search.click event to the AI engine.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <span title=\"Deprecated\">AI API key (legacy)</span>\n\n**API key permission required:** `API_SUGGESTION_SEARCH_CLICK_EVENT_CREATE`\n","operationId":"publishAiCompatSuggestionSearchClickUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-SuggestionSearchClickEventDataCompat-apiv4"}}}},"responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"x-snr-doc-urls":["/api-reference/data-management#tag/AI-Events/operation/publishAiCompatSuggestionSearchClickUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/ai-compat/suggestion.search.click \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"suggestion\":\"string\",\"property1\":null,\"property2\":null}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"correlationId\\\":\\\"string\\\",\\\"clientUUID\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"position\\\":0,\\\"searchType\\\":\\\"full-text-search\\\",\\\"EventTimestamp\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"suggestion\\\":\\\"string\\\",\\\"property1\\\":null,\\\"property2\\\":null}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/ai-compat/suggestion.search.click\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"correlationId\": \"string\",\n  \"clientUUID\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"position\": 0,\n  \"searchType\": \"full-text-search\",\n  \"EventTimestamp\": \"2019-02-07T09:53:56.999+00:00\",\n  \"suggestion\": \"string\",\n  \"property1\": null,\n  \"property2\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/ai-compat/suggestion.search.click\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/ai-compat/suggestion.search.click\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  correlationId: 'string',\n  clientUUID: '07243772-008a-42e1-ba37-c3807cebde8f',\n  position: 0,\n  searchType: 'full-text-search',\n  EventTimestamp: '2019-02-07T09:53:56.999+00:00',\n  suggestion: 'string',\n  property1: null,\n  property2: null\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/ai-compat/suggestion.search.click');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"suggestion\":\"string\",\"property1\":null,\"property2\":null}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/ai-compat/suggestion.search.click\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"correlationId\\\":\\\"string\\\",\\\"clientUUID\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"position\\\":0,\\\"searchType\\\":\\\"full-text-search\\\",\\\"EventTimestamp\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"suggestion\\\":\\\"string\\\",\\\"property1\\\":null,\\\"property2\\\":null}\")\n  .asString();"}]}},"/v4/events/ai-compat/product.search.click":{"post":{"deprecated":true,"security":[{"JWT":[]},{"TrackerKey":[]}],"tags":["AI Events"],"summary":"Product clicked in search","description":"Upload a product.search.click event to the AI engine.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <span title=\"Deprecated\">AI API key (legacy)</span>\n\n**API key permission required:** `API_PRODUCT_SEARCH_CLICK_EVENT_CREATE`\n","operationId":"publishAiCompatProductSearchClickUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-ProductSearchClickEventDataCompat-apiv4"}}}},"responses":{"202":{"description":"Accepted"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"x-snr-doc-urls":["/api-reference/data-management#tag/AI-Events/operation/publishAiCompatProductSearchClickUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/ai-compat/product.search.click \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"productId\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"correlationId\\\":\\\"string\\\",\\\"clientUUID\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"position\\\":0,\\\"searchType\\\":\\\"full-text-search\\\",\\\"productId\\\":\\\"string\\\",\\\"EventTimestamp\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"property1\\\":null,\\\"property2\\\":null}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/ai-compat/product.search.click\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"correlationId\": \"string\",\n  \"clientUUID\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"position\": 0,\n  \"searchType\": \"full-text-search\",\n  \"productId\": \"string\",\n  \"EventTimestamp\": \"2019-02-07T09:53:56.999+00:00\",\n  \"property1\": null,\n  \"property2\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/ai-compat/product.search.click\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/ai-compat/product.search.click\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  correlationId: 'string',\n  clientUUID: '07243772-008a-42e1-ba37-c3807cebde8f',\n  position: 0,\n  searchType: 'full-text-search',\n  productId: 'string',\n  EventTimestamp: '2019-02-07T09:53:56.999+00:00',\n  property1: null,\n  property2: null\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/ai-compat/product.search.click');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"position\":0,\"searchType\":\"full-text-search\",\"productId\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/ai-compat/product.search.click\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"correlationId\\\":\\\"string\\\",\\\"clientUUID\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"position\\\":0,\\\"searchType\\\":\\\"full-text-search\\\",\\\"productId\\\":\\\"string\\\",\\\"EventTimestamp\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"property1\\\":null,\\\"property2\\\":null}\")\n  .asString();"}]}},"/v4/events/ai-compat/recommendation.click":{"post":{"security":[{"JWT":[]},{"TrackerKey":[]}],"tags":["AI Events"],"summary":"Item clicked in recommendation","description":"Upload a recommendation.click event to the AI engine.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <span title=\"Deprecated\">AI API key (legacy)</span>\n\n**API key permission required:** `API_RECOMMENDATION_CLICK_EVENT_CREATE`\n","operationId":"publishAiCompatRecommendationClickUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-RecommendationClickEventDataCompat-apiv4"}}}},"responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"x-snr-doc-urls":["/api-reference/data-management#tag/AI-Events/operation/publishAiCompatRecommendationClickUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/ai-compat/recommendation.click \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"item\":\"string\",\"campaignId\":\"string\",\"sessionId\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"correlationId\\\":\\\"string\\\",\\\"clientUUID\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"item\\\":\\\"string\\\",\\\"campaignId\\\":\\\"string\\\",\\\"sessionId\\\":\\\"string\\\",\\\"EventTimestamp\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"property1\\\":null,\\\"property2\\\":null}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/ai-compat/recommendation.click\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"correlationId\": \"string\",\n  \"clientUUID\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"item\": \"string\",\n  \"campaignId\": \"string\",\n  \"sessionId\": \"string\",\n  \"EventTimestamp\": \"2019-02-07T09:53:56.999+00:00\",\n  \"property1\": null,\n  \"property2\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/ai-compat/recommendation.click\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/ai-compat/recommendation.click\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  correlationId: 'string',\n  clientUUID: '07243772-008a-42e1-ba37-c3807cebde8f',\n  item: 'string',\n  campaignId: 'string',\n  sessionId: 'string',\n  EventTimestamp: '2019-02-07T09:53:56.999+00:00',\n  property1: null,\n  property2: null\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/ai-compat/recommendation.click');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"item\":\"string\",\"campaignId\":\"string\",\"sessionId\":\"string\",\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"property1\":null,\"property2\":null}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/ai-compat/recommendation.click\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"correlationId\\\":\\\"string\\\",\\\"clientUUID\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"item\\\":\\\"string\\\",\\\"campaignId\\\":\\\"string\\\",\\\"sessionId\\\":\\\"string\\\",\\\"EventTimestamp\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"property1\\\":null,\\\"property2\\\":null}\")\n  .asString();"}]}},"/v4/events/ai-compat/recommendation.view":{"post":{"security":[{"JWT":[]},{"TrackerKey":[]}],"tags":["AI Events"],"summary":"Recommendation viewed","description":"Upload a recommendation.view event to the AI engine.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <span title=\"Deprecated\">AI API key (legacy)</span>\n\n**API key permission required:** `API_RECOMMENDATION_VIEW_EVENT_CREATE`\n","operationId":"publishAiCompatRecommendationViewUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-RecommendationViewEventDataCompat-apiv4"}}}},"responses":{"204":{"description":"No Content"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"x-snr-doc-urls":["/api-reference/data-management#tag/AI-Events/operation/publishAiCompatRecommendationViewUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/ai-compat/recommendation.view \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"items\":[\"string\"],\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"campaignId\":\"string\",\"property1\":null,\"property2\":null}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"correlationId\\\":\\\"string\\\",\\\"clientUUID\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"items\\\":[\\\"string\\\"],\\\"EventTimestamp\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"campaignId\\\":\\\"string\\\",\\\"property1\\\":null,\\\"property2\\\":null}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/ai-compat/recommendation.view\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"correlationId\": \"string\",\n  \"clientUUID\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"items\": [\n    \"string\"\n  ],\n  \"EventTimestamp\": \"2019-02-07T09:53:56.999+00:00\",\n  \"campaignId\": \"string\",\n  \"property1\": null,\n  \"property2\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/ai-compat/recommendation.view\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/ai-compat/recommendation.view\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  correlationId: 'string',\n  clientUUID: '07243772-008a-42e1-ba37-c3807cebde8f',\n  items: ['string'],\n  EventTimestamp: '2019-02-07T09:53:56.999+00:00',\n  campaignId: 'string',\n  property1: null,\n  property2: null\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/ai-compat/recommendation.view');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"correlationId\":\"string\",\"clientUUID\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"items\":[\"string\"],\"EventTimestamp\":\"2019-02-07T09:53:56.999+00:00\",\"campaignId\":\"string\",\"property1\":null,\"property2\":null}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/ai-compat/recommendation.view\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"correlationId\\\":\\\"string\\\",\\\"clientUUID\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"items\\\":[\\\"string\\\"],\\\"EventTimestamp\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"campaignId\\\":\\\"string\\\",\\\"property1\\\":null,\\\"property2\\\":null}\")\n  .asString();"}]}},"/v4/events/recommendation-view":{"post":{"security":[{"JWT":[]}],"tags":["Events"],"summary":"Recommendation viewed","description":"A recommendation was displayed to a customer.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <span title=\"Deprecated\">AI API key (legacy)</span>\n\n**API key permission required:** `API_RECOMMENDATION_VIEW_EVENT_CREATE`\n","operationId":"publishRecommendationViewEventUsingPOST","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-RecommendationViewEventData-apiv4"}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/publishRecommendationViewEventUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/recommendation-view \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"params\":{\"items\":[\"string\"],\"correlationId\":\"string\",\"campaignId\":\"string\"},\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"params\\\":{\\\"items\\\":[\\\"string\\\"],\\\"correlationId\\\":\\\"string\\\",\\\"campaignId\\\":\\\"string\\\"},\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\"}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/recommendation-view\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"params\": {\n    \"items\": [\n      \"string\"\n    ],\n    \"correlationId\": \"string\",\n    \"campaignId\": \"string\"\n  },\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/recommendation-view\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/recommendation-view\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  params: {items: ['string'], correlationId: 'string', campaignId: 'string'},\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/recommendation-view');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"params\":{\"items\":[\"string\"],\"correlationId\":\"string\",\"campaignId\":\"string\"},\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/recommendation-view\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"params\\\":{\\\"items\\\":[\\\"string\\\"],\\\"correlationId\\\":\\\"string\\\",\\\"campaignId\\\":\\\"string\\\"},\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\"}\")\n  .asString();"}]}},"/v4/events/item-search-click":{"post":{"security":[{"JWT":[]}],"tags":["Events"],"summary":"Search result clicked","description":"An item in a search result was clicked or tapped.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <span title=\"Deprecated\">AI API key (legacy)</span>\n\n**API key permission required:** `API_ITEM_SEARCH_CLICK_EVENT_CREATE`\n","operationId":"publishItemSearchClickEventUsingPOST","parameters":[{"$ref":"#/components/parameters/api-service-apiVersionHeader-apiv4"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-ItemSearchClickEventData-apiv4"}}}},"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/api-service-400-apiv4"},"401":{"$ref":"#/components/responses/api-service-401-apiv4"},"403":{"$ref":"#/components/responses/api-service-403-apiv4"},"415":{"$ref":"#/components/responses/api-service-415-apiv4"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Events/operation/publishItemSearchClickEventUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/events/item-search-click \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"params\":{\"item\":\"string\",\"correlationId\":\"string\",\"position\":0,\"searchType\":\"full-text-search\"},\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"params\\\":{\\\"item\\\":\\\"string\\\",\\\"correlationId\\\":\\\"string\\\",\\\"position\\\":0,\\\"searchType\\\":\\\"full-text-search\\\"},\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\"}\"\n\nheaders = {\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/events/item-search-click\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"params\": {\n    \"item\": \"string\",\n    \"correlationId\": \"string\",\n    \"position\": 0,\n    \"searchType\": \"full-text-search\"\n  },\n  \"label\": \"Human-readable label\",\n  \"client\": {\n    \"customId\": \"string\",\n    \"id\": 433230297,\n    \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n    \"email\": \"string\"\n  },\n  \"time\": \"2019-02-07T09:53:56.999+00:00\",\n  \"eventSalt\": \"972346context.action2019-02-07T09:53:56.999+00:00\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/events/item-search-click\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/events/item-search-click\",\n  \"headers\": {\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  params: {\n    item: 'string',\n    correlationId: 'string',\n    position: 0,\n    searchType: 'full-text-search'\n  },\n  label: 'Human-readable label',\n  client: {\n    customId: 'string',\n    id: 433230297,\n    uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n    email: 'string'\n  },\n  time: '2019-02-07T09:53:56.999+00:00',\n  eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/events/item-search-click');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"params\":{\"item\":\"string\",\"correlationId\":\"string\",\"position\":0,\"searchType\":\"full-text-search\"},\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/events/item-search-click\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"params\\\":{\\\"item\\\":\\\"string\\\",\\\"correlationId\\\":\\\"string\\\",\\\"position\\\":0,\\\"searchType\\\":\\\"full-text-search\\\"},\\\"label\\\":\\\"Human-readable label\\\",\\\"client\\\":{\\\"customId\\\":\\\"string\\\",\\\"id\\\":433230297,\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\"},\\\"time\\\":\\\"2019-02-07T09:53:56.999+00:00\\\",\\\"eventSalt\\\":\\\"972346context.action2019-02-07T09:53:56.999+00:00\\\"}\")\n  .asString();"}]}},"/automation-brain/dashboard/diagrams/count-by-trigger-type":{"get":{"security":[{"JWT":[]}],"tags":["Control Center"],"summary":"Count workflows by trigger type","operationId":"countDiagramsByTriggerType","description":"Returns the count of active workflows grouped by trigger node type for the current workspace.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","responses":{"200":{"description":"Workflow counts by trigger type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-DiagramCountByTriggerTypeResponse"}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"}},"x-snr-doc-urls":["/api-reference/automation#tag/Control-Center/operation/countDiagramsByTriggerType"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-trigger-type \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/dashboard/diagrams/count-by-trigger-type\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-trigger-type\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/dashboard/diagrams/count-by-trigger-type\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-trigger-type');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-trigger-type\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/dashboard/diagrams/count-by-status":{"get":{"security":[{"JWT":[]}],"tags":["Control Center"],"summary":"Count workflows by status","operationId":"countDiagramsByStatus","description":"Returns the count of workflows grouped by status for the current workspace.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","responses":{"200":{"description":"Workflow counts by status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-DiagramCountByStatusResponse"}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"}},"x-snr-doc-urls":["/api-reference/automation#tag/Control-Center/operation/countDiagramsByStatus"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-status \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/dashboard/diagrams/count-by-status\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-status\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/dashboard/diagrams/count-by-status\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-status');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-status\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/dashboard/diagrams/most-used":{"get":{"security":[{"JWT":[]}],"tags":["Control Center"],"summary":"Get most used workflows","operationId":"getMostUsedDiagrams","description":"Returns a paginated list of workflows ordered by the number of data points (events) generated by those workflows.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-page"},{"$ref":"#/components/parameters/automation-brain-limit"}],"responses":{"200":{"description":"A page of most used workflows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-PaginatedDashboardDiagramsMostUsed"}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"}},"x-snr-doc-urls":["/api-reference/automation#tag/Control-Center/operation/getMostUsedDiagrams"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/dashboard/diagrams/most-used');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_NUMBER_VALUE',\n  'limit' => 'SOME_NUMBER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/dashboard/diagrams/most-triggered":{"get":{"security":[{"JWT":[]}],"tags":["Control Center"],"summary":"Get most triggered workflows","operationId":"getMostTriggeredDiagrams","description":"Returns a paginated list of workflows ordered by the number of triggered paths.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-page"},{"$ref":"#/components/parameters/automation-brain-limit"}],"responses":{"200":{"description":"A page of most triggered workflows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-PaginatedDashboardDiagramsMostTriggered"}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"}},"x-snr-doc-urls":["/api-reference/automation#tag/Control-Center/operation/getMostTriggeredDiagrams"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/dashboard/diagrams/most-triggered');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_NUMBER_VALUE',\n  'limit' => 'SOME_NUMBER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/dashboard/diagrams/in-progress":{"get":{"security":[{"JWT":[]}],"tags":["Control Center"],"summary":"Get workflows with paths in progress","operationId":"getInProgressDiagrams","description":"Returns a paginated list of workflows ordered by the number of paths currently in progress.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-page"},{"$ref":"#/components/parameters/automation-brain-limit"}],"responses":{"200":{"description":"A page of workflows with paths in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-PaginatedDashboardDiagramsInProgress"}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"}},"x-snr-doc-urls":["/api-reference/automation#tag/Control-Center/operation/getInProgressDiagrams"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/dashboard/diagrams/in-progress');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_NUMBER_VALUE',\n  'limit' => 'SOME_NUMBER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/dashboard/upcoming-status-changes":{"get":{"security":[{"JWT":[]}],"tags":["Control Center"],"summary":"Get upcoming status changes","operationId":"getUpcomingStatusChanges","description":"Returns a paginated list of upcoming workflow status changes (resumes, pauses, and stops).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-page"},{"$ref":"#/components/parameters/automation-brain-limit"}],"responses":{"200":{"description":"A page of upcoming status changes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-PaginatedDashboardUpcomingStatusChanges"}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"}},"x-snr-doc-urls":["/api-reference/automation#tag/Control-Center/operation/getUpcomingStatusChanges"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/dashboard/upcoming-status-changes');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_NUMBER_VALUE',\n  'limit' => 'SOME_NUMBER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/dashboard/upcoming-triggers":{"get":{"security":[{"JWT":[]}],"tags":["Control Center"],"summary":"Get upcoming trigger events","operationId":"getUpcomingTriggers","description":"Returns a paginated list of upcoming trigger events for workflows with active scheduled triggers.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-page"},{"$ref":"#/components/parameters/automation-brain-limit"}],"responses":{"200":{"description":"A page of upcoming trigger events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-PaginatedDashboardUpcomingTriggers"}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"}},"x-snr-doc-urls":["/api-reference/automation#tag/Control-Center/operation/getUpcomingTriggers"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/dashboard/upcoming-triggers');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_NUMBER_VALUE',\n  'limit' => 'SOME_NUMBER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/dashboard/diagrams/with-issues":{"get":{"security":[{"JWT":[]}],"tags":["Control Center"],"summary":"Get workflows with issues","operationId":"getDiagramsWithIssues","description":"Returns a paginated list of workflows that have encountered failures, ordered by failure count.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-timePeriod"},{"name":"context","description":"AutomationContext for which workflows should be returned","in":"query","required":false,"schema":{"type":"string","enum":["Client","Business","Undefined"]}},{"$ref":"#/components/parameters/automation-brain-page"},{"$ref":"#/components/parameters/automation-brain-limit"}],"responses":{"200":{"description":"A page of workflows with issues","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-PaginatedDashboardDiagramsWithIssues"}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"}},"x-snr-doc-urls":["/api-reference/automation#tag/Control-Center/operation/getDiagramsWithIssues"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/dashboard/diagrams/with-issues');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'timePeriod' => 'SOME_STRING_VALUE',\n  'context' => 'SOME_STRING_VALUE',\n  'page' => 'SOME_NUMBER_VALUE',\n  'limit' => 'SOME_NUMBER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/diagrams":{"get":{"security":[{"JWT":[]}],"tags":["Workflows"],"summary":"Get list of workflows/diagrams","operationId":"getPaginatedDiagrams","description":"Retrieve a paginated list of workflows.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-page"},{"$ref":"#/components/parameters/automation-brain-limit"},{"$ref":"#/components/parameters/automation-brain-filterByStatus"},{"$ref":"#/components/parameters/automation-brain-sortDiagrams"},{"$ref":"#/components/parameters/automation-brain-sortByDiagrams"},{"$ref":"#/components/parameters/automation-brain-sortingOrder"},{"$ref":"#/components/parameters/automation-brain-search"},{"$ref":"#/components/parameters/automation-brain-directoryId"},{"$ref":"#/components/parameters/automation-brain-blockTypes"},{"$ref":"#/components/parameters/automation-brain-triggersOnEvent"},{"$ref":"#/components/parameters/automation-brain-generatesEvent"}],"responses":{"200":{"description":"A page of workflows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-PaginatedDiagrams"}}}},"400":{"$ref":"#/components/responses/automation-brain-400"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"},"404":{"$ref":"#/components/responses/automation-brain-404"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflows/operation/getPaginatedDiagrams"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/diagrams');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_NUMBER_VALUE',\n  'limit' => 'SOME_NUMBER_VALUE',\n  'status' => 'SOME_STRING_VALUE',\n  'sort' => 'SOME_STRING_VALUE',\n  'sortBy' => 'createdTime:desc',\n  'order' => 'SOME_STRING_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'blockTypes' => 'SOME_STRING_VALUE',\n  'triggersOnEvent' => 'SOME_STRING_VALUE',\n  'generatesEvent' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/v2/diagrams":{"get":{"security":[{"JWT":[]}],"tags":["Workflows"],"summary":"Get list of workflows","operationId":"getPaginatedDiagramsV2","description":"Retrieve a paginated list of workflows.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-page"},{"$ref":"#/components/parameters/automation-brain-limit50"},{"$ref":"#/components/parameters/automation-brain-filterByStatus"},{"$ref":"#/components/parameters/automation-brain-sortDiagrams"},{"$ref":"#/components/parameters/automation-brain-sortByDiagrams"},{"$ref":"#/components/parameters/automation-brain-sortingOrder"},{"$ref":"#/components/parameters/automation-brain-search"},{"$ref":"#/components/parameters/automation-brain-directoryId"},{"$ref":"#/components/parameters/automation-brain-tagIds"},{"$ref":"#/components/parameters/automation-brain-blockTypes"},{"$ref":"#/components/parameters/automation-brain-triggersOnEvent"},{"$ref":"#/components/parameters/automation-brain-generatesEvent"}],"responses":{"200":{"description":"A page of workflows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-PaginatedDiagramsV2"}}}},"400":{"$ref":"#/components/responses/automation-brain-400"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"},"404":{"$ref":"#/components/responses/automation-brain-404"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflows/operation/getPaginatedDiagramsV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/v2/diagrams');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_NUMBER_VALUE',\n  'limit' => 'SOME_NUMBER_VALUE',\n  'status' => 'SOME_STRING_VALUE',\n  'sort' => 'SOME_STRING_VALUE',\n  'sortBy' => 'createdTime:desc',\n  'order' => 'SOME_STRING_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'tags' => 'SOME_STRING_VALUE',\n  'blockTypes' => 'SOME_STRING_VALUE',\n  'triggersOnEvent' => 'SOME_STRING_VALUE',\n  'generatesEvent' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/diagrams/{diagramId}/run":{"post":{"security":[{"JWT":[]}],"tags":["Workflows"],"summary":"Run/resume workflow","operationId":"runAutomationDiagram","description":"Run a or resume workflow.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_EXECUTE`\n\n**User role permission required:** `automation_2_journeys: execute`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-diagramId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-DiagramActionRequest"}}}},"responses":{"200":{"description":"Workflow run/resumed or was already running","content":{"text/plain":{"schema":{"type":"string","enum":["OK"]}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"},"404":{"$ref":"#/components/responses/automation-brain-404"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflows/operation/runAutomationDiagram"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/run \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"scheduleAction\":\"On\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"scheduleAction\\\":\\\"On\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/automation-brain/diagrams/%7BdiagramId%7D/run\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"scheduleAction\": \"On\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/run\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/diagrams/%7BdiagramId%7D/run\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({scheduleAction: 'On'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/run');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"scheduleAction\":\"On\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/run\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"scheduleAction\\\":\\\"On\\\"}\")\n  .asString();"}]}},"/automation-brain/diagrams/{diagramId}/pause":{"post":{"security":[{"JWT":[]}],"tags":["Workflows"],"summary":"Pause workflow","operationId":"pauseAutomationDiagram","description":"Pause a workflow.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_EXECUTE`\n\n**User role permission required:** `automation_2_journeys: execute`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-diagramId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-DiagramActionRequest"}}}},"responses":{"200":{"description":"Diagram paused or was already paused","content":{"text/plain":{"schema":{"type":"string","enum":["OK"]}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"},"404":{"$ref":"#/components/responses/automation-brain-404"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflows/operation/pauseAutomationDiagram"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/pause \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"scheduleAction\":\"On\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"scheduleAction\\\":\\\"On\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/automation-brain/diagrams/%7BdiagramId%7D/pause\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"scheduleAction\": \"On\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/pause\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/diagrams/%7BdiagramId%7D/pause\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({scheduleAction: 'On'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/pause');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"scheduleAction\":\"On\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/pause\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"scheduleAction\\\":\\\"On\\\"}\")\n  .asString();"}]}},"/automation-brain/diagrams/{diagramId}/stop":{"post":{"security":[{"JWT":[]}],"tags":["Workflows"],"summary":"Stop workflow","operationId":"stopAutomationDiagram","description":"Stop a workflow.\n\n<span style=\"color:red\"><strong>WARNING:</strong> A stopped workflow can't be restarted.</span>\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_EXECUTE`\n\n**User role permission required:** `automation_2_journeys: execute`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-diagramId"}],"responses":{"200":{"description":"Workflow stopped or was already stopped","content":{"text/plain":{"schema":{"type":"string","enum":["OK"]}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"},"404":{"$ref":"#/components/responses/automation-brain-404"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflows/operation/stopAutomationDiagram"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/stop \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/automation-brain/diagrams/%7BdiagramId%7D/stop\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/stop\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/diagrams/%7BdiagramId%7D/stop\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/stop');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/stop\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/diagrams/{diagramId}/schedule":{"post":{"security":[{"JWT":[]}],"tags":["Workflow schedules"],"summary":"Set schedule rules for workflow","description":"Set schedule rules for a workflow. This lets you activate, pause, or stop a workflow according to a plan. \n\nAfter the schedule is set, it must be activated to take effect (see the `POST /automation-brain/diagrams/{diagramId}/schedule-on` method).  \n\n**The backend doesn't validate the logic of the schedule**. You must ensure it's well-built (rules make logical sense) and complies with the structure of the workflow (such as trigger node time rules). See [\"Workflow Scheduler > Important\" in the Synerise Hub](https://hub.synerise.com/docs/automation/workflow-scheduler#important).\n\nThe contents of this request overwrite an existing schedule.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_UPDATE`\n\n**User role permission required:** `automation_2_journeys: update`\n","operationId":"setDiagramSchedule","parameters":[{"$ref":"#/components/parameters/automation-brain-diagramId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-DiagramScheduleRequest"}}},"required":true},"responses":{"200":{"description":"Schedule saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-DiagramSchedule"}}}},"400":{"$ref":"#/components/responses/automation-brain-SimpleError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"},"404":{"$ref":"#/components/responses/automation-brain-404"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflow-schedules/operation/setDiagramSchedule"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"timezone\":\"Europe/Paris\",\"rules\":[{\"ruleId\":\"70af3071-65d9-4ec3-b3cb-5283e8d55dac\",\"actionType\":\"Resume\",\"repeatModel\":{\"repeatType\":\"Interval\",\"body\":{\"start\":\"2020-01-01T01:00:00.000\",\"intervalSeconds\":6000}}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"timezone\\\":\\\"Europe/Paris\\\",\\\"rules\\\":[{\\\"ruleId\\\":\\\"70af3071-65d9-4ec3-b3cb-5283e8d55dac\\\",\\\"actionType\\\":\\\"Resume\\\",\\\"repeatModel\\\":{\\\"repeatType\\\":\\\"Interval\\\",\\\"body\\\":{\\\"start\\\":\\\"2020-01-01T01:00:00.000\\\",\\\"intervalSeconds\\\":6000}}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/automation-brain/diagrams/%7BdiagramId%7D/schedule\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"timezone\": \"Europe/Paris\",\n  \"rules\": [\n    {\n      \"ruleId\": \"70af3071-65d9-4ec3-b3cb-5283e8d55dac\",\n      \"actionType\": \"Resume\",\n      \"repeatModel\": {\n        \"repeatType\": \"Interval\",\n        \"body\": {\n          \"start\": \"2020-01-01T01:00:00.000\",\n          \"intervalSeconds\": 6000\n        }\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/diagrams/%7BdiagramId%7D/schedule\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  timezone: 'Europe/Paris',\n  rules: [\n    {\n      ruleId: '70af3071-65d9-4ec3-b3cb-5283e8d55dac',\n      actionType: 'Resume',\n      repeatModel: {\n        repeatType: 'Interval',\n        body: {start: '2020-01-01T01:00:00.000', intervalSeconds: 6000}\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"timezone\":\"Europe/Paris\",\"rules\":[{\"ruleId\":\"70af3071-65d9-4ec3-b3cb-5283e8d55dac\",\"actionType\":\"Resume\",\"repeatModel\":{\"repeatType\":\"Interval\",\"body\":{\"start\":\"2020-01-01T01:00:00.000\",\"intervalSeconds\":6000}}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"timezone\\\":\\\"Europe/Paris\\\",\\\"rules\\\":[{\\\"ruleId\\\":\\\"70af3071-65d9-4ec3-b3cb-5283e8d55dac\\\",\\\"actionType\\\":\\\"Resume\\\",\\\"repeatModel\\\":{\\\"repeatType\\\":\\\"Interval\\\",\\\"body\\\":{\\\"start\\\":\\\"2020-01-01T01:00:00.000\\\",\\\"intervalSeconds\\\":6000}}}]}\")\n  .asString();"}]},"get":{"security":[{"JWT":[]}],"tags":["Workflow schedules"],"summary":"Get workflow schedule","operationId":"getDiagramSchedule","description":"Get all schedule rules of a workflow.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-diagramId"}],"responses":{"200":{"description":"Schedule rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-DiagramSchedule"}}}},"400":{"$ref":"#/components/responses/automation-brain-SimpleError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"},"404":{"$ref":"#/components/responses/automation-brain-404"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflow-schedules/operation/getDiagramSchedule"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/diagrams/%7BdiagramId%7D/schedule\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/diagrams/%7BdiagramId%7D/schedule\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/diagrams/{diagramId}/schedule-on":{"post":{"security":[{"JWT":[]}],"tags":["Workflow schedules"],"summary":"Enable schedule for workflow","operationId":"scheduleOnAutomationDiagram","description":"Enable schedule for a workflow. The schedule must first be set with `POST /automation-brain/diagrams/{diagramId}/schedule`\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_EXECUTE`\n\n**User role permission required:** `automation_2_journeys: execute`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-diagramId"}],"responses":{"200":{"description":"Workflow scheduled or was already scheduled","content":{"text/plain":{"schema":{"type":"string","enum":["OK"]}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"},"404":{"$ref":"#/components/responses/automation-brain-404"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflow-schedules/operation/scheduleOnAutomationDiagram"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-on \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/automation-brain/diagrams/%7BdiagramId%7D/schedule-on\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-on\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/diagrams/%7BdiagramId%7D/schedule-on\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-on');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-on\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/diagrams/{diagramId}/schedule-off":{"post":{"security":[{"JWT":[]}],"tags":["Workflow schedules"],"summary":"Disable schedule for workflow","operationId":"scheduleOffAutomationDiagram","description":"Disable schedule for a workflow.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_EXECUTE`\n\n**User role permission required:** `automation_2_journeys: execute`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-diagramId"}],"responses":{"200":{"description":"Workflow unscheduled or was already unscheduled","content":{"text/plain":{"schema":{"type":"string","enum":["OK"]}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"401":{"$ref":"#/components/responses/automation-brain-401"},"403":{"$ref":"#/components/responses/automation-brain-403"},"404":{"$ref":"#/components/responses/automation-brain-404"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflow-schedules/operation/scheduleOffAutomationDiagram"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-off \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/automation-brain/diagrams/%7BdiagramId%7D/schedule-off\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-off\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/diagrams/%7BdiagramId%7D/schedule-off\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-off');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-off\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/diagrams/{diagramId}/schedule-executed-events":{"get":{"security":[{"JWT":[]}],"tags":["Workflow schedules"],"summary":"Get schedule execution events","operationId":"getDiagramScheduleExecutedEvents","description":"Get events (rule executions) that were already processed for the workflow. You can limit the list to a time range defined by `start` and `end`.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-diagramId"},{"name":"start","in":"query","required":true,"description":"Start date","schema":{"type":"string","format":"date-time"}},{"$ref":"#/components/parameters/automation-brain-ScheduleEventFilterEnd"}],"responses":{"200":{"description":"Executed schedule events","content":{"application/json":{"schema":{"type":"object","properties":{"hasMore":{"$ref":"#/components/schemas/automation-brain-HasMore"},"events":{"type":"array","description":"Executed schedule rules","items":{"$ref":"#/components/schemas/automation-brain-ExecutedDiagramScheduleEvent"}}},"required":["hasMore","events"]}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"403":{"$ref":"#/components/responses/automation-brain-403"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflow-schedules/operation/getDiagramScheduleExecutedEvents"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-executed-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/diagrams/%7BdiagramId%7D/schedule-executed-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-executed-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/diagrams/%7BdiagramId%7D/schedule-executed-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-executed-events');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'start' => 'SOME_STRING_VALUE',\n  'end' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-executed-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/diagrams/{diagramId}/schedule-upcoming-events":{"get":{"security":[{"JWT":[]}],"tags":["Workflow schedules"],"summary":"Get upcoming schedule events","operationId":"getDiagramSchedulePendingEvents","description":"Get a list of upcoming events (rule executions) caused by a schedule. You can limit the list to a time range defined by `start` and `end`.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-diagramId"},{"$ref":"#/components/parameters/automation-brain-ScheduleEventFilterStart"},{"$ref":"#/components/parameters/automation-brain-ScheduleEventFilterEnd"}],"responses":{"200":{"description":"Upcoming schedule events","content":{"application/json":{"schema":{"type":"object","properties":{"hasMore":{"$ref":"#/components/schemas/automation-brain-HasMore"},"events":{"type":"array","description":"Upcoming schedule rule executions","items":{"$ref":"#/components/schemas/automation-brain-UpcomingDiagramScheduleEvent"}}},"required":["hasMore","events"]}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"403":{"$ref":"#/components/responses/automation-brain-403"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflow-schedules/operation/getDiagramSchedulePendingEvents"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-upcoming-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/diagrams/%7BdiagramId%7D/schedule-upcoming-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-upcoming-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/diagrams/%7BdiagramId%7D/schedule-upcoming-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-upcoming-events');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'start' => 'SOME_STRING_VALUE',\n  'end' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-upcoming-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/diagrams/{diagramId}/upcoming-status-changes":{"get":{"security":[{"JWT":[]}],"tags":["Workflow schedules"],"summary":"Get upcoming workflow status changes","operationId":"getDiagramUpcomingStatusChanges","description":"Get upcoming status changes for a workflow. You can limit the list to a time range defined by `start` and `end`.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-diagramId"},{"name":"initialStatus","in":"query","description":"Initial status used if diagramId is not present (default: Pending)","schema":{"type":"string"}},{"$ref":"#/components/parameters/automation-brain-ScheduleEventFilterStart"},{"$ref":"#/components/parameters/automation-brain-ScheduleEventFilterEnd"}],"responses":{"200":{"description":"Upcoming status changes","content":{"application/json":{"schema":{"type":"object","properties":{"hasMore":{"$ref":"#/components/schemas/automation-brain-HasMore"},"events":{"type":"array","description":"Upcoming status changes of the workflow","items":{"$ref":"#/components/schemas/automation-brain-UpcomingDiagramStatusChange"}}},"required":["hasMore","events"]}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"403":{"$ref":"#/components/responses/automation-brain-403"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflow-schedules/operation/getDiagramUpcomingStatusChanges"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/diagrams/%7BdiagramId%7D/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/diagrams/%7BdiagramId%7D/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/upcoming-status-changes');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'initialStatus' => 'SOME_STRING_VALUE',\n  'start' => 'SOME_STRING_VALUE',\n  'end' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/diagrams/{diagramId}/statistics":{"get":{"security":[{"JWT":[]}],"tags":["Workflows"],"summary":"Get workflow statistics with node details","operationId":"getDiagramStatistics","description":"Retrieve workflow execution statistics, including node statistics and metadata (name, type).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATION_STATS_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-diagramId"},{"name":"timePeriod","in":"query","description":"Time period for the statistics","required":false,"schema":{"type":"string","enum":["currentHour","currentDay","previousHour","previousDay"]}}],"responses":{"200":{"description":"Diagram statistics with node info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-ExternalDiagramStatsWithInfo"}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"403":{"$ref":"#/components/responses/automation-brain-403"},"404":{"description":"Diagram not found"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflows/operation/getDiagramStatistics"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/statistics');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'timePeriod' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/automation-brain/diagrams/{diagramId}/blocks/{blockId}/statistics":{"get":{"security":[{"JWT":[]}],"tags":["Workflows"],"summary":"Get node statistics","operationId":"getBlockStatistics","description":"Retrieve execution statistics for a single block enriched with block metadata (name, type).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `AUTOMATION_STATS_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"$ref":"#/components/parameters/automation-brain-diagramId"},{"name":"blockId","in":"path","description":"UUID of the node","required":true,"schema":{"type":"string"}},{"name":"timePeriod","in":"query","description":"Time period for statistics","required":false,"schema":{"type":"string","enum":["currentHour","currentDay","previousHour","previousDay"]}}],"responses":{"200":{"description":"Block statistics with block info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-ExternalBlockStatsWithInfo"}}}},"400":{"$ref":"#/components/responses/automation-brain-genericError"},"403":{"$ref":"#/components/responses/automation-brain-403"},"404":{"description":"Diagram or block not found"}},"x-snr-doc-urls":["/api-reference/automation#tag/Workflows/operation/getBlockStatistics"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'timePeriod' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/brickworks/v1/schemas":{"get":{"tags":["Brickworks: Schemas"],"summary":"Get schemas","description":"Retrieve a list of schemas. You can paginate the results, filter by schema type, and search for a phrase in schema names.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_SCHEMAS_READ`\n\n**User role permission required:** `assets_brickworks: read`\n","operationId":"getSchemas","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-queryLimit"},{"$ref":"#/components/parameters/brickworks-service-queryPage"},{"$ref":"#/components/parameters/brickworks-service-querySearch"},{"$ref":"#/components/parameters/brickworks-service-querySortBy"},{"$ref":"#/components/parameters/brickworks-service-querySchemaTypes"}],"responses":{"200":{"description":"Schema objects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-SchemaPagingResult"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Schemas/operation/getSchemas"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/brickworks/v1/schemas?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=updatedAt%3Aasc&schemaTypes=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/brickworks/v1/schemas?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=updatedAt%3Aasc&schemaTypes=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/brickworks/v1/schemas?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=updatedAt%3Aasc&schemaTypes=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/brickworks/v1/schemas?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=updatedAt%3Aasc&schemaTypes=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/brickworks/v1/schemas');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'limit' => 'SOME_INTEGER_VALUE',\n  'page' => 'SOME_INTEGER_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'sortBy' => 'updatedAt:asc',\n  'schemaTypes' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/brickworks/v1/schemas?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=updatedAt%3Aasc&schemaTypes=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Brickworks: Schemas"],"summary":"Create schema","description":"Create a new schema\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_SCHEMAS_CREATE`\n\n**User role permission required:** `assets_brickworks: create`\n","operationId":"createSchema","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-CreateSchemaRequest"}}}},"responses":{"200":{"description":"Details of the created schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-Schema"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Schemas/operation/createSchema"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/brickworks/v1/schemas \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"appId\":\"string\",\"displayName\":\"string\",\"description\":\"string\",\"fields\":{\"type\":\"object\",\"properties\":{\"property1\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false},\"property2\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false}},\"required\":[\"string\"],\"allOf\":[{\"if\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"then\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"else\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}}}],\"additionalProperties\":true},\"displayConfiguration\":{\"ordering\":{\"property1\":0,\"property2\":0},\"metadata\":{\"property1\":{\"title\":\"empty title\",\"description\":\"string\",\"useAsRecordName\":false},\"property2\":{\"title\":\"empty title\",\"description\":\"string\",\"useAsRecordName\":false}}},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"type\\\\\\\":\\\\\\\"ATTRIBUTE\\\\\\\",\\\\\\\"attribute\\\\\\\":{\\\\\\\"expressions\\\\\\\":[{\\\\\\\"constraint\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"BOOL\\\\\\\",\\\\\\\"logic\\\\\\\":\\\\\\\"IS_TRUE\\\\\\\"},\\\\\\\"attribute\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"PARAM\\\\\\\",\\\\\\\"param\\\\\\\":\\\\\\\"exampleBool\\\\\\\"}}]}}]}}]}}\"},\"schemaType\":\"SIMPLE\",\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"appId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"fields\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"property1\\\":{\\\"type\\\":\\\"number\\\",\\\"subtype\\\":\\\"number\\\",\\\"minimum\\\":0.1,\\\"maximum\\\":0.1,\\\"unique\\\":true,\\\"searchable\\\":true,\\\"default\\\":0,\\\"isConstantField\\\":false},\\\"property2\\\":{\\\"type\\\":\\\"number\\\",\\\"subtype\\\":\\\"number\\\",\\\"minimum\\\":0.1,\\\"maximum\\\":0.1,\\\"unique\\\":true,\\\"searchable\\\":true,\\\"default\\\":0,\\\"isConstantField\\\":false}},\\\"required\\\":[\\\"string\\\"],\\\"allOf\\\":[{\\\"if\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}},\\\"then\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}},\\\"else\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}}}],\\\"additionalProperties\\\":true},\\\"displayConfiguration\\\":{\\\"ordering\\\":{\\\"property1\\\":0,\\\"property2\\\":0},\\\"metadata\\\":{\\\"property1\\\":{\\\"title\\\":\\\"empty title\\\",\\\"description\\\":\\\"string\\\",\\\"useAsRecordName\\\":false},\\\"property2\\\":{\\\"title\\\":\\\"empty title\\\",\\\"description\\\":\\\"string\\\",\\\"useAsRecordName\\\":false}}},\\\"audience\\\":{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"query\\\":\\\"{\\\\\\\\\\\\\\\"analysis\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"title\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"segments\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"title\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"filter\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"matching\\\\\\\\\\\\\\\":true,\\\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"ATTRIBUTE\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"constraint\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"BOOL\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"logic\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"IS_TRUE\\\\\\\\\\\\\\\"},\\\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"PARAM\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"param\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"exampleBool\\\\\\\\\\\\\\\"}}]}}]}}]}}\\\"},\\\"schemaType\\\":\\\"SIMPLE\\\",\\\"lambdaId\\\":\\\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/brickworks/v1/schemas\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"appId\": \"string\",\n  \"displayName\": \"string\",\n  \"description\": \"string\",\n  \"fields\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"property1\": {\n        \"type\": \"number\",\n        \"subtype\": \"number\",\n        \"minimum\": 0.1,\n        \"maximum\": 0.1,\n        \"unique\": true,\n        \"searchable\": true,\n        \"default\": 0,\n        \"isConstantField\": false\n      },\n      \"property2\": {\n        \"type\": \"number\",\n        \"subtype\": \"number\",\n        \"minimum\": 0.1,\n        \"maximum\": 0.1,\n        \"unique\": true,\n        \"searchable\": true,\n        \"default\": 0,\n        \"isConstantField\": false\n      }\n    },\n    \"required\": [\n      \"string\"\n    ],\n    \"allOf\": [\n      {\n        \"if\": {\n          \"required\": [\n            \"string\"\n          ],\n          \"properties\": {\n            \"property1\": {\n              \"minItems\": 0,\n              \"maxItems\": 0,\n              \"uniqueItems\": true,\n              \"minimum\": 0,\n              \"maximum\": 0,\n              \"pattern\": \"string\",\n              \"const\": null,\n              \"enum\": [\n                \"string\"\n              ],\n              \"not\": {}\n            },\n            \"property2\": {\n              \"minItems\": 0,\n              \"maxItems\": 0,\n              \"uniqueItems\": true,\n              \"minimum\": 0,\n              \"maximum\": 0,\n              \"pattern\": \"string\",\n              \"const\": null,\n              \"enum\": [\n                \"string\"\n              ],\n              \"not\": {}\n            }\n          }\n        },\n        \"then\": {\n          \"required\": [\n            \"string\"\n          ],\n          \"properties\": {\n            \"property1\": {\n              \"minItems\": 0,\n              \"maxItems\": 0,\n              \"uniqueItems\": true,\n              \"minimum\": 0,\n              \"maximum\": 0,\n              \"pattern\": \"string\",\n              \"const\": null,\n              \"enum\": [\n                \"string\"\n              ],\n              \"not\": {}\n            },\n            \"property2\": {\n              \"minItems\": 0,\n              \"maxItems\": 0,\n              \"uniqueItems\": true,\n              \"minimum\": 0,\n              \"maximum\": 0,\n              \"pattern\": \"string\",\n              \"const\": null,\n              \"enum\": [\n                \"string\"\n              ],\n              \"not\": {}\n            }\n          }\n        },\n        \"else\": {\n          \"required\": [\n            \"string\"\n          ],\n          \"properties\": {\n            \"property1\": {\n              \"minItems\": 0,\n              \"maxItems\": 0,\n              \"uniqueItems\": true,\n              \"minimum\": 0,\n              \"maximum\": 0,\n              \"pattern\": \"string\",\n              \"const\": null,\n              \"enum\": [\n                \"string\"\n              ],\n              \"not\": {}\n            },\n            \"property2\": {\n              \"minItems\": 0,\n              \"maxItems\": 0,\n              \"uniqueItems\": true,\n              \"minimum\": 0,\n              \"maximum\": 0,\n              \"pattern\": \"string\",\n              \"const\": null,\n              \"enum\": [\n                \"string\"\n              ],\n              \"not\": {}\n            }\n          }\n        }\n      }\n    ],\n    \"additionalProperties\": true\n  },\n  \"displayConfiguration\": {\n    \"ordering\": {\n      \"property1\": 0,\n      \"property2\": 0\n    },\n    \"metadata\": {\n      \"property1\": {\n        \"title\": \"empty title\",\n        \"description\": \"string\",\n        \"useAsRecordName\": false\n      },\n      \"property2\": {\n        \"title\": \"empty title\",\n        \"description\": \"string\",\n        \"useAsRecordName\": false\n      }\n    }\n  },\n  \"audience\": {\n    \"targetType\": \"SEGMENT\",\n    \"segments\": [\n      \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n    ],\n    \"query\": \"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"type\\\\\\\":\\\\\\\"ATTRIBUTE\\\\\\\",\\\\\\\"attribute\\\\\\\":{\\\\\\\"expressions\\\\\\\":[{\\\\\\\"constraint\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"BOOL\\\\\\\",\\\\\\\"logic\\\\\\\":\\\\\\\"IS_TRUE\\\\\\\"},\\\\\\\"attribute\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"PARAM\\\\\\\",\\\\\\\"param\\\\\\\":\\\\\\\"exampleBool\\\\\\\"}}]}}]}}]}}\"\n  },\n  \"schemaType\": \"SIMPLE\",\n  \"lambdaId\": \"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/brickworks/v1/schemas\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/brickworks/v1/schemas\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  appId: 'string',\n  displayName: 'string',\n  description: 'string',\n  fields: {\n    type: 'object',\n    properties: {\n      property1: {\n        type: 'number',\n        subtype: 'number',\n        minimum: 0.1,\n        maximum: 0.1,\n        unique: true,\n        searchable: true,\n        default: 0,\n        isConstantField: false\n      },\n      property2: {\n        type: 'number',\n        subtype: 'number',\n        minimum: 0.1,\n        maximum: 0.1,\n        unique: true,\n        searchable: true,\n        default: 0,\n        isConstantField: false\n      }\n    },\n    required: ['string'],\n    allOf: [\n      {\n        if: {\n          required: ['string'],\n          properties: {\n            property1: {\n              minItems: 0,\n              maxItems: 0,\n              uniqueItems: true,\n              minimum: 0,\n              maximum: 0,\n              pattern: 'string',\n              const: null,\n              enum: ['string'],\n              not: {}\n            },\n            property2: {\n              minItems: 0,\n              maxItems: 0,\n              uniqueItems: true,\n              minimum: 0,\n              maximum: 0,\n              pattern: 'string',\n              const: null,\n              enum: ['string'],\n              not: {}\n            }\n          }\n        },\n        then: {\n          required: ['string'],\n          properties: {\n            property1: {\n              minItems: 0,\n              maxItems: 0,\n              uniqueItems: true,\n              minimum: 0,\n              maximum: 0,\n              pattern: 'string',\n              const: null,\n              enum: ['string'],\n              not: {}\n            },\n            property2: {\n              minItems: 0,\n              maxItems: 0,\n              uniqueItems: true,\n              minimum: 0,\n              maximum: 0,\n              pattern: 'string',\n              const: null,\n              enum: ['string'],\n              not: {}\n            }\n          }\n        },\n        else: {\n          required: ['string'],\n          properties: {\n            property1: {\n              minItems: 0,\n              maxItems: 0,\n              uniqueItems: true,\n              minimum: 0,\n              maximum: 0,\n              pattern: 'string',\n              const: null,\n              enum: ['string'],\n              not: {}\n            },\n            property2: {\n              minItems: 0,\n              maxItems: 0,\n              uniqueItems: true,\n              minimum: 0,\n              maximum: 0,\n              pattern: 'string',\n              const: null,\n              enum: ['string'],\n              not: {}\n            }\n          }\n        }\n      }\n    ],\n    additionalProperties: true\n  },\n  displayConfiguration: {\n    ordering: {property1: 0, property2: 0},\n    metadata: {\n      property1: {title: 'empty title', description: 'string', useAsRecordName: false},\n      property2: {title: 'empty title', description: 'string', useAsRecordName: false}\n    }\n  },\n  audience: {\n    targetType: 'SEGMENT',\n    segments: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n    query: '{\\\"analysis\\\":{\\\"title\\\":\\\"notempty\\\",\\\"segments\\\":[{\\\"title\\\":\\\"notempty\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"exampleBool\\\"}}]}}]}}]}}'\n  },\n  schemaType: 'SIMPLE',\n  lambdaId: '19f4e1cf-838e-4f7d-9400-1ddf9fb6829d'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/brickworks/v1/schemas');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"appId\":\"string\",\"displayName\":\"string\",\"description\":\"string\",\"fields\":{\"type\":\"object\",\"properties\":{\"property1\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false},\"property2\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false}},\"required\":[\"string\"],\"allOf\":[{\"if\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"then\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"else\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}}}],\"additionalProperties\":true},\"displayConfiguration\":{\"ordering\":{\"property1\":0,\"property2\":0},\"metadata\":{\"property1\":{\"title\":\"empty title\",\"description\":\"string\",\"useAsRecordName\":false},\"property2\":{\"title\":\"empty title\",\"description\":\"string\",\"useAsRecordName\":false}}},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":\"{\\\\\\\\\\\\\"analysis\\\\\\\\\\\\\":{\\\\\\\\\\\\\"title\\\\\\\\\\\\\":\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\",\\\\\\\\\\\\\"segments\\\\\\\\\\\\\":[{\\\\\\\\\\\\\"title\\\\\\\\\\\\\":\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\",\\\\\\\\\\\\\"filter\\\\\\\\\\\\\":{\\\\\\\\\\\\\"matching\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\":[{\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"ATTRIBUTE\\\\\\\\\\\\\",\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\":{\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\":[{\\\\\\\\\\\\\"constraint\\\\\\\\\\\\\":{\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"BOOL\\\\\\\\\\\\\",\\\\\\\\\\\\\"logic\\\\\\\\\\\\\":\\\\\\\\\\\\\"IS_TRUE\\\\\\\\\\\\\"},\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\":{\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"PARAM\\\\\\\\\\\\\",\\\\\\\\\\\\\"param\\\\\\\\\\\\\":\\\\\\\\\\\\\"exampleBool\\\\\\\\\\\\\"}}]}}]}}]}}\"},\"schemaType\":\"SIMPLE\",\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/brickworks/v1/schemas\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"appId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"fields\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"property1\\\":{\\\"type\\\":\\\"number\\\",\\\"subtype\\\":\\\"number\\\",\\\"minimum\\\":0.1,\\\"maximum\\\":0.1,\\\"unique\\\":true,\\\"searchable\\\":true,\\\"default\\\":0,\\\"isConstantField\\\":false},\\\"property2\\\":{\\\"type\\\":\\\"number\\\",\\\"subtype\\\":\\\"number\\\",\\\"minimum\\\":0.1,\\\"maximum\\\":0.1,\\\"unique\\\":true,\\\"searchable\\\":true,\\\"default\\\":0,\\\"isConstantField\\\":false}},\\\"required\\\":[\\\"string\\\"],\\\"allOf\\\":[{\\\"if\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}},\\\"then\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}},\\\"else\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}}}],\\\"additionalProperties\\\":true},\\\"displayConfiguration\\\":{\\\"ordering\\\":{\\\"property1\\\":0,\\\"property2\\\":0},\\\"metadata\\\":{\\\"property1\\\":{\\\"title\\\":\\\"empty title\\\",\\\"description\\\":\\\"string\\\",\\\"useAsRecordName\\\":false},\\\"property2\\\":{\\\"title\\\":\\\"empty title\\\",\\\"description\\\":\\\"string\\\",\\\"useAsRecordName\\\":false}}},\\\"audience\\\":{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"query\\\":\\\"{\\\\\\\\\\\\\\\"analysis\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"title\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"segments\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"title\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"filter\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"matching\\\\\\\\\\\\\\\":true,\\\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"ATTRIBUTE\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"constraint\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"BOOL\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"logic\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"IS_TRUE\\\\\\\\\\\\\\\"},\\\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"PARAM\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"param\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"exampleBool\\\\\\\\\\\\\\\"}}]}}]}}]}}\\\"},\\\"schemaType\\\":\\\"SIMPLE\\\",\\\"lambdaId\\\":\\\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\\\"}\")\n  .asString();"}]}},"/brickworks/v1/schemas/{SchemaIdentifier}":{"get":{"tags":["Brickworks: Schemas"],"summary":"Get schema","description":"Retrieve the details of a schema.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_SCHEMAS_READ`\n\n**User role permission required:** `assets_brickworks: read`\n","operationId":"getSchemaById","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"}],"responses":{"200":{"description":"Details of the schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-Schema"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Schemas/operation/getSchemaById"]},"put":{"tags":["Brickworks: Schemas"],"summary":"Update schema","description":"Update a schema.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_SCHEMAS_UPDATE`\n\n**User role permission required:** `assets_brickworks: update`\n","operationId":"updateSchema","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"}],"requestBody":{"description":"Schema properties to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-UpdateSchemaRequest"}}}},"responses":{"200":{"description":"Schema updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-Schema"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Schemas/operation/updateSchema"]},"delete":{"tags":["Brickworks: Schemas"],"summary":"Delete schema","description":"Delete a schema.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_SCHEMAS_DELETE`\n\n**User role permission required:** `assets_brickworks: delete`\n","operationId":"deleteSchema","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"}],"responses":{"204":{"description":"Schema deleted"},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Schemas/operation/deleteSchema"]}},"/brickworks/v1/schemas/{SchemaIdentifier}/records":{"get":{"tags":["Brickworks: Records"],"summary":"Get records from schema","description":"Retrieve records from a schema. You can paginate, sort, and refine the results. By default, the records are sorted by status (published > scheduled > draft > unpublished) and then by last update time.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_READ`\n\n**User role permission required:** `assets_brickworks: read`\n","operationId":"getRecordsFromSchema","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"},{"$ref":"#/components/parameters/brickworks-service-queryLimit"},{"$ref":"#/components/parameters/brickworks-service-queryPage"},{"$ref":"#/components/parameters/brickworks-service-queryRecordFilters"},{"$ref":"#/components/parameters/brickworks-service-querySearchRecords"},{"$ref":"#/components/parameters/brickworks-service-querySortByRecords"},{"$ref":"#/components/parameters/brickworks-service-queryIds"},{"$ref":"#/components/parameters/brickworks-service-queryStatuses"},{"$ref":"#/components/parameters/brickworks-service-querySlugs"},{"$ref":"#/components/parameters/brickworks-service-queryFields"}],"responses":{"200":{"description":"A page of records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-RecordPagingResult"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Records/operation/getRecordsFromSchema"]},"post":{"tags":["Brickworks: Records"],"summary":"Add record to schema","description":"Add a record to a schema\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_CREATE`\n\n**User role permission required:** `assets_brickworks: create`\n","operationId":"addRecordToSchema","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"}],"requestBody":{"description":"Add record to schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-AddRecordToSchemaRequest"}}}},"responses":{"200":{"description":"Record data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-Record"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Records/operation/addRecordToSchema"]}},"/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}":{"get":{"tags":["Brickworks: Records"],"summary":"Get record","description":"Retrieve a record. You can select the fields that you want to include in the response.\n\nIf the record has multiple versions in different publishing states, the first available version is returned according to publishing status priority:\n  - PUBLISHED\n  - DRAFT\n  - SCHEDULED\n  - UNPUBLISHED\nYou can use the `statuses` parameter to limit the lookup.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_READ`\n\n**User role permission required:** `assets_brickworks: read`\n","operationId":"getRecord","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"},{"$ref":"#/components/parameters/brickworks-service-pathRecordIdentifier"},{"$ref":"#/components/parameters/brickworks-service-queryFields"},{"$ref":"#/components/parameters/brickworks-service-queryStatuses"}],"responses":{"200":{"description":"Details of the record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-Record"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Records/operation/getRecord"]},"put":{"tags":["Brickworks: Records"],"summary":"Update record","description":"Update a record.\n\nIn a versioned schema, you can't directly edit a published record. To make changes, update the status to DRAFT (you can include the other changes that you want to make). This creates a new version of the record (without modifying the currently published version), which you can edit and publish.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_UPDATE`\n\n**User role permission required:** `assets_brickworks: update`\n","operationId":"updateRecord","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-UpdateRecordRequest"}}}},"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"},{"$ref":"#/components/parameters/brickworks-service-pathRecordIdentifier"}],"responses":{"200":{"description":"Details of the updated record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-Record"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Records/operation/updateRecord"]},"delete":{"tags":["Brickworks: Records"],"summary":"Delete record","description":"Delete a record **permanently**. If you want to unpublish a record instead, send an update request to change the status to `UNPUBLISHED`\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_DELETE`\n\n**User role permission required:** `assets_brickworks: delete`\n","operationId":"deleteRecord","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"},{"$ref":"#/components/parameters/brickworks-service-pathRecordIdentifier"}],"responses":{"204":{"description":"Record deleted"},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Records/operation/deleteRecord"]}},"/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/generate/by/{IdentifierType}":{"post":{"tags":["Brickworks: Content generation"],"summary":"Generate object from a record (as workspace)","description":"Generate content from the latest **published version of a record** by processing Jinjava inserts and requests to external sources. Profile data (if needed, for example for Jinjava) is retrieved automatically from the profile declared in the request.\n\nThe system looks for values to generate in the following order:\n\n  1. Values in the `fieldContext` object (used by recommendations and relations).\n  1. Values saved in the record.\n  2. Values from the `default` object in the schema.  \n    This is available for all field types.  \n  3. Default values nested in the `properties` of a field in the schema.  \n    This is available for some complex field types.  \n\n\nThe content is always generated according to the latest version of a schema:\n  - If fields were deleted from the schema, but they still exist in the record, they are ignored.\n  - If fields were added to the schema and they don't exist in the record, their default values are added. If there are no default values, the fields are ignored.\n\nSome data is cached:\n- profile data (even if the profile is updated)\n- responses from external sources  \nFor details, see the [User Guide](https://hub.synerise.com/docs/assets/brickworks/limits).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_READ`\n\n**User role permission required:** `assets_brickworks: read`\n","operationId":"generateObjectForProfile","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"},{"$ref":"#/components/parameters/brickworks-service-pathRecordIdentifier"},{"$ref":"#/components/parameters/brickworks-service-pathIdentifierType"}],"requestBody":{"description":"Object generation request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-GenerateRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/brickworks-service-GeneratedObject"},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Content-generation/operation/generateObjectForProfile"]}},"/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/generate":{"post":{"tags":["Brickworks: Content generation"],"summary":"Generate object from a record (as any consumer)","description":"Generate content from the latest **published version of a record** by processing Jinjava inserts and requests to external sources.  \nIf the request is authorized by a profile, the profile data is automatically retrieve for fields which need it (for example, in Jinjava inserts).\n\nThe system looks for values to generate in the following order:\n\n  1. Values in the `fieldContext` object (used by recommendations and relations).\n  1. Values saved in the record.\n  2. Values from the `default` object in the schema.  \n    This is available for all field types.  \n  3. Default values nested in the `properties` of a field in the schema.  \n    This is available for some complex field types.  \n\n\nThe content is always generated according to the latest version of a schema:\n  - If fields were deleted from the schema, but they still exist in the record, they are ignored.\n  - If fields were added to the schema and they don't exist in the record, their default values are added. If there are no default values, the fields are ignored.\n\nSome data is cached:\n- profile data (even if the profile is updated)\n- responses from external sources  \nFor details, see the [User Guide](https://hub.synerise.com/docs/assets/brickworks/limits).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_READ`\n\n**User role permission required:** `assets_brickworks: read`\n","operationId":"generateObject","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"},{"$ref":"#/components/parameters/brickworks-service-pathRecordIdentifier"}],"requestBody":{"description":"Object generation request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-GenerateRequestWithoutIdentifier"}}}},"responses":{"200":{"$ref":"#/components/responses/brickworks-service-GeneratedObject"},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Content-generation/operation/generateObject"]}},"/brickworks/v1/schemas/records/preview/by/{IdentifierType}":{"post":{"tags":["Brickworks: Records"],"summary":"Preview object (as workspace)","description":"Preview an object by sending field values. \n\nWhen generating a preview, fields are only generated when you send their value or they have a default value. Values saved in the record are not used in the preview.\n\nSome data is cached:\n- profile data (even if the profile is updated)\n- responses from external sources  \nFor details, see the [User Guide](https://hub.synerise.com/docs/assets/brickworks/limits).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_READ`\n\n**User role permission required:** `assets_brickworks: read`\n","operationId":"previewObject","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathIdentifierType"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-PreviewRequest"}}}},"responses":{"200":{"description":"Generated JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-GeneratedObject"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Records/operation/previewObject"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/brickworks/v1/schemas/records/preview/by/%7BIdentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\",\"context\":{\"property1\":null,\"property2\":null},\"fieldContext\":{\"property1\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"},\"property2\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"}},\"values\":{\"property1\":null,\"property2\":null},\"schema\":{\"fields\":{\"type\":\"object\",\"properties\":{\"property1\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false},\"property2\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false}},\"required\":[\"string\"],\"allOf\":[{\"if\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"then\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"else\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}}}],\"additionalProperties\":true},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"type\\\\\\\":\\\\\\\"ATTRIBUTE\\\\\\\",\\\\\\\"attribute\\\\\\\":{\\\\\\\"expressions\\\\\\\":[{\\\\\\\"constraint\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"BOOL\\\\\\\",\\\\\\\"logic\\\\\\\":\\\\\\\"IS_TRUE\\\\\\\"},\\\\\\\"attribute\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"PARAM\\\\\\\",\\\\\\\"param\\\\\\\":\\\\\\\"exampleBool\\\\\\\"}}]}}]}}]}}\"},\"schemaType\":\"SIMPLE\",\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\",\\\"context\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"fieldContext\\\":{\\\"property1\\\":{\\\"page\\\":1,\\\"limit\\\":10,\\\"itemId\\\":\\\"item-123\\\",\\\"additionalFilters\\\":\\\"custom filter value\\\"},\\\"property2\\\":{\\\"page\\\":1,\\\"limit\\\":10,\\\"itemId\\\":\\\"item-123\\\",\\\"additionalFilters\\\":\\\"custom filter value\\\"}},\\\"values\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"schema\\\":{\\\"fields\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"property1\\\":{\\\"type\\\":\\\"number\\\",\\\"subtype\\\":\\\"number\\\",\\\"minimum\\\":0.1,\\\"maximum\\\":0.1,\\\"unique\\\":true,\\\"searchable\\\":true,\\\"default\\\":0,\\\"isConstantField\\\":false},\\\"property2\\\":{\\\"type\\\":\\\"number\\\",\\\"subtype\\\":\\\"number\\\",\\\"minimum\\\":0.1,\\\"maximum\\\":0.1,\\\"unique\\\":true,\\\"searchable\\\":true,\\\"default\\\":0,\\\"isConstantField\\\":false}},\\\"required\\\":[\\\"string\\\"],\\\"allOf\\\":[{\\\"if\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}},\\\"then\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}},\\\"else\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}}}],\\\"additionalProperties\\\":true},\\\"audience\\\":{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"query\\\":\\\"{\\\\\\\\\\\\\\\"analysis\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"title\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"segments\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"title\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"filter\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"matching\\\\\\\\\\\\\\\":true,\\\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"ATTRIBUTE\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"constraint\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"BOOL\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"logic\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"IS_TRUE\\\\\\\\\\\\\\\"},\\\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"PARAM\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"param\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"exampleBool\\\\\\\\\\\\\\\"}}]}}]}}]}}\\\"},\\\"schemaType\\\":\\\"SIMPLE\\\",\\\"lambdaId\\\":\\\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\\\",\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/brickworks/v1/schemas/records/preview/by/%7BIdentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\",\n  \"context\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"fieldContext\": {\n    \"property1\": {\n      \"page\": 1,\n      \"limit\": 10,\n      \"itemId\": \"item-123\",\n      \"additionalFilters\": \"custom filter value\"\n    },\n    \"property2\": {\n      \"page\": 1,\n      \"limit\": 10,\n      \"itemId\": \"item-123\",\n      \"additionalFilters\": \"custom filter value\"\n    }\n  },\n  \"values\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"schema\": {\n    \"fields\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"property1\": {\n          \"type\": \"number\",\n          \"subtype\": \"number\",\n          \"minimum\": 0.1,\n          \"maximum\": 0.1,\n          \"unique\": true,\n          \"searchable\": true,\n          \"default\": 0,\n          \"isConstantField\": false\n        },\n        \"property2\": {\n          \"type\": \"number\",\n          \"subtype\": \"number\",\n          \"minimum\": 0.1,\n          \"maximum\": 0.1,\n          \"unique\": true,\n          \"searchable\": true,\n          \"default\": 0,\n          \"isConstantField\": false\n        }\n      },\n      \"required\": [\n        \"string\"\n      ],\n      \"allOf\": [\n        {\n          \"if\": {\n            \"required\": [\n              \"string\"\n            ],\n            \"properties\": {\n              \"property1\": {\n                \"minItems\": 0,\n                \"maxItems\": 0,\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"maximum\": 0,\n                \"pattern\": \"string\",\n                \"const\": null,\n                \"enum\": [\n                  \"string\"\n                ],\n                \"not\": {}\n              },\n              \"property2\": {\n                \"minItems\": 0,\n                \"maxItems\": 0,\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"maximum\": 0,\n                \"pattern\": \"string\",\n                \"const\": null,\n                \"enum\": [\n                  \"string\"\n                ],\n                \"not\": {}\n              }\n            }\n          },\n          \"then\": {\n            \"required\": [\n              \"string\"\n            ],\n            \"properties\": {\n              \"property1\": {\n                \"minItems\": 0,\n                \"maxItems\": 0,\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"maximum\": 0,\n                \"pattern\": \"string\",\n                \"const\": null,\n                \"enum\": [\n                  \"string\"\n                ],\n                \"not\": {}\n              },\n              \"property2\": {\n                \"minItems\": 0,\n                \"maxItems\": 0,\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"maximum\": 0,\n                \"pattern\": \"string\",\n                \"const\": null,\n                \"enum\": [\n                  \"string\"\n                ],\n                \"not\": {}\n              }\n            }\n          },\n          \"else\": {\n            \"required\": [\n              \"string\"\n            ],\n            \"properties\": {\n              \"property1\": {\n                \"minItems\": 0,\n                \"maxItems\": 0,\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"maximum\": 0,\n                \"pattern\": \"string\",\n                \"const\": null,\n                \"enum\": [\n                  \"string\"\n                ],\n                \"not\": {}\n              },\n              \"property2\": {\n                \"minItems\": 0,\n                \"maxItems\": 0,\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"maximum\": 0,\n                \"pattern\": \"string\",\n                \"const\": null,\n                \"enum\": [\n                  \"string\"\n                ],\n                \"not\": {}\n              }\n            }\n          }\n        }\n      ],\n      \"additionalProperties\": true\n    },\n    \"audience\": {\n      \"targetType\": \"SEGMENT\",\n      \"segments\": [\n        \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n      ],\n      \"query\": \"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"type\\\\\\\":\\\\\\\"ATTRIBUTE\\\\\\\",\\\\\\\"attribute\\\\\\\":{\\\\\\\"expressions\\\\\\\":[{\\\\\\\"constraint\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"BOOL\\\\\\\",\\\\\\\"logic\\\\\\\":\\\\\\\"IS_TRUE\\\\\\\"},\\\\\\\"attribute\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"PARAM\\\\\\\",\\\\\\\"param\\\\\\\":\\\\\\\"exampleBool\\\\\\\"}}]}}]}}]}}\"\n    },\n    \"schemaType\": \"SIMPLE\",\n    \"lambdaId\": \"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\",\n    \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/brickworks/v1/schemas/records/preview/by/%7BIdentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/brickworks/v1/schemas/records/preview/by/%7BIdentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  identifierValue: 'string',\n  context: {property1: null, property2: null},\n  fieldContext: {\n    property1: {\n      page: 1,\n      limit: 10,\n      itemId: 'item-123',\n      additionalFilters: 'custom filter value'\n    },\n    property2: {\n      page: 1,\n      limit: 10,\n      itemId: 'item-123',\n      additionalFilters: 'custom filter value'\n    }\n  },\n  values: {property1: null, property2: null},\n  schema: {\n    fields: {\n      type: 'object',\n      properties: {\n        property1: {\n          type: 'number',\n          subtype: 'number',\n          minimum: 0.1,\n          maximum: 0.1,\n          unique: true,\n          searchable: true,\n          default: 0,\n          isConstantField: false\n        },\n        property2: {\n          type: 'number',\n          subtype: 'number',\n          minimum: 0.1,\n          maximum: 0.1,\n          unique: true,\n          searchable: true,\n          default: 0,\n          isConstantField: false\n        }\n      },\n      required: ['string'],\n      allOf: [\n        {\n          if: {\n            required: ['string'],\n            properties: {\n              property1: {\n                minItems: 0,\n                maxItems: 0,\n                uniqueItems: true,\n                minimum: 0,\n                maximum: 0,\n                pattern: 'string',\n                const: null,\n                enum: ['string'],\n                not: {}\n              },\n              property2: {\n                minItems: 0,\n                maxItems: 0,\n                uniqueItems: true,\n                minimum: 0,\n                maximum: 0,\n                pattern: 'string',\n                const: null,\n                enum: ['string'],\n                not: {}\n              }\n            }\n          },\n          then: {\n            required: ['string'],\n            properties: {\n              property1: {\n                minItems: 0,\n                maxItems: 0,\n                uniqueItems: true,\n                minimum: 0,\n                maximum: 0,\n                pattern: 'string',\n                const: null,\n                enum: ['string'],\n                not: {}\n              },\n              property2: {\n                minItems: 0,\n                maxItems: 0,\n                uniqueItems: true,\n                minimum: 0,\n                maximum: 0,\n                pattern: 'string',\n                const: null,\n                enum: ['string'],\n                not: {}\n              }\n            }\n          },\n          else: {\n            required: ['string'],\n            properties: {\n              property1: {\n                minItems: 0,\n                maxItems: 0,\n                uniqueItems: true,\n                minimum: 0,\n                maximum: 0,\n                pattern: 'string',\n                const: null,\n                enum: ['string'],\n                not: {}\n              },\n              property2: {\n                minItems: 0,\n                maxItems: 0,\n                uniqueItems: true,\n                minimum: 0,\n                maximum: 0,\n                pattern: 'string',\n                const: null,\n                enum: ['string'],\n                not: {}\n              }\n            }\n          }\n        }\n      ],\n      additionalProperties: true\n    },\n    audience: {\n      targetType: 'SEGMENT',\n      segments: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n      query: '{\\\"analysis\\\":{\\\"title\\\":\\\"notempty\\\",\\\"segments\\\":[{\\\"title\\\":\\\"notempty\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"exampleBool\\\"}}]}}]}}]}}'\n    },\n    schemaType: 'SIMPLE',\n    lambdaId: '19f4e1cf-838e-4f7d-9400-1ddf9fb6829d',\n    id: '497f6eca-6276-4993-bfeb-53cbbbba6f08'\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/brickworks/v1/schemas/records/preview/by/%7BIdentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\",\"context\":{\"property1\":null,\"property2\":null},\"fieldContext\":{\"property1\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"},\"property2\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"}},\"values\":{\"property1\":null,\"property2\":null},\"schema\":{\"fields\":{\"type\":\"object\",\"properties\":{\"property1\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false},\"property2\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false}},\"required\":[\"string\"],\"allOf\":[{\"if\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"then\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"else\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}}}],\"additionalProperties\":true},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":\"{\\\\\\\\\\\\\"analysis\\\\\\\\\\\\\":{\\\\\\\\\\\\\"title\\\\\\\\\\\\\":\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\",\\\\\\\\\\\\\"segments\\\\\\\\\\\\\":[{\\\\\\\\\\\\\"title\\\\\\\\\\\\\":\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\",\\\\\\\\\\\\\"filter\\\\\\\\\\\\\":{\\\\\\\\\\\\\"matching\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\":[{\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"ATTRIBUTE\\\\\\\\\\\\\",\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\":{\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\":[{\\\\\\\\\\\\\"constraint\\\\\\\\\\\\\":{\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"BOOL\\\\\\\\\\\\\",\\\\\\\\\\\\\"logic\\\\\\\\\\\\\":\\\\\\\\\\\\\"IS_TRUE\\\\\\\\\\\\\"},\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\":{\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"PARAM\\\\\\\\\\\\\",\\\\\\\\\\\\\"param\\\\\\\\\\\\\":\\\\\\\\\\\\\"exampleBool\\\\\\\\\\\\\"}}]}}]}}]}}\"},\"schemaType\":\"SIMPLE\",\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/brickworks/v1/schemas/records/preview/by/%7BIdentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\",\\\"context\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"fieldContext\\\":{\\\"property1\\\":{\\\"page\\\":1,\\\"limit\\\":10,\\\"itemId\\\":\\\"item-123\\\",\\\"additionalFilters\\\":\\\"custom filter value\\\"},\\\"property2\\\":{\\\"page\\\":1,\\\"limit\\\":10,\\\"itemId\\\":\\\"item-123\\\",\\\"additionalFilters\\\":\\\"custom filter value\\\"}},\\\"values\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"schema\\\":{\\\"fields\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"property1\\\":{\\\"type\\\":\\\"number\\\",\\\"subtype\\\":\\\"number\\\",\\\"minimum\\\":0.1,\\\"maximum\\\":0.1,\\\"unique\\\":true,\\\"searchable\\\":true,\\\"default\\\":0,\\\"isConstantField\\\":false},\\\"property2\\\":{\\\"type\\\":\\\"number\\\",\\\"subtype\\\":\\\"number\\\",\\\"minimum\\\":0.1,\\\"maximum\\\":0.1,\\\"unique\\\":true,\\\"searchable\\\":true,\\\"default\\\":0,\\\"isConstantField\\\":false}},\\\"required\\\":[\\\"string\\\"],\\\"allOf\\\":[{\\\"if\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}},\\\"then\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}},\\\"else\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}}}],\\\"additionalProperties\\\":true},\\\"audience\\\":{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"query\\\":\\\"{\\\\\\\\\\\\\\\"analysis\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"title\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"segments\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"title\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"filter\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"matching\\\\\\\\\\\\\\\":true,\\\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"ATTRIBUTE\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"constraint\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"BOOL\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"logic\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"IS_TRUE\\\\\\\\\\\\\\\"},\\\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"PARAM\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"param\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"exampleBool\\\\\\\\\\\\\\\"}}]}}]}}]}}\\\"},\\\"schemaType\\\":\\\"SIMPLE\\\",\\\"lambdaId\\\":\\\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\\\",\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"}}\")\n  .asString();"}]}},"/brickworks/v1/schemas/records/preview":{"post":{"tags":["Brickworks: Records"],"summary":"Preview object (as any consumer)","description":"Preview an object by sending field values. \n\nWhen generating a preview, fields are only generated when you send their value or they have a default value. Values saved in the record are not used in the preview.\n\nSome data is cached:\n- profile data (even if the profile is updated)\n- responses from external sources  \nFor details, see the [User Guide](https://hub.synerise.com/docs/assets/brickworks/limits).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_READ`\n\n**User role permission required:** `assets_brickworks: read`\n","operationId":"previewObjectByProfile","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-PreviewRequestWithoutIdentifier"}}}},"responses":{"200":{"description":"Generated JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-GeneratedObject"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Records/operation/previewObjectByProfile"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/brickworks/v1/schemas/records/preview \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"context\":{\"property1\":null,\"property2\":null},\"fieldContext\":{\"property1\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"},\"property2\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"}},\"values\":{\"property1\":null,\"property2\":null},\"schema\":{\"fields\":{\"type\":\"object\",\"properties\":{\"property1\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false},\"property2\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false}},\"required\":[\"string\"],\"allOf\":[{\"if\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"then\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"else\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}}}],\"additionalProperties\":true},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"type\\\\\\\":\\\\\\\"ATTRIBUTE\\\\\\\",\\\\\\\"attribute\\\\\\\":{\\\\\\\"expressions\\\\\\\":[{\\\\\\\"constraint\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"BOOL\\\\\\\",\\\\\\\"logic\\\\\\\":\\\\\\\"IS_TRUE\\\\\\\"},\\\\\\\"attribute\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"PARAM\\\\\\\",\\\\\\\"param\\\\\\\":\\\\\\\"exampleBool\\\\\\\"}}]}}]}}]}}\"},\"schemaType\":\"SIMPLE\",\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"},\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"context\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"fieldContext\\\":{\\\"property1\\\":{\\\"page\\\":1,\\\"limit\\\":10,\\\"itemId\\\":\\\"item-123\\\",\\\"additionalFilters\\\":\\\"custom filter value\\\"},\\\"property2\\\":{\\\"page\\\":1,\\\"limit\\\":10,\\\"itemId\\\":\\\"item-123\\\",\\\"additionalFilters\\\":\\\"custom filter value\\\"}},\\\"values\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"schema\\\":{\\\"fields\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"property1\\\":{\\\"type\\\":\\\"number\\\",\\\"subtype\\\":\\\"number\\\",\\\"minimum\\\":0.1,\\\"maximum\\\":0.1,\\\"unique\\\":true,\\\"searchable\\\":true,\\\"default\\\":0,\\\"isConstantField\\\":false},\\\"property2\\\":{\\\"type\\\":\\\"number\\\",\\\"subtype\\\":\\\"number\\\",\\\"minimum\\\":0.1,\\\"maximum\\\":0.1,\\\"unique\\\":true,\\\"searchable\\\":true,\\\"default\\\":0,\\\"isConstantField\\\":false}},\\\"required\\\":[\\\"string\\\"],\\\"allOf\\\":[{\\\"if\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}},\\\"then\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}},\\\"else\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}}}],\\\"additionalProperties\\\":true},\\\"audience\\\":{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"query\\\":\\\"{\\\\\\\\\\\\\\\"analysis\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"title\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"segments\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"title\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"filter\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"matching\\\\\\\\\\\\\\\":true,\\\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"ATTRIBUTE\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"constraint\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"BOOL\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"logic\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"IS_TRUE\\\\\\\\\\\\\\\"},\\\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"PARAM\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"param\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"exampleBool\\\\\\\\\\\\\\\"}}]}}]}}]}}\\\"},\\\"schemaType\\\":\\\"SIMPLE\\\",\\\"lambdaId\\\":\\\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\\\",\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"},\\\"lambdaId\\\":\\\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/brickworks/v1/schemas/records/preview\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"context\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"fieldContext\": {\n    \"property1\": {\n      \"page\": 1,\n      \"limit\": 10,\n      \"itemId\": \"item-123\",\n      \"additionalFilters\": \"custom filter value\"\n    },\n    \"property2\": {\n      \"page\": 1,\n      \"limit\": 10,\n      \"itemId\": \"item-123\",\n      \"additionalFilters\": \"custom filter value\"\n    }\n  },\n  \"values\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"schema\": {\n    \"fields\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"property1\": {\n          \"type\": \"number\",\n          \"subtype\": \"number\",\n          \"minimum\": 0.1,\n          \"maximum\": 0.1,\n          \"unique\": true,\n          \"searchable\": true,\n          \"default\": 0,\n          \"isConstantField\": false\n        },\n        \"property2\": {\n          \"type\": \"number\",\n          \"subtype\": \"number\",\n          \"minimum\": 0.1,\n          \"maximum\": 0.1,\n          \"unique\": true,\n          \"searchable\": true,\n          \"default\": 0,\n          \"isConstantField\": false\n        }\n      },\n      \"required\": [\n        \"string\"\n      ],\n      \"allOf\": [\n        {\n          \"if\": {\n            \"required\": [\n              \"string\"\n            ],\n            \"properties\": {\n              \"property1\": {\n                \"minItems\": 0,\n                \"maxItems\": 0,\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"maximum\": 0,\n                \"pattern\": \"string\",\n                \"const\": null,\n                \"enum\": [\n                  \"string\"\n                ],\n                \"not\": {}\n              },\n              \"property2\": {\n                \"minItems\": 0,\n                \"maxItems\": 0,\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"maximum\": 0,\n                \"pattern\": \"string\",\n                \"const\": null,\n                \"enum\": [\n                  \"string\"\n                ],\n                \"not\": {}\n              }\n            }\n          },\n          \"then\": {\n            \"required\": [\n              \"string\"\n            ],\n            \"properties\": {\n              \"property1\": {\n                \"minItems\": 0,\n                \"maxItems\": 0,\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"maximum\": 0,\n                \"pattern\": \"string\",\n                \"const\": null,\n                \"enum\": [\n                  \"string\"\n                ],\n                \"not\": {}\n              },\n              \"property2\": {\n                \"minItems\": 0,\n                \"maxItems\": 0,\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"maximum\": 0,\n                \"pattern\": \"string\",\n                \"const\": null,\n                \"enum\": [\n                  \"string\"\n                ],\n                \"not\": {}\n              }\n            }\n          },\n          \"else\": {\n            \"required\": [\n              \"string\"\n            ],\n            \"properties\": {\n              \"property1\": {\n                \"minItems\": 0,\n                \"maxItems\": 0,\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"maximum\": 0,\n                \"pattern\": \"string\",\n                \"const\": null,\n                \"enum\": [\n                  \"string\"\n                ],\n                \"not\": {}\n              },\n              \"property2\": {\n                \"minItems\": 0,\n                \"maxItems\": 0,\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"maximum\": 0,\n                \"pattern\": \"string\",\n                \"const\": null,\n                \"enum\": [\n                  \"string\"\n                ],\n                \"not\": {}\n              }\n            }\n          }\n        }\n      ],\n      \"additionalProperties\": true\n    },\n    \"audience\": {\n      \"targetType\": \"SEGMENT\",\n      \"segments\": [\n        \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n      ],\n      \"query\": \"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"notempty\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"type\\\\\\\":\\\\\\\"ATTRIBUTE\\\\\\\",\\\\\\\"attribute\\\\\\\":{\\\\\\\"expressions\\\\\\\":[{\\\\\\\"constraint\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"BOOL\\\\\\\",\\\\\\\"logic\\\\\\\":\\\\\\\"IS_TRUE\\\\\\\"},\\\\\\\"attribute\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"PARAM\\\\\\\",\\\\\\\"param\\\\\\\":\\\\\\\"exampleBool\\\\\\\"}}]}}]}}]}}\"\n    },\n    \"schemaType\": \"SIMPLE\",\n    \"lambdaId\": \"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\",\n    \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  },\n  \"lambdaId\": \"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/brickworks/v1/schemas/records/preview\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/brickworks/v1/schemas/records/preview\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  context: {property1: null, property2: null},\n  fieldContext: {\n    property1: {\n      page: 1,\n      limit: 10,\n      itemId: 'item-123',\n      additionalFilters: 'custom filter value'\n    },\n    property2: {\n      page: 1,\n      limit: 10,\n      itemId: 'item-123',\n      additionalFilters: 'custom filter value'\n    }\n  },\n  values: {property1: null, property2: null},\n  schema: {\n    fields: {\n      type: 'object',\n      properties: {\n        property1: {\n          type: 'number',\n          subtype: 'number',\n          minimum: 0.1,\n          maximum: 0.1,\n          unique: true,\n          searchable: true,\n          default: 0,\n          isConstantField: false\n        },\n        property2: {\n          type: 'number',\n          subtype: 'number',\n          minimum: 0.1,\n          maximum: 0.1,\n          unique: true,\n          searchable: true,\n          default: 0,\n          isConstantField: false\n        }\n      },\n      required: ['string'],\n      allOf: [\n        {\n          if: {\n            required: ['string'],\n            properties: {\n              property1: {\n                minItems: 0,\n                maxItems: 0,\n                uniqueItems: true,\n                minimum: 0,\n                maximum: 0,\n                pattern: 'string',\n                const: null,\n                enum: ['string'],\n                not: {}\n              },\n              property2: {\n                minItems: 0,\n                maxItems: 0,\n                uniqueItems: true,\n                minimum: 0,\n                maximum: 0,\n                pattern: 'string',\n                const: null,\n                enum: ['string'],\n                not: {}\n              }\n            }\n          },\n          then: {\n            required: ['string'],\n            properties: {\n              property1: {\n                minItems: 0,\n                maxItems: 0,\n                uniqueItems: true,\n                minimum: 0,\n                maximum: 0,\n                pattern: 'string',\n                const: null,\n                enum: ['string'],\n                not: {}\n              },\n              property2: {\n                minItems: 0,\n                maxItems: 0,\n                uniqueItems: true,\n                minimum: 0,\n                maximum: 0,\n                pattern: 'string',\n                const: null,\n                enum: ['string'],\n                not: {}\n              }\n            }\n          },\n          else: {\n            required: ['string'],\n            properties: {\n              property1: {\n                minItems: 0,\n                maxItems: 0,\n                uniqueItems: true,\n                minimum: 0,\n                maximum: 0,\n                pattern: 'string',\n                const: null,\n                enum: ['string'],\n                not: {}\n              },\n              property2: {\n                minItems: 0,\n                maxItems: 0,\n                uniqueItems: true,\n                minimum: 0,\n                maximum: 0,\n                pattern: 'string',\n                const: null,\n                enum: ['string'],\n                not: {}\n              }\n            }\n          }\n        }\n      ],\n      additionalProperties: true\n    },\n    audience: {\n      targetType: 'SEGMENT',\n      segments: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n      query: '{\\\"analysis\\\":{\\\"title\\\":\\\"notempty\\\",\\\"segments\\\":[{\\\"title\\\":\\\"notempty\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"exampleBool\\\"}}]}}]}}]}}'\n    },\n    schemaType: 'SIMPLE',\n    lambdaId: '19f4e1cf-838e-4f7d-9400-1ddf9fb6829d',\n    id: '497f6eca-6276-4993-bfeb-53cbbbba6f08'\n  },\n  lambdaId: '19f4e1cf-838e-4f7d-9400-1ddf9fb6829d'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/brickworks/v1/schemas/records/preview');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"context\":{\"property1\":null,\"property2\":null},\"fieldContext\":{\"property1\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"},\"property2\":{\"page\":1,\"limit\":10,\"itemId\":\"item-123\",\"additionalFilters\":\"custom filter value\"}},\"values\":{\"property1\":null,\"property2\":null},\"schema\":{\"fields\":{\"type\":\"object\",\"properties\":{\"property1\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false},\"property2\":{\"type\":\"number\",\"subtype\":\"number\",\"minimum\":0.1,\"maximum\":0.1,\"unique\":true,\"searchable\":true,\"default\":0,\"isConstantField\":false}},\"required\":[\"string\"],\"allOf\":[{\"if\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"then\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}},\"else\":{\"required\":[\"string\"],\"properties\":{\"property1\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}},\"property2\":{\"minItems\":0,\"maxItems\":0,\"uniqueItems\":true,\"minimum\":0,\"maximum\":0,\"pattern\":\"string\",\"const\":null,\"enum\":[\"string\"],\"not\":{}}}}}],\"additionalProperties\":true},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"query\":\"{\\\\\\\\\\\\\"analysis\\\\\\\\\\\\\":{\\\\\\\\\\\\\"title\\\\\\\\\\\\\":\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\",\\\\\\\\\\\\\"segments\\\\\\\\\\\\\":[{\\\\\\\\\\\\\"title\\\\\\\\\\\\\":\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\",\\\\\\\\\\\\\"filter\\\\\\\\\\\\\":{\\\\\\\\\\\\\"matching\\\\\\\\\\\\\":true,\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\":[{\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"ATTRIBUTE\\\\\\\\\\\\\",\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\":{\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\":[{\\\\\\\\\\\\\"constraint\\\\\\\\\\\\\":{\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"BOOL\\\\\\\\\\\\\",\\\\\\\\\\\\\"logic\\\\\\\\\\\\\":\\\\\\\\\\\\\"IS_TRUE\\\\\\\\\\\\\"},\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\":{\\\\\\\\\\\\\"type\\\\\\\\\\\\\":\\\\\\\\\\\\\"PARAM\\\\\\\\\\\\\",\\\\\\\\\\\\\"param\\\\\\\\\\\\\":\\\\\\\\\\\\\"exampleBool\\\\\\\\\\\\\"}}]}}]}}]}}\"},\"schemaType\":\"SIMPLE\",\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\",\"id\":\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"},\"lambdaId\":\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/brickworks/v1/schemas/records/preview\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"context\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"fieldContext\\\":{\\\"property1\\\":{\\\"page\\\":1,\\\"limit\\\":10,\\\"itemId\\\":\\\"item-123\\\",\\\"additionalFilters\\\":\\\"custom filter value\\\"},\\\"property2\\\":{\\\"page\\\":1,\\\"limit\\\":10,\\\"itemId\\\":\\\"item-123\\\",\\\"additionalFilters\\\":\\\"custom filter value\\\"}},\\\"values\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"schema\\\":{\\\"fields\\\":{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"property1\\\":{\\\"type\\\":\\\"number\\\",\\\"subtype\\\":\\\"number\\\",\\\"minimum\\\":0.1,\\\"maximum\\\":0.1,\\\"unique\\\":true,\\\"searchable\\\":true,\\\"default\\\":0,\\\"isConstantField\\\":false},\\\"property2\\\":{\\\"type\\\":\\\"number\\\",\\\"subtype\\\":\\\"number\\\",\\\"minimum\\\":0.1,\\\"maximum\\\":0.1,\\\"unique\\\":true,\\\"searchable\\\":true,\\\"default\\\":0,\\\"isConstantField\\\":false}},\\\"required\\\":[\\\"string\\\"],\\\"allOf\\\":[{\\\"if\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}},\\\"then\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}},\\\"else\\\":{\\\"required\\\":[\\\"string\\\"],\\\"properties\\\":{\\\"property1\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}},\\\"property2\\\":{\\\"minItems\\\":0,\\\"maxItems\\\":0,\\\"uniqueItems\\\":true,\\\"minimum\\\":0,\\\"maximum\\\":0,\\\"pattern\\\":\\\"string\\\",\\\"const\\\":null,\\\"enum\\\":[\\\"string\\\"],\\\"not\\\":{}}}}}],\\\"additionalProperties\\\":true},\\\"audience\\\":{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"query\\\":\\\"{\\\\\\\\\\\\\\\"analysis\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"title\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"segments\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"title\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"notempty\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"filter\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"matching\\\\\\\\\\\\\\\":true,\\\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"ATTRIBUTE\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"expressions\\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\\"constraint\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"BOOL\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"logic\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"IS_TRUE\\\\\\\\\\\\\\\"},\\\\\\\\\\\\\\\"attribute\\\\\\\\\\\\\\\":{\\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"PARAM\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"param\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"exampleBool\\\\\\\\\\\\\\\"}}]}}]}}]}}\\\"},\\\"schemaType\\\":\\\"SIMPLE\\\",\\\"lambdaId\\\":\\\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\\\",\\\"id\\\":\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"},\\\"lambdaId\\\":\\\"19f4e1cf-838e-4f7d-9400-1ddf9fb6829d\\\"}\")\n  .asString();"}]}},"/brickworks/v1/external-sources":{"post":{"tags":["Brickworks: External sources"],"summary":"Create external source","description":"Create an external data source definition. External sources can be used as a special schema field to retrieve data from a given URL when generating an object from a record.\n\nBefore starting, make sure you have a [connection](https://hub.synerise.com/docs/settings/tool/connections/) which you can use in the external source definition.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_EXTERNALSOURCES_CREATE`\n\n**User role permission required:** `assets_brickworks: create`\n","operationId":"createExternalSource","security":[{"JWT":[]}],"requestBody":{"description":"External data source definition","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-CreateExternalSourceRequest"}}}},"responses":{"200":{"description":"External Data Source created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceModel"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-External-sources/operation/createExternalSource"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/brickworks/v1/external-sources \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"description\":\"string\",\"properties\":{\"sourceType\":\"http_source\",\"url\":\"https://example.com/clients/{% customer email %}\",\"method\":\"post\",\"headers\":{\"property1\":\"string\",\"property2\":\"string\"},\"params\":{\"property1\":\"string\",\"property2\":\"string\"},\"authType\":\"basic\",\"authId\":\"25d4321e-f980-49d3-983b-4275c49dc2c4\",\"body\":{\"someString\":\"string\",\"someObject\":{\"key\":\"{% customer email %}\"},\"dynamicField\":\"{% customer id %}\"},\"bodySchema\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"someObject\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"key\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true},\"dynamicField\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true}},\"ttl\":0}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"properties\\\":{\\\"sourceType\\\":\\\"http_source\\\",\\\"url\\\":\\\"https://example.com/clients/{% customer email %}\\\",\\\"method\\\":\\\"post\\\",\\\"headers\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"},\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"},\\\"authType\\\":\\\"basic\\\",\\\"authId\\\":\\\"25d4321e-f980-49d3-983b-4275c49dc2c4\\\",\\\"body\\\":{\\\"someString\\\":\\\"string\\\",\\\"someObject\\\":{\\\"key\\\":\\\"{% customer email %}\\\"},\\\"dynamicField\\\":\\\"{% customer id %}\\\"},\\\"bodySchema\\\":{\\\"type\\\":\\\"object\\\",\\\"subtype\\\":\\\"key_value\\\",\\\"properties\\\":{\\\"someObject\\\":{\\\"type\\\":\\\"object\\\",\\\"subtype\\\":\\\"key_value\\\",\\\"properties\\\":{\\\"key\\\":{\\\"type\\\":\\\"string\\\",\\\"subtype\\\":\\\"jinjava\\\"}},\\\"additionalProperties\\\":true},\\\"dynamicField\\\":{\\\"type\\\":\\\"string\\\",\\\"subtype\\\":\\\"jinjava\\\"}},\\\"additionalProperties\\\":true}},\\\"ttl\\\":0}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/brickworks/v1/external-sources\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"description\": \"string\",\n  \"properties\": {\n    \"sourceType\": \"http_source\",\n    \"url\": \"https://example.com/clients/{% customer email %}\",\n    \"method\": \"post\",\n    \"headers\": {\n      \"property1\": \"string\",\n      \"property2\": \"string\"\n    },\n    \"params\": {\n      \"property1\": \"string\",\n      \"property2\": \"string\"\n    },\n    \"authType\": \"basic\",\n    \"authId\": \"25d4321e-f980-49d3-983b-4275c49dc2c4\",\n    \"body\": {\n      \"someString\": \"string\",\n      \"someObject\": {\n        \"key\": \"{% customer email %}\"\n      },\n      \"dynamicField\": \"{% customer id %}\"\n    },\n    \"bodySchema\": {\n      \"type\": \"object\",\n      \"subtype\": \"key_value\",\n      \"properties\": {\n        \"someObject\": {\n          \"type\": \"object\",\n          \"subtype\": \"key_value\",\n          \"properties\": {\n            \"key\": {\n              \"type\": \"string\",\n              \"subtype\": \"jinjava\"\n            }\n          },\n          \"additionalProperties\": true\n        },\n        \"dynamicField\": {\n          \"type\": \"string\",\n          \"subtype\": \"jinjava\"\n        }\n      },\n      \"additionalProperties\": true\n    }\n  },\n  \"ttl\": 0\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/brickworks/v1/external-sources\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/brickworks/v1/external-sources\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  name: 'string',\n  description: 'string',\n  properties: {\n    sourceType: 'http_source',\n    url: 'https://example.com/clients/{% customer email %}',\n    method: 'post',\n    headers: {property1: 'string', property2: 'string'},\n    params: {property1: 'string', property2: 'string'},\n    authType: 'basic',\n    authId: '25d4321e-f980-49d3-983b-4275c49dc2c4',\n    body: {\n      someString: 'string',\n      someObject: {key: '{% customer email %}'},\n      dynamicField: '{% customer id %}'\n    },\n    bodySchema: {\n      type: 'object',\n      subtype: 'key_value',\n      properties: {\n        someObject: {\n          type: 'object',\n          subtype: 'key_value',\n          properties: {key: {type: 'string', subtype: 'jinjava'}},\n          additionalProperties: true\n        },\n        dynamicField: {type: 'string', subtype: 'jinjava'}\n      },\n      additionalProperties: true\n    }\n  },\n  ttl: 0\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/brickworks/v1/external-sources');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"description\":\"string\",\"properties\":{\"sourceType\":\"http_source\",\"url\":\"https://example.com/clients/{% customer email %}\",\"method\":\"post\",\"headers\":{\"property1\":\"string\",\"property2\":\"string\"},\"params\":{\"property1\":\"string\",\"property2\":\"string\"},\"authType\":\"basic\",\"authId\":\"25d4321e-f980-49d3-983b-4275c49dc2c4\",\"body\":{\"someString\":\"string\",\"someObject\":{\"key\":\"{% customer email %}\"},\"dynamicField\":\"{% customer id %}\"},\"bodySchema\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"someObject\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"key\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true},\"dynamicField\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true}},\"ttl\":0}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/brickworks/v1/external-sources\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"properties\\\":{\\\"sourceType\\\":\\\"http_source\\\",\\\"url\\\":\\\"https://example.com/clients/{% customer email %}\\\",\\\"method\\\":\\\"post\\\",\\\"headers\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"},\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"},\\\"authType\\\":\\\"basic\\\",\\\"authId\\\":\\\"25d4321e-f980-49d3-983b-4275c49dc2c4\\\",\\\"body\\\":{\\\"someString\\\":\\\"string\\\",\\\"someObject\\\":{\\\"key\\\":\\\"{% customer email %}\\\"},\\\"dynamicField\\\":\\\"{% customer id %}\\\"},\\\"bodySchema\\\":{\\\"type\\\":\\\"object\\\",\\\"subtype\\\":\\\"key_value\\\",\\\"properties\\\":{\\\"someObject\\\":{\\\"type\\\":\\\"object\\\",\\\"subtype\\\":\\\"key_value\\\",\\\"properties\\\":{\\\"key\\\":{\\\"type\\\":\\\"string\\\",\\\"subtype\\\":\\\"jinjava\\\"}},\\\"additionalProperties\\\":true},\\\"dynamicField\\\":{\\\"type\\\":\\\"string\\\",\\\"subtype\\\":\\\"jinjava\\\"}},\\\"additionalProperties\\\":true}},\\\"ttl\\\":0}\")\n  .asString();"}]},"get":{"tags":["Brickworks: External sources"],"summary":"List external sources","description":"Retrieve a list of external data sources. You can sort and paginate the results.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_EXTERNALSOURCES_READ`\n\n**User role permission required:** `assets_brickworks: read`\n","operationId":"listExternalSource","parameters":[{"$ref":"#/components/parameters/brickworks-service-queryLimit"},{"$ref":"#/components/parameters/brickworks-service-queryPage"},{"$ref":"#/components/parameters/brickworks-service-querySearch"},{"in":"query","name":"sortBy","required":false,"description":"You can sort by:\n- `createdAt`\n- `updatedAt`\n- `name`\n","schema":{"type":"string","example":"createdAt:asc|desc"}},{"$ref":"#/components/parameters/brickworks-service-methodQueryParam"}],"security":[{"JWT":[]}],"responses":{"200":{"description":"A page of external data sources","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-ExternalSourcePagingResult"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-External-sources/operation/listExternalSource"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/brickworks/v1/external-sources');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'limit' => 'SOME_INTEGER_VALUE',\n  'page' => 'SOME_INTEGER_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'sortBy' => 'createdAt:asc|desc',\n  'method' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/brickworks/v1/external-sources/{ExternalDataSourceId}":{"get":{"tags":["Brickworks: External sources"],"summary":"Get External Source","description":"Retrieve the details of an external data source.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_EXTERNALSOURCES_READ`\n\n**User role permission required:** `assets_brickworks: read`\n","operationId":"getExternalSourceById","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathExternalDataSourceId"}],"responses":{"200":{"description":"Details of the external source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceModel"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-External-sources/operation/getExternalSourceById"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/brickworks/v1/external-sources/%7BExternalDataSourceId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/brickworks/v1/external-sources/%7BExternalDataSourceId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Brickworks: External sources"],"summary":"Update External Source","description":"Update an external data source definition.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_EXTERNALSOURCES_UPDATE`\n\n**User role permission required:** `assets_brickworks: update`\n","operationId":"updateExternalSource","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathExternalDataSourceId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-UpdateExternalSourceRequest"}}}},"responses":{"200":{"description":"External Source updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceModel"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-External-sources/operation/updateExternalSource"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"description\":\"string\",\"properties\":{\"sourceType\":\"http_source\",\"url\":\"https://example.com/clients/{% customer email %}\",\"method\":\"post\",\"headers\":{\"property1\":\"string\",\"property2\":\"string\"},\"params\":{\"property1\":\"string\",\"property2\":\"string\"},\"authType\":\"basic\",\"authId\":\"25d4321e-f980-49d3-983b-4275c49dc2c4\",\"body\":{\"someString\":\"string\",\"someObject\":{\"key\":\"{% customer email %}\"},\"dynamicField\":\"{% customer id %}\"},\"bodySchema\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"someObject\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"key\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true},\"dynamicField\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true}},\"ttl\":0}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"properties\\\":{\\\"sourceType\\\":\\\"http_source\\\",\\\"url\\\":\\\"https://example.com/clients/{% customer email %}\\\",\\\"method\\\":\\\"post\\\",\\\"headers\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"},\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"},\\\"authType\\\":\\\"basic\\\",\\\"authId\\\":\\\"25d4321e-f980-49d3-983b-4275c49dc2c4\\\",\\\"body\\\":{\\\"someString\\\":\\\"string\\\",\\\"someObject\\\":{\\\"key\\\":\\\"{% customer email %}\\\"},\\\"dynamicField\\\":\\\"{% customer id %}\\\"},\\\"bodySchema\\\":{\\\"type\\\":\\\"object\\\",\\\"subtype\\\":\\\"key_value\\\",\\\"properties\\\":{\\\"someObject\\\":{\\\"type\\\":\\\"object\\\",\\\"subtype\\\":\\\"key_value\\\",\\\"properties\\\":{\\\"key\\\":{\\\"type\\\":\\\"string\\\",\\\"subtype\\\":\\\"jinjava\\\"}},\\\"additionalProperties\\\":true},\\\"dynamicField\\\":{\\\"type\\\":\\\"string\\\",\\\"subtype\\\":\\\"jinjava\\\"}},\\\"additionalProperties\\\":true}},\\\"ttl\\\":0}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/brickworks/v1/external-sources/%7BExternalDataSourceId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"description\": \"string\",\n  \"properties\": {\n    \"sourceType\": \"http_source\",\n    \"url\": \"https://example.com/clients/{% customer email %}\",\n    \"method\": \"post\",\n    \"headers\": {\n      \"property1\": \"string\",\n      \"property2\": \"string\"\n    },\n    \"params\": {\n      \"property1\": \"string\",\n      \"property2\": \"string\"\n    },\n    \"authType\": \"basic\",\n    \"authId\": \"25d4321e-f980-49d3-983b-4275c49dc2c4\",\n    \"body\": {\n      \"someString\": \"string\",\n      \"someObject\": {\n        \"key\": \"{% customer email %}\"\n      },\n      \"dynamicField\": \"{% customer id %}\"\n    },\n    \"bodySchema\": {\n      \"type\": \"object\",\n      \"subtype\": \"key_value\",\n      \"properties\": {\n        \"someObject\": {\n          \"type\": \"object\",\n          \"subtype\": \"key_value\",\n          \"properties\": {\n            \"key\": {\n              \"type\": \"string\",\n              \"subtype\": \"jinjava\"\n            }\n          },\n          \"additionalProperties\": true\n        },\n        \"dynamicField\": {\n          \"type\": \"string\",\n          \"subtype\": \"jinjava\"\n        }\n      },\n      \"additionalProperties\": true\n    }\n  },\n  \"ttl\": 0\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/brickworks/v1/external-sources/%7BExternalDataSourceId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  name: 'string',\n  description: 'string',\n  properties: {\n    sourceType: 'http_source',\n    url: 'https://example.com/clients/{% customer email %}',\n    method: 'post',\n    headers: {property1: 'string', property2: 'string'},\n    params: {property1: 'string', property2: 'string'},\n    authType: 'basic',\n    authId: '25d4321e-f980-49d3-983b-4275c49dc2c4',\n    body: {\n      someString: 'string',\n      someObject: {key: '{% customer email %}'},\n      dynamicField: '{% customer id %}'\n    },\n    bodySchema: {\n      type: 'object',\n      subtype: 'key_value',\n      properties: {\n        someObject: {\n          type: 'object',\n          subtype: 'key_value',\n          properties: {key: {type: 'string', subtype: 'jinjava'}},\n          additionalProperties: true\n        },\n        dynamicField: {type: 'string', subtype: 'jinjava'}\n      },\n      additionalProperties: true\n    }\n  },\n  ttl: 0\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"description\":\"string\",\"properties\":{\"sourceType\":\"http_source\",\"url\":\"https://example.com/clients/{% customer email %}\",\"method\":\"post\",\"headers\":{\"property1\":\"string\",\"property2\":\"string\"},\"params\":{\"property1\":\"string\",\"property2\":\"string\"},\"authType\":\"basic\",\"authId\":\"25d4321e-f980-49d3-983b-4275c49dc2c4\",\"body\":{\"someString\":\"string\",\"someObject\":{\"key\":\"{% customer email %}\"},\"dynamicField\":\"{% customer id %}\"},\"bodySchema\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"someObject\":{\"type\":\"object\",\"subtype\":\"key_value\",\"properties\":{\"key\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true},\"dynamicField\":{\"type\":\"string\",\"subtype\":\"jinjava\"}},\"additionalProperties\":true}},\"ttl\":0}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"properties\\\":{\\\"sourceType\\\":\\\"http_source\\\",\\\"url\\\":\\\"https://example.com/clients/{% customer email %}\\\",\\\"method\\\":\\\"post\\\",\\\"headers\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"},\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"},\\\"authType\\\":\\\"basic\\\",\\\"authId\\\":\\\"25d4321e-f980-49d3-983b-4275c49dc2c4\\\",\\\"body\\\":{\\\"someString\\\":\\\"string\\\",\\\"someObject\\\":{\\\"key\\\":\\\"{% customer email %}\\\"},\\\"dynamicField\\\":\\\"{% customer id %}\\\"},\\\"bodySchema\\\":{\\\"type\\\":\\\"object\\\",\\\"subtype\\\":\\\"key_value\\\",\\\"properties\\\":{\\\"someObject\\\":{\\\"type\\\":\\\"object\\\",\\\"subtype\\\":\\\"key_value\\\",\\\"properties\\\":{\\\"key\\\":{\\\"type\\\":\\\"string\\\",\\\"subtype\\\":\\\"jinjava\\\"}},\\\"additionalProperties\\\":true},\\\"dynamicField\\\":{\\\"type\\\":\\\"string\\\",\\\"subtype\\\":\\\"jinjava\\\"}},\\\"additionalProperties\\\":true}},\\\"ttl\\\":0}\")\n  .asString();"}]},"delete":{"tags":["Brickworks: External sources"],"summary":"Delete external source","description":"Permanently delete an external data source definition.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_EXTERNALSOURCES_DELETE`\n\n**User role permission required:** `assets_brickworks: delete`\n","operationId":"deleteExternalSource","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathExternalDataSourceId"}],"responses":{"204":{"description":"No content"},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-External-sources/operation/deleteExternalSource"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/brickworks/v1/external-sources/%7BExternalDataSourceId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/brickworks/v1/external-sources/%7BExternalDataSourceId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/duplicate":{"post":{"tags":["Brickworks: Records"],"summary":"Duplicate record","description":"Create a copy of a record. The name of the copy is `{recordName} - copy`\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_CREATE`\n\n**User role permission required:** `assets_brickworks: create`\n","operationId":"duplicateRecordBySchemaAppIdAndRecordId","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"},{"$ref":"#/components/parameters/brickworks-service-pathRecordIdentifier"}],"responses":{"200":{"description":"Data of the created record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-Record"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Records/operation/duplicateRecordBySchemaAppIdAndRecordId"]}},"/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/versions":{"get":{"tags":["Brickworks: Record versions"],"summary":"Get record versions","description":"Retrieve all versions of a record. You can paginate, sort, and refine the results. By default, the versions are sorted from newest to oldest.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_READ`\n\n**User role permission required:** `assets_brickworks: read`\n","operationId":"getRecordVersions","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"},{"$ref":"#/components/parameters/brickworks-service-pathRecordIdentifier"},{"$ref":"#/components/parameters/brickworks-service-queryLimit"},{"$ref":"#/components/parameters/brickworks-service-queryPage"},{"$ref":"#/components/parameters/brickworks-service-queryRecordFilters"},{"$ref":"#/components/parameters/brickworks-service-querySortBy"},{"$ref":"#/components/parameters/brickworks-service-queryStatuses"}],"responses":{"200":{"description":"A page of record versions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-RecordVersionPagingResult"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Record-versions/operation/getRecordVersions"]}},"/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/versions/{RecordVersionIdentifier}":{"get":{"tags":["Brickworks: Record versions"],"summary":"Get record version","description":"Retrieve the details of a record version. The version can be identified by either a UUID (RecordVersionId) or a version number (integer).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_READ`\n\n**User role permission required:** `assets_brickworks: read`\n","operationId":"getRecordVersion","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"},{"$ref":"#/components/parameters/brickworks-service-pathRecordIdentifier"},{"$ref":"#/components/parameters/brickworks-service-pathRecordVersionIdentifier"}],"responses":{"200":{"description":"Record version object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-RecordVersion"}}}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Record-versions/operation/getRecordVersion"]}},"/brickworks/v1/async/schemas/{SchemaIdentifier}/records":{"post":{"tags":["Brickworks: Records"],"summary":"Batch create or update records (async)","description":"This endpoint can only be used for simple schemas.\n\n- If a record included in this request already exists, it's entirely overwritten by the content from the request (including the slug - if the slug isn't sent, it's removed).\n- Provide the current identifier value (if your request changes the identifier, provide the one from before the change).\n- The record must conform with the schema.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.\n\nIn some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_CREATE`\n\n**User role permission required:** `assets_brickworks: create`\n","operationId":"createOrUpdateRecordBatchAsync","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"}],"requestBody":{"description":"Record data","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/brickworks-service-AsyncRecordRequest"}}}}},"responses":{"201":{"description":"Operation added to queue"},"207":{"$ref":"#/components/responses/brickworks-service-207Response"},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Records/operation/createOrUpdateRecordBatchAsync"]},"patch":{"tags":["Brickworks: Records"],"summary":"Batch create or partially update record (async)","description":"This endpoint can only be used for simple schemas.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.\n\nIn some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_CREATE`\n\n**User role permission required:** `assets_brickworks: create`\n","operationId":"createOrPartialUpdateRecordBatchAsync","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"}],"requestBody":{"description":"Record data","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/brickworks-service-AsyncRecordRequest"}}}}},"responses":{"201":{"description":"Operation added to queue"},"207":{"$ref":"#/components/responses/brickworks-service-207Response"},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Records/operation/createOrPartialUpdateRecordBatchAsync"]}},"/brickworks/v1/async/schemas/{SchemaIdentifier}/record":{"post":{"tags":["Brickworks: Records"],"summary":"Create or update record (async)","description":"This endpoint can only be used for simple schemas.\n\n- If a record included in this request already exists, it's entirely overwritten by the content from the request (including the slug - if the slug isn't sent, it's removed).\n- Provide the current identifier value (if your request changes the identifier, provide the one from before the change).\n- The record must conform with the schema.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.\n\nIn some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_CREATE`\n\n**User role permission required:** `assets_brickworks: create`\n","operationId":"createOrUpdateRecordSingleAsync","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"}],"requestBody":{"description":"Record data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-AsyncRecordRequest"}}}},"responses":{"201":{"description":"Operation added to queue","content":{}},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Records/operation/createOrUpdateRecordSingleAsync"]},"patch":{"tags":["Brickworks: Records"],"summary":"Create or partially update record (async)","description":"This endpoint can only be used for simple schemas.\n\n- You can use this endpoint to update a record by sending only the fields which you want to change. Other fields are not affected.\n- This endpoint doesn't validate the data against field-specific settings, such as limits on character count or regex in a string field.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.\n\nIn some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `BRICKWORKS_RECORDS_CREATE`\n\n**User role permission required:** `assets_brickworks: create`\n","operationId":"createOrPartialUpdateRecordSingleAsync","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/brickworks-service-pathSchemaIdentifier"}],"requestBody":{"description":"Record data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-AsyncRecordRequest"}}}},"responses":{"201":{"description":"Operation added to queue"},"400":{"$ref":"#/components/responses/brickworks-service-GenericBadRequestError"},"401":{"$ref":"#/components/responses/brickworks-service-GenericUnauthorizedError"},"403":{"$ref":"#/components/responses/brickworks-service-GenericForbiddenError"},"404":{"$ref":"#/components/responses/brickworks-service-GenericNotFoundError"},"409":{"$ref":"#/components/responses/brickworks-service-GenericConflictError"},"422":{"$ref":"#/components/responses/brickworks-service-GenericUnprocessableContentError"},"500":{"$ref":"#/components/responses/brickworks-service-GenericError"}},"x-snr-doc-urls":["/api-reference/brickworks#tag/Brickworks:-Records/operation/createOrPartialUpdateRecordSingleAsync"]}},"/business-profile-service/organizations/usage/stats/newDataPoints":{"post":{"operationId":"generateDailyNewDataPointsStats","summary":"Get consumption metric with new data points","description":"Retrieve the number of new events (events added to the database on a particular day), listed by day. You can limit the metric to particular workspaces and event types (actions).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <span title=\"Contact support\">Organization</span>\n","security":[{"JWT":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business-profile-service-OrganizationDailyUsageReportRequest"}}}},"responses":{"200":{"description":"Statistics of new events for the specified date range","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/business-profile-service-DailyUsageStats"}}}}},"401":{"$ref":"#/components/responses/business-profile-service-401-bpservice"},"403":{"$ref":"#/components/responses/business-profile-service-403-bpservice"},"4xx":{"$ref":"#/components/responses/business-profile-service-4xx-bpservice"}},"tags":["Consumption"],"x-snr-doc-urls":["/api-reference/organizations#tag/Consumption/operation/generateDailyNewDataPointsStats"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/business-profile-service/organizations/usage/stats/newDataPoints \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"from\":\"2025-05-29\",\"to\":\"2025-05-30\",\"actions\":[\"page.visit\"],\"bpGuids\":[\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"from\\\":\\\"2025-05-29\\\",\\\"to\\\":\\\"2025-05-30\\\",\\\"actions\\\":[\\\"page.visit\\\"],\\\"bpGuids\\\":[\\\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\\\"]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/business-profile-service/organizations/usage/stats/newDataPoints\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"from\": \"2025-05-29\",\n  \"to\": \"2025-05-30\",\n  \"actions\": [\n    \"page.visit\"\n  ],\n  \"bpGuids\": [\n    \"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/business-profile-service/organizations/usage/stats/newDataPoints\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/business-profile-service/organizations/usage/stats/newDataPoints\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  from: '2025-05-29',\n  to: '2025-05-30',\n  actions: ['page.visit'],\n  bpGuids: ['34eea35e-3ac4-44f4-95b5-fd00a3b45eff']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/business-profile-service/organizations/usage/stats/newDataPoints');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"from\":\"2025-05-29\",\"to\":\"2025-05-30\",\"actions\":[\"page.visit\"],\"bpGuids\":[\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/business-profile-service/organizations/usage/stats/newDataPoints\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"from\\\":\\\"2025-05-29\\\",\\\"to\\\":\\\"2025-05-30\\\",\\\"actions\\\":[\\\"page.visit\\\"],\\\"bpGuids\\\":[\\\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\\\"]}\")\n  .asString();"}]}},"/business-profile-service/organizations/usage/stats/retentionDataPoints":{"post":{"operationId":"generateDailyRetentionDataPointsStats","summary":"Get consumption metric with retention data points","description":"Retrieve the number of events kept in the database, listed by day. This includes events saved in the past, which currently exist in the database according to their retention period. \n\nYou can limit the metric to particular workspaces and event types (actions).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <span title=\"Contact support\">Organization</span>\n","security":[{"JWT":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/business-profile-service-OrganizationDailyUsageReportRequest"}}}},"responses":{"200":{"description":"Statistics of retention events for the specified date range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business-profile-service-RetentionUsageStats"}}}},"401":{"$ref":"#/components/responses/business-profile-service-401-bpservice"},"403":{"$ref":"#/components/responses/business-profile-service-403-bpservice"},"4xx":{"$ref":"#/components/responses/business-profile-service-4xx-bpservice"}},"tags":["Consumption"],"x-snr-doc-urls":["/api-reference/organizations#tag/Consumption/operation/generateDailyRetentionDataPointsStats"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/business-profile-service/organizations/usage/stats/retentionDataPoints \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"from\":\"2025-05-29\",\"to\":\"2025-05-30\",\"actions\":[\"page.visit\"],\"bpGuids\":[\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"from\\\":\\\"2025-05-29\\\",\\\"to\\\":\\\"2025-05-30\\\",\\\"actions\\\":[\\\"page.visit\\\"],\\\"bpGuids\\\":[\\\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\\\"]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/business-profile-service/organizations/usage/stats/retentionDataPoints\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"from\": \"2025-05-29\",\n  \"to\": \"2025-05-30\",\n  \"actions\": [\n    \"page.visit\"\n  ],\n  \"bpGuids\": [\n    \"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/business-profile-service/organizations/usage/stats/retentionDataPoints\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/business-profile-service/organizations/usage/stats/retentionDataPoints\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  from: '2025-05-29',\n  to: '2025-05-30',\n  actions: ['page.visit'],\n  bpGuids: ['34eea35e-3ac4-44f4-95b5-fd00a3b45eff']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/business-profile-service/organizations/usage/stats/retentionDataPoints');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"from\":\"2025-05-29\",\"to\":\"2025-05-30\",\"actions\":[\"page.visit\"],\"bpGuids\":[\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/business-profile-service/organizations/usage/stats/retentionDataPoints\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"from\\\":\\\"2025-05-29\\\",\\\"to\\\":\\\"2025-05-30\\\",\\\"actions\\\":[\\\"page.visit\\\"],\\\"bpGuids\\\":[\\\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\\\"]}\")\n  .asString();"}]}},"/business-profile-service/business-profiles":{"get":{"tags":["Organization workspaces"],"summary":"Get universal list of organization workspaces","operationId":"getBusinessProfilesUniversalList","description":"Retrieve a universal list of workspaces available to the user.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","parameters":[{"$ref":"#/components/parameters/business-profile-service-listPage"},{"$ref":"#/components/parameters/business-profile-service-listLimit"},{"name":"favorite","in":"query","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/business-profile-service-listSearch"},{"name":"sortBy","in":"query","schema":{"type":"string","default":"CREATED:ASC","enum":["ID:ASC","ID:DESC","NAME:ASC","NAME:DESC","CREATED:ASC","CREATED:DESC","FAVORITE:ASC","FAVORITE:DESC"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business-profile-service-UniversalListBusinessProfilesResponse"}}}}},"x-snr-doc-urls":["/api-reference/organizations#tag/Organization-workspaces/operation/getBusinessProfilesUniversalList"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/business-profile-service/business-profiles');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'favorite' => 'SOME_BOOLEAN_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'sortBy' => 'SOME_STRING_VALUE'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE\")\n  .asString();"}]}},"/business-profile-service/organizations/workspaces":{"get":{"summary":"Get all workspaces from organization","description":"Retrieve a list of all workspaces in an organization.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <span title=\"Contact support\">Organization</span>\n","tags":["Organization workspaces"],"operationId":"getWorkspacesOfOrganization","responses":{"200":{"description":"List of workspaces","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business-profile-service-OrganizationWorkspacesResponse"}}}}},"x-snr-doc-urls":["/api-reference/organizations#tag/Organization-workspaces/operation/getWorkspacesOfOrganization"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/business-profile-service/organizations/workspaces"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/business-profile-service/organizations/workspaces\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/business-profile-service/organizations/workspaces\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/business-profile-service/organizations/workspaces\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/business-profile-service/organizations/workspaces');\n$request->setMethod(HTTP_METH_GET);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/business-profile-service/organizations/workspaces\")\n  .asString();"}]}},"/business-profile-service/organizations/business-profiles":{"get":{"tags":["Settings"],"summary":"Get universal list of organization workspaces","operationId":"getBusinessProfilesForOrganizationUserUniversalList","description":"Retrieve a list of worspaces in the organization in context of the current user.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","parameters":[{"$ref":"#/components/parameters/business-profile-service-listPage"},{"$ref":"#/components/parameters/business-profile-service-listLimit"},{"name":"businessProfileGroupId","in":"query","required":false,"description":"Workspace group to filter by.","schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"NAME:ASC","enum":["NAME:ASC","NAME:DESC","CREATED:ASC","CREATED:DESC"]}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business-profile-service-UniversalListBusinessProfilesForOrganizationUserResponse"}}}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/getBusinessProfilesForOrganizationUserUniversalList"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/business-profile-service/organizations/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/business-profile-service/organizations/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/business-profile-service/organizations/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/business-profile-service/organizations/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/business-profile-service/organizations/business-profiles');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'businessProfileGroupId' => 'SOME_STRING_VALUE',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'search' => 'SOME_STRING_VALUE'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/business-profile-service/organizations/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE\")\n  .asString();"}]}},"/business-profile-service/organizations/business-profiles/with-identifiers":{"get":{"tags":["Organization workspaces"],"summary":"Get universal list of organization workspaces with profile identifiers","operationId":"getBusinessProfilesWithIdentifiersForOrganizationUserUniversalList","description":"Retrieve a universal list of workspaces in context of the current user; with profile identifiers used in each workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","parameters":[{"$ref":"#/components/parameters/business-profile-service-listPage"},{"$ref":"#/components/parameters/business-profile-service-listLimit"},{"name":"businessProfileGroupId","in":"query","required":false,"description":"Workspace group to filter by.","schema":{"type":"string"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","default":"NAME:ASC","enum":["NAME:ASC","NAME:DESC","CREATED:ASC","CREATED:DESC"]}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business-profile-service-UniversalListBusinessProfilesForOrganizationWithIdentifiersUserResponse"}}}}},"x-snr-doc-urls":["/api-reference/organizations#tag/Organization-workspaces/operation/getBusinessProfilesWithIdentifiersForOrganizationUserUniversalList"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/business-profile-service/organizations/business-profiles/with-identifiers');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'businessProfileGroupId' => 'SOME_STRING_VALUE',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'search' => 'SOME_STRING_VALUE'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE\")\n  .asString();"}]}},"/catalogs/bags/{catalogId}/csv":{"get":{"tags":["Catalogs"],"summary":"Get all items as CSV file","description":"Download a CSV with all items in the catalog. The unique identifier of an item is saved in the `item_key` column.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_READ`\n\n**User role permission required:** `assets_catalogs: read`\n","operationId":"getItemsCSV","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"},{"$ref":"#/components/parameters/catalogs-queryDelimiter"}],"responses":{"200":{"description":"CSV file. The unique identifier of an item is in the `item_key` column.","content":{"text/csv":{"schema":{"type":"string"},"example":"item_key,color,type\n3a9d38e8,blue,sneaker\ne96b17b7,red,sneaker\n"}}},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/getItemsCSV"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/csv?delimiter=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/catalogs/bags/%7BcatalogId%7D/csv?delimiter=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/csv?delimiter=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D/csv?delimiter=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/csv');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'delimiter' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/csv?delimiter=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/catalogs/bags/{catalogId}/items/upload":{"post":{"tags":["Catalogs"],"summary":"Add items from CSV","description":"Upload items to a catalog from a CSV file\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_UPDATE`\n\n**User role permission required:** `assets_catalogs: update`\n","operationId":"uploadItems","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"itemKey":{"description":"The name of the CSV column that contains unique identifiers. Slashes (`/`) are not allowed in the identifier values.","type":"string"},"file":{"description":"CSV file","type":"string","format":"binary"}},"required":["itemKey","file"]}}}},"responses":{"200":{"description":"Upload status","content":{"application/json":{"schema":{"type":"boolean","description":"`true` when successful"}}}},"400":{"$ref":"#/components/responses/catalogs-400"},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/uploadItems"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/upload \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: multipart/form-data' \\\n  --form itemKey=string \\\n  --form file=string"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"itemKey\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"file\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"multipart/form-data\"\n    }\n\nconn.request(\"POST\", \"/catalogs/bags/%7BcatalogId%7D/items/upload\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = new FormData();\ndata.append(\"itemKey\", \"string\");\ndata.append(\"file\", \"string\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/upload\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D/items/upload\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"itemKey\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"file\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\");\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/upload');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'multipart/form-data'\n]);\n\n$request->setBody('-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"itemKey\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/upload\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .body(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"itemKey\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"file\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\")\n  .asString();"}]}},"/catalogs/bags":{"post":{"tags":["Catalogs"],"summary":"Add catalog","description":"Create a new, empty catalog.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_CREATE`\n\n**User role permission required:** `assets_catalogs: create`\n","operationId":"addBag","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/catalogs-addBag"}}},"required":true},"responses":{"200":{"description":"Details of the created catalog","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/catalogs-bag"},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/catalogs-400"},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/addBag"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/catalogs/bags \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/catalogs/bags\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/catalogs/bags\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/catalogs/bags\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\"}\")\n  .asString();"}]},"get":{"tags":["Catalogs"],"summary":"Get catalogs","description":"Retrieve all catalogs from the Workspace. You can filter and sort the results.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_READ`\n\n**User role permission required:** `assets_catalogs: read`\n","operationId":"getBags","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-queryCatalogSearchBy"},{"$ref":"#/components/parameters/catalogs-queryCatalogOrderBy"},{"$ref":"#/components/parameters/catalogs-queryOffset"},{"$ref":"#/components/parameters/catalogs-queryLimit"}],"responses":{"200":{"description":"List of catalogs","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"A list of catalogs","items":{"$ref":"#/components/schemas/catalogs-bag"}},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/getBags"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/catalogs/bags?searchBy=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/catalogs/bags?searchBy=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/catalogs/bags?searchBy=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags?searchBy=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'searchBy' => 'SOME_STRING_VALUE',\n  'orderBy' => 'SOME_STRING_VALUE',\n  'offset' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/catalogs/bags?searchBy=SOME_STRING_VALUE&orderBy=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"delete":{"tags":["Catalogs"],"summary":"Delete catalogs","description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_DELETE`\n\n**User role permission required:** `assets_catalogs: delete`\n","operationId":"deleteBagByIds","security":[{"JWT":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string","description":"Catalog ID"},"example":[1199,1200,1201]}}}},"responses":{"200":{"description":"Deletion status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"A list of catalogs and their deletion statuses","items":{"$ref":"#/components/schemas/catalogs-deleteResponse"}},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/catalogs-400"},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/deleteBagByIds"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/catalogs/bags \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[1199,1200,1201]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[1199,1200,1201]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"DELETE\", \"/catalogs/bags\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  1199,\n  1200,\n  1201\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/catalogs/bags\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([1199, 1200, 1201]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[1199,1200,1201]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/catalogs/bags\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[1199,1200,1201]\")\n  .asString();"}]}},"/catalogs/bags/{catalogId}/keys":{"get":{"tags":["Catalogs"],"summary":"Get catalog keys","description":"Retrieve the list of keys from a catalog.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_READ`\n\n**User role permission required:** `assets_catalogs: read`\n","operationId":"getKeysByBag","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"responses":{"200":{"description":"List of keys","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"A list of keys (column names) in the catalog","items":{"type":"string"}},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}},"example":{"data":["id","isbn","name"],"metaData":{"totalCount":3,"requestTime":"0.071 [s]"}}}}}},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/getKeysByBag"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/keys \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/catalogs/bags/%7BcatalogId%7D/keys\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/keys\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D/keys\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/keys');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/keys\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/catalogs/bags/{catalogId}":{"get":{"tags":["Catalogs"],"summary":"Get catalog info","description":"Retrieve the metadata of a catalog\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_READ`\n\n**User role permission required:** `assets_catalogs: read`\n","operationId":"getBagById","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"responses":{"200":{"description":"Details of the catalog","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/catalogs-bag"},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/getBagById"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/catalogs/bags/%7BcatalogId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"delete":{"tags":["Catalogs"],"summary":"Delete catalog","description":"Delete a single catalog. This operation is irreversible.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_DELETE`\n\n**User role permission required:** `assets_catalogs: delete`\n","operationId":"deleteBagById","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"responses":{"200":{"description":"Deletion status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"boolean","description":"`true` if the catalog was deleted successfully"},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/deleteBagById"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/catalogs/bags/%7BcatalogId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/catalogs/bags/{catalogId}/items":{"post":{"tags":["Catalogs"],"summary":"Add item","description":"Add a single item to the catalog.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_ITEM_BATCH_CATALOG_CREATE`\n\n**User role permission required:** `assets_catalogs: create`\n","operationId":"addItems","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"requestBody":{"description":"JSON object with any number of key/value pairs","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/catalogs-addItem"}}}},"responses":{"200":{"description":"Upload status","content":{"application/json":{"schema":{"type":"boolean","description":"TRUE if successful"}}}},"400":{"$ref":"#/components/responses/catalogs-400"},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/addItems"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"itemKey\\\":\\\"sku1357\\\",\\\"value\\\":{\\\"itemCategory\\\":\\\"smartphone\\\",\\\"itemColor\\\":\\\"blue\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/catalogs/bags/%7BcatalogId%7D/items\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"itemKey\": \"sku1357\",\n  \"value\": {\n    \"itemCategory\": \"smartphone\",\n    \"itemColor\": \"blue\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D/items\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"itemKey\\\":\\\"sku1357\\\",\\\"value\\\":{\\\"itemCategory\\\":\\\"smartphone\\\",\\\"itemColor\\\":\\\"blue\\\"}}\")\n  .asString();"}]},"get":{"tags":["Catalogs"],"summary":"Get items from catalog","description":"Retrieve the entries from a single catalog.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_READ`\n\n**User role permission required:** `assets_catalogs: read`\n","operationId":"getItemsByBag","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"},{"$ref":"#/components/parameters/catalogs-queryItemKey"},{"$ref":"#/components/parameters/catalogs-queryOffset"},{"$ref":"#/components/parameters/catalogs-queryLimit"}],"responses":{"200":{"description":"A list of items in the catalog","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"Details of the items","items":{"$ref":"#/components/schemas/catalogs-item"}},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/getItemsByBag"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items?itemKey=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/catalogs/bags/%7BcatalogId%7D/items?itemKey=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items?itemKey=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D/items?itemKey=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'itemKey' => 'SOME_STRING_VALUE',\n  'offset' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items?itemKey=SOME_STRING_VALUE&offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/catalogs/bags/{catalogId}/items/batch":{"post":{"tags":["Catalogs"],"summary":"Batch add items","description":"Add a number of items at once.\n\nFor better performance, we recommend using the [`/v1/async/bags/{catalogId}/items` endpoint](#operation/addItemsBatchAsync).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_ITEM_BATCH_CATALOG_CREATE`\n\n**User role permission required:** `assets_catalogs: create`\n","operationId":"addItemsBatch","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"requestBody":{"description":"An array of JSON objects with any number of key/value pairs","required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/catalogs-addItem"}}}}},"responses":{"200":{"description":"Upload status","content":{"application/json":{"schema":{"type":"boolean","description":"TRUE if successful"}}}},"400":{"$ref":"#/components/responses/catalogs-400"},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/addItemsBatch"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/batch \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[{\\\"itemKey\\\":\\\"sku1357\\\",\\\"value\\\":{\\\"itemCategory\\\":\\\"smartphone\\\",\\\"itemColor\\\":\\\"blue\\\"}}]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/catalogs/bags/%7BcatalogId%7D/items/batch\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  {\n    \"itemKey\": \"sku1357\",\n    \"value\": {\n      \"itemCategory\": \"smartphone\",\n      \"itemColor\": \"blue\"\n    }\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/batch\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D/items/batch\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([{itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/batch');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/batch\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[{\\\"itemKey\\\":\\\"sku1357\\\",\\\"value\\\":{\\\"itemCategory\\\":\\\"smartphone\\\",\\\"itemColor\\\":\\\"blue\\\"}}]\")\n  .asString();"}]}},"/catalogs/bags/{catalogId}/enrichment/fields":{"patch":{"tags":["Catalogs"],"summary":"Update enrichment fields","description":"Change enrichment fields for given mapping\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_MAPPING_CATALOG_CREATE`\n\n**User role permission required:** `assets_catalogs: create`\n","operationId":"updateEnrichmentFields","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/catalogs-enrichmentUpdateRequest"}}}},"responses":{"200":{"description":"Upload status","content":{"application/json":{"schema":{"type":"integer","description":"Number of rows changed"}}}},"400":{"$ref":"#/components/responses/catalogs-400"},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/updateEnrichmentFields"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PATCH \\\n  --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/enrichment/fields \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"action\":\"string\",\"paramKey\":\"string\",\"enrichmentFields\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"action\\\":\\\"string\\\",\\\"paramKey\\\":\\\"string\\\",\\\"enrichmentFields\\\":[\\\"string\\\"]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PATCH\", \"/catalogs/bags/%7BcatalogId%7D/enrichment/fields\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"action\": \"string\",\n  \"paramKey\": \"string\",\n  \"enrichmentFields\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/enrichment/fields\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PATCH\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D/enrichment/fields\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({action: 'string', paramKey: 'string', enrichmentFields: ['string']}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\nHttpRequest::methodRegister('PATCH');\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/enrichment/fields');\n$request->setMethod(HttpRequest::HTTP_METH_PATCH);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"action\":\"string\",\"paramKey\":\"string\",\"enrichmentFields\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.patch(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/enrichment/fields\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"action\\\":\\\"string\\\",\\\"paramKey\\\":\\\"string\\\",\\\"enrichmentFields\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/catalogs/bags/{catalogId}/items/itemKey/{itemKey}":{"get":{"tags":["Catalogs"],"summary":"Get single item by itemKey","description":"Retrieve a single item from a catalog by using the item key (unique identifier of an item in the catalog, for example a product's SKU) of the entry in the Synerise database.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_READ`\n\n**User role permission required:** `assets_catalogs: read`\n","operationId":"getItemByKey","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"},{"in":"path","name":"itemKey","required":true,"description":"`itemKey` parameter of the item to retrieve","schema":{"type":"string"}}],"responses":{"200":{"description":"A single item","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/catalogs-item"},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/getItemByKey"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"delete":{"tags":["Catalogs"],"summary":"Delete single item by itemKey","description":"Delete a single item by itemKey (unique identifier of an item in the catalog, for example a product's SKU).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_DELETE`\n\n**User role permission required:** `assets_catalogs: delete`\n","operationId":"deleteItemByItemKey","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"},{"in":"path","name":"itemKey","required":true,"description":"`itemKey` parameter of the item to delete","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"boolean","description":"`true` if the operation was successful."},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/deleteItemByItemKey"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/itemKey/%7BitemKey%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/catalogs/bags/{catalogId}/items/{itemId}":{"post":{"tags":["Catalogs"],"summary":"Update single item by database ID","description":"Update a single item from a catalog by using the ID of the entry in the Synerise database.\n\nUpdate requests are processed according to the time they reach the service.  \nThis means that updates from the synchronous `/bags/{catalogId}/items/{itemId}` endpoint may overwrite asynchronous operations (see [`/v1/async/*` endpoints](#operation/updateItemAsync)) which were sent earlier and queued due to high traffic.  \nThis behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_UPDATE`\n\n**User role permission required:** `assets_catalogs: update`\n","operationId":"updateItem","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"},{"$ref":"#/components/parameters/catalogs-itemDatabaseId"}],"requestBody":{"description":"JSON object with any number of key/value pairs","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"description":"The properties of the catalog item"}}}}},"responses":{"200":{"description":"A single item","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/catalogs-item"},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/updateItem"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"property1\":null,\"property2\":null}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"property1\\\":null,\\\"property2\\\":null}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"property1\": null,\n  \"property2\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({property1: null, property2: null}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"property1\":null,\"property2\":null}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"property1\\\":null,\\\"property2\\\":null}\")\n  .asString();"}]},"get":{"tags":["Catalogs"],"summary":"Get single item by database ID","description":"Retrieve a single item from a catalog by using the ID of the entry in the Synerise database. If you want to retrieve an item by its unique identifier in the catalog, use [/bags/{catalogId}/items/itemKey/{itemKey}](#operation/getItemByKey).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_READ`\n\n**User role permission required:** `assets_catalogs: read`\n","operationId":"getItem","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"},{"$ref":"#/components/parameters/catalogs-itemDatabaseId"}],"responses":{"200":{"description":"A single item","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/catalogs-item"},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/getItem"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"delete":{"tags":["Catalogs"],"summary":"Delete single item by database ID","description":"Delete a single item by ID.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_DELETE`\n\n**User role permission required:** `assets_catalogs: delete`\n","operationId":"deleteItem","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"},{"$ref":"#/components/parameters/catalogs-itemDatabaseId"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"boolean","description":"`true` if the operation was successful."},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/deleteItem"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/items/%7BitemId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/catalogs/items":{"get":{"tags":["Catalogs"],"summary":"Get all items","description":"Retrieve all items from all catalogs in the Workspace.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_READ`\n\n**User role permission required:** `assets_catalogs: read`\n","operationId":"getItemsByBusinessProfileid","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-queryOffset"},{"$ref":"#/components/parameters/catalogs-queryLimit"}],"responses":{"200":{"description":"A list of items in the Workspace","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"Details of the items","items":{"$ref":"#/components/schemas/catalogs-item"}},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/getItemsByBusinessProfileid"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/catalogs/items?offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/catalogs/items?offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/catalogs/items?offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/items?offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/items');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'offset' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/catalogs/items?offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/catalogs/bags/{catalogId}/mappings":{"post":{"tags":["Catalogs"],"summary":"Add mapping","description":"Add a new mapping. Mappings can be used to enrich events with data from catalogs.\n\nFor example, you can map the product's SKU from the \"product.buy\" event to the column in the catalog that includes the SKU. Whenever someone purchases an item with that SKU, you can extract data from the catalog (for example, the product's brand and category) and show that additional in the event log in the Synerise GUI.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_MAPPING_CATALOG_CREATE`\n\n**User role permission required:** `assets_catalogs: create`\n","operationId":"addMapping","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/catalogs-eventData"}}}},"responses":{"200":{"description":"Mapping data","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/catalogs-mapper"},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/catalogs-400"},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/addMapping"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/mappings \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"action\":\"transaction.charge\",\"paramKey\":\"sku\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"action\\\":\\\"transaction.charge\\\",\\\"paramKey\\\":\\\"sku\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/catalogs/bags/%7BcatalogId%7D/mappings\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"action\": \"transaction.charge\",\n  \"paramKey\": \"sku\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/mappings\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/bags/%7BcatalogId%7D/mappings\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({action: 'transaction.charge', paramKey: 'sku'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/mappings');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"action\":\"transaction.charge\",\"paramKey\":\"sku\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/catalogs/bags/%7BcatalogId%7D/mappings\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"action\\\":\\\"transaction.charge\\\",\\\"paramKey\\\":\\\"sku\\\"}\")\n  .asString();"}]}},"/catalogs/mappings":{"get":{"tags":["Catalogs"],"summary":"Get all mappings","description":"Retrieve all mappings from the Workspace.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_MAPPING_CATALOG_READ`\n\n**User role permission required:** `assets_catalogs: read`\n","operationId":"getMappingsByBP","security":[{"JWT":[]}],"responses":{"200":{"description":"List of mappings","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"A list of mappings","items":{"$ref":"#/components/schemas/catalogs-mapper"}},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/getMappingsByBP"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/catalogs/mappings \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/catalogs/mappings\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/catalogs/mappings\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/mappings\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/mappings');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/catalogs/mappings\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/catalogs/mappings/{bpActionParamKey}":{"delete":{"tags":["Catalogs"],"summary":"Delete mapping","description":"Delete a single mapping.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_MAPPING_CATALOG_DELETE`\n\n**User role permission required:** `assets_catalogs: delete`\n","operationId":"deleteMappingBykey","security":[{"JWT":[]}],"parameters":[{"in":"path","name":"bpActionParamKey","description":"The unique identifier of the mapping","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"boolean","description":"`true` if successful"},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/deleteMappingBykey"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/catalogs/mappings/%7BbpActionParamKey%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/catalogs/mappings/%7BbpActionParamKey%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/catalogs/mappings/%7BbpActionParamKey%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/mappings/%7BbpActionParamKey%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/mappings/%7BbpActionParamKey%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/catalogs/mappings/%7BbpActionParamKey%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/catalogs/itemDetail":{"get":{"tags":["Catalogs"],"summary":"Get single item by unique key","description":"Retrieve a single item from a catalog by using the value of the unique identifier (key) in the catalog. If you want to retrieve an item by its ID in the Synerise database, use [/bags/{catalogId}/items/{itemId}](#operation/getItem).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_COLLECTOR_CATALOG_READ`\n\n**User role permission required:** `assets_catalogs: read`\n","operationId":"getItemDetailByKey","security":[{"JWT":[]}],"parameters":[{"name":"catalogName","in":"query","required":true,"description":"Name of the catalog","schema":{"type":"string"}},{"name":"key","in":"query","required":true,"description":"Value of the unique identifier of the item in the catalog. When you retrieve an item using [this endpoint](#operation/getItemsByBag), the identifier is in the `itemKey` field.\n\n```\n{\n    \"creationDate\": \"2020-09-30T11:31:16.314Z\",\n    \"id\": 73753,\n    \"itemKey\": \"uniqueValue\", // this is the value of the key\n    \"lastModified\": null,\n    \"value\": \"{\\\"exampleKey\\\":\\\"uniqueValue\\\",\\\"exampleKey2\\\":\\\"exampleValue\\\"}\",\n    \"bag\": {\n        \"author\": \"authorName\",\n        \"creationDate\": \"2020-09-30T10:52:31.264Z\",\n        \"id\": 1053,\n        \"lastModified\": \"2020-09-30T11:41:11.808Z\",\n        \"name\": \"sampleCatalog\"\n    }\n},\n```\n","schema":{"type":"string"}}],"responses":{"200":{"description":"A single item","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"The column values from this item's catalog row.","properties":{"itemId":{"type":"string","description":"Unique ID, equal to the `itemKey` used in the request to this endpoint."}},"additionalProperties":{"description":"Column values"}},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/getItemDetailByKey"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/itemDetail');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'catalogName' => 'SOME_STRING_VALUE',\n  'key' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/catalogs/v2/bags/{catalogId}/items":{"delete":{"tags":["Catalogs"],"summary":"Delete all items from a catalog","description":"Delete all the contents of a catalog.\n\nInformation about the keys (columns) remains.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_DELETE`\n\n**User role permission required:** `assets_catalogs: delete`\n","operationId":"deleteBagsItemsV2","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"responses":{"200":{"description":"Items deleted. The `metaData` object always shows a `totalCount` of 1, regardless of the number of deleted items.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string","format":"uuid","description":"ID of the deletion job"},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}},"4xx":{"$ref":"#/components/responses/catalogs-400generic"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/deleteBagsItemsV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/catalogs/v2/bags/%7BcatalogId%7D/items\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/v2/bags/%7BcatalogId%7D/items\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/catalogs/v2/bags/{catalogId}/items/batch":{"delete":{"tags":["Catalogs"],"summary":"Delete items by itemKeys","description":"Delete items by itemKeys (unique identifier of an item in the catalog, for example a product's SKU). In the Synerise Portal, it's called the **Primary key**.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_DELETE`\n\n**User role permission required:** `assets_catalogs: delete`\n","operationId":"deleteItemsByItemKeys","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"requestBody":{"description":"Array of itemKeys","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"responses":{"204":{"description":"No Content"},"401":{"$ref":"#/components/responses/catalogs-401"},"403":{"$ref":"#/components/responses/catalogs-403"},"404":{"$ref":"#/components/responses/catalogs-404"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/deleteItemsByItemKeys"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items/batch \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[\"string\"]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[\\\"string\\\"]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"DELETE\", \"/catalogs/v2/bags/%7BcatalogId%7D/items/batch\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  \"string\"\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items/batch\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/v2/bags/%7BcatalogId%7D/items/batch\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify(['string']));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items/batch');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[\"string\"]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/items/batch\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[\\\"string\\\"]\")\n  .asString();"}]}},"/catalogs/v2/bags/{catalogId}/enable/filtering":{"patch":{"tags":["Catalogs"],"summary":"Enable filtering","description":"Enable filtering for a catalog on selected fields\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_UPDATE`\n\n**User role permission required:** `assets_catalogs: update`\n","operationId":"enableFilteringV2","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/catalogs-enableFilteringRequest"}}}},"responses":{"200":{"description":"Upload status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string","format":"uuid"},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/enableFilteringV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PATCH \\\n  --url https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"fields\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"fields\\\":[\\\"string\\\"]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PATCH\", \"/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"fields\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PATCH\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({fields: ['string']}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\nHttpRequest::methodRegister('PATCH');\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering');\n$request->setMethod(HttpRequest::HTTP_METH_PATCH);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"fields\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.patch(\"https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/enable/filtering\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"fields\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/catalogs/v2/bags/{catalogId}/disable/filtering":{"patch":{"tags":["Catalogs"],"summary":"Disable filtering","description":"Disable filtering for a catalog on selected fields\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CATALOGS_CATALOG_UPDATE`\n\n**User role permission required:** `assets_catalogs: update`\n","operationId":"disableFilteringV2","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/catalogs-disableFilteringRequest"}}}},"responses":{"200":{"description":"Number of rows changed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"integer"},"metaData":{"$ref":"#/components/schemas/catalogs-responseMeta"}}}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/disableFilteringV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PATCH \\\n  --url https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"removeFilters\":true}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"removeFilters\\\":true}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PATCH\", \"/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"removeFilters\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PATCH\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({removeFilters: true}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\nHttpRequest::methodRegister('PATCH');\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering');\n$request->setMethod(HttpRequest::HTTP_METH_PATCH);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"removeFilters\":true}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.patch(\"https://api.synerise.com/catalogs/v2/bags/%7BcatalogId%7D/disable/filtering\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"removeFilters\\\":true}\")\n  .asString();"}]}},"/catalogs/v1/async/bags/{catalogId}/item":{"post":{"tags":["Catalogs"],"summary":"Add or update item asynchronously","description":"Add a single item asynchronously to the catalog. If the item already exists, it's entirely overwritten by the item you send.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  \nThis behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.\n\nThe request body can't exceed 256KB.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `CATALOGS_ITEM_BATCH_CREATE`, `CATALOGS_ITEM_BATCH_CATALOG_CREATE`\n\n**User role permission required:** `assets_catalogs: create`\n","operationId":"addItemAsync","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"requestBody":{"description":"JSON object with any number of key/value pairs","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/catalogs-addItem"}}}},"responses":{"204":{"description":"Operation added to queue"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/addItemAsync"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"itemKey\\\":\\\"sku1357\\\",\\\"value\\\":{\\\"itemCategory\\\":\\\"smartphone\\\",\\\"itemColor\\\":\\\"blue\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/catalogs/v1/async/bags/%7BcatalogId%7D/item\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"itemKey\": \"sku1357\",\n  \"value\": {\n    \"itemCategory\": \"smartphone\",\n    \"itemColor\": \"blue\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/v1/async/bags/%7BcatalogId%7D/item\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"itemKey\\\":\\\"sku1357\\\",\\\"value\\\":{\\\"itemCategory\\\":\\\"smartphone\\\",\\\"itemColor\\\":\\\"blue\\\"}}\")\n  .asString();"}]},"patch":{"tags":["Catalogs"],"summary":"Add or update (partial) item asynchronously","description":"Update a single item asynchronously to the catalog. If the item doesn't exist, it will be created.\n\nThis endpoint allows you to perform partial updates - you can send only the properties that you want to add/modify, instead of sending the entire item.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  \nThis behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.\n\nThe request body can't exceed 256KB.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `CATALOGS_ITEM_BATCH_UPDATE`, `CATALOGS_ITEM_BATCH_CATALOG_UPDATE`\n\n**User role permission required:** `assets_catalogs: update`\n","operationId":"updateItemAsync","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"requestBody":{"description":"JSON object with any number of key/value pairs","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/catalogs-addItem"}}}},"responses":{"204":{"description":"Operation added to queue"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/updateItemAsync"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PATCH \\\n  --url https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"itemKey\\\":\\\"sku1357\\\",\\\"value\\\":{\\\"itemCategory\\\":\\\"smartphone\\\",\\\"itemColor\\\":\\\"blue\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PATCH\", \"/catalogs/v1/async/bags/%7BcatalogId%7D/item\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"itemKey\": \"sku1357\",\n  \"value\": {\n    \"itemCategory\": \"smartphone\",\n    \"itemColor\": \"blue\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PATCH\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/v1/async/bags/%7BcatalogId%7D/item\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\nHttpRequest::methodRegister('PATCH');\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item');\n$request->setMethod(HttpRequest::HTTP_METH_PATCH);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.patch(\"https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/item\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"itemKey\\\":\\\"sku1357\\\",\\\"value\\\":{\\\"itemCategory\\\":\\\"smartphone\\\",\\\"itemColor\\\":\\\"blue\\\"}}\")\n  .asString();"}]}},"/catalogs/v1/async/bags/{catalogId}/items":{"post":{"tags":["Catalogs"],"summary":"Batch add or update items asynchronously","description":"Add a number of items asynchronously at once. If an item already exists, it's entirely overwritten by the item you send.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  \nThis behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.\n\nThe request body can't exceed 256KB.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `CATALOGS_ITEM_BATCH_CREATE`, `CATALOGS_ITEM_BATCH_CATALOG_CREATE`\n\n**User role permission required:** `assets_catalogs: create`\n","operationId":"addItemsBatchAsync","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"requestBody":{"description":"JSON object with any number of key/value pairs","required":true,"content":{"application/json":{"schema":{"type":"array","maxItems":200,"items":{"$ref":"#/components/schemas/catalogs-addItem"}}}}},"responses":{"204":{"description":"Operation added to queue"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/addItemsBatchAsync"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[{\\\"itemKey\\\":\\\"sku1357\\\",\\\"value\\\":{\\\"itemCategory\\\":\\\"smartphone\\\",\\\"itemColor\\\":\\\"blue\\\"}}]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/catalogs/v1/async/bags/%7BcatalogId%7D/items\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  {\n    \"itemKey\": \"sku1357\",\n    \"value\": {\n      \"itemCategory\": \"smartphone\",\n      \"itemColor\": \"blue\"\n    }\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/v1/async/bags/%7BcatalogId%7D/items\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([{itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[{\\\"itemKey\\\":\\\"sku1357\\\",\\\"value\\\":{\\\"itemCategory\\\":\\\"smartphone\\\",\\\"itemColor\\\":\\\"blue\\\"}}]\")\n  .asString();"}]},"patch":{"tags":["Catalogs"],"summary":"Batch add or update (partial) items asynchronously","description":"Update a number of items asynchronously at once. If an item doesn't exist, it will be created.\n\nThis endpoint allows you to perform partial updates - you can send only the properties that you want to add/modify, instead of sending the entire item.\n\nAsynchronous requests are processed according to the time they reach the service.  \nThis means that requests to synchronous endpoints (for example, [`/bags/{catalogId}/items/{itemId}`](#operation/updateItem) may overwrite asynchronous operations which were sent earlier and queued due to high traffic.  \nThis behavior also applies to requests from Automation and AI feed synchronization, which use the asynchronous mechanism.\n\nThe request body can't exceed 256KB.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permissions required (at least one):** `CATALOGS_ITEM_BATCH_UPDATE`, `CATALOGS_ITEM_BATCH_CATALOG_UPDATE`\n\n**User role permission required:** `assets_catalogs: update`\n","operationId":"updateItemsBatchAsync","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/catalogs-pathCatalogId"}],"requestBody":{"description":"JSON object with any number of key/value pairs","required":true,"content":{"application/json":{"schema":{"type":"array","maxItems":200,"items":{"$ref":"#/components/schemas/catalogs-addItem"}}}}},"responses":{"204":{"description":"Operation added to queue"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Catalogs/operation/updateItemsBatchAsync"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PATCH \\\n  --url https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[{\\\"itemKey\\\":\\\"sku1357\\\",\\\"value\\\":{\\\"itemCategory\\\":\\\"smartphone\\\",\\\"itemColor\\\":\\\"blue\\\"}}]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PATCH\", \"/catalogs/v1/async/bags/%7BcatalogId%7D/items\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  {\n    \"itemKey\": \"sku1357\",\n    \"value\": {\n      \"itemCategory\": \"smartphone\",\n      \"itemColor\": \"blue\"\n    }\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PATCH\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/catalogs/v1/async/bags/%7BcatalogId%7D/items\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([{itemKey: 'sku1357', value: {itemCategory: 'smartphone', itemColor: 'blue'}}]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\nHttpRequest::methodRegister('PATCH');\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items');\n$request->setMethod(HttpRequest::HTTP_METH_PATCH);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[{\"itemKey\":\"sku1357\",\"value\":{\"itemCategory\":\"smartphone\",\"itemColor\":\"blue\"}}]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.patch(\"https://api.synerise.com/catalogs/v1/async/bags/%7BcatalogId%7D/items\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[{\\\"itemKey\\\":\\\"sku1357\\\",\\\"value\\\":{\\\"itemCategory\\\":\\\"smartphone\\\",\\\"itemColor\\\":\\\"blue\\\"}}]\")\n  .asString();"}]}},"/crm/v1/clients/{clientId}/contacts":{"get":{"deprecated":true,"tags":["Profile management"],"summary":"Get Profile details","description":"<span style=\"color:red\">This method is deprecated. It will be disabled on August 30, 2026.</span>  \n\nYou can use these methods instead:\n  - [GET /v4/clients/{clientId}](#operation/GetClientData)\n  - [GET /v4/clients/{identifierType}/{identifierValue}](#operation/FindAClient)\n\nRetrieve the details of a Profile.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CRM_DETAILS_CLIENT_READ`\n\n**User role permission required:** `client_info: read`\n","operationId":"getClient","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/crm-pathClientId"}],"responses":{"200":{"description":"Profile details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm-ClientDetails"}}}},"404":{"$ref":"#/components/responses/crm-404-pii"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/getClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/crm/v1/clients/%7BclientId%7D/contacts \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/crm/v1/clients/%7BclientId%7D/contacts\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/crm/v1/clients/%7BclientId%7D/contacts\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/crm/v1/clients/%7BclientId%7D/contacts\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/crm/v1/clients/%7BclientId%7D/contacts');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/crm/v1/clients/%7BclientId%7D/contacts\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/crm/v1/contacts/{clientId}":{"put":{"deprecated":true,"tags":["Profile management"],"summary":"Update Profile","description":"<span style=\"color:red\">This method is deprecated. It will be disabled on August 16, 2026</span>  \nUse one of these endpoints instead:\n  - [POST /v4/clients/{clientId}](#operation/UpdateAClient)\n  - [POST /v4/clients/by-email/{clientEmail}](#operation/UpdateAClientByEmail)\n  - [POST /v4/clients/by-customid/{customId}](#operation/UpdateAClientByCustomId)\n\nSending a null value **deletes** an attribute (if it's a custom attribute) or **sets it to null/default value** (if the attribute is Synerise-native)\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CRM_CLIENT_UPDATE`\n\n**User role permission required:** `client_management: update`\n","operationId":"updateClient","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/crm-pathClientId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm-CustomerCommon"}}},"required":true},"responses":{"200":{"description":"Profile details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/crm-ClientDetails"}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/updateClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/crm/v1/contacts/%7BclientId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\",\"firstname\":\"string\",\"lastName\":\"string\",\"custom_identify\":\"string\",\"company\":\"string\",\"phone\":\"string\",\"address\":\"string\",\"birthdate\":\"2019-08-24\",\"city\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"country_id\":\"string\",\"countryCode\":\"PL\",\"avatarUrl\":\"string\",\"sex\":\"0\",\"tags\":[\"string\"],\"additionalProperties\":null}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\",\\\"firstname\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"custom_identify\\\":\\\"string\\\",\\\"company\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"birthdate\\\":\\\"2019-08-24\\\",\\\"city\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"country_id\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"sex\\\":\\\"0\\\",\\\"tags\\\":[\\\"string\\\"],\\\"additionalProperties\\\":null}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/crm/v1/contacts/%7BclientId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"email\": \"string\",\n  \"firstname\": \"string\",\n  \"lastName\": \"string\",\n  \"custom_identify\": \"string\",\n  \"company\": \"string\",\n  \"phone\": \"string\",\n  \"address\": \"string\",\n  \"birthdate\": \"2019-08-24\",\n  \"city\": \"string\",\n  \"zipCode\": \"string\",\n  \"province\": \"string\",\n  \"country_id\": \"string\",\n  \"countryCode\": \"PL\",\n  \"avatarUrl\": \"string\",\n  \"sex\": \"0\",\n  \"tags\": [\n    \"string\"\n  ],\n  \"additionalProperties\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/crm/v1/contacts/%7BclientId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/crm/v1/contacts/%7BclientId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  email: 'string',\n  firstname: 'string',\n  lastName: 'string',\n  custom_identify: 'string',\n  company: 'string',\n  phone: 'string',\n  address: 'string',\n  birthdate: '2019-08-24',\n  city: 'string',\n  zipCode: 'string',\n  province: 'string',\n  country_id: 'string',\n  countryCode: 'PL',\n  avatarUrl: 'string',\n  sex: '0',\n  tags: ['string'],\n  additionalProperties: null\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/crm/v1/contacts/%7BclientId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\",\"firstname\":\"string\",\"lastName\":\"string\",\"custom_identify\":\"string\",\"company\":\"string\",\"phone\":\"string\",\"address\":\"string\",\"birthdate\":\"2019-08-24\",\"city\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"country_id\":\"string\",\"countryCode\":\"PL\",\"avatarUrl\":\"string\",\"sex\":\"0\",\"tags\":[\"string\"],\"additionalProperties\":null}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/crm/v1/contacts/%7BclientId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"email\\\":\\\"string\\\",\\\"firstname\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"custom_identify\\\":\\\"string\\\",\\\"company\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"birthdate\\\":\\\"2019-08-24\\\",\\\"city\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"country_id\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"sex\\\":\\\"0\\\",\\\"tags\\\":[\\\"string\\\"],\\\"additionalProperties\\\":null}\")\n  .asString();"}]}},"/items/v2/filter/validate":{"post":{"summary":"Validate item filter","description":"This endpoint lets you validate the syntax of a filter and preview its results.\n\nThe `parserResult` object in the response validates only the IQL syntax, it does not check if the attributes or contexts referenced in the IQL query exist!\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_FILTER_VALIDATE_READ`\n\n**User role permission required:** `campaigns_recommendations: read`\n","operationId":"ValidateItemFilter","tags":["Item filters"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-filter-all-itemsCatalogId"},{"$ref":"#/components/parameters/items-filter-all-exampleItems"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-filter-all-ValidateItemsFilterRequestBody"}}}},"responses":{"200":{"description":"Validation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-filter-all-FilterValidateResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-filter-all-Error"}}}},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-filter-all-Error"}}}},"502":{"description":"Catalog not ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-filter-all-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-suite#tag/Item-filters/operation/ValidateItemFilter"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/items/v2/filter/validate?itemsCatalogId=SOME_STRING_VALUE&exampleItems=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"filteringString\":\"IF(\\\"abcd\\\" IN client.tags,discount == 0,discount > 0)\",\"clientUUID\":\"68df2317-0edb-4cc9-8b39-5ab68325f891\",\"contextItems\":[\"12345\"],\"inventoryContext\":{\"channelIds\":[\"string\"]},\"candidateItems\":[\"67890\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"filteringString\\\":\\\"IF(\\\\\\\"abcd\\\\\\\" IN client.tags,discount == 0,discount > 0)\\\",\\\"clientUUID\\\":\\\"68df2317-0edb-4cc9-8b39-5ab68325f891\\\",\\\"contextItems\\\":[\\\"12345\\\"],\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"candidateItems\\\":[\\\"67890\\\"]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/items/v2/filter/validate?itemsCatalogId=SOME_STRING_VALUE&exampleItems=SOME_INTEGER_VALUE\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"filteringString\": \"IF(\\\"abcd\\\" IN client.tags,discount == 0,discount > 0)\",\n  \"clientUUID\": \"68df2317-0edb-4cc9-8b39-5ab68325f891\",\n  \"contextItems\": [\n    \"12345\"\n  ],\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"candidateItems\": [\n    \"67890\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/items/v2/filter/validate?itemsCatalogId=SOME_STRING_VALUE&exampleItems=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/items/v2/filter/validate?itemsCatalogId=SOME_STRING_VALUE&exampleItems=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  filteringString: 'IF(\"abcd\" IN client.tags,discount == 0,discount > 0)',\n  clientUUID: '68df2317-0edb-4cc9-8b39-5ab68325f891',\n  contextItems: ['12345'],\n  inventoryContext: {channelIds: ['string']},\n  candidateItems: ['67890']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/items/v2/filter/validate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setQueryData([\n  'itemsCatalogId' => 'SOME_STRING_VALUE',\n  'exampleItems' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"filteringString\":\"IF(\\\\\"abcd\\\\\" IN client.tags,discount == 0,discount > 0)\",\"clientUUID\":\"68df2317-0edb-4cc9-8b39-5ab68325f891\",\"contextItems\":[\"12345\"],\"inventoryContext\":{\"channelIds\":[\"string\"]},\"candidateItems\":[\"67890\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/items/v2/filter/validate?itemsCatalogId=SOME_STRING_VALUE&exampleItems=SOME_INTEGER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"filteringString\\\":\\\"IF(\\\\\\\"abcd\\\\\\\" IN client.tags,discount == 0,discount > 0)\\\",\\\"clientUUID\\\":\\\"68df2317-0edb-4cc9-8b39-5ab68325f891\\\",\\\"contextItems\\\":[\\\"12345\\\"],\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"candidateItems\\\":[\\\"67890\\\"]}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/visual":{"get":{"summary":"Visual items search","description":"Retrieves items that match an image. The results can be filtered and sorted.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"SearchVisualGet","tags":["Visual Search"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-imageUrl"},{"$ref":"#/components/parameters/items-search-inPathIndexId"},{"$ref":"#/components/parameters/items-search-clientUUID"},{"$ref":"#/components/parameters/items-search-personalize"},{"$ref":"#/components/parameters/items-search-correlationId"},{"$ref":"#/components/parameters/items-search-searchId"},{"$ref":"#/components/parameters/items-search-sortByMetric"},{"$ref":"#/components/parameters/items-search-sortByGeoPoint"},{"$ref":"#/components/parameters/items-search-filterGeoPoints"},{"$ref":"#/components/parameters/items-search-filterAroundRadius"},{"$ref":"#/components/parameters/items-search-filterAnchor"},{"$ref":"#/components/parameters/items-search-filters"},{"$ref":"#/components/parameters/items-search-facets"},{"$ref":"#/components/parameters/items-search-facetsSize"},{"$ref":"#/components/parameters/items-search-maxValuesPerFacet"},{"$ref":"#/components/parameters/items-search-caseSensitiveFacetValues"},{"$ref":"#/components/parameters/items-search-displayAttributes"},{"$ref":"#/components/parameters/items-search-context"},{"$ref":"#/components/parameters/items-search-includeFacets"},{"$ref":"#/components/parameters/items-search-facetsOrderBy"},{"$ref":"#/components/parameters/items-search-paginationPage"},{"$ref":"#/components/parameters/items-search-paginationLimit"},{"$ref":"#/components/parameters/items-search-paginationSortBy"},{"$ref":"#/components/parameters/items-search-paginationOrdering"},{"$ref":"#/components/parameters/items-search-paginationIncludeMeta"},{"$ref":"#/components/parameters/items-search-ignoreQueryRules"},{"$ref":"#/components/parameters/items-search-excludeQueryRules"},{"$ref":"#/components/parameters/items-search-params"}],"responses":{"200":{"description":"Search response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-VisualSearchResponse"}}}},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Visual-Search/operation/SearchVisualGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'url' => 'SOME_STRING_VALUE',\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'personalize' => 'SOME_BOOLEAN_VALUE',\n  'correlationId' => 'SOME_STRING_VALUE',\n  'searchId' => 'SOME_STRING_VALUE',\n  'sortByMetric' => 'SOME_STRING_VALUE',\n  'sortByGeoPoint' => '34.052235,-118.243685',\n  'filterGeoPoints' => [\n    '34.052235,-118.243685',\n    '15.0,65.0'\n  ],\n  'filterAroundRadius' => '5000',\n  'filterAnchor' => '0.2,0.8',\n  'filters' => 'SOME_STRING_VALUE',\n  'facets' => 'SOME_ARRAY_VALUE',\n  'facetsSize' => 'SOME_INTEGER_VALUE',\n  'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',\n  'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',\n  'displayAttributes' => [\n    'title',\n    'price'\n  ],\n  'context' => [\n    'mobile',\n    'listing'\n  ],\n  'includeFacets' => 'SOME_STRING_VALUE',\n  'facetsOrderBy' => 'SOME_STRING_VALUE',\n  'page' => '4',\n  'limit' => '10',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'SOME_BOOLEAN_VALUE',\n  'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',\n  'excludeQueryRules' => [\n    '2',\n    '5'\n  ],\n  'params' => 'source:mobile'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Visual items search","description":"Retrieves items that match an image. The results can be filtered and sorted.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"SearchVisualPost","tags":["Visual Search"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-inPathIndexId"}],"requestBody":{"description":"Request for performing visual search","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-VisualSearchRequest"}},"multipart/form-data":{"schema":{"type":"object","properties":{"image":{"type":"string","format":"binary","description":"Uploaded image to be used in the visual search"},"params":{"type":"object","description":"Parameters of the search","properties":{"page":{"$ref":"#/components/schemas/items-search-PaginationPage"},"limit":{"$ref":"#/components/schemas/items-search-PaginationLimit"},"sortBy":{"$ref":"#/components/schemas/items-search-PaginationSortBy"},"ordering":{"$ref":"#/components/schemas/items-search-PaginationOrdering"},"includeMeta":{"$ref":"#/components/schemas/items-search-PaginationIncludeMeta"},"clientUUID":{"$ref":"#/components/schemas/items-search-ClientUUID"},"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationId"},"searchId":{"$ref":"#/components/schemas/items-search-SearchId"},"sortByMetric":{"$ref":"#/components/schemas/items-search-SortByMetric"},"sortByGeoPoints":{"$ref":"#/components/schemas/items-search-SortByGeoPoint"},"filterGeoPoints":{"$ref":"#/components/schemas/items-search-FilterGeoPoints"},"filterAroundRadius":{"$ref":"#/components/schemas/items-search-FilterAroundRadius"},"filterAnchor":{"$ref":"#/components/schemas/items-search-FilterAnchor"},"filters":{"$ref":"#/components/schemas/items-search-Filters"},"facets":{"$ref":"#/components/schemas/items-search-Facets"},"facetsSize":{"$ref":"#/components/schemas/items-search-FacetsSize"},"maxValuesPerFacet":{"$ref":"#/components/schemas/items-search-MaxValuesPerFacet"},"caseSensitiveFacetValues":{"$ref":"#/components/schemas/items-search-CaseSensitiveFacetValues"},"includeFacets":{"$ref":"#/components/schemas/items-search-IncludeFacets"},"facetsOrderBy":{"$ref":"#/components/schemas/items-search-FacetsOrdering"},"context":{"$ref":"#/components/schemas/items-search-Context"},"displayAttributes":{"$ref":"#/components/schemas/items-search-DisplayAttributes"},"ignoreQueryRules":{"$ref":"#/components/schemas/items-search-IgnoreQueryRules"},"excludeQueryRules":{"$ref":"#/components/schemas/items-search-ExcludeQueryRules"},"params":{"$ref":"#/components/schemas/items-search-Params"}}}}}}}},"responses":{"200":{"description":"Search response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-VisualSearchResponse"}}}},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Visual-Search/operation/SearchVisualPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"url\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"url\\\":\\\"string\\\",\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"personalize\\\":true,\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filterAnchor\\\":\\\"0.2,0.8\\\",\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/visual\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"url\": \"string\",\n  \"page\": 0,\n  \"limit\": 10,\n  \"sortBy\": \"string\",\n  \"ordering\": \"desc\",\n  \"includeMeta\": true,\n  \"clientUUID\": \"string\",\n  \"personalize\": true,\n  \"correlationId\": \"string\",\n  \"searchId\": \"string\",\n  \"sortByMetric\": \"TransactionsPopularity\",\n  \"sortByGeoPoints\": \"34.052235,-118.243685\",\n  \"filterGeoPoints\": [\n    \"34.052235,-118.243685\",\n    \"15.0,65.0\"\n  ],\n  \"filterAroundRadius\": 2000,\n  \"filterAnchor\": \"0.2,0.8\",\n  \"filters\": \"string\",\n  \"facets\": [\n    \"string\"\n  ],\n  \"customFilteredFacets\": {\n    \"brand\": \"price > 100\",\n    \"price\": \"brand == foo\"\n  },\n  \"facetsSize\": 2000,\n  \"maxValuesPerFacet\": 50,\n  \"caseSensitiveFacetValues\": false,\n  \"includeFacets\": \"all\",\n  \"facetsOrderBy\": \"coverage\",\n  \"context\": [\n    \"mobile\",\n    \"listing\"\n  ],\n  \"displayAttributes\": [\n    \"title\",\n    \"price\"\n  ],\n  \"ignoreQueryRules\": false,\n  \"excludeQueryRules\": [\n    2,\n    5\n  ],\n  \"params\": {\n    \"source\": \"mobile\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/visual\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  url: 'string',\n  page: 0,\n  limit: 10,\n  sortBy: 'string',\n  ordering: 'desc',\n  includeMeta: true,\n  clientUUID: 'string',\n  personalize: true,\n  correlationId: 'string',\n  searchId: 'string',\n  sortByMetric: 'TransactionsPopularity',\n  sortByGeoPoints: '34.052235,-118.243685',\n  filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],\n  filterAroundRadius: 2000,\n  filterAnchor: '0.2,0.8',\n  filters: 'string',\n  facets: ['string'],\n  customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},\n  facetsSize: 2000,\n  maxValuesPerFacet: 50,\n  caseSensitiveFacetValues: false,\n  includeFacets: 'all',\n  facetsOrderBy: 'coverage',\n  context: ['mobile', 'listing'],\n  displayAttributes: ['title', 'price'],\n  ignoreQueryRules: false,\n  excludeQueryRules: [2, 5],\n  params: {source: 'mobile'}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"url\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"url\\\":\\\"string\\\",\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"personalize\\\":true,\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filterAnchor\\\":\\\"0.2,0.8\\\",\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"}}\")\n  .asString();"},{"lang":"shell_curl","label":"Shell + Curl","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: multipart/form-data' \\\n  --form image=string \\\n  --form 'params={\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}'"},{"lang":"python_python3","label":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"image\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"params\\\"\\r\\n\\r\\n{\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filterAnchor\\\":\\\"0.2,0.8\\\",\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"}}\\r\\n-----011000010111000001101001--\\r\\n\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"multipart/form-data\"\n    }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/visual\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"javascript_xhr","label":"Javascript + Xhr","source":"const data = new FormData();\ndata.append(\"image\", \"string\");\ndata.append(\"params\", \"{\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filterAnchor\\\":\\\"0.2,0.8\\\",\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"}}\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"node_native","label":"Node + Native","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/visual\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"image\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"params\\\"\\r\\n\\r\\n{\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filterAnchor\\\":\\\"0.2,0.8\\\",\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"}}\\r\\n-----011000010111000001101001--\\r\\n\");\nreq.end();"},{"lang":"php_http1","label":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'multipart/form-data'\n]);\n\n$request->setBody('-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\nstring\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"params\"\r\n\r\n{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}\r\n-----011000010111000001101001--\r\n');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"java_unirest","label":"Java + Unirest","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .body(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"image\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"params\\\"\\r\\n\\r\\n{\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filterAnchor\\\":\\\"0.2,0.8\\\",\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"}}\\r\\n-----011000010111000001101001--\\r\\n\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/visual/explain":{"get":{"summary":"Explained visual items search","description":"Retrieves items that match an image. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"SearchVisualGetWithExplanation","tags":["Visual Search"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-imageUrl"},{"$ref":"#/components/parameters/items-search-inPathIndexId"},{"$ref":"#/components/parameters/items-search-clientUUID"},{"$ref":"#/components/parameters/items-search-personalize"},{"$ref":"#/components/parameters/items-search-correlationId"},{"$ref":"#/components/parameters/items-search-searchId"},{"$ref":"#/components/parameters/items-search-sortByMetric"},{"$ref":"#/components/parameters/items-search-sortByGeoPoint"},{"$ref":"#/components/parameters/items-search-filterGeoPoints"},{"$ref":"#/components/parameters/items-search-filterAroundRadius"},{"$ref":"#/components/parameters/items-search-filterAnchor"},{"$ref":"#/components/parameters/items-search-filters"},{"$ref":"#/components/parameters/items-search-facets"},{"$ref":"#/components/parameters/items-search-facetsSize"},{"$ref":"#/components/parameters/items-search-maxValuesPerFacet"},{"$ref":"#/components/parameters/items-search-caseSensitiveFacetValues"},{"$ref":"#/components/parameters/items-search-displayAttributes"},{"$ref":"#/components/parameters/items-search-context"},{"$ref":"#/components/parameters/items-search-includeFacets"},{"$ref":"#/components/parameters/items-search-facetsOrderBy"},{"$ref":"#/components/parameters/items-search-paginationPage"},{"$ref":"#/components/parameters/items-search-paginationLimit"},{"$ref":"#/components/parameters/items-search-paginationSortBy"},{"$ref":"#/components/parameters/items-search-paginationOrdering"},{"$ref":"#/components/parameters/items-search-paginationIncludeMeta"},{"$ref":"#/components/parameters/items-search-ignoreQueryRules"},{"$ref":"#/components/parameters/items-search-excludeQueryRules"},{"$ref":"#/components/parameters/items-search-crossWorkspaceModeEnabled"},{"$ref":"#/components/parameters/items-search-params"}],"responses":{"200":{"description":"Search response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-VisualSearchResponseWithExplanation"}}}},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Visual-Search/operation/SearchVisualGetWithExplanation"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'url' => 'SOME_STRING_VALUE',\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'personalize' => 'SOME_BOOLEAN_VALUE',\n  'correlationId' => 'SOME_STRING_VALUE',\n  'searchId' => 'SOME_STRING_VALUE',\n  'sortByMetric' => 'SOME_STRING_VALUE',\n  'sortByGeoPoint' => '34.052235,-118.243685',\n  'filterGeoPoints' => [\n    '34.052235,-118.243685',\n    '15.0,65.0'\n  ],\n  'filterAroundRadius' => '5000',\n  'filterAnchor' => '0.2,0.8',\n  'filters' => 'SOME_STRING_VALUE',\n  'facets' => 'SOME_ARRAY_VALUE',\n  'facetsSize' => 'SOME_INTEGER_VALUE',\n  'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',\n  'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',\n  'displayAttributes' => [\n    'title',\n    'price'\n  ],\n  'context' => [\n    'mobile',\n    'listing'\n  ],\n  'includeFacets' => 'SOME_STRING_VALUE',\n  'facetsOrderBy' => 'SOME_STRING_VALUE',\n  'page' => '4',\n  'limit' => '10',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'SOME_BOOLEAN_VALUE',\n  'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',\n  'excludeQueryRules' => [\n    '2',\n    '5'\n  ],\n  'crossWorkspaceModeEnabled' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain?url=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filterAnchor=0.2%2C0.8&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Explained visual items search","description":"Retrieves items that match an image. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"SearchVisualPostWithExplanation","tags":["Visual Search"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-inPathIndexId"}],"requestBody":{"description":"Request for performing visual search with explanation","required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/items-search-VisualSearchRequest"},{"type":"object","properties":{"crossWorkspaceMode":{"$ref":"#/components/schemas/items-search-CrossWorkspaceMode"}}}]}}}},"responses":{"200":{"description":"Search response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-VisualSearchResponseWithExplanation"}}}},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Visual-Search/operation/SearchVisualPostWithExplanation"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"url\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"crossWorkspaceMode\":{\"enabled\":true}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"url\\\":\\\"string\\\",\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"personalize\\\":true,\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filterAnchor\\\":\\\"0.2,0.8\\\",\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/visual/explain\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"url\": \"string\",\n  \"page\": 0,\n  \"limit\": 10,\n  \"sortBy\": \"string\",\n  \"ordering\": \"desc\",\n  \"includeMeta\": true,\n  \"clientUUID\": \"string\",\n  \"personalize\": true,\n  \"correlationId\": \"string\",\n  \"searchId\": \"string\",\n  \"sortByMetric\": \"TransactionsPopularity\",\n  \"sortByGeoPoints\": \"34.052235,-118.243685\",\n  \"filterGeoPoints\": [\n    \"34.052235,-118.243685\",\n    \"15.0,65.0\"\n  ],\n  \"filterAroundRadius\": 2000,\n  \"filterAnchor\": \"0.2,0.8\",\n  \"filters\": \"string\",\n  \"facets\": [\n    \"string\"\n  ],\n  \"customFilteredFacets\": {\n    \"brand\": \"price > 100\",\n    \"price\": \"brand == foo\"\n  },\n  \"facetsSize\": 2000,\n  \"maxValuesPerFacet\": 50,\n  \"caseSensitiveFacetValues\": false,\n  \"includeFacets\": \"all\",\n  \"facetsOrderBy\": \"coverage\",\n  \"context\": [\n    \"mobile\",\n    \"listing\"\n  ],\n  \"displayAttributes\": [\n    \"title\",\n    \"price\"\n  ],\n  \"ignoreQueryRules\": false,\n  \"excludeQueryRules\": [\n    2,\n    5\n  ],\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/visual/explain\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  url: 'string',\n  page: 0,\n  limit: 10,\n  sortBy: 'string',\n  ordering: 'desc',\n  includeMeta: true,\n  clientUUID: 'string',\n  personalize: true,\n  correlationId: 'string',\n  searchId: 'string',\n  sortByMetric: 'TransactionsPopularity',\n  sortByGeoPoints: '34.052235,-118.243685',\n  filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],\n  filterAroundRadius: 2000,\n  filterAnchor: '0.2,0.8',\n  filters: 'string',\n  facets: ['string'],\n  customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},\n  facetsSize: 2000,\n  maxValuesPerFacet: 50,\n  caseSensitiveFacetValues: false,\n  includeFacets: 'all',\n  facetsOrderBy: 'coverage',\n  context: ['mobile', 'listing'],\n  displayAttributes: ['title', 'price'],\n  ignoreQueryRules: false,\n  excludeQueryRules: [2, 5],\n  params: {source: 'mobile'},\n  crossWorkspaceMode: {enabled: true}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"url\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filterAnchor\":\"0.2,0.8\",\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"crossWorkspaceMode\":{\"enabled\":true}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/visual/explain\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"url\\\":\\\"string\\\",\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"personalize\\\":true,\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filterAnchor\\\":\\\"0.2,0.8\\\",\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/query":{"get":{"summary":"Full-text items search","description":"Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"SearchFullTextGet","tags":["Search"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-searchQuery"},{"$ref":"#/components/parameters/items-search-inPathIndexId"},{"$ref":"#/components/parameters/items-search-clientUUID"},{"$ref":"#/components/parameters/items-search-personalize"},{"$ref":"#/components/parameters/items-search-correlationId"},{"$ref":"#/components/parameters/items-search-searchId"},{"$ref":"#/components/parameters/items-search-sortByMetric"},{"$ref":"#/components/parameters/items-search-sortByGeoPoint"},{"$ref":"#/components/parameters/items-search-filterGeoPoints"},{"$ref":"#/components/parameters/items-search-filterAroundRadius"},{"$ref":"#/components/parameters/items-search-filters"},{"$ref":"#/components/parameters/items-search-facets"},{"$ref":"#/components/parameters/items-search-facetsSize"},{"$ref":"#/components/parameters/items-search-maxValuesPerFacet"},{"$ref":"#/components/parameters/items-search-caseSensitiveFacetValues"},{"$ref":"#/components/parameters/items-search-displayAttributes"},{"$ref":"#/components/parameters/items-search-context"},{"$ref":"#/components/parameters/items-search-includeFacets"},{"$ref":"#/components/parameters/items-search-facetsOrderBy"},{"$ref":"#/components/parameters/items-search-paginationPage"},{"$ref":"#/components/parameters/items-search-paginationLimit"},{"$ref":"#/components/parameters/items-search-paginationSortBy"},{"$ref":"#/components/parameters/items-search-paginationOrdering"},{"$ref":"#/components/parameters/items-search-paginationIncludeMeta"},{"$ref":"#/components/parameters/items-search-distinctFilter"},{"$ref":"#/components/parameters/items-search-ignoreQueryRules"},{"$ref":"#/components/parameters/items-search-excludeQueryRules"},{"$ref":"#/components/parameters/items-search-disableQueryClassification"},{"$ref":"#/components/parameters/items-search-disableDynamicReranker"},{"$ref":"#/components/parameters/items-search-params"}],"responses":{"200":{"$ref":"#/components/responses/items-search-FullTextSearchResponse200"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search/operation/SearchFullTextGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/query');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'query' => 'SOME_STRING_VALUE',\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'personalize' => 'SOME_BOOLEAN_VALUE',\n  'correlationId' => 'SOME_STRING_VALUE',\n  'searchId' => 'SOME_STRING_VALUE',\n  'sortByMetric' => 'SOME_STRING_VALUE',\n  'sortByGeoPoint' => '34.052235,-118.243685',\n  'filterGeoPoints' => [\n    '34.052235,-118.243685',\n    '15.0,65.0'\n  ],\n  'filterAroundRadius' => '5000',\n  'filters' => 'SOME_STRING_VALUE',\n  'facets' => 'SOME_ARRAY_VALUE',\n  'facetsSize' => 'SOME_INTEGER_VALUE',\n  'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',\n  'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',\n  'displayAttributes' => [\n    'title',\n    'price'\n  ],\n  'context' => [\n    'mobile',\n    'listing'\n  ],\n  'includeFacets' => 'SOME_STRING_VALUE',\n  'facetsOrderBy' => 'SOME_STRING_VALUE',\n  'page' => '4',\n  'limit' => '10',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'SOME_BOOLEAN_VALUE',\n  'distinctFilter' => '{\"attribute\": \"color\", \"maxNumItems\": 3}',\n  'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',\n  'excludeQueryRules' => [\n    '2',\n    '5'\n  ],\n  'disableQueryClassification' => 'SOME_BOOLEAN_VALUE',\n  'disableDynamicReranker' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/query?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&params=source%3Amobile\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Full-text items search","description":"Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"SearchFullTextPost","tags":["Search"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-inPathIndexId"}],"requestBody":{"description":"Request for performing full-text search","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-FullTextSearchRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/items-search-FullTextSearchResponse200"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search/operation/SearchFullTextPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/query \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"query\\\":\\\"string\\\",\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"personalize\\\":true,\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":1,\\\"levelRangeModifier\\\":0},\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"disableQueryClassification\\\":false,\\\"disableDynamicReranker\\\":false}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/query\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"query\": \"string\",\n  \"page\": 0,\n  \"limit\": 10,\n  \"sortBy\": \"string\",\n  \"ordering\": \"desc\",\n  \"includeMeta\": true,\n  \"clientUUID\": \"string\",\n  \"personalize\": true,\n  \"correlationId\": \"string\",\n  \"searchId\": \"string\",\n  \"sortByMetric\": \"TransactionsPopularity\",\n  \"sortByGeoPoints\": \"34.052235,-118.243685\",\n  \"filterGeoPoints\": [\n    \"34.052235,-118.243685\",\n    \"15.0,65.0\"\n  ],\n  \"filterAroundRadius\": 2000,\n  \"filters\": \"string\",\n  \"facets\": [\n    \"string\"\n  ],\n  \"customFilteredFacets\": {\n    \"brand\": \"price > 100\",\n    \"price\": \"brand == foo\"\n  },\n  \"facetsSize\": 2000,\n  \"maxValuesPerFacet\": 50,\n  \"caseSensitiveFacetValues\": false,\n  \"includeFacets\": \"all\",\n  \"facetsOrderBy\": \"coverage\",\n  \"context\": [\n    \"mobile\",\n    \"listing\"\n  ],\n  \"displayAttributes\": [\n    \"title\",\n    \"price\"\n  ],\n  \"distinctFilter\": {\n    \"attribute\": \"string\",\n    \"maxNumItems\": 1,\n    \"levelRangeModifier\": 0\n  },\n  \"ignoreQueryRules\": false,\n  \"excludeQueryRules\": [\n    2,\n    5\n  ],\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"disableQueryClassification\": false,\n  \"disableDynamicReranker\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/query\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/query\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  query: 'string',\n  page: 0,\n  limit: 10,\n  sortBy: 'string',\n  ordering: 'desc',\n  includeMeta: true,\n  clientUUID: 'string',\n  personalize: true,\n  correlationId: 'string',\n  searchId: 'string',\n  sortByMetric: 'TransactionsPopularity',\n  sortByGeoPoints: '34.052235,-118.243685',\n  filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],\n  filterAroundRadius: 2000,\n  filters: 'string',\n  facets: ['string'],\n  customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},\n  facetsSize: 2000,\n  maxValuesPerFacet: 50,\n  caseSensitiveFacetValues: false,\n  includeFacets: 'all',\n  facetsOrderBy: 'coverage',\n  context: ['mobile', 'listing'],\n  displayAttributes: ['title', 'price'],\n  distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},\n  ignoreQueryRules: false,\n  excludeQueryRules: [2, 5],\n  params: {source: 'mobile'},\n  disableQueryClassification: false,\n  disableDynamicReranker: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/query');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/query\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"query\\\":\\\"string\\\",\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"personalize\\\":true,\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":1,\\\"levelRangeModifier\\\":0},\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"disableQueryClassification\\\":false,\\\"disableDynamicReranker\\\":false}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/query/explain":{"get":{"summary":"Explained full-text items search","description":"Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted.  The response contains an explanation of the factors that influenced the result.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"SearchFullTextGetWithExplanation","tags":["Search"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-searchQuery"},{"$ref":"#/components/parameters/items-search-inPathIndexId"},{"$ref":"#/components/parameters/items-search-clientUUID"},{"$ref":"#/components/parameters/items-search-personalize"},{"$ref":"#/components/parameters/items-search-correlationId"},{"$ref":"#/components/parameters/items-search-searchId"},{"$ref":"#/components/parameters/items-search-sortByMetric"},{"$ref":"#/components/parameters/items-search-sortByGeoPoint"},{"$ref":"#/components/parameters/items-search-filterGeoPoints"},{"$ref":"#/components/parameters/items-search-filterAroundRadius"},{"$ref":"#/components/parameters/items-search-filters"},{"$ref":"#/components/parameters/items-search-facets"},{"$ref":"#/components/parameters/items-search-facetsSize"},{"$ref":"#/components/parameters/items-search-maxValuesPerFacet"},{"$ref":"#/components/parameters/items-search-caseSensitiveFacetValues"},{"$ref":"#/components/parameters/items-search-displayAttributes"},{"$ref":"#/components/parameters/items-search-context"},{"$ref":"#/components/parameters/items-search-includeFacets"},{"$ref":"#/components/parameters/items-search-facetsOrderBy"},{"$ref":"#/components/parameters/items-search-paginationPage"},{"$ref":"#/components/parameters/items-search-paginationLimit"},{"$ref":"#/components/parameters/items-search-paginationSortBy"},{"$ref":"#/components/parameters/items-search-paginationOrdering"},{"$ref":"#/components/parameters/items-search-paginationIncludeMeta"},{"$ref":"#/components/parameters/items-search-distinctFilter"},{"$ref":"#/components/parameters/items-search-ignoreQueryRules"},{"$ref":"#/components/parameters/items-search-disableQueryClassification"},{"$ref":"#/components/parameters/items-search-disableDynamicReranker"},{"$ref":"#/components/parameters/items-search-excludeQueryRules"},{"$ref":"#/components/parameters/items-search-crossWorkspaceModeEnabled"},{"$ref":"#/components/parameters/items-search-params"}],"responses":{"200":{"$ref":"#/components/responses/items-search-FullTextSearchResponse200WithExplanation"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search/operation/SearchFullTextGetWithExplanation"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'query' => 'SOME_STRING_VALUE',\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'personalize' => 'SOME_BOOLEAN_VALUE',\n  'correlationId' => 'SOME_STRING_VALUE',\n  'searchId' => 'SOME_STRING_VALUE',\n  'sortByMetric' => 'SOME_STRING_VALUE',\n  'sortByGeoPoint' => '34.052235,-118.243685',\n  'filterGeoPoints' => [\n    '34.052235,-118.243685',\n    '15.0,65.0'\n  ],\n  'filterAroundRadius' => '5000',\n  'filters' => 'SOME_STRING_VALUE',\n  'facets' => 'SOME_ARRAY_VALUE',\n  'facetsSize' => 'SOME_INTEGER_VALUE',\n  'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',\n  'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',\n  'displayAttributes' => [\n    'title',\n    'price'\n  ],\n  'context' => [\n    'mobile',\n    'listing'\n  ],\n  'includeFacets' => 'SOME_STRING_VALUE',\n  'facetsOrderBy' => 'SOME_STRING_VALUE',\n  'page' => '4',\n  'limit' => '10',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'SOME_BOOLEAN_VALUE',\n  'distinctFilter' => '{\"attribute\": \"color\", \"maxNumItems\": 3}',\n  'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',\n  'disableQueryClassification' => 'SOME_BOOLEAN_VALUE',\n  'disableDynamicReranker' => 'SOME_BOOLEAN_VALUE',\n  'excludeQueryRules' => [\n    '2',\n    '5'\n  ],\n  'crossWorkspaceModeEnabled' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Explained full-text items search","description":"Retrieves items that match a full-text query from a search index or a suggestion index. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"SearchFullTextPostWithExplanation","tags":["Search"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-inPathIndexId"}],"requestBody":{"description":"Request for performing full-text search with explanation","required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/items-search-FullTextSearchRequest"},{"type":"object","properties":{"crossWorkspaceMode":{"$ref":"#/components/schemas/items-search-CrossWorkspaceMode"}}}]}}}},"responses":{"200":{"$ref":"#/components/responses/items-search-FullTextSearchResponse200WithExplanation"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search/operation/SearchFullTextPostWithExplanation"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"query\\\":\\\"string\\\",\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"personalize\\\":true,\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":1,\\\"levelRangeModifier\\\":0},\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"disableQueryClassification\\\":false,\\\"disableDynamicReranker\\\":false,\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/query/explain\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"query\": \"string\",\n  \"page\": 0,\n  \"limit\": 10,\n  \"sortBy\": \"string\",\n  \"ordering\": \"desc\",\n  \"includeMeta\": true,\n  \"clientUUID\": \"string\",\n  \"personalize\": true,\n  \"correlationId\": \"string\",\n  \"searchId\": \"string\",\n  \"sortByMetric\": \"TransactionsPopularity\",\n  \"sortByGeoPoints\": \"34.052235,-118.243685\",\n  \"filterGeoPoints\": [\n    \"34.052235,-118.243685\",\n    \"15.0,65.0\"\n  ],\n  \"filterAroundRadius\": 2000,\n  \"filters\": \"string\",\n  \"facets\": [\n    \"string\"\n  ],\n  \"customFilteredFacets\": {\n    \"brand\": \"price > 100\",\n    \"price\": \"brand == foo\"\n  },\n  \"facetsSize\": 2000,\n  \"maxValuesPerFacet\": 50,\n  \"caseSensitiveFacetValues\": false,\n  \"includeFacets\": \"all\",\n  \"facetsOrderBy\": \"coverage\",\n  \"context\": [\n    \"mobile\",\n    \"listing\"\n  ],\n  \"displayAttributes\": [\n    \"title\",\n    \"price\"\n  ],\n  \"distinctFilter\": {\n    \"attribute\": \"string\",\n    \"maxNumItems\": 1,\n    \"levelRangeModifier\": 0\n  },\n  \"ignoreQueryRules\": false,\n  \"excludeQueryRules\": [\n    2,\n    5\n  ],\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"disableQueryClassification\": false,\n  \"disableDynamicReranker\": false,\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/query/explain\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  query: 'string',\n  page: 0,\n  limit: 10,\n  sortBy: 'string',\n  ordering: 'desc',\n  includeMeta: true,\n  clientUUID: 'string',\n  personalize: true,\n  correlationId: 'string',\n  searchId: 'string',\n  sortByMetric: 'TransactionsPopularity',\n  sortByGeoPoints: '34.052235,-118.243685',\n  filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],\n  filterAroundRadius: 2000,\n  filters: 'string',\n  facets: ['string'],\n  customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},\n  facetsSize: 2000,\n  maxValuesPerFacet: 50,\n  caseSensitiveFacetValues: false,\n  includeFacets: 'all',\n  facetsOrderBy: 'coverage',\n  context: ['mobile', 'listing'],\n  displayAttributes: ['title', 'price'],\n  distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},\n  ignoreQueryRules: false,\n  excludeQueryRules: [2, 5],\n  params: {source: 'mobile'},\n  disableQueryClassification: false,\n  disableDynamicReranker: false,\n  crossWorkspaceMode: {enabled: true}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/query/explain\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"query\\\":\\\"string\\\",\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"personalize\\\":true,\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":1,\\\"levelRangeModifier\\\":0},\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"disableQueryClassification\\\":false,\\\"disableDynamicReranker\\\":false,\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/autocomplete":{"get":{"summary":"Autocomplete items search","description":"Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"SearchAutocompleteGet","tags":["Search"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-searchQuery"},{"$ref":"#/components/parameters/items-search-inPathIndexId"},{"$ref":"#/components/parameters/items-search-clientUUID"},{"$ref":"#/components/parameters/items-search-personalize"},{"$ref":"#/components/parameters/items-search-sortByMetric"},{"$ref":"#/components/parameters/items-search-sortByGeoPoint"},{"$ref":"#/components/parameters/items-search-filterGeoPoints"},{"$ref":"#/components/parameters/items-search-filterAroundRadius"},{"$ref":"#/components/parameters/items-search-filters"},{"$ref":"#/components/parameters/items-search-facets"},{"$ref":"#/components/parameters/items-search-facetsSize"},{"$ref":"#/components/parameters/items-search-maxValuesPerFacet"},{"$ref":"#/components/parameters/items-search-caseSensitiveFacetValues"},{"$ref":"#/components/parameters/items-search-displayAttributes"},{"$ref":"#/components/parameters/items-search-context"},{"$ref":"#/components/parameters/items-search-includeFacets"},{"$ref":"#/components/parameters/items-search-facetsOrderBy"},{"$ref":"#/components/parameters/items-search-paginationPage"},{"$ref":"#/components/parameters/items-search-paginationLimit"},{"$ref":"#/components/parameters/items-search-paginationSortBy"},{"$ref":"#/components/parameters/items-search-paginationOrdering"},{"$ref":"#/components/parameters/items-search-paginationIncludeMeta"},{"$ref":"#/components/parameters/items-search-distinctFilter"},{"$ref":"#/components/parameters/items-search-ignoreQueryRules"},{"$ref":"#/components/parameters/items-search-excludeQueryRules"},{"$ref":"#/components/parameters/items-search-params"},{"$ref":"#/components/parameters/items-search-disableQueryClassification"},{"$ref":"#/components/parameters/items-search-disableDynamicReranker"}],"responses":{"200":{"$ref":"#/components/responses/items-search-AutocompleteSearchResponse200"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search/operation/SearchAutocompleteGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'query' => 'SOME_STRING_VALUE',\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'personalize' => 'SOME_BOOLEAN_VALUE',\n  'sortByMetric' => 'SOME_STRING_VALUE',\n  'sortByGeoPoint' => '34.052235,-118.243685',\n  'filterGeoPoints' => [\n    '34.052235,-118.243685',\n    '15.0,65.0'\n  ],\n  'filterAroundRadius' => '5000',\n  'filters' => 'SOME_STRING_VALUE',\n  'facets' => 'SOME_ARRAY_VALUE',\n  'facetsSize' => 'SOME_INTEGER_VALUE',\n  'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',\n  'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',\n  'displayAttributes' => [\n    'title',\n    'price'\n  ],\n  'context' => [\n    'mobile',\n    'listing'\n  ],\n  'includeFacets' => 'SOME_STRING_VALUE',\n  'facetsOrderBy' => 'SOME_STRING_VALUE',\n  'page' => '4',\n  'limit' => '10',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'SOME_BOOLEAN_VALUE',\n  'distinctFilter' => '{\"attribute\": \"color\", \"maxNumItems\": 3}',\n  'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',\n  'excludeQueryRules' => [\n    '2',\n    '5'\n  ],\n  'params' => 'source:mobile',\n  'disableQueryClassification' => 'SOME_BOOLEAN_VALUE',\n  'disableDynamicReranker' => 'SOME_BOOLEAN_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Autocomplete items search","description":"Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"SearchAutocompletePost","tags":["Search"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-inPathIndexId"}],"requestBody":{"description":"Request for performing an autocomplete search","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-AutocompleteRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/items-search-AutocompleteSearchResponse200"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search/operation/SearchAutocompletePost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"query\\\":\\\"string\\\",\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":1,\\\"levelRangeModifier\\\":0},\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"disableQueryClassification\\\":false,\\\"disableDynamicReranker\\\":false}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/autocomplete\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"query\": \"string\",\n  \"page\": 0,\n  \"limit\": 10,\n  \"sortBy\": \"string\",\n  \"ordering\": \"desc\",\n  \"includeMeta\": true,\n  \"clientUUID\": \"string\",\n  \"sortByMetric\": \"TransactionsPopularity\",\n  \"sortByGeoPoints\": \"34.052235,-118.243685\",\n  \"filterGeoPoints\": [\n    \"34.052235,-118.243685\",\n    \"15.0,65.0\"\n  ],\n  \"filterAroundRadius\": 2000,\n  \"filters\": \"string\",\n  \"facets\": [\n    \"string\"\n  ],\n  \"customFilteredFacets\": {\n    \"brand\": \"price > 100\",\n    \"price\": \"brand == foo\"\n  },\n  \"facetsSize\": 2000,\n  \"maxValuesPerFacet\": 50,\n  \"caseSensitiveFacetValues\": false,\n  \"includeFacets\": \"all\",\n  \"facetsOrderBy\": \"coverage\",\n  \"context\": [\n    \"mobile\",\n    \"listing\"\n  ],\n  \"displayAttributes\": [\n    \"title\",\n    \"price\"\n  ],\n  \"distinctFilter\": {\n    \"attribute\": \"string\",\n    \"maxNumItems\": 1,\n    \"levelRangeModifier\": 0\n  },\n  \"ignoreQueryRules\": false,\n  \"excludeQueryRules\": [\n    2,\n    5\n  ],\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"disableQueryClassification\": false,\n  \"disableDynamicReranker\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/autocomplete\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  query: 'string',\n  page: 0,\n  limit: 10,\n  sortBy: 'string',\n  ordering: 'desc',\n  includeMeta: true,\n  clientUUID: 'string',\n  sortByMetric: 'TransactionsPopularity',\n  sortByGeoPoints: '34.052235,-118.243685',\n  filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],\n  filterAroundRadius: 2000,\n  filters: 'string',\n  facets: ['string'],\n  customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},\n  facetsSize: 2000,\n  maxValuesPerFacet: 50,\n  caseSensitiveFacetValues: false,\n  includeFacets: 'all',\n  facetsOrderBy: 'coverage',\n  context: ['mobile', 'listing'],\n  displayAttributes: ['title', 'price'],\n  distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},\n  ignoreQueryRules: false,\n  excludeQueryRules: [2, 5],\n  params: {source: 'mobile'},\n  disableQueryClassification: false,\n  disableDynamicReranker: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"query\\\":\\\"string\\\",\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":1,\\\"levelRangeModifier\\\":0},\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"disableQueryClassification\\\":false,\\\"disableDynamicReranker\\\":false}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/autocomplete/explain":{"get":{"summary":"Explained autocomplete items search","description":"Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached. The response contains an explanation of the factors that influenced the result.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"SearchAutocompleteGetWithExplanation","tags":["Search"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-searchQuery"},{"$ref":"#/components/parameters/items-search-inPathIndexId"},{"$ref":"#/components/parameters/items-search-clientUUID"},{"$ref":"#/components/parameters/items-search-personalize"},{"$ref":"#/components/parameters/items-search-sortByMetric"},{"$ref":"#/components/parameters/items-search-sortByGeoPoint"},{"$ref":"#/components/parameters/items-search-filterGeoPoints"},{"$ref":"#/components/parameters/items-search-filterAroundRadius"},{"$ref":"#/components/parameters/items-search-filters"},{"$ref":"#/components/parameters/items-search-facets"},{"$ref":"#/components/parameters/items-search-facetsSize"},{"$ref":"#/components/parameters/items-search-maxValuesPerFacet"},{"$ref":"#/components/parameters/items-search-caseSensitiveFacetValues"},{"$ref":"#/components/parameters/items-search-displayAttributes"},{"$ref":"#/components/parameters/items-search-context"},{"$ref":"#/components/parameters/items-search-includeFacets"},{"$ref":"#/components/parameters/items-search-facetsOrderBy"},{"$ref":"#/components/parameters/items-search-paginationPage"},{"$ref":"#/components/parameters/items-search-paginationLimit"},{"$ref":"#/components/parameters/items-search-paginationSortBy"},{"$ref":"#/components/parameters/items-search-paginationOrdering"},{"$ref":"#/components/parameters/items-search-paginationIncludeMeta"},{"$ref":"#/components/parameters/items-search-distinctFilter"},{"$ref":"#/components/parameters/items-search-ignoreQueryRules"},{"$ref":"#/components/parameters/items-search-excludeQueryRules"},{"$ref":"#/components/parameters/items-search-crossWorkspaceModeEnabled"},{"$ref":"#/components/parameters/items-search-params"},{"$ref":"#/components/parameters/items-search-disableQueryClassification"},{"$ref":"#/components/parameters/items-search-disableDynamicReranker"}],"responses":{"200":{"$ref":"#/components/responses/items-search-AutocompleteSearchResponse200WithExplanation"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search/operation/SearchAutocompleteGetWithExplanation"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'query' => 'SOME_STRING_VALUE',\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'personalize' => 'SOME_BOOLEAN_VALUE',\n  'sortByMetric' => 'SOME_STRING_VALUE',\n  'sortByGeoPoint' => '34.052235,-118.243685',\n  'filterGeoPoints' => [\n    '34.052235,-118.243685',\n    '15.0,65.0'\n  ],\n  'filterAroundRadius' => '5000',\n  'filters' => 'SOME_STRING_VALUE',\n  'facets' => 'SOME_ARRAY_VALUE',\n  'facetsSize' => 'SOME_INTEGER_VALUE',\n  'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',\n  'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',\n  'displayAttributes' => [\n    'title',\n    'price'\n  ],\n  'context' => [\n    'mobile',\n    'listing'\n  ],\n  'includeFacets' => 'SOME_STRING_VALUE',\n  'facetsOrderBy' => 'SOME_STRING_VALUE',\n  'page' => '4',\n  'limit' => '10',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'SOME_BOOLEAN_VALUE',\n  'distinctFilter' => '{\"attribute\": \"color\", \"maxNumItems\": 3}',\n  'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',\n  'excludeQueryRules' => [\n    '2',\n    '5'\n  ],\n  'crossWorkspaceModeEnabled' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile',\n  'disableQueryClassification' => 'SOME_BOOLEAN_VALUE',\n  'disableDynamicReranker' => 'SOME_BOOLEAN_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain?query=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile&disableQueryClassification=SOME_BOOLEAN_VALUE&disableDynamicReranker=SOME_BOOLEAN_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Explained autocomplete items search","description":"Retrieves items that match a query from a search index or a suggestion index. The results can be filtered and sorted. The results of this search type are not cached. The response contains an explanation of the factors that influenced the result.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"SearchAutocompletePostWithExplanation","tags":["Search"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-inPathIndexId"}],"requestBody":{"description":"Request for performing an autocomplete search with explanation","required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/items-search-AutocompleteRequest"},{"type":"object","properties":{"crossWorkspaceMode":{"$ref":"#/components/schemas/items-search-CrossWorkspaceMode"}}}]}}}},"responses":{"200":{"$ref":"#/components/responses/items-search-AutocompleteSearchResponse200WithExplanation"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search/operation/SearchAutocompletePostWithExplanation"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"query\\\":\\\"string\\\",\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":1,\\\"levelRangeModifier\\\":0},\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"disableQueryClassification\\\":false,\\\"disableDynamicReranker\\\":false,\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/autocomplete/explain\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"query\": \"string\",\n  \"page\": 0,\n  \"limit\": 10,\n  \"sortBy\": \"string\",\n  \"ordering\": \"desc\",\n  \"includeMeta\": true,\n  \"clientUUID\": \"string\",\n  \"sortByMetric\": \"TransactionsPopularity\",\n  \"sortByGeoPoints\": \"34.052235,-118.243685\",\n  \"filterGeoPoints\": [\n    \"34.052235,-118.243685\",\n    \"15.0,65.0\"\n  ],\n  \"filterAroundRadius\": 2000,\n  \"filters\": \"string\",\n  \"facets\": [\n    \"string\"\n  ],\n  \"customFilteredFacets\": {\n    \"brand\": \"price > 100\",\n    \"price\": \"brand == foo\"\n  },\n  \"facetsSize\": 2000,\n  \"maxValuesPerFacet\": 50,\n  \"caseSensitiveFacetValues\": false,\n  \"includeFacets\": \"all\",\n  \"facetsOrderBy\": \"coverage\",\n  \"context\": [\n    \"mobile\",\n    \"listing\"\n  ],\n  \"displayAttributes\": [\n    \"title\",\n    \"price\"\n  ],\n  \"distinctFilter\": {\n    \"attribute\": \"string\",\n    \"maxNumItems\": 1,\n    \"levelRangeModifier\": 0\n  },\n  \"ignoreQueryRules\": false,\n  \"excludeQueryRules\": [\n    2,\n    5\n  ],\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"disableQueryClassification\": false,\n  \"disableDynamicReranker\": false,\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/autocomplete/explain\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  query: 'string',\n  page: 0,\n  limit: 10,\n  sortBy: 'string',\n  ordering: 'desc',\n  includeMeta: true,\n  clientUUID: 'string',\n  sortByMetric: 'TransactionsPopularity',\n  sortByGeoPoints: '34.052235,-118.243685',\n  filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],\n  filterAroundRadius: 2000,\n  filters: 'string',\n  facets: ['string'],\n  customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},\n  facetsSize: 2000,\n  maxValuesPerFacet: 50,\n  caseSensitiveFacetValues: false,\n  includeFacets: 'all',\n  facetsOrderBy: 'coverage',\n  context: ['mobile', 'listing'],\n  displayAttributes: ['title', 'price'],\n  distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},\n  ignoreQueryRules: false,\n  excludeQueryRules: [2, 5],\n  params: {source: 'mobile'},\n  disableQueryClassification: false,\n  disableDynamicReranker: false,\n  crossWorkspaceMode: {enabled: true}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"query\":\"string\",\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"disableQueryClassification\":false,\"disableDynamicReranker\":false,\"crossWorkspaceMode\":{\"enabled\":true}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/autocomplete/explain\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"query\\\":\\\"string\\\",\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":1,\\\"levelRangeModifier\\\":0},\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"disableQueryClassification\\\":false,\\\"disableDynamicReranker\\\":false,\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/list":{"get":{"summary":"Items listing","description":"Retrieves item listing, which is a search without a query. The results can be filtered and sorted.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"ListingGet","tags":["Listing"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-inPathIndexId"},{"$ref":"#/components/parameters/items-search-clientUUID"},{"$ref":"#/components/parameters/items-search-personalize"},{"$ref":"#/components/parameters/items-search-correlationId"},{"$ref":"#/components/parameters/items-search-searchId"},{"$ref":"#/components/parameters/items-search-sortByMetric"},{"$ref":"#/components/parameters/items-search-sortByGeoPoint"},{"$ref":"#/components/parameters/items-search-filterGeoPoints"},{"$ref":"#/components/parameters/items-search-filterAroundRadius"},{"$ref":"#/components/parameters/items-search-filters"},{"$ref":"#/components/parameters/items-search-facets"},{"$ref":"#/components/parameters/items-search-facetsSize"},{"$ref":"#/components/parameters/items-search-maxValuesPerFacet"},{"$ref":"#/components/parameters/items-search-caseSensitiveFacetValues"},{"$ref":"#/components/parameters/items-search-displayAttributes"},{"$ref":"#/components/parameters/items-search-context"},{"$ref":"#/components/parameters/items-search-includeFacets"},{"$ref":"#/components/parameters/items-search-facetsOrderBy"},{"$ref":"#/components/parameters/items-search-paginationPage"},{"$ref":"#/components/parameters/items-search-paginationLimit"},{"$ref":"#/components/parameters/items-search-paginationSortBy"},{"$ref":"#/components/parameters/items-search-paginationOrdering"},{"$ref":"#/components/parameters/items-search-paginationIncludeMeta"},{"$ref":"#/components/parameters/items-search-distinctFilter"},{"$ref":"#/components/parameters/items-search-ignoreQueryRules"},{"$ref":"#/components/parameters/items-search-excludeQueryRules"},{"$ref":"#/components/parameters/items-search-params"}],"responses":{"200":{"$ref":"#/components/responses/items-search-ListingResponse200"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Listing/operation/ListingGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/list');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'personalize' => 'SOME_BOOLEAN_VALUE',\n  'correlationId' => 'SOME_STRING_VALUE',\n  'searchId' => 'SOME_STRING_VALUE',\n  'sortByMetric' => 'SOME_STRING_VALUE',\n  'sortByGeoPoint' => '34.052235,-118.243685',\n  'filterGeoPoints' => [\n    '34.052235,-118.243685',\n    '15.0,65.0'\n  ],\n  'filterAroundRadius' => '5000',\n  'filters' => 'SOME_STRING_VALUE',\n  'facets' => 'SOME_ARRAY_VALUE',\n  'facetsSize' => 'SOME_INTEGER_VALUE',\n  'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',\n  'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',\n  'displayAttributes' => [\n    'title',\n    'price'\n  ],\n  'context' => [\n    'mobile',\n    'listing'\n  ],\n  'includeFacets' => 'SOME_STRING_VALUE',\n  'facetsOrderBy' => 'SOME_STRING_VALUE',\n  'page' => '4',\n  'limit' => '10',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'SOME_BOOLEAN_VALUE',\n  'distinctFilter' => '{\"attribute\": \"color\", \"maxNumItems\": 3}',\n  'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',\n  'excludeQueryRules' => [\n    '2',\n    '5'\n  ],\n  'params' => 'source:mobile'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/list?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&params=source%3Amobile\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Items listing","description":"Retrieves item listing, which is a search without a query. The results can be filtered and sorted.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"ListingPost","tags":["Listing"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-inPathIndexId"}],"requestBody":{"description":"Request for item listing","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-ListingRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/items-search-ListingResponse200"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Listing/operation/ListingPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/list \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"personalize\\\":true,\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":1,\\\"levelRangeModifier\\\":0},\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/list\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"page\": 0,\n  \"limit\": 10,\n  \"sortBy\": \"string\",\n  \"ordering\": \"desc\",\n  \"includeMeta\": true,\n  \"clientUUID\": \"string\",\n  \"personalize\": true,\n  \"correlationId\": \"string\",\n  \"searchId\": \"string\",\n  \"sortByMetric\": \"TransactionsPopularity\",\n  \"sortByGeoPoints\": \"34.052235,-118.243685\",\n  \"filterGeoPoints\": [\n    \"34.052235,-118.243685\",\n    \"15.0,65.0\"\n  ],\n  \"filterAroundRadius\": 2000,\n  \"filters\": \"string\",\n  \"facets\": [\n    \"string\"\n  ],\n  \"customFilteredFacets\": {\n    \"brand\": \"price > 100\",\n    \"price\": \"brand == foo\"\n  },\n  \"facetsSize\": 2000,\n  \"maxValuesPerFacet\": 50,\n  \"caseSensitiveFacetValues\": false,\n  \"includeFacets\": \"all\",\n  \"facetsOrderBy\": \"coverage\",\n  \"context\": [\n    \"mobile\",\n    \"listing\"\n  ],\n  \"displayAttributes\": [\n    \"title\",\n    \"price\"\n  ],\n  \"distinctFilter\": {\n    \"attribute\": \"string\",\n    \"maxNumItems\": 1,\n    \"levelRangeModifier\": 0\n  },\n  \"ignoreQueryRules\": false,\n  \"excludeQueryRules\": [\n    2,\n    5\n  ],\n  \"params\": {\n    \"source\": \"mobile\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/list\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/list\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  page: 0,\n  limit: 10,\n  sortBy: 'string',\n  ordering: 'desc',\n  includeMeta: true,\n  clientUUID: 'string',\n  personalize: true,\n  correlationId: 'string',\n  searchId: 'string',\n  sortByMetric: 'TransactionsPopularity',\n  sortByGeoPoints: '34.052235,-118.243685',\n  filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],\n  filterAroundRadius: 2000,\n  filters: 'string',\n  facets: ['string'],\n  customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},\n  facetsSize: 2000,\n  maxValuesPerFacet: 50,\n  caseSensitiveFacetValues: false,\n  includeFacets: 'all',\n  facetsOrderBy: 'coverage',\n  context: ['mobile', 'listing'],\n  displayAttributes: ['title', 'price'],\n  distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},\n  ignoreQueryRules: false,\n  excludeQueryRules: [2, 5],\n  params: {source: 'mobile'}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/list');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/list\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"personalize\\\":true,\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":1,\\\"levelRangeModifier\\\":0},\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"}}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/list/explain":{"get":{"summary":"Explained items listing","description":"Retrieves item listing, which is a search without a query. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"ListingGetWithExplanation","tags":["Listing"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-inPathIndexId"},{"$ref":"#/components/parameters/items-search-clientUUID"},{"$ref":"#/components/parameters/items-search-personalize"},{"$ref":"#/components/parameters/items-search-correlationId"},{"$ref":"#/components/parameters/items-search-searchId"},{"$ref":"#/components/parameters/items-search-sortByMetric"},{"$ref":"#/components/parameters/items-search-sortByGeoPoint"},{"$ref":"#/components/parameters/items-search-filterGeoPoints"},{"$ref":"#/components/parameters/items-search-filterAroundRadius"},{"$ref":"#/components/parameters/items-search-filters"},{"$ref":"#/components/parameters/items-search-facets"},{"$ref":"#/components/parameters/items-search-facetsSize"},{"$ref":"#/components/parameters/items-search-maxValuesPerFacet"},{"$ref":"#/components/parameters/items-search-caseSensitiveFacetValues"},{"$ref":"#/components/parameters/items-search-displayAttributes"},{"$ref":"#/components/parameters/items-search-context"},{"$ref":"#/components/parameters/items-search-includeFacets"},{"$ref":"#/components/parameters/items-search-facetsOrderBy"},{"$ref":"#/components/parameters/items-search-paginationPage"},{"$ref":"#/components/parameters/items-search-paginationLimit"},{"$ref":"#/components/parameters/items-search-paginationSortBy"},{"$ref":"#/components/parameters/items-search-paginationOrdering"},{"$ref":"#/components/parameters/items-search-paginationIncludeMeta"},{"$ref":"#/components/parameters/items-search-distinctFilter"},{"$ref":"#/components/parameters/items-search-ignoreQueryRules"},{"$ref":"#/components/parameters/items-search-excludeQueryRules"},{"$ref":"#/components/parameters/items-search-crossWorkspaceModeEnabled"},{"$ref":"#/components/parameters/items-search-params"}],"responses":{"200":{"$ref":"#/components/responses/items-search-ListingResponse200WithExplanation"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Listing/operation/ListingGetWithExplanation"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'personalize' => 'SOME_BOOLEAN_VALUE',\n  'correlationId' => 'SOME_STRING_VALUE',\n  'searchId' => 'SOME_STRING_VALUE',\n  'sortByMetric' => 'SOME_STRING_VALUE',\n  'sortByGeoPoint' => '34.052235,-118.243685',\n  'filterGeoPoints' => [\n    '34.052235,-118.243685',\n    '15.0,65.0'\n  ],\n  'filterAroundRadius' => '5000',\n  'filters' => 'SOME_STRING_VALUE',\n  'facets' => 'SOME_ARRAY_VALUE',\n  'facetsSize' => 'SOME_INTEGER_VALUE',\n  'maxValuesPerFacet' => 'SOME_INTEGER_VALUE',\n  'caseSensitiveFacetValues' => 'SOME_BOOLEAN_VALUE',\n  'displayAttributes' => [\n    'title',\n    'price'\n  ],\n  'context' => [\n    'mobile',\n    'listing'\n  ],\n  'includeFacets' => 'SOME_STRING_VALUE',\n  'facetsOrderBy' => 'SOME_STRING_VALUE',\n  'page' => '4',\n  'limit' => '10',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'SOME_BOOLEAN_VALUE',\n  'distinctFilter' => '{\"attribute\": \"color\", \"maxNumItems\": 3}',\n  'ignoreQueryRules' => 'SOME_BOOLEAN_VALUE',\n  'excludeQueryRules' => [\n    '2',\n    '5'\n  ],\n  'crossWorkspaceModeEnabled' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain?clientUUID=SOME_STRING_VALUE&personalize=SOME_BOOLEAN_VALUE&correlationId=SOME_STRING_VALUE&searchId=SOME_STRING_VALUE&sortByMetric=SOME_STRING_VALUE&sortByGeoPoint=34.052235%2C-118.243685&filterGeoPoints=34.052235%2C-118.243685&filterGeoPoints=15.0%2C65.0&filterAroundRadius=5000&filters=SOME_STRING_VALUE&facets=SOME_ARRAY_VALUE&facetsSize=SOME_INTEGER_VALUE&maxValuesPerFacet=SOME_INTEGER_VALUE&caseSensitiveFacetValues=SOME_BOOLEAN_VALUE&displayAttributes=title&displayAttributes=price&context=mobile&context=listing&includeFacets=SOME_STRING_VALUE&facetsOrderBy=SOME_STRING_VALUE&page=4&limit=10&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&distinctFilter=%7B%22attribute%22%3A%20%22color%22%2C%20%22maxNumItems%22%3A%203%7D&ignoreQueryRules=SOME_BOOLEAN_VALUE&excludeQueryRules=2&excludeQueryRules=5&crossWorkspaceModeEnabled=SOME_BOOLEAN_VALUE&params=source%3Amobile\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Explained items listing","description":"Retrieves item listing, which is a search without a query. The results can be filtered and sorted. The response contains an explanation of the factors that influenced the result.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n","operationId":"ListingPostWithExplanation","tags":["Listing"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-inPathIndexId"}],"requestBody":{"description":"Request for item listing with explanation","required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/items-search-ListingRequest"},{"type":"object","properties":{"crossWorkspaceMode":{"$ref":"#/components/schemas/items-search-CrossWorkspaceMode"}}}]}}}},"responses":{"200":{"$ref":"#/components/responses/items-search-ListingResponse200WithExplanation"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Listing/operation/ListingPostWithExplanation"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"crossWorkspaceMode\":{\"enabled\":true}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"personalize\\\":true,\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":1,\\\"levelRangeModifier\\\":0},\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/list/explain\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"page\": 0,\n  \"limit\": 10,\n  \"sortBy\": \"string\",\n  \"ordering\": \"desc\",\n  \"includeMeta\": true,\n  \"clientUUID\": \"string\",\n  \"personalize\": true,\n  \"correlationId\": \"string\",\n  \"searchId\": \"string\",\n  \"sortByMetric\": \"TransactionsPopularity\",\n  \"sortByGeoPoints\": \"34.052235,-118.243685\",\n  \"filterGeoPoints\": [\n    \"34.052235,-118.243685\",\n    \"15.0,65.0\"\n  ],\n  \"filterAroundRadius\": 2000,\n  \"filters\": \"string\",\n  \"facets\": [\n    \"string\"\n  ],\n  \"customFilteredFacets\": {\n    \"brand\": \"price > 100\",\n    \"price\": \"brand == foo\"\n  },\n  \"facetsSize\": 2000,\n  \"maxValuesPerFacet\": 50,\n  \"caseSensitiveFacetValues\": false,\n  \"includeFacets\": \"all\",\n  \"facetsOrderBy\": \"coverage\",\n  \"context\": [\n    \"mobile\",\n    \"listing\"\n  ],\n  \"displayAttributes\": [\n    \"title\",\n    \"price\"\n  ],\n  \"distinctFilter\": {\n    \"attribute\": \"string\",\n    \"maxNumItems\": 1,\n    \"levelRangeModifier\": 0\n  },\n  \"ignoreQueryRules\": false,\n  \"excludeQueryRules\": [\n    2,\n    5\n  ],\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/list/explain\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  page: 0,\n  limit: 10,\n  sortBy: 'string',\n  ordering: 'desc',\n  includeMeta: true,\n  clientUUID: 'string',\n  personalize: true,\n  correlationId: 'string',\n  searchId: 'string',\n  sortByMetric: 'TransactionsPopularity',\n  sortByGeoPoints: '34.052235,-118.243685',\n  filterGeoPoints: ['34.052235,-118.243685', '15.0,65.0'],\n  filterAroundRadius: 2000,\n  filters: 'string',\n  facets: ['string'],\n  customFilteredFacets: {brand: 'price > 100', price: 'brand == foo'},\n  facetsSize: 2000,\n  maxValuesPerFacet: 50,\n  caseSensitiveFacetValues: false,\n  includeFacets: 'all',\n  facetsOrderBy: 'coverage',\n  context: ['mobile', 'listing'],\n  displayAttributes: ['title', 'price'],\n  distinctFilter: {attribute: 'string', maxNumItems: 1, levelRangeModifier: 0},\n  ignoreQueryRules: false,\n  excludeQueryRules: [2, 5],\n  params: {source: 'mobile'},\n  crossWorkspaceMode: {enabled: true}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"page\":0,\"limit\":10,\"sortBy\":\"string\",\"ordering\":\"desc\",\"includeMeta\":true,\"clientUUID\":\"string\",\"personalize\":true,\"correlationId\":\"string\",\"searchId\":\"string\",\"sortByMetric\":\"TransactionsPopularity\",\"sortByGeoPoints\":\"34.052235,-118.243685\",\"filterGeoPoints\":[\"34.052235,-118.243685\",\"15.0,65.0\"],\"filterAroundRadius\":2000,\"filters\":\"string\",\"facets\":[\"string\"],\"customFilteredFacets\":{\"brand\":\"price > 100\",\"price\":\"brand == foo\"},\"facetsSize\":2000,\"maxValuesPerFacet\":50,\"caseSensitiveFacetValues\":false,\"includeFacets\":\"all\",\"facetsOrderBy\":\"coverage\",\"context\":[\"mobile\",\"listing\"],\"displayAttributes\":[\"title\",\"price\"],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":1,\"levelRangeModifier\":0},\"ignoreQueryRules\":false,\"excludeQueryRules\":[2,5],\"params\":{\"source\":\"mobile\"},\"crossWorkspaceMode\":{\"enabled\":true}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/list/explain\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"page\\\":0,\\\"limit\\\":10,\\\"sortBy\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\",\\\"includeMeta\\\":true,\\\"clientUUID\\\":\\\"string\\\",\\\"personalize\\\":true,\\\"correlationId\\\":\\\"string\\\",\\\"searchId\\\":\\\"string\\\",\\\"sortByMetric\\\":\\\"TransactionsPopularity\\\",\\\"sortByGeoPoints\\\":\\\"34.052235,-118.243685\\\",\\\"filterGeoPoints\\\":[\\\"34.052235,-118.243685\\\",\\\"15.0,65.0\\\"],\\\"filterAroundRadius\\\":2000,\\\"filters\\\":\\\"string\\\",\\\"facets\\\":[\\\"string\\\"],\\\"customFilteredFacets\\\":{\\\"brand\\\":\\\"price > 100\\\",\\\"price\\\":\\\"brand == foo\\\"},\\\"facetsSize\\\":2000,\\\"maxValuesPerFacet\\\":50,\\\"caseSensitiveFacetValues\\\":false,\\\"includeFacets\\\":\\\"all\\\",\\\"facetsOrderBy\\\":\\\"coverage\\\",\\\"context\\\":[\\\"mobile\\\",\\\"listing\\\"],\\\"displayAttributes\\\":[\\\"title\\\",\\\"price\\\"],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":1,\\\"levelRangeModifier\\\":0},\\\"ignoreQueryRules\\\":false,\\\"excludeQueryRules\\\":[2,5],\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/attributes/filterable/values":{"get":{"summary":"Get values of filterable attributes","description":"Retrieve values of filterable attributes.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"getFilterableAttributesValues","tags":["Search Configuration"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-inPathIndexId"},{"$ref":"#/components/parameters/items-search-filterableAttributes"}],"responses":{"200":{"description":"Values returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-FilterableAttributesValues"}}}},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Configuration/operation/getFilterableAttributesValues"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/attributes/filterable/values');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'attribute' => 'SOME_ARRAY_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/attributes/filterable/values?attribute=SOME_ARRAY_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/explain-match":{"get":{"summary":"Searchable attributes match","description":"Enter a query and an item ID to check if a token (a word or a synonym which replaced it) matches a value or part of a value from the item's searchable attributes.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_SEARCH_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"searchableAttributesMatch","tags":["Search"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-inPathIndexId"},{"$ref":"#/components/parameters/items-search-searchQuery"},{"$ref":"#/components/parameters/items-search-itemId"}],"responses":{"200":{"$ref":"#/components/responses/items-search-SearchableAttributesMatchResponse200"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search/operation/searchableAttributesMatch"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/explain-match');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'query' => 'SOME_STRING_VALUE',\n  'itemId' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/explain-match?query=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/indices":{"get":{"summary":"Get configurations of all indices","description":"Retrieve the configurations of all indices.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"getIndicesConfigsV2","tags":["Search Configuration"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-config-paginationPage"},{"$ref":"#/components/parameters/items-search-config-paginationLimit"},{"$ref":"#/components/parameters/items-search-config-paginationSortBy"},{"$ref":"#/components/parameters/items-search-config-paginationOrdering"},{"$ref":"#/components/parameters/items-search-config-paginationIncludeMeta"},{"$ref":"#/components/parameters/items-search-config-nameFilter"},{"$ref":"#/components/parameters/items-search-config-queryFilter"},{"$ref":"#/components/parameters/items-search-config-excludeAbTests"},{"$ref":"#/components/parameters/items-search-config-inQueryDirectoryId"},{"$ref":"#/components/parameters/items-search-config-inQueryType"}],"responses":{"200":{"description":"Configurations returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-PaginatedSearchConfigsSchema"}}}},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Configuration/operation/getIndicesConfigsV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => '4',\n  'limit' => '100',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'SOME_BOOLEAN_VALUE',\n  'name' => 'SOME_STRING_VALUE',\n  'query' => 'SOME_STRING_VALUE',\n  'excludeAbTests' => 'SOME_BOOLEAN_VALUE',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'type' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE&excludeAbTests=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&type=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Post index configuration","description":"Creates a new configuration of a single index.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_CREATE`\n\n**User role permission required:** `assets_search: create`\n","operationId":"postIndexConfigV2","tags":["Search Configuration"],"security":[{"JWT":[]}],"requestBody":{"description":"Request for posting search configuration","required":true,"content":{"application/json":{"schema":{"type":"object","required":["indexName","itemsCatalogId","language","searchableAttributes","enabled"],"properties":{"indexName":{"$ref":"#/components/schemas/items-search-config-IndexNameSchema"},"description":{"$ref":"#/components/schemas/items-search-config-IndexDescriptionSchema"},"itemsCatalogId":{"$ref":"#/components/schemas/items-search-config-ItemsCatalogIdSchema"},"language":{"$ref":"#/components/schemas/items-search-config-LanguageSchema"},"enabled":{"$ref":"#/components/schemas/items-search-config-EnabledSchema"},"ignoreUnavailableItems":{"$ref":"#/components/schemas/items-search-config-IgnoreUnavailableItemsSchema"},"scoring":{"$ref":"#/components/schemas/items-search-config-ScoringSchema"},"suggestions":{"$ref":"#/components/schemas/items-search-config-Suggestions"},"tokenizer":{"$ref":"#/components/schemas/items-search-config-Tokenizer"},"analyzers":{"$ref":"#/components/schemas/items-search-config-Analyzers"},"attributesWithoutPrefixSearch":{"$ref":"#/components/schemas/items-search-config-AttributesWithoutPrefixSearchSchema"},"attributesWithoutTypoTolerance":{"$ref":"#/components/schemas/items-search-config-AttributesWithoutTypoToleranceSchema"},"valuesWithoutTypoTolerance":{"$ref":"#/components/schemas/items-search-config-ValuesWithoutTypoToleranceSchema"},"typoToleranceOnNumericValues":{"$ref":"#/components/schemas/items-search-config-TypoToleranceOnNumericValuesSchema"},"searchableAttributes":{"$ref":"#/components/schemas/items-search-config-SearchableAttributesSchema"},"displayableAttributes":{"$ref":"#/components/schemas/items-search-config-DisplayableAttributesSchema"},"facetableAttributes":{"$ref":"#/components/schemas/items-search-config-FacetableAttributesSchema"},"filterableAttributes":{"$ref":"#/components/schemas/items-search-config-FilterableAttributesSchema"},"sortableAttributes":{"$ref":"#/components/schemas/items-search-config-SortableAttributesSchema"},"distinctFilterAttributes":{"$ref":"#/components/schemas/items-search-config-DistinctFilterAttributesSchema"},"recentSearches":{"$ref":"#/components/schemas/items-search-config-RecentSearchesConfig"},"reranking":{"$ref":"#/components/schemas/items-search-config-RerankingSchema"},"optimization":{"$ref":"#/components/schemas/items-search-config-OptimizationSchema"},"geoSearch":{"$ref":"#/components/schemas/items-search-config-GeoSearchSchema"},"queryRules":{"$ref":"#/components/schemas/items-search-config-QueryRulesSchema"}}}}}},"responses":{"200":{"description":"Returned created configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-SearchConfigSchema"}}}},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Configuration/operation/postIndexConfigV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"indexName\":\"string\",\"description\":\"string\",\"itemsCatalogId\":\"string\",\"language\":\"string\",\"enabled\":true,\"ignoreUnavailableItems\":true,\"scoring\":{\"pageVisitsPopularity\":0,\"transactionsPopularity\":0,\"personalized\":0,\"tieBreaker\":0,\"matching\":{\"type\":\"MinimumMatching\",\"value\":1},\"fallbackMatching\":{\"type\":\"MinimumMatching\",\"value\":1},\"similarity\":{\"type\":\"BM25\",\"k1\":1.2,\"b\":0.75},\"crossWorkspaceMode\":{\"enabled\":true}},\"suggestions\":{\"smoothingModel\":\"Popularity\",\"gramSize\":3,\"maxErrors\":2,\"minWordLength\":4,\"useAlways\":false},\"tokenizer\":{\"type\":\"Whitespace\"},\"analyzers\":{\"autocomplete\":\"Ngram\"},\"attributesWithoutPrefixSearch\":[\"brand\",\"color\",\"promotion.type\"],\"attributesWithoutTypoTolerance\":[\"itemId\",\"link\"],\"valuesWithoutTypoTolerance\":[\"Nike\",\"blue\",\"74997\"],\"typoToleranceOnNumericValues\":true,\"searchableAttributes\":{\"fullText\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextBoosted\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextStronglyBoosted\":[\"brand\",\"color\",\"promotion.type\"]},\"displayableAttributes\":[\"brand\",\"color\",\"promotion.type\"],\"facetableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"filterableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"sortableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"distinctFilterAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"recentSearches\":{\"windowSize\":100,\"timeSpan\":{\"type\":\"DAYS\",\"value\":30}},\"reranking\":{\"dynamicReranker\":{\"enabled\":true,\"filter\":\"string\",\"numberOfItems\":1,\"minNumberOfEvents\":0},\"queryClassification\":{\"enabled\":true,\"actions\":[{\"action\":\"staticFilter\",\"minReliabilityLevel\":\"certain\"}],\"excludedPhrases\":[\"string\"],\"excludedCategories\":[\"string\"]}},\"optimization\":{\"enabled\":true,\"target\":\"ctr\",\"optimizedWeights\":{\"property1\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}},\"property2\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}}}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"indexName\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"itemsCatalogId\\\":\\\"string\\\",\\\"language\\\":\\\"string\\\",\\\"enabled\\\":true,\\\"ignoreUnavailableItems\\\":true,\\\"scoring\\\":{\\\"pageVisitsPopularity\\\":0,\\\"transactionsPopularity\\\":0,\\\"personalized\\\":0,\\\"tieBreaker\\\":0,\\\"matching\\\":{\\\"type\\\":\\\"MinimumMatching\\\",\\\"value\\\":1},\\\"fallbackMatching\\\":{\\\"type\\\":\\\"MinimumMatching\\\",\\\"value\\\":1},\\\"similarity\\\":{\\\"type\\\":\\\"BM25\\\",\\\"k1\\\":1.2,\\\"b\\\":0.75},\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}},\\\"suggestions\\\":{\\\"smoothingModel\\\":\\\"Popularity\\\",\\\"gramSize\\\":3,\\\"maxErrors\\\":2,\\\"minWordLength\\\":4,\\\"useAlways\\\":false},\\\"tokenizer\\\":{\\\"type\\\":\\\"Whitespace\\\"},\\\"analyzers\\\":{\\\"autocomplete\\\":\\\"Ngram\\\"},\\\"attributesWithoutPrefixSearch\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"attributesWithoutTypoTolerance\\\":[\\\"itemId\\\",\\\"link\\\"],\\\"valuesWithoutTypoTolerance\\\":[\\\"Nike\\\",\\\"blue\\\",\\\"74997\\\"],\\\"typoToleranceOnNumericValues\\\":true,\\\"searchableAttributes\\\":{\\\"fullText\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"fullTextBoosted\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"fullTextStronglyBoosted\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"]},\\\"displayableAttributes\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"facetableAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"filterableAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"sortableAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"distinctFilterAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"recentSearches\\\":{\\\"windowSize\\\":100,\\\"timeSpan\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"reranking\\\":{\\\"dynamicReranker\\\":{\\\"enabled\\\":true,\\\"filter\\\":\\\"string\\\",\\\"numberOfItems\\\":1,\\\"minNumberOfEvents\\\":0},\\\"queryClassification\\\":{\\\"enabled\\\":true,\\\"actions\\\":[{\\\"action\\\":\\\"staticFilter\\\",\\\"minReliabilityLevel\\\":\\\"certain\\\"}],\\\"excludedPhrases\\\":[\\\"string\\\"],\\\"excludedCategories\\\":[\\\"string\\\"]}},\\\"optimization\\\":{\\\"enabled\\\":true,\\\"target\\\":\\\"ctr\\\",\\\"optimizedWeights\\\":{\\\"property1\\\":{\\\"baseWeights\\\":{\\\"personalized\\\":5,\\\"transactionsPopularity\\\":5,\\\"pageVisitsPopularity\\\":5,\\\"transactions7DaysPopularity\\\":5,\\\"pageVisits7DaysPopularity\\\":5,\\\"revenueBoost\\\":5,\\\"conversionRateBoost\\\":5},\\\"drrWeights\\\":{\\\"searchDRRWeight\\\":5,\\\"listingDRRWeight\\\":5,\\\"clickWeight\\\":5,\\\"buyWeight\\\":5,\\\"revenueWeight\\\":5}},\\\"property2\\\":{\\\"baseWeights\\\":{\\\"personalized\\\":5,\\\"transactionsPopularity\\\":5,\\\"pageVisitsPopularity\\\":5,\\\"transactions7DaysPopularity\\\":5,\\\"pageVisits7DaysPopularity\\\":5,\\\"revenueBoost\\\":5,\\\"conversionRateBoost\\\":5},\\\"drrWeights\\\":{\\\"searchDRRWeight\\\":5,\\\"listingDRRWeight\\\":5,\\\"clickWeight\\\":5,\\\"buyWeight\\\":5,\\\"revenueWeight\\\":5}}}},\\\"geoSearch\\\":{\\\"geoSearchableAttribute\\\":\\\"string\\\"},\\\"queryRules\\\":{\\\"consequencesJoinOperators\\\":{\\\"standardFilters\\\":\\\"AND\\\",\\\"elasticFilters\\\":\\\"AND\\\"}}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/search/v2/indices\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"indexName\": \"string\",\n  \"description\": \"string\",\n  \"itemsCatalogId\": \"string\",\n  \"language\": \"string\",\n  \"enabled\": true,\n  \"ignoreUnavailableItems\": true,\n  \"scoring\": {\n    \"pageVisitsPopularity\": 0,\n    \"transactionsPopularity\": 0,\n    \"personalized\": 0,\n    \"tieBreaker\": 0,\n    \"matching\": {\n      \"type\": \"MinimumMatching\",\n      \"value\": 1\n    },\n    \"fallbackMatching\": {\n      \"type\": \"MinimumMatching\",\n      \"value\": 1\n    },\n    \"similarity\": {\n      \"type\": \"BM25\",\n      \"k1\": 1.2,\n      \"b\": 0.75\n    },\n    \"crossWorkspaceMode\": {\n      \"enabled\": true\n    }\n  },\n  \"suggestions\": {\n    \"smoothingModel\": \"Popularity\",\n    \"gramSize\": 3,\n    \"maxErrors\": 2,\n    \"minWordLength\": 4,\n    \"useAlways\": false\n  },\n  \"tokenizer\": {\n    \"type\": \"Whitespace\"\n  },\n  \"analyzers\": {\n    \"autocomplete\": \"Ngram\"\n  },\n  \"attributesWithoutPrefixSearch\": [\n    \"brand\",\n    \"color\",\n    \"promotion.type\"\n  ],\n  \"attributesWithoutTypoTolerance\": [\n    \"itemId\",\n    \"link\"\n  ],\n  \"valuesWithoutTypoTolerance\": [\n    \"Nike\",\n    \"blue\",\n    \"74997\"\n  ],\n  \"typoToleranceOnNumericValues\": true,\n  \"searchableAttributes\": {\n    \"fullText\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ],\n    \"fullTextBoosted\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ],\n    \"fullTextStronglyBoosted\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ]\n  },\n  \"displayableAttributes\": [\n    \"brand\",\n    \"color\",\n    \"promotion.type\"\n  ],\n  \"facetableAttributes\": {\n    \"range\": [\n      \"age\",\n      \"customScore.value\",\n      \"salePrice.value\"\n    ],\n    \"text\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ],\n    \"datetime\": [\n      \"created\",\n      \"attributes.modifiedAt\"\n    ]\n  },\n  \"filterableAttributes\": {\n    \"range\": [\n      \"age\",\n      \"customScore.value\",\n      \"salePrice.value\"\n    ],\n    \"text\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ],\n    \"datetime\": [\n      \"created\",\n      \"attributes.modifiedAt\"\n    ]\n  },\n  \"sortableAttributes\": {\n    \"range\": [\n      \"age\",\n      \"customScore.value\",\n      \"salePrice.value\"\n    ],\n    \"text\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ],\n    \"datetime\": [\n      \"created\",\n      \"attributes.modifiedAt\"\n    ]\n  },\n  \"distinctFilterAttributes\": {\n    \"range\": [\n      \"age\",\n      \"customScore.value\",\n      \"salePrice.value\"\n    ],\n    \"text\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ],\n    \"datetime\": [\n      \"created\",\n      \"attributes.modifiedAt\"\n    ]\n  },\n  \"recentSearches\": {\n    \"windowSize\": 100,\n    \"timeSpan\": {\n      \"type\": \"DAYS\",\n      \"value\": 30\n    }\n  },\n  \"reranking\": {\n    \"dynamicReranker\": {\n      \"enabled\": true,\n      \"filter\": \"string\",\n      \"numberOfItems\": 1,\n      \"minNumberOfEvents\": 0\n    },\n    \"queryClassification\": {\n      \"enabled\": true,\n      \"actions\": [\n        {\n          \"action\": \"staticFilter\",\n          \"minReliabilityLevel\": \"certain\"\n        }\n      ],\n      \"excludedPhrases\": [\n        \"string\"\n      ],\n      \"excludedCategories\": [\n        \"string\"\n      ]\n    }\n  },\n  \"optimization\": {\n    \"enabled\": true,\n    \"target\": \"ctr\",\n    \"optimizedWeights\": {\n      \"property1\": {\n        \"baseWeights\": {\n          \"personalized\": 5,\n          \"transactionsPopularity\": 5,\n          \"pageVisitsPopularity\": 5,\n          \"transactions7DaysPopularity\": 5,\n          \"pageVisits7DaysPopularity\": 5,\n          \"revenueBoost\": 5,\n          \"conversionRateBoost\": 5\n        },\n        \"drrWeights\": {\n          \"searchDRRWeight\": 5,\n          \"listingDRRWeight\": 5,\n          \"clickWeight\": 5,\n          \"buyWeight\": 5,\n          \"revenueWeight\": 5\n        }\n      },\n      \"property2\": {\n        \"baseWeights\": {\n          \"personalized\": 5,\n          \"transactionsPopularity\": 5,\n          \"pageVisitsPopularity\": 5,\n          \"transactions7DaysPopularity\": 5,\n          \"pageVisits7DaysPopularity\": 5,\n          \"revenueBoost\": 5,\n          \"conversionRateBoost\": 5\n        },\n        \"drrWeights\": {\n          \"searchDRRWeight\": 5,\n          \"listingDRRWeight\": 5,\n          \"clickWeight\": 5,\n          \"buyWeight\": 5,\n          \"revenueWeight\": 5\n        }\n      }\n    }\n  },\n  \"geoSearch\": {\n    \"geoSearchableAttribute\": \"string\"\n  },\n  \"queryRules\": {\n    \"consequencesJoinOperators\": {\n      \"standardFilters\": \"AND\",\n      \"elasticFilters\": \"AND\"\n    }\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  indexName: 'string',\n  description: 'string',\n  itemsCatalogId: 'string',\n  language: 'string',\n  enabled: true,\n  ignoreUnavailableItems: true,\n  scoring: {\n    pageVisitsPopularity: 0,\n    transactionsPopularity: 0,\n    personalized: 0,\n    tieBreaker: 0,\n    matching: {type: 'MinimumMatching', value: 1},\n    fallbackMatching: {type: 'MinimumMatching', value: 1},\n    similarity: {type: 'BM25', k1: 1.2, b: 0.75},\n    crossWorkspaceMode: {enabled: true}\n  },\n  suggestions: {\n    smoothingModel: 'Popularity',\n    gramSize: 3,\n    maxErrors: 2,\n    minWordLength: 4,\n    useAlways: false\n  },\n  tokenizer: {type: 'Whitespace'},\n  analyzers: {autocomplete: 'Ngram'},\n  attributesWithoutPrefixSearch: ['brand', 'color', 'promotion.type'],\n  attributesWithoutTypoTolerance: ['itemId', 'link'],\n  valuesWithoutTypoTolerance: ['Nike', 'blue', '74997'],\n  typoToleranceOnNumericValues: true,\n  searchableAttributes: {\n    fullText: ['brand', 'color', 'promotion.type'],\n    fullTextBoosted: ['brand', 'color', 'promotion.type'],\n    fullTextStronglyBoosted: ['brand', 'color', 'promotion.type']\n  },\n  displayableAttributes: ['brand', 'color', 'promotion.type'],\n  facetableAttributes: {\n    range: ['age', 'customScore.value', 'salePrice.value'],\n    text: ['brand', 'color', 'promotion.type'],\n    datetime: ['created', 'attributes.modifiedAt']\n  },\n  filterableAttributes: {\n    range: ['age', 'customScore.value', 'salePrice.value'],\n    text: ['brand', 'color', 'promotion.type'],\n    datetime: ['created', 'attributes.modifiedAt']\n  },\n  sortableAttributes: {\n    range: ['age', 'customScore.value', 'salePrice.value'],\n    text: ['brand', 'color', 'promotion.type'],\n    datetime: ['created', 'attributes.modifiedAt']\n  },\n  distinctFilterAttributes: {\n    range: ['age', 'customScore.value', 'salePrice.value'],\n    text: ['brand', 'color', 'promotion.type'],\n    datetime: ['created', 'attributes.modifiedAt']\n  },\n  recentSearches: {windowSize: 100, timeSpan: {type: 'DAYS', value: 30}},\n  reranking: {\n    dynamicReranker: {enabled: true, filter: 'string', numberOfItems: 1, minNumberOfEvents: 0},\n    queryClassification: {\n      enabled: true,\n      actions: [{action: 'staticFilter', minReliabilityLevel: 'certain'}],\n      excludedPhrases: ['string'],\n      excludedCategories: ['string']\n    }\n  },\n  optimization: {\n    enabled: true,\n    target: 'ctr',\n    optimizedWeights: {\n      property1: {\n        baseWeights: {\n          personalized: 5,\n          transactionsPopularity: 5,\n          pageVisitsPopularity: 5,\n          transactions7DaysPopularity: 5,\n          pageVisits7DaysPopularity: 5,\n          revenueBoost: 5,\n          conversionRateBoost: 5\n        },\n        drrWeights: {\n          searchDRRWeight: 5,\n          listingDRRWeight: 5,\n          clickWeight: 5,\n          buyWeight: 5,\n          revenueWeight: 5\n        }\n      },\n      property2: {\n        baseWeights: {\n          personalized: 5,\n          transactionsPopularity: 5,\n          pageVisitsPopularity: 5,\n          transactions7DaysPopularity: 5,\n          pageVisits7DaysPopularity: 5,\n          revenueBoost: 5,\n          conversionRateBoost: 5\n        },\n        drrWeights: {\n          searchDRRWeight: 5,\n          listingDRRWeight: 5,\n          clickWeight: 5,\n          buyWeight: 5,\n          revenueWeight: 5\n        }\n      }\n    }\n  },\n  geoSearch: {geoSearchableAttribute: 'string'},\n  queryRules: {consequencesJoinOperators: {standardFilters: 'AND', elasticFilters: 'AND'}}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"indexName\":\"string\",\"description\":\"string\",\"itemsCatalogId\":\"string\",\"language\":\"string\",\"enabled\":true,\"ignoreUnavailableItems\":true,\"scoring\":{\"pageVisitsPopularity\":0,\"transactionsPopularity\":0,\"personalized\":0,\"tieBreaker\":0,\"matching\":{\"type\":\"MinimumMatching\",\"value\":1},\"fallbackMatching\":{\"type\":\"MinimumMatching\",\"value\":1},\"similarity\":{\"type\":\"BM25\",\"k1\":1.2,\"b\":0.75},\"crossWorkspaceMode\":{\"enabled\":true}},\"suggestions\":{\"smoothingModel\":\"Popularity\",\"gramSize\":3,\"maxErrors\":2,\"minWordLength\":4,\"useAlways\":false},\"tokenizer\":{\"type\":\"Whitespace\"},\"analyzers\":{\"autocomplete\":\"Ngram\"},\"attributesWithoutPrefixSearch\":[\"brand\",\"color\",\"promotion.type\"],\"attributesWithoutTypoTolerance\":[\"itemId\",\"link\"],\"valuesWithoutTypoTolerance\":[\"Nike\",\"blue\",\"74997\"],\"typoToleranceOnNumericValues\":true,\"searchableAttributes\":{\"fullText\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextBoosted\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextStronglyBoosted\":[\"brand\",\"color\",\"promotion.type\"]},\"displayableAttributes\":[\"brand\",\"color\",\"promotion.type\"],\"facetableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"filterableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"sortableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"distinctFilterAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"recentSearches\":{\"windowSize\":100,\"timeSpan\":{\"type\":\"DAYS\",\"value\":30}},\"reranking\":{\"dynamicReranker\":{\"enabled\":true,\"filter\":\"string\",\"numberOfItems\":1,\"minNumberOfEvents\":0},\"queryClassification\":{\"enabled\":true,\"actions\":[{\"action\":\"staticFilter\",\"minReliabilityLevel\":\"certain\"}],\"excludedPhrases\":[\"string\"],\"excludedCategories\":[\"string\"]}},\"optimization\":{\"enabled\":true,\"target\":\"ctr\",\"optimizedWeights\":{\"property1\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}},\"property2\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}}}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"indexName\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"itemsCatalogId\\\":\\\"string\\\",\\\"language\\\":\\\"string\\\",\\\"enabled\\\":true,\\\"ignoreUnavailableItems\\\":true,\\\"scoring\\\":{\\\"pageVisitsPopularity\\\":0,\\\"transactionsPopularity\\\":0,\\\"personalized\\\":0,\\\"tieBreaker\\\":0,\\\"matching\\\":{\\\"type\\\":\\\"MinimumMatching\\\",\\\"value\\\":1},\\\"fallbackMatching\\\":{\\\"type\\\":\\\"MinimumMatching\\\",\\\"value\\\":1},\\\"similarity\\\":{\\\"type\\\":\\\"BM25\\\",\\\"k1\\\":1.2,\\\"b\\\":0.75},\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}},\\\"suggestions\\\":{\\\"smoothingModel\\\":\\\"Popularity\\\",\\\"gramSize\\\":3,\\\"maxErrors\\\":2,\\\"minWordLength\\\":4,\\\"useAlways\\\":false},\\\"tokenizer\\\":{\\\"type\\\":\\\"Whitespace\\\"},\\\"analyzers\\\":{\\\"autocomplete\\\":\\\"Ngram\\\"},\\\"attributesWithoutPrefixSearch\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"attributesWithoutTypoTolerance\\\":[\\\"itemId\\\",\\\"link\\\"],\\\"valuesWithoutTypoTolerance\\\":[\\\"Nike\\\",\\\"blue\\\",\\\"74997\\\"],\\\"typoToleranceOnNumericValues\\\":true,\\\"searchableAttributes\\\":{\\\"fullText\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"fullTextBoosted\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"fullTextStronglyBoosted\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"]},\\\"displayableAttributes\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"facetableAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"filterableAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"sortableAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"distinctFilterAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"recentSearches\\\":{\\\"windowSize\\\":100,\\\"timeSpan\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"reranking\\\":{\\\"dynamicReranker\\\":{\\\"enabled\\\":true,\\\"filter\\\":\\\"string\\\",\\\"numberOfItems\\\":1,\\\"minNumberOfEvents\\\":0},\\\"queryClassification\\\":{\\\"enabled\\\":true,\\\"actions\\\":[{\\\"action\\\":\\\"staticFilter\\\",\\\"minReliabilityLevel\\\":\\\"certain\\\"}],\\\"excludedPhrases\\\":[\\\"string\\\"],\\\"excludedCategories\\\":[\\\"string\\\"]}},\\\"optimization\\\":{\\\"enabled\\\":true,\\\"target\\\":\\\"ctr\\\",\\\"optimizedWeights\\\":{\\\"property1\\\":{\\\"baseWeights\\\":{\\\"personalized\\\":5,\\\"transactionsPopularity\\\":5,\\\"pageVisitsPopularity\\\":5,\\\"transactions7DaysPopularity\\\":5,\\\"pageVisits7DaysPopularity\\\":5,\\\"revenueBoost\\\":5,\\\"conversionRateBoost\\\":5},\\\"drrWeights\\\":{\\\"searchDRRWeight\\\":5,\\\"listingDRRWeight\\\":5,\\\"clickWeight\\\":5,\\\"buyWeight\\\":5,\\\"revenueWeight\\\":5}},\\\"property2\\\":{\\\"baseWeights\\\":{\\\"personalized\\\":5,\\\"transactionsPopularity\\\":5,\\\"pageVisitsPopularity\\\":5,\\\"transactions7DaysPopularity\\\":5,\\\"pageVisits7DaysPopularity\\\":5,\\\"revenueBoost\\\":5,\\\"conversionRateBoost\\\":5},\\\"drrWeights\\\":{\\\"searchDRRWeight\\\":5,\\\"listingDRRWeight\\\":5,\\\"clickWeight\\\":5,\\\"buyWeight\\\":5,\\\"revenueWeight\\\":5}}}},\\\"geoSearch\\\":{\\\"geoSearchableAttribute\\\":\\\"string\\\"},\\\"queryRules\\\":{\\\"consequencesJoinOperators\\\":{\\\"standardFilters\\\":\\\"AND\\\",\\\"elasticFilters\\\":\\\"AND\\\"}}}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/config":{"get":{"summary":"Get index configuration","description":"Retrieve the configuration of a single index.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"getIndexConfigV2","tags":["Search Configuration"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-config-InPathIndexId"}],"responses":{"200":{"description":"Configuration returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-SearchConfigSchema"}}}},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Configuration/operation/getIndexConfigV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/config \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/config\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/config\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/config\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/config');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/config\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"delete":{"summary":"Delete index configuration","description":"Delete the configuration of a single index.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_DELETE`\n\n**User role permission required:** `assets_search: delete`\n","operationId":"deleteIndexConfigV2","tags":["Search Configuration"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-config-InPathIndexId"}],"responses":{"204":{"description":"Configuration deleted"},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Configuration/operation/deleteIndexConfigV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/config \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/search/v2/indices/%7BindexId%7D/config\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/config\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/config\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/config');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/config\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"summary":"Update index configuration","description":"Update the configuration of a single index.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_UPDATE`\n\n**User role permission required:** `assets_search: update`\n","operationId":"updateIndexConfigV2","tags":["Search Configuration"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-config-InPathIndexId"}],"requestBody":{"description":"Request for posting search configuration","required":true,"content":{"application/json":{"schema":{"type":"object","required":["indexName","itemsCatalogId","language","searchableAttributes","enabled"],"properties":{"indexName":{"$ref":"#/components/schemas/items-search-config-IndexNameSchema"},"description":{"$ref":"#/components/schemas/items-search-config-IndexDescriptionSchema"},"itemsCatalogId":{"$ref":"#/components/schemas/items-search-config-ItemsCatalogIdSchema"},"language":{"$ref":"#/components/schemas/items-search-config-LanguageSchema"},"enabled":{"$ref":"#/components/schemas/items-search-config-EnabledSchema"},"ignoreUnavailableItems":{"$ref":"#/components/schemas/items-search-config-IgnoreUnavailableItemsSchema"},"scoring":{"$ref":"#/components/schemas/items-search-config-ScoringSchema"},"suggestions":{"$ref":"#/components/schemas/items-search-config-Suggestions"},"tokenizer":{"$ref":"#/components/schemas/items-search-config-Tokenizer"},"analyzers":{"$ref":"#/components/schemas/items-search-config-Analyzers"},"attributesWithoutPrefixSearch":{"$ref":"#/components/schemas/items-search-config-AttributesWithoutPrefixSearchSchema"},"attributesWithoutTypoTolerance":{"$ref":"#/components/schemas/items-search-config-AttributesWithoutTypoToleranceSchema"},"valuesWithoutTypoTolerance":{"$ref":"#/components/schemas/items-search-config-ValuesWithoutTypoToleranceSchema"},"typoToleranceOnNumericValues":{"$ref":"#/components/schemas/items-search-config-TypoToleranceOnNumericValuesSchema"},"searchableAttributes":{"$ref":"#/components/schemas/items-search-config-SearchableAttributesSchema"},"displayableAttributes":{"$ref":"#/components/schemas/items-search-config-DisplayableAttributesSchema"},"facetableAttributes":{"$ref":"#/components/schemas/items-search-config-FacetableAttributesSchema"},"filterableAttributes":{"$ref":"#/components/schemas/items-search-config-FilterableAttributesSchema"},"sortableAttributes":{"$ref":"#/components/schemas/items-search-config-SortableAttributesSchema"},"distinctFilterAttributes":{"$ref":"#/components/schemas/items-search-config-DistinctFilterAttributesSchema"},"recentSearches":{"$ref":"#/components/schemas/items-search-config-RecentSearchesConfig"},"reranking":{"$ref":"#/components/schemas/items-search-config-RerankingSchema"},"optimization":{"$ref":"#/components/schemas/items-search-config-OptimizationSchema"},"geoSearch":{"$ref":"#/components/schemas/items-search-config-GeoSearchSchema"},"queryRules":{"$ref":"#/components/schemas/items-search-config-QueryRulesSchema"}}}}}},"responses":{"200":{"description":"Returned updated configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-SearchConfigSchema"}}}},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Configuration/operation/updateIndexConfigV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/config \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"indexName\":\"string\",\"description\":\"string\",\"itemsCatalogId\":\"string\",\"language\":\"string\",\"enabled\":true,\"ignoreUnavailableItems\":true,\"scoring\":{\"pageVisitsPopularity\":0,\"transactionsPopularity\":0,\"personalized\":0,\"tieBreaker\":0,\"matching\":{\"type\":\"MinimumMatching\",\"value\":1},\"fallbackMatching\":{\"type\":\"MinimumMatching\",\"value\":1},\"similarity\":{\"type\":\"BM25\",\"k1\":1.2,\"b\":0.75},\"crossWorkspaceMode\":{\"enabled\":true}},\"suggestions\":{\"smoothingModel\":\"Popularity\",\"gramSize\":3,\"maxErrors\":2,\"minWordLength\":4,\"useAlways\":false},\"tokenizer\":{\"type\":\"Whitespace\"},\"analyzers\":{\"autocomplete\":\"Ngram\"},\"attributesWithoutPrefixSearch\":[\"brand\",\"color\",\"promotion.type\"],\"attributesWithoutTypoTolerance\":[\"itemId\",\"link\"],\"valuesWithoutTypoTolerance\":[\"Nike\",\"blue\",\"74997\"],\"typoToleranceOnNumericValues\":true,\"searchableAttributes\":{\"fullText\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextBoosted\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextStronglyBoosted\":[\"brand\",\"color\",\"promotion.type\"]},\"displayableAttributes\":[\"brand\",\"color\",\"promotion.type\"],\"facetableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"filterableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"sortableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"distinctFilterAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"recentSearches\":{\"windowSize\":100,\"timeSpan\":{\"type\":\"DAYS\",\"value\":30}},\"reranking\":{\"dynamicReranker\":{\"enabled\":true,\"filter\":\"string\",\"numberOfItems\":1,\"minNumberOfEvents\":0},\"queryClassification\":{\"enabled\":true,\"actions\":[{\"action\":\"staticFilter\",\"minReliabilityLevel\":\"certain\"}],\"excludedPhrases\":[\"string\"],\"excludedCategories\":[\"string\"]}},\"optimization\":{\"enabled\":true,\"target\":\"ctr\",\"optimizedWeights\":{\"property1\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}},\"property2\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}}}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"indexName\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"itemsCatalogId\\\":\\\"string\\\",\\\"language\\\":\\\"string\\\",\\\"enabled\\\":true,\\\"ignoreUnavailableItems\\\":true,\\\"scoring\\\":{\\\"pageVisitsPopularity\\\":0,\\\"transactionsPopularity\\\":0,\\\"personalized\\\":0,\\\"tieBreaker\\\":0,\\\"matching\\\":{\\\"type\\\":\\\"MinimumMatching\\\",\\\"value\\\":1},\\\"fallbackMatching\\\":{\\\"type\\\":\\\"MinimumMatching\\\",\\\"value\\\":1},\\\"similarity\\\":{\\\"type\\\":\\\"BM25\\\",\\\"k1\\\":1.2,\\\"b\\\":0.75},\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}},\\\"suggestions\\\":{\\\"smoothingModel\\\":\\\"Popularity\\\",\\\"gramSize\\\":3,\\\"maxErrors\\\":2,\\\"minWordLength\\\":4,\\\"useAlways\\\":false},\\\"tokenizer\\\":{\\\"type\\\":\\\"Whitespace\\\"},\\\"analyzers\\\":{\\\"autocomplete\\\":\\\"Ngram\\\"},\\\"attributesWithoutPrefixSearch\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"attributesWithoutTypoTolerance\\\":[\\\"itemId\\\",\\\"link\\\"],\\\"valuesWithoutTypoTolerance\\\":[\\\"Nike\\\",\\\"blue\\\",\\\"74997\\\"],\\\"typoToleranceOnNumericValues\\\":true,\\\"searchableAttributes\\\":{\\\"fullText\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"fullTextBoosted\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"fullTextStronglyBoosted\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"]},\\\"displayableAttributes\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"facetableAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"filterableAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"sortableAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"distinctFilterAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"recentSearches\\\":{\\\"windowSize\\\":100,\\\"timeSpan\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"reranking\\\":{\\\"dynamicReranker\\\":{\\\"enabled\\\":true,\\\"filter\\\":\\\"string\\\",\\\"numberOfItems\\\":1,\\\"minNumberOfEvents\\\":0},\\\"queryClassification\\\":{\\\"enabled\\\":true,\\\"actions\\\":[{\\\"action\\\":\\\"staticFilter\\\",\\\"minReliabilityLevel\\\":\\\"certain\\\"}],\\\"excludedPhrases\\\":[\\\"string\\\"],\\\"excludedCategories\\\":[\\\"string\\\"]}},\\\"optimization\\\":{\\\"enabled\\\":true,\\\"target\\\":\\\"ctr\\\",\\\"optimizedWeights\\\":{\\\"property1\\\":{\\\"baseWeights\\\":{\\\"personalized\\\":5,\\\"transactionsPopularity\\\":5,\\\"pageVisitsPopularity\\\":5,\\\"transactions7DaysPopularity\\\":5,\\\"pageVisits7DaysPopularity\\\":5,\\\"revenueBoost\\\":5,\\\"conversionRateBoost\\\":5},\\\"drrWeights\\\":{\\\"searchDRRWeight\\\":5,\\\"listingDRRWeight\\\":5,\\\"clickWeight\\\":5,\\\"buyWeight\\\":5,\\\"revenueWeight\\\":5}},\\\"property2\\\":{\\\"baseWeights\\\":{\\\"personalized\\\":5,\\\"transactionsPopularity\\\":5,\\\"pageVisitsPopularity\\\":5,\\\"transactions7DaysPopularity\\\":5,\\\"pageVisits7DaysPopularity\\\":5,\\\"revenueBoost\\\":5,\\\"conversionRateBoost\\\":5},\\\"drrWeights\\\":{\\\"searchDRRWeight\\\":5,\\\"listingDRRWeight\\\":5,\\\"clickWeight\\\":5,\\\"buyWeight\\\":5,\\\"revenueWeight\\\":5}}}},\\\"geoSearch\\\":{\\\"geoSearchableAttribute\\\":\\\"string\\\"},\\\"queryRules\\\":{\\\"consequencesJoinOperators\\\":{\\\"standardFilters\\\":\\\"AND\\\",\\\"elasticFilters\\\":\\\"AND\\\"}}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/search/v2/indices/%7BindexId%7D/config\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"indexName\": \"string\",\n  \"description\": \"string\",\n  \"itemsCatalogId\": \"string\",\n  \"language\": \"string\",\n  \"enabled\": true,\n  \"ignoreUnavailableItems\": true,\n  \"scoring\": {\n    \"pageVisitsPopularity\": 0,\n    \"transactionsPopularity\": 0,\n    \"personalized\": 0,\n    \"tieBreaker\": 0,\n    \"matching\": {\n      \"type\": \"MinimumMatching\",\n      \"value\": 1\n    },\n    \"fallbackMatching\": {\n      \"type\": \"MinimumMatching\",\n      \"value\": 1\n    },\n    \"similarity\": {\n      \"type\": \"BM25\",\n      \"k1\": 1.2,\n      \"b\": 0.75\n    },\n    \"crossWorkspaceMode\": {\n      \"enabled\": true\n    }\n  },\n  \"suggestions\": {\n    \"smoothingModel\": \"Popularity\",\n    \"gramSize\": 3,\n    \"maxErrors\": 2,\n    \"minWordLength\": 4,\n    \"useAlways\": false\n  },\n  \"tokenizer\": {\n    \"type\": \"Whitespace\"\n  },\n  \"analyzers\": {\n    \"autocomplete\": \"Ngram\"\n  },\n  \"attributesWithoutPrefixSearch\": [\n    \"brand\",\n    \"color\",\n    \"promotion.type\"\n  ],\n  \"attributesWithoutTypoTolerance\": [\n    \"itemId\",\n    \"link\"\n  ],\n  \"valuesWithoutTypoTolerance\": [\n    \"Nike\",\n    \"blue\",\n    \"74997\"\n  ],\n  \"typoToleranceOnNumericValues\": true,\n  \"searchableAttributes\": {\n    \"fullText\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ],\n    \"fullTextBoosted\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ],\n    \"fullTextStronglyBoosted\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ]\n  },\n  \"displayableAttributes\": [\n    \"brand\",\n    \"color\",\n    \"promotion.type\"\n  ],\n  \"facetableAttributes\": {\n    \"range\": [\n      \"age\",\n      \"customScore.value\",\n      \"salePrice.value\"\n    ],\n    \"text\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ],\n    \"datetime\": [\n      \"created\",\n      \"attributes.modifiedAt\"\n    ]\n  },\n  \"filterableAttributes\": {\n    \"range\": [\n      \"age\",\n      \"customScore.value\",\n      \"salePrice.value\"\n    ],\n    \"text\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ],\n    \"datetime\": [\n      \"created\",\n      \"attributes.modifiedAt\"\n    ]\n  },\n  \"sortableAttributes\": {\n    \"range\": [\n      \"age\",\n      \"customScore.value\",\n      \"salePrice.value\"\n    ],\n    \"text\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ],\n    \"datetime\": [\n      \"created\",\n      \"attributes.modifiedAt\"\n    ]\n  },\n  \"distinctFilterAttributes\": {\n    \"range\": [\n      \"age\",\n      \"customScore.value\",\n      \"salePrice.value\"\n    ],\n    \"text\": [\n      \"brand\",\n      \"color\",\n      \"promotion.type\"\n    ],\n    \"datetime\": [\n      \"created\",\n      \"attributes.modifiedAt\"\n    ]\n  },\n  \"recentSearches\": {\n    \"windowSize\": 100,\n    \"timeSpan\": {\n      \"type\": \"DAYS\",\n      \"value\": 30\n    }\n  },\n  \"reranking\": {\n    \"dynamicReranker\": {\n      \"enabled\": true,\n      \"filter\": \"string\",\n      \"numberOfItems\": 1,\n      \"minNumberOfEvents\": 0\n    },\n    \"queryClassification\": {\n      \"enabled\": true,\n      \"actions\": [\n        {\n          \"action\": \"staticFilter\",\n          \"minReliabilityLevel\": \"certain\"\n        }\n      ],\n      \"excludedPhrases\": [\n        \"string\"\n      ],\n      \"excludedCategories\": [\n        \"string\"\n      ]\n    }\n  },\n  \"optimization\": {\n    \"enabled\": true,\n    \"target\": \"ctr\",\n    \"optimizedWeights\": {\n      \"property1\": {\n        \"baseWeights\": {\n          \"personalized\": 5,\n          \"transactionsPopularity\": 5,\n          \"pageVisitsPopularity\": 5,\n          \"transactions7DaysPopularity\": 5,\n          \"pageVisits7DaysPopularity\": 5,\n          \"revenueBoost\": 5,\n          \"conversionRateBoost\": 5\n        },\n        \"drrWeights\": {\n          \"searchDRRWeight\": 5,\n          \"listingDRRWeight\": 5,\n          \"clickWeight\": 5,\n          \"buyWeight\": 5,\n          \"revenueWeight\": 5\n        }\n      },\n      \"property2\": {\n        \"baseWeights\": {\n          \"personalized\": 5,\n          \"transactionsPopularity\": 5,\n          \"pageVisitsPopularity\": 5,\n          \"transactions7DaysPopularity\": 5,\n          \"pageVisits7DaysPopularity\": 5,\n          \"revenueBoost\": 5,\n          \"conversionRateBoost\": 5\n        },\n        \"drrWeights\": {\n          \"searchDRRWeight\": 5,\n          \"listingDRRWeight\": 5,\n          \"clickWeight\": 5,\n          \"buyWeight\": 5,\n          \"revenueWeight\": 5\n        }\n      }\n    }\n  },\n  \"geoSearch\": {\n    \"geoSearchableAttribute\": \"string\"\n  },\n  \"queryRules\": {\n    \"consequencesJoinOperators\": {\n      \"standardFilters\": \"AND\",\n      \"elasticFilters\": \"AND\"\n    }\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/config\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/config\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  indexName: 'string',\n  description: 'string',\n  itemsCatalogId: 'string',\n  language: 'string',\n  enabled: true,\n  ignoreUnavailableItems: true,\n  scoring: {\n    pageVisitsPopularity: 0,\n    transactionsPopularity: 0,\n    personalized: 0,\n    tieBreaker: 0,\n    matching: {type: 'MinimumMatching', value: 1},\n    fallbackMatching: {type: 'MinimumMatching', value: 1},\n    similarity: {type: 'BM25', k1: 1.2, b: 0.75},\n    crossWorkspaceMode: {enabled: true}\n  },\n  suggestions: {\n    smoothingModel: 'Popularity',\n    gramSize: 3,\n    maxErrors: 2,\n    minWordLength: 4,\n    useAlways: false\n  },\n  tokenizer: {type: 'Whitespace'},\n  analyzers: {autocomplete: 'Ngram'},\n  attributesWithoutPrefixSearch: ['brand', 'color', 'promotion.type'],\n  attributesWithoutTypoTolerance: ['itemId', 'link'],\n  valuesWithoutTypoTolerance: ['Nike', 'blue', '74997'],\n  typoToleranceOnNumericValues: true,\n  searchableAttributes: {\n    fullText: ['brand', 'color', 'promotion.type'],\n    fullTextBoosted: ['brand', 'color', 'promotion.type'],\n    fullTextStronglyBoosted: ['brand', 'color', 'promotion.type']\n  },\n  displayableAttributes: ['brand', 'color', 'promotion.type'],\n  facetableAttributes: {\n    range: ['age', 'customScore.value', 'salePrice.value'],\n    text: ['brand', 'color', 'promotion.type'],\n    datetime: ['created', 'attributes.modifiedAt']\n  },\n  filterableAttributes: {\n    range: ['age', 'customScore.value', 'salePrice.value'],\n    text: ['brand', 'color', 'promotion.type'],\n    datetime: ['created', 'attributes.modifiedAt']\n  },\n  sortableAttributes: {\n    range: ['age', 'customScore.value', 'salePrice.value'],\n    text: ['brand', 'color', 'promotion.type'],\n    datetime: ['created', 'attributes.modifiedAt']\n  },\n  distinctFilterAttributes: {\n    range: ['age', 'customScore.value', 'salePrice.value'],\n    text: ['brand', 'color', 'promotion.type'],\n    datetime: ['created', 'attributes.modifiedAt']\n  },\n  recentSearches: {windowSize: 100, timeSpan: {type: 'DAYS', value: 30}},\n  reranking: {\n    dynamicReranker: {enabled: true, filter: 'string', numberOfItems: 1, minNumberOfEvents: 0},\n    queryClassification: {\n      enabled: true,\n      actions: [{action: 'staticFilter', minReliabilityLevel: 'certain'}],\n      excludedPhrases: ['string'],\n      excludedCategories: ['string']\n    }\n  },\n  optimization: {\n    enabled: true,\n    target: 'ctr',\n    optimizedWeights: {\n      property1: {\n        baseWeights: {\n          personalized: 5,\n          transactionsPopularity: 5,\n          pageVisitsPopularity: 5,\n          transactions7DaysPopularity: 5,\n          pageVisits7DaysPopularity: 5,\n          revenueBoost: 5,\n          conversionRateBoost: 5\n        },\n        drrWeights: {\n          searchDRRWeight: 5,\n          listingDRRWeight: 5,\n          clickWeight: 5,\n          buyWeight: 5,\n          revenueWeight: 5\n        }\n      },\n      property2: {\n        baseWeights: {\n          personalized: 5,\n          transactionsPopularity: 5,\n          pageVisitsPopularity: 5,\n          transactions7DaysPopularity: 5,\n          pageVisits7DaysPopularity: 5,\n          revenueBoost: 5,\n          conversionRateBoost: 5\n        },\n        drrWeights: {\n          searchDRRWeight: 5,\n          listingDRRWeight: 5,\n          clickWeight: 5,\n          buyWeight: 5,\n          revenueWeight: 5\n        }\n      }\n    }\n  },\n  geoSearch: {geoSearchableAttribute: 'string'},\n  queryRules: {consequencesJoinOperators: {standardFilters: 'AND', elasticFilters: 'AND'}}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/config');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"indexName\":\"string\",\"description\":\"string\",\"itemsCatalogId\":\"string\",\"language\":\"string\",\"enabled\":true,\"ignoreUnavailableItems\":true,\"scoring\":{\"pageVisitsPopularity\":0,\"transactionsPopularity\":0,\"personalized\":0,\"tieBreaker\":0,\"matching\":{\"type\":\"MinimumMatching\",\"value\":1},\"fallbackMatching\":{\"type\":\"MinimumMatching\",\"value\":1},\"similarity\":{\"type\":\"BM25\",\"k1\":1.2,\"b\":0.75},\"crossWorkspaceMode\":{\"enabled\":true}},\"suggestions\":{\"smoothingModel\":\"Popularity\",\"gramSize\":3,\"maxErrors\":2,\"minWordLength\":4,\"useAlways\":false},\"tokenizer\":{\"type\":\"Whitespace\"},\"analyzers\":{\"autocomplete\":\"Ngram\"},\"attributesWithoutPrefixSearch\":[\"brand\",\"color\",\"promotion.type\"],\"attributesWithoutTypoTolerance\":[\"itemId\",\"link\"],\"valuesWithoutTypoTolerance\":[\"Nike\",\"blue\",\"74997\"],\"typoToleranceOnNumericValues\":true,\"searchableAttributes\":{\"fullText\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextBoosted\":[\"brand\",\"color\",\"promotion.type\"],\"fullTextStronglyBoosted\":[\"brand\",\"color\",\"promotion.type\"]},\"displayableAttributes\":[\"brand\",\"color\",\"promotion.type\"],\"facetableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"filterableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"sortableAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"distinctFilterAttributes\":{\"range\":[\"age\",\"customScore.value\",\"salePrice.value\"],\"text\":[\"brand\",\"color\",\"promotion.type\"],\"datetime\":[\"created\",\"attributes.modifiedAt\"]},\"recentSearches\":{\"windowSize\":100,\"timeSpan\":{\"type\":\"DAYS\",\"value\":30}},\"reranking\":{\"dynamicReranker\":{\"enabled\":true,\"filter\":\"string\",\"numberOfItems\":1,\"minNumberOfEvents\":0},\"queryClassification\":{\"enabled\":true,\"actions\":[{\"action\":\"staticFilter\",\"minReliabilityLevel\":\"certain\"}],\"excludedPhrases\":[\"string\"],\"excludedCategories\":[\"string\"]}},\"optimization\":{\"enabled\":true,\"target\":\"ctr\",\"optimizedWeights\":{\"property1\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}},\"property2\":{\"baseWeights\":{\"personalized\":5,\"transactionsPopularity\":5,\"pageVisitsPopularity\":5,\"transactions7DaysPopularity\":5,\"pageVisits7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5},\"drrWeights\":{\"searchDRRWeight\":5,\"listingDRRWeight\":5,\"clickWeight\":5,\"buyWeight\":5,\"revenueWeight\":5}}}},\"geoSearch\":{\"geoSearchableAttribute\":\"string\"},\"queryRules\":{\"consequencesJoinOperators\":{\"standardFilters\":\"AND\",\"elasticFilters\":\"AND\"}}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/config\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"indexName\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"itemsCatalogId\\\":\\\"string\\\",\\\"language\\\":\\\"string\\\",\\\"enabled\\\":true,\\\"ignoreUnavailableItems\\\":true,\\\"scoring\\\":{\\\"pageVisitsPopularity\\\":0,\\\"transactionsPopularity\\\":0,\\\"personalized\\\":0,\\\"tieBreaker\\\":0,\\\"matching\\\":{\\\"type\\\":\\\"MinimumMatching\\\",\\\"value\\\":1},\\\"fallbackMatching\\\":{\\\"type\\\":\\\"MinimumMatching\\\",\\\"value\\\":1},\\\"similarity\\\":{\\\"type\\\":\\\"BM25\\\",\\\"k1\\\":1.2,\\\"b\\\":0.75},\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}},\\\"suggestions\\\":{\\\"smoothingModel\\\":\\\"Popularity\\\",\\\"gramSize\\\":3,\\\"maxErrors\\\":2,\\\"minWordLength\\\":4,\\\"useAlways\\\":false},\\\"tokenizer\\\":{\\\"type\\\":\\\"Whitespace\\\"},\\\"analyzers\\\":{\\\"autocomplete\\\":\\\"Ngram\\\"},\\\"attributesWithoutPrefixSearch\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"attributesWithoutTypoTolerance\\\":[\\\"itemId\\\",\\\"link\\\"],\\\"valuesWithoutTypoTolerance\\\":[\\\"Nike\\\",\\\"blue\\\",\\\"74997\\\"],\\\"typoToleranceOnNumericValues\\\":true,\\\"searchableAttributes\\\":{\\\"fullText\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"fullTextBoosted\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"fullTextStronglyBoosted\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"]},\\\"displayableAttributes\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"facetableAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"filterableAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"sortableAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"distinctFilterAttributes\\\":{\\\"range\\\":[\\\"age\\\",\\\"customScore.value\\\",\\\"salePrice.value\\\"],\\\"text\\\":[\\\"brand\\\",\\\"color\\\",\\\"promotion.type\\\"],\\\"datetime\\\":[\\\"created\\\",\\\"attributes.modifiedAt\\\"]},\\\"recentSearches\\\":{\\\"windowSize\\\":100,\\\"timeSpan\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"reranking\\\":{\\\"dynamicReranker\\\":{\\\"enabled\\\":true,\\\"filter\\\":\\\"string\\\",\\\"numberOfItems\\\":1,\\\"minNumberOfEvents\\\":0},\\\"queryClassification\\\":{\\\"enabled\\\":true,\\\"actions\\\":[{\\\"action\\\":\\\"staticFilter\\\",\\\"minReliabilityLevel\\\":\\\"certain\\\"}],\\\"excludedPhrases\\\":[\\\"string\\\"],\\\"excludedCategories\\\":[\\\"string\\\"]}},\\\"optimization\\\":{\\\"enabled\\\":true,\\\"target\\\":\\\"ctr\\\",\\\"optimizedWeights\\\":{\\\"property1\\\":{\\\"baseWeights\\\":{\\\"personalized\\\":5,\\\"transactionsPopularity\\\":5,\\\"pageVisitsPopularity\\\":5,\\\"transactions7DaysPopularity\\\":5,\\\"pageVisits7DaysPopularity\\\":5,\\\"revenueBoost\\\":5,\\\"conversionRateBoost\\\":5},\\\"drrWeights\\\":{\\\"searchDRRWeight\\\":5,\\\"listingDRRWeight\\\":5,\\\"clickWeight\\\":5,\\\"buyWeight\\\":5,\\\"revenueWeight\\\":5}},\\\"property2\\\":{\\\"baseWeights\\\":{\\\"personalized\\\":5,\\\"transactionsPopularity\\\":5,\\\"pageVisitsPopularity\\\":5,\\\"transactions7DaysPopularity\\\":5,\\\"pageVisits7DaysPopularity\\\":5,\\\"revenueBoost\\\":5,\\\"conversionRateBoost\\\":5},\\\"drrWeights\\\":{\\\"searchDRRWeight\\\":5,\\\"listingDRRWeight\\\":5,\\\"clickWeight\\\":5,\\\"buyWeight\\\":5,\\\"revenueWeight\\\":5}}}},\\\"geoSearch\\\":{\\\"geoSearchableAttribute\\\":\\\"string\\\"},\\\"queryRules\\\":{\\\"consequencesJoinOperators\\\":{\\\"standardFilters\\\":\\\"AND\\\",\\\"elasticFilters\\\":\\\"AND\\\"}}}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/state":{"get":{"summary":"Get index state","description":"Retrieve the state of a single index.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"getIndexStateV2","tags":["Search Configuration"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-config-InPathIndexId"}],"responses":{"200":{"description":"State returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-IndexStateResponseSchema"}}}},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Configuration/operation/getIndexStateV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/state \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/state\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/state\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/state\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/state');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/state\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/supported-languages":{"get":{"summary":"Get supported languages","description":"Retrieve supported languages.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"getSupportedLanguagesV2","tags":["Search Configuration"],"security":[{"JWT":[]}],"responses":{"200":{"description":"Supported search languages as ISO 639-1 codes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-SupportedLanguages"}}}},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Configuration/operation/getSupportedLanguagesV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/search/v2/supported-languages \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/supported-languages\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/supported-languages\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/supported-languages\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/supported-languages');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/supported-languages\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/duplicate":{"get":{"summary":"Duplicate index","description":"duplicate index.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_CREATE`\n\n**User role permission required:** `assets_search: create`\n","operationId":"duplicateIndexV2Get","tags":["Search Configuration"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-config-InPathIndexId"}],"responses":{"200":{"description":"Returned newly created duplicate index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-SearchConfigSchema"}}}},"500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search-Configuration/operation/duplicateIndexV2Get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/duplicate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/duplicate\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/duplicate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/duplicate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/duplicate');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/duplicate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/suggestion-indices":{"get":{"summary":"Get suggestion indices","description":"Retrieve a list of all suggestion index configurations in the workspace.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"GetSuggestionsIndices","tags":["Suggestions Configuration"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-config-paginationPage"},{"$ref":"#/components/parameters/items-search-config-paginationLimit"},{"$ref":"#/components/parameters/items-search-config-paginationSortBy"},{"$ref":"#/components/parameters/items-search-config-paginationOrdering"},{"$ref":"#/components/parameters/items-search-config-paginationIncludeMeta"},{"$ref":"#/components/parameters/items-search-config-nameFilter"},{"$ref":"#/components/parameters/items-search-config-queryFilter"}],"responses":{"200":{"description":"List of suggestion index configurations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-GetSuggestionIndicesResponseSchema"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Suggestions-Configuration/operation/GetSuggestionsIndices"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/suggestion-indices');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => '4',\n  'limit' => '100',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'SOME_BOOLEAN_VALUE',\n  'name' => 'SOME_STRING_VALUE',\n  'query' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/suggestion-indices?page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&query=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Create suggestion index","description":"Create a suggestion index configuration.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_CREATE`\n\n**User role permission required:** `assets_search: create`\n","operationId":"PostSuggestionIndexConfig","tags":["Suggestions Configuration"],"security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"indexName":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexNameSchema"},"description":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexDescriptionSchema"},"author":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexAuthorSchema"},"enabled":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexEnabledSchema"},"sources":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexSourcesSchema"},"denylist":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexDenylistSchema"}},"required":["indexName","enabled","sources"]}}}},"responses":{"200":{"description":"Suggestion index config created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexSchema"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Suggestions-Configuration/operation/PostSuggestionIndexConfig"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/suggestion-indices \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"indexName\":\"string\",\"description\":\"string\",\"author\":0,\"enabled\":true,\"sources\":{\"indices\":[{\"indexId\":\"string\",\"minPopularity\":5,\"minHits\":1,\"minLetters\":2,\"daysInterval\":30,\"validate\":false}],\"external\":[{\"query\":\"string\",\"count\":0}],\"generate\":[{\"itemsCatalogId\":\"string\",\"attributes\":[\"string\"]}]},\"denylist\":[{\"pattern\":\"string\",\"matchingType\":\"Phrase\"}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"indexName\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"author\\\":0,\\\"enabled\\\":true,\\\"sources\\\":{\\\"indices\\\":[{\\\"indexId\\\":\\\"string\\\",\\\"minPopularity\\\":5,\\\"minHits\\\":1,\\\"minLetters\\\":2,\\\"daysInterval\\\":30,\\\"validate\\\":false}],\\\"external\\\":[{\\\"query\\\":\\\"string\\\",\\\"count\\\":0}],\\\"generate\\\":[{\\\"itemsCatalogId\\\":\\\"string\\\",\\\"attributes\\\":[\\\"string\\\"]}]},\\\"denylist\\\":[{\\\"pattern\\\":\\\"string\\\",\\\"matchingType\\\":\\\"Phrase\\\"}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/search/v2/suggestion-indices\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"indexName\": \"string\",\n  \"description\": \"string\",\n  \"author\": 0,\n  \"enabled\": true,\n  \"sources\": {\n    \"indices\": [\n      {\n        \"indexId\": \"string\",\n        \"minPopularity\": 5,\n        \"minHits\": 1,\n        \"minLetters\": 2,\n        \"daysInterval\": 30,\n        \"validate\": false\n      }\n    ],\n    \"external\": [\n      {\n        \"query\": \"string\",\n        \"count\": 0\n      }\n    ],\n    \"generate\": [\n      {\n        \"itemsCatalogId\": \"string\",\n        \"attributes\": [\n          \"string\"\n        ]\n      }\n    ]\n  },\n  \"denylist\": [\n    {\n      \"pattern\": \"string\",\n      \"matchingType\": \"Phrase\"\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/suggestion-indices\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/suggestion-indices\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  indexName: 'string',\n  description: 'string',\n  author: 0,\n  enabled: true,\n  sources: {\n    indices: [\n      {\n        indexId: 'string',\n        minPopularity: 5,\n        minHits: 1,\n        minLetters: 2,\n        daysInterval: 30,\n        validate: false\n      }\n    ],\n    external: [{query: 'string', count: 0}],\n    generate: [{itemsCatalogId: 'string', attributes: ['string']}]\n  },\n  denylist: [{pattern: 'string', matchingType: 'Phrase'}]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/suggestion-indices');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"indexName\":\"string\",\"description\":\"string\",\"author\":0,\"enabled\":true,\"sources\":{\"indices\":[{\"indexId\":\"string\",\"minPopularity\":5,\"minHits\":1,\"minLetters\":2,\"daysInterval\":30,\"validate\":false}],\"external\":[{\"query\":\"string\",\"count\":0}],\"generate\":[{\"itemsCatalogId\":\"string\",\"attributes\":[\"string\"]}]},\"denylist\":[{\"pattern\":\"string\",\"matchingType\":\"Phrase\"}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/suggestion-indices\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"indexName\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"author\\\":0,\\\"enabled\\\":true,\\\"sources\\\":{\\\"indices\\\":[{\\\"indexId\\\":\\\"string\\\",\\\"minPopularity\\\":5,\\\"minHits\\\":1,\\\"minLetters\\\":2,\\\"daysInterval\\\":30,\\\"validate\\\":false}],\\\"external\\\":[{\\\"query\\\":\\\"string\\\",\\\"count\\\":0}],\\\"generate\\\":[{\\\"itemsCatalogId\\\":\\\"string\\\",\\\"attributes\\\":[\\\"string\\\"]}]},\\\"denylist\\\":[{\\\"pattern\\\":\\\"string\\\",\\\"matchingType\\\":\\\"Phrase\\\"}]}\")\n  .asString();"}]}},"/search/v2/suggestion-indices/{indexId}/config":{"get":{"summary":"Get suggestion index","description":"Retrieve a suggestion index configuration.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"GetSuggestionsIndex","tags":["Suggestions Configuration"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-config-InPathIndexId"}],"responses":{"200":{"description":"Suggestion index configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexSchema"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Suggestions-Configuration/operation/GetSuggestionsIndex"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/suggestion-indices/%7BindexId%7D/config\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/suggestion-indices/%7BindexId%7D/config\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"summary":"Create/replace suggestion index","description":"Create a suggestion index configuration or replace an existing one, given the index ID.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_UPDATE`\n\n**User role permission required:** `assets_search: update`\n","operationId":"PutSuggestionIndexConfig","tags":["Suggestions Configuration"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-config-InPathIndexId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"indexName":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexNameSchema"},"description":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexDescriptionSchema"},"author":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexAuthorSchema"},"enabled":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexEnabledSchema"},"sources":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexSourcesSchema"},"denylist":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexDenylistSchema"}},"required":["indexName","enabled","sources"]}}}},"responses":{"200":{"description":"Suggestion index config created or replaced successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexSchema"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Suggestions-Configuration/operation/PutSuggestionIndexConfig"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"indexName\":\"string\",\"description\":\"string\",\"author\":0,\"enabled\":true,\"sources\":{\"indices\":[{\"indexId\":\"string\",\"minPopularity\":5,\"minHits\":1,\"minLetters\":2,\"daysInterval\":30,\"validate\":false}],\"external\":[{\"query\":\"string\",\"count\":0}],\"generate\":[{\"itemsCatalogId\":\"string\",\"attributes\":[\"string\"]}]},\"denylist\":[{\"pattern\":\"string\",\"matchingType\":\"Phrase\"}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"indexName\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"author\\\":0,\\\"enabled\\\":true,\\\"sources\\\":{\\\"indices\\\":[{\\\"indexId\\\":\\\"string\\\",\\\"minPopularity\\\":5,\\\"minHits\\\":1,\\\"minLetters\\\":2,\\\"daysInterval\\\":30,\\\"validate\\\":false}],\\\"external\\\":[{\\\"query\\\":\\\"string\\\",\\\"count\\\":0}],\\\"generate\\\":[{\\\"itemsCatalogId\\\":\\\"string\\\",\\\"attributes\\\":[\\\"string\\\"]}]},\\\"denylist\\\":[{\\\"pattern\\\":\\\"string\\\",\\\"matchingType\\\":\\\"Phrase\\\"}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/search/v2/suggestion-indices/%7BindexId%7D/config\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"indexName\": \"string\",\n  \"description\": \"string\",\n  \"author\": 0,\n  \"enabled\": true,\n  \"sources\": {\n    \"indices\": [\n      {\n        \"indexId\": \"string\",\n        \"minPopularity\": 5,\n        \"minHits\": 1,\n        \"minLetters\": 2,\n        \"daysInterval\": 30,\n        \"validate\": false\n      }\n    ],\n    \"external\": [\n      {\n        \"query\": \"string\",\n        \"count\": 0\n      }\n    ],\n    \"generate\": [\n      {\n        \"itemsCatalogId\": \"string\",\n        \"attributes\": [\n          \"string\"\n        ]\n      }\n    ]\n  },\n  \"denylist\": [\n    {\n      \"pattern\": \"string\",\n      \"matchingType\": \"Phrase\"\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/suggestion-indices/%7BindexId%7D/config\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  indexName: 'string',\n  description: 'string',\n  author: 0,\n  enabled: true,\n  sources: {\n    indices: [\n      {\n        indexId: 'string',\n        minPopularity: 5,\n        minHits: 1,\n        minLetters: 2,\n        daysInterval: 30,\n        validate: false\n      }\n    ],\n    external: [{query: 'string', count: 0}],\n    generate: [{itemsCatalogId: 'string', attributes: ['string']}]\n  },\n  denylist: [{pattern: 'string', matchingType: 'Phrase'}]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"indexName\":\"string\",\"description\":\"string\",\"author\":0,\"enabled\":true,\"sources\":{\"indices\":[{\"indexId\":\"string\",\"minPopularity\":5,\"minHits\":1,\"minLetters\":2,\"daysInterval\":30,\"validate\":false}],\"external\":[{\"query\":\"string\",\"count\":0}],\"generate\":[{\"itemsCatalogId\":\"string\",\"attributes\":[\"string\"]}]},\"denylist\":[{\"pattern\":\"string\",\"matchingType\":\"Phrase\"}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"indexName\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"author\\\":0,\\\"enabled\\\":true,\\\"sources\\\":{\\\"indices\\\":[{\\\"indexId\\\":\\\"string\\\",\\\"minPopularity\\\":5,\\\"minHits\\\":1,\\\"minLetters\\\":2,\\\"daysInterval\\\":30,\\\"validate\\\":false}],\\\"external\\\":[{\\\"query\\\":\\\"string\\\",\\\"count\\\":0}],\\\"generate\\\":[{\\\"itemsCatalogId\\\":\\\"string\\\",\\\"attributes\\\":[\\\"string\\\"]}]},\\\"denylist\\\":[{\\\"pattern\\\":\\\"string\\\",\\\"matchingType\\\":\\\"Phrase\\\"}]}\")\n  .asString();"}]},"delete":{"summary":"Delete suggestion index","description":"Delete a suggestion index configuration.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_DELETE`\n\n**User role permission required:** `assets_search: delete`\n","operationId":"DeleteSuggestionIndexConfig","tags":["Suggestions Configuration"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-config-InPathIndexId"}],"responses":{"204":{"description":"Suggestion index config deleted"},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Suggestions-Configuration/operation/DeleteSuggestionIndexConfig"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/search/v2/suggestion-indices/%7BindexId%7D/config\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/suggestion-indices/%7BindexId%7D/config\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/config\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/suggestion-indices/{indexId}/state":{"get":{"summary":"Get suggestion index state","description":"Retrieve the state of a single suggestion index.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `ITEMS_SEARCH_CONFIG_SEARCH_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"GetSuggestionsIndexState","tags":["Suggestions Configuration"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-config-InPathIndexId"}],"responses":{"200":{"description":"Suggestion index state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-IndexStateResponseSchema"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-config-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Suggestions-Configuration/operation/GetSuggestionsIndexState"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/state \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/suggestion-indices/%7BindexId%7D/state\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/state\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/suggestion-indices/%7BindexId%7D/state\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/state');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/suggestion-indices/%7BindexId%7D/state\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/deleted-searches":{"get":{"summary":"Get deleted searches","description":"Retrieve the searches deleted from a profile's history.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `ITEMS_SEARCH_RECENT_SEARCH_READ`\n","operationId":"GetDeletedSearches","tags":["Search"],"security":[{"JWT":[]},{"TrackerKey":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-recent-indexId"},{"$ref":"#/components/parameters/items-search-recent-clientUUID"}],"responses":{"200":{"description":"Deleted searches returned","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/items-search-recent-DeletedSearch"}}}}},"400":{"description":"Check error message for more details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-recent-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search/operation/GetDeletedSearches"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'clientUUID' => 'e0097757-d1e2-44ac-ba3c-d97979a354c1'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Soft-delete a recent search","description":"Delete a recent search from the history accessible to a profile. The search remains in the database and you can retrieve it by using [this endpoint](#operation/GetDeletedSearches).\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `ITEMS_SEARCH_RECENT_SEARCH_CREATE`\n","operationId":"PostDeletedSearch","tags":["Search"],"security":[{"JWT":[]},{"TrackerKey":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-recent-indexId"},{"$ref":"#/components/parameters/items-search-recent-clientUUID"}],"requestBody":{"description":"Request for deleting search query","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-recent-DeletedSearch"}}}},"responses":{"204":{"description":"Soft-delete successful"},"400":{"description":"Check error message for more details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-recent-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search/operation/PostDeletedSearch"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"query\":\"string\",\"match\":\"query\",\"timestamp\":\"2019-08-24T14:15:22Z\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"query\\\":\\\"string\\\",\\\"match\\\":\\\"query\\\",\\\"timestamp\\\":\\\"2019-08-24T14:15:22Z\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"query\": \"string\",\n  \"match\": \"query\",\n  \"timestamp\": \"2019-08-24T14:15:22Z\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({query: 'string', match: 'query', timestamp: '2019-08-24T14:15:22Z'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setQueryData([\n  'clientUUID' => 'e0097757-d1e2-44ac-ba3c-d97979a354c1'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"query\":\"string\",\"match\":\"query\",\"timestamp\":\"2019-08-24T14:15:22Z\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/deleted-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"query\\\":\\\"string\\\",\\\"match\\\":\\\"query\\\",\\\"timestamp\\\":\\\"2019-08-24T14:15:22Z\\\"}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/recent-searches":{"get":{"summary":"Get recent searches","description":"Get a profile's recent searches from a particular index.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `ITEMS_SEARCH_RECENT_SEARCH_READ`\n","operationId":"GetRecentSearches","tags":["Search"],"security":[{"JWT":[]},{"TrackerKey":[]}],"parameters":[{"$ref":"#/components/parameters/items-search-recent-indexId"},{"$ref":"#/components/parameters/items-search-recent-clientUUID"},{"$ref":"#/components/parameters/items-search-recent-windowSize"},{"$ref":"#/components/parameters/items-search-recent-timeUnit"},{"$ref":"#/components/parameters/items-search-recent-timeValue"}],"responses":{"200":{"description":"Recent searches returned","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","description":"Recent search query"}}}}},"400":{"description":"Check error message for more details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-recent-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Search/operation/GetRecentSearches"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'clientUUID' => 'e0097757-d1e2-44ac-ba3c-d97979a354c1',\n  'windowSize' => 'SOME_INTEGER_VALUE',\n  'timeUnit' => 'SOME_STRING_VALUE',\n  'timeValue' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/4add1a1fa877c1651906bb22c9dfd37a1618852272/recent-searches?clientUUID=e0097757-d1e2-44ac-ba3c-d97979a354c1&windowSize=SOME_INTEGER_VALUE&timeUnit=SOME_STRING_VALUE&timeValue=SOME_INTEGER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/metrics/v2/available":{"get":{"summary":"Check available metrics (recommendations)","description":"Returns metrics available for the Workspace. The metrics can be used when defining boostMetric and sortMetric query parameters in recommendations and in metric-based recommendations.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `METRICS_RECOMMENDATIONS_READ`\n\n**User role permission required:** `campaigns_recommendations: read`\n","operationId":"ApiGetAvailableMetricsV2","tags":["AI: Metrics"],"security":[{"JWT":[]}],"responses":{"200":{"description":"Available metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metrics-AvailableMetrics"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metrics-Error"}}}}},"x-snr-doc-urls":["/api-reference/analytics-suite#tag/AI:-Metrics/operation/ApiGetAvailableMetricsV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/metrics/v2/available \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/metrics/v2/available\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/metrics/v2/available\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/metrics/v2/available\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/metrics/v2/available');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/metrics/v2/available\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/metrics/v2/available-ids":{"get":{"summary":"Retrieve IDs of available metrics (recommendations)","description":"Returns IDs of metrics that are available for the Workspace. The metrics can be used when defining boostMetric and sortMetric query parameters in recommendations and in metric-based recommendations.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `METRICS_RECOMMENDATIONS_READ`\n\n**User role permission required:** `campaigns_recommendations: read`\n","operationId":"ApiGetAvailableMetricsIdsV2","tags":["AI: Metrics"],"security":[{"JWT":[]}],"responses":{"200":{"description":"IDs of available metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metrics-AvailableMetricsIds"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metrics-Error"}}}}},"x-snr-doc-urls":["/api-reference/analytics-suite#tag/AI:-Metrics/operation/ApiGetAvailableMetricsIdsV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/metrics/v2/available-ids \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/metrics/v2/available-ids\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/metrics/v2/available-ids\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/metrics/v2/available-ids\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/metrics/v2/available-ids');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/metrics/v2/available-ids\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/morph/logs/automation/{automationWorkflowId}/last-run/with-stages":{"get":{"tags":["Data Processing Job Logs"],"operationId":"getExtendedInfoAboutLastRun","summary":"Get last log with stages","description":"\nRetrieve the status of a workflow's last run and its stages.\n\nThe workflow must contain at least one of the following nodes:\n- Any Data Transformation node\n- Any node that pulls data into a workflow (for example local file, SFTP, Azure Blob Storage)\n- Any node that pushes data out of the workflow (for example SFTP, Pub/Sub)\n- Any node that imports data into Synerise\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `MORPH_JOBS_READ`\n\n**User role permission required:** `automation_2_journeys: read`\n","parameters":[{"name":"automationWorkflowId","in":"path","required":true,"description":"`diagramId` of the workflow to fetch last job from","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/morph-LogsLimitInQuery"}],"responses":{"200":{"description":"Information about last data transformation journey status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/morph-DtDiagramLastRunResponse"}}}},"401":{"$ref":"#/components/responses/morph-401"},"403":{"$ref":"#/components/responses/morph-403"},"404":{"description":"- workflow doesn't exist; \n- no journeys exist for a workflow; \n- workflow doesn't contain any of the required nodes (returns a \"no journeys found\" error)\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/morph-HttpErrorDetails"},"example":{"error":"Not found","status":404,"timestamp":"2023-09-06T11:54:08.564Z","message":"No journeys for diagram fe7e3a80-91bb-433a-94cf-744253cc442c found"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/automation#tag/Data-Processing-Job-Logs/operation/getExtendedInfoAboutLastRun"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'limit' => 'SOME_NUMBER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/morph/exports/clients/segmentation":{"post":{"tags":["Profile management"],"operationId":"runProfileExport","summary":"Create and run profile export","description":"Request an export of profiles. The group of profiles to export is selected by pointing to a segmentation. After the export is completed, you can access the data with [GET /exports/clients/{taskId}/data](#operation/getExportedProfileData) or from [https://app.synerise.com/assets/exports](https://app.synerise.com/assets/exports).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CLIENT_EXPORTER_REPORT_CREATE`\n\n**User role permission required:** `settings_export: create`\n","security":[{"JWT":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/morph-NewProfileExport"}}}},"responses":{"200":{"description":"Export task created and queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/morph-ExportResponse"}}}},"400":{"$ref":"#/components/responses/morph-BadRequest"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/runProfileExport"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/morph/exports/clients/segmentation \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"fields\":[\"id\",\"attr1\",\"attr2\"],\"agreementFilter\":\"NONE\",\"segmentationHash\":\"e7cff342-b484-4fcb-aa34-4735122bc9e7\",\"tags\":[\"string\"],\"expressions\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"aggregates\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"segmentations\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"excludedIds\":[0]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"fields\\\":[\\\"id\\\",\\\"attr1\\\",\\\"attr2\\\"],\\\"agreementFilter\\\":\\\"NONE\\\",\\\"segmentationHash\\\":\\\"e7cff342-b484-4fcb-aa34-4735122bc9e7\\\",\\\"tags\\\":[\\\"string\\\"],\\\"expressions\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"aggregates\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"segmentations\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"excludedIds\\\":[0]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/morph/exports/clients/segmentation\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"fields\": [\n    \"id\",\n    \"attr1\",\n    \"attr2\"\n  ],\n  \"agreementFilter\": \"NONE\",\n  \"segmentationHash\": \"e7cff342-b484-4fcb-aa34-4735122bc9e7\",\n  \"tags\": [\n    \"string\"\n  ],\n  \"expressions\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"aggregates\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"segmentations\": [\n    \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n  ],\n  \"excludedIds\": [\n    0\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/morph/exports/clients/segmentation\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/morph/exports/clients/segmentation\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  name: 'string',\n  fields: ['id', 'attr1', 'attr2'],\n  agreementFilter: 'NONE',\n  segmentationHash: 'e7cff342-b484-4fcb-aa34-4735122bc9e7',\n  tags: ['string'],\n  expressions: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n  aggregates: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n  segmentations: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n  excludedIds: [0]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/morph/exports/clients/segmentation');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"fields\":[\"id\",\"attr1\",\"attr2\"],\"agreementFilter\":\"NONE\",\"segmentationHash\":\"e7cff342-b484-4fcb-aa34-4735122bc9e7\",\"tags\":[\"string\"],\"expressions\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"aggregates\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"segmentations\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"excludedIds\":[0]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/morph/exports/clients/segmentation\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"fields\\\":[\\\"id\\\",\\\"attr1\\\",\\\"attr2\\\"],\\\"agreementFilter\\\":\\\"NONE\\\",\\\"segmentationHash\\\":\\\"e7cff342-b484-4fcb-aa34-4735122bc9e7\\\",\\\"tags\\\":[\\\"string\\\"],\\\"expressions\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"aggregates\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"segmentations\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"excludedIds\\\":[0]}\")\n  .asString();"}]}},"/morph/exports/clients/{taskId}/status":{"get":{"tags":["Profile management"],"operationId":"getProfileExportStatus","summary":"Check profile export status","description":"After creating an export with [POST /exports/clients/segmentation](#operation/runProfileExport), you can check its status. When the export is ready, you can access the data with [GET /exports/clients/{taskId}/data](#operation/getExportedProfileData).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CLIENT_EXPORTER_REPORT_CREATE`\n\n**User role permission required:** `settings_export: create`\n","security":[{"JWT":[]}],"parameters":[{"name":"taskId","in":"path","required":true,"description":"Unique ID of the export task","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Status of the export task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/morph-JobStatus"}}}}},"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/getProfileExportStatus"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/status \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/morph/exports/clients/%7BtaskId%7D/status\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/status\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/morph/exports/clients/%7BtaskId%7D/status\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/status');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/status\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/morph/exports/clients/{taskId}/data":{"get":{"tags":["Profile management"],"operationId":"getExportedProfileData","summary":"Get exported profiles","description":"Get exported profiles as a list. To create the export, use [POST /exports/clients/segmentation](#operation/runProfileExport).\n\n**Tip**: If you want to download a CSV, JSON, or JSONL, find your export in [https://app.synerise.com/assets/exports](https://app.synerise.com/assets/exports).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `CLIENT_EXPORTER_REPORT_CREATE`\n\n**User role permission required:** `settings_export: create`\n","security":[{"JWT":[]}],"parameters":[{"name":"taskId","in":"path","required":true,"description":"Unique ID of the export task","schema":{"type":"string","format":"uuid"}},{"name":"offset","in":"query","required":true,"description":"The index of the first record to retrieve. Use this to paginate the exported data.","schema":{"type":"number","minimum":0}},{"name":"limit","in":"query","required":true,"description":"The number of records to retrieve. Use this to paginate the exported data.","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Exported profile data","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","example":{"id":"1234","exampleAttribute":"foo","exampleTag":"true","exampleExpression":"23","exampleAggregate":"74","exampleSegmentation":"false"},"additionalProperties":{"type":"string","description":"- Profile attributes are key/value pairs.\n- Tags are key/value pairs, where the key is the name of the tag and the value is \"true\" (string) if the tag is assigned to the profile.\n- Expressions are key/value pairs, where the key is the name of the expression and the value is the result of the expression.\n- Aggregates are key/value pairs, where the key is the name of the aggregate and the value is the result of the aggregate.\n- Segmentations are key/value pairs, where the key is the name of the segmentation, and the value is \"true\" (string) if the profile belongs to the segmentation.\n"}}}}}},"400":{"$ref":"#/components/responses/morph-BadRequest"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/getExportedProfileData"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/data');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'offset' => 'SOME_NUMBER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/notes-service/by-id/{clientId}":{"get":{"tags":["Profile management"],"summary":"Get all Profile notes","description":"Retrieve all notes associated with a single profile.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `client_notes: read`\n","operationId":"getAllNotesUsingGET","parameters":[{"$ref":"#/components/parameters/notes-service-profileId"}],"responses":{"200":{"description":"An array of notes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/notes-service-NoteResponse"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/getAllNotesUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/notes-service/by-id/%7BclientId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/notes-service/by-id/%7BclientId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/notes-service/by-id/%7BclientId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/notes-service/by-id/%7BclientId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/notes-service/by-id/%7BclientId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Profile management"],"summary":"Create a note","description":"Create a new note in the profile\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `client_notes: create`\n","operationId":"createNoteUsingPOST","parameters":[{"$ref":"#/components/parameters/notes-service-profileId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notes-service-NoteRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/notes-service-NoteResponse"}}}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/createNoteUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"subject\":\"Note 1\",\"body\":\"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"subject\\\":\\\"Note 1\\\",\\\"body\\\":\\\"<h1>NOTE 1</h1>\\\\\\\\n<p>Some text</p>\\\\\\\\n<ul>\\\\\\\\n<li>1</li>\\\\\\\\n<li>2</li>\\\\\\\\n<li>3</li>\\\\\\\\n</ul>\\\\\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\\\\\n\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/notes-service/by-id/%7BclientId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"subject\": \"Note 1\",\n  \"body\": \"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/notes-service/by-id/%7BclientId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/notes-service/by-id/%7BclientId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  subject: 'Note 1',\n  body: '<h1>NOTE 1</h1>\\n<p>Some text</p>\\n<ul>\\n<li>1</li>\\n<li>2</li>\\n<li>3</li>\\n</ul>\\n<blockquote>Lorem ipsum in quote</blockquote>\\n<p><strong>Lorem ipsum in bold</strong></p>\\n'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/notes-service/by-id/%7BclientId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"subject\":\"Note 1\",\"body\":\"<h1>NOTE 1</h1>\\\\\\\\n<p>Some text</p>\\\\\\\\n<ul>\\\\\\\\n<li>1</li>\\\\\\\\n<li>2</li>\\\\\\\\n<li>3</li>\\\\\\\\n</ul>\\\\\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\\\\\n\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/notes-service/by-id/%7BclientId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"subject\\\":\\\"Note 1\\\",\\\"body\\\":\\\"<h1>NOTE 1</h1>\\\\\\\\n<p>Some text</p>\\\\\\\\n<ul>\\\\\\\\n<li>1</li>\\\\\\\\n<li>2</li>\\\\\\\\n<li>3</li>\\\\\\\\n</ul>\\\\\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\\\\\n\\\"}\")\n  .asString();"}]}},"/notes-service/by-id/{clientId}/{noteId}":{"get":{"tags":["Profile management"],"summary":"Get note","description":"Retrieve a single note\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `client_notes: read`\n","operationId":"getNoteUsingGET","parameters":[{"$ref":"#/components/parameters/notes-service-profileId"},{"name":"noteId","in":"path","description":"Note UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/notes-service-NoteResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/getNoteUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Profile management"],"summary":"Update note","description":"You can update an existing note.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `client_notes: update`\n","operationId":"updateNoteUsingPUT","parameters":[{"name":"clientId","in":"path","required":true,"description":"Profile ID","schema":{"type":"integer","format":"int64"}},{"name":"noteId","in":"path","description":"Note UUID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/notes-service-NoteRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/notes-service-NoteResponse"}}}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/updateNoteUsingPUT"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"subject\":\"Note 1\",\"body\":\"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"subject\\\":\\\"Note 1\\\",\\\"body\\\":\\\"<h1>NOTE 1</h1>\\\\\\\\n<p>Some text</p>\\\\\\\\n<ul>\\\\\\\\n<li>1</li>\\\\\\\\n<li>2</li>\\\\\\\\n<li>3</li>\\\\\\\\n</ul>\\\\\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\\\\\n\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"subject\": \"Note 1\",\n  \"body\": \"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  subject: 'Note 1',\n  body: '<h1>NOTE 1</h1>\\n<p>Some text</p>\\n<ul>\\n<li>1</li>\\n<li>2</li>\\n<li>3</li>\\n</ul>\\n<blockquote>Lorem ipsum in quote</blockquote>\\n<p><strong>Lorem ipsum in bold</strong></p>\\n'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"subject\":\"Note 1\",\"body\":\"<h1>NOTE 1</h1>\\\\\\\\n<p>Some text</p>\\\\\\\\n<ul>\\\\\\\\n<li>1</li>\\\\\\\\n<li>2</li>\\\\\\\\n<li>3</li>\\\\\\\\n</ul>\\\\\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\\\\\n\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"subject\\\":\\\"Note 1\\\",\\\"body\\\":\\\"<h1>NOTE 1</h1>\\\\\\\\n<p>Some text</p>\\\\\\\\n<ul>\\\\\\\\n<li>1</li>\\\\\\\\n<li>2</li>\\\\\\\\n<li>3</li>\\\\\\\\n</ul>\\\\\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\\\\\n\\\"}\")\n  .asString();"}]},"delete":{"tags":["Profile management"],"summary":"Delete note","description":"You can delete a note. This operation is irreversible.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `client_notes: delete`\n","operationId":"deleteNoteUsingDELETE","parameters":[{"$ref":"#/components/parameters/notes-service-profileId"},{"name":"noteId","in":"path","description":"Note UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"204":{"description":"No Content"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/deleteNoteUsingDELETE"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/promotion/get-for-client":{"get":{"tags":["Promotions"],"summary":"Get a Profile's promotions as Profile","description":"A Profile can retrieve a list of all its promotions, assigned or activated. By default, only non-expired promotions are retrieved.\n\n**IMPORTANT**: \n- As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.\n- The endpoint is limited to 25000 requests per minute (per workspace).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n","operationId":"GetAClientsPromotions","parameters":[{"$ref":"#/components/parameters/promotions-queryPromotionSort"},{"$ref":"#/components/parameters/promotions-queryPromotionStatus"},{"$ref":"#/components/parameters/promotions-queryPromotionPresentOnly"},{"$ref":"#/components/parameters/promotions-queryPromotionDisplayableOnly"},{"$ref":"#/components/parameters/promotions-queryTagNames"},{"$ref":"#/components/parameters/promotions-queryLimit"},{"$ref":"#/components/parameters/promotions-queryPage"},{"$ref":"#/components/parameters/promotions-queryIncludeMeta"},{"$ref":"#/components/parameters/promotions-queryCheckGlobalActivationLimits"},{"$ref":"#/components/parameters/promotions-queryIncludeVouchers"},{"$ref":"#/components/parameters/promotions-queryStoreIds"}],"responses":{"200":{"description":"An array of promotions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"},"description":"An array of promotions"},"meta":{"$ref":"#/components/schemas/promotions-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/GetAClientsPromotions"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'sort' => 'requireRedeemedPoints,desc',\n  'status' => 'SOME_ARRAY_VALUE',\n  'presentOnly' => 'true',\n  'displayableOnly' => 'true',\n  'tagNames' => 'SOME_ARRAY_VALUE',\n  'limit' => '100',\n  'page' => '4',\n  'includeMeta' => 'false',\n  'checkGlobalActivationLimits' => 'true',\n  'includeVouchers' => 'false',\n  'storeIds' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/get-for-client?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/promotion/duplicate":{"post":{"tags":["Promotions"],"summary":"Duplicate existing promotion","description":"You can duplicate an existing promotion.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `PROMOTIONS_DUPLICATE_PROMOTIONS_CREATE`\n\n**User role permission required:** `campaigns_promotions: create`\n","operationId":"duplicatePromotion","requestBody":{"required":true,"description":"Provide only one of the parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-duplicatePromotionRequest"}}}},"responses":{"200":{"description":"Promotion duplicated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionDataResponse"}}}},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"description":"Promotion not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Promotion not found"}}}},"500":{"description":"Internal Server Error"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/duplicatePromotion"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/promotion/duplicate \\\n  --header 'content-type: application/json' \\\n  --data '{\"uuid\":\"string\",\"code\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"uuid\\\":\\\"string\\\",\\\"code\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/v4/promotions/promotion/duplicate\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"uuid\": \"string\",\n  \"code\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion/duplicate\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/duplicate\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({uuid: 'string', code: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/duplicate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"uuid\":\"string\",\"code\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion/duplicate\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"uuid\\\":\\\"string\\\",\\\"code\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/v4/promotions/promotion/activate":{"post":{"tags":["Promotions"],"summary":"Activate a promotion","description":"A Profile can change the status of a promotion from `assigned` to `active`, the promotion can now be applied to a purchase.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n","operationId":"ActivateAPromotion","requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionActivation"}}},"required":true},"responses":{"200":{"description":"Promotion activated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"$ref":"#/components/responses/promotions-Promotion404"},"409":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"},"412":{"$ref":"#/components/responses/promotions-PromotionActivate412"},"422":{"$ref":"#/components/responses/promotions-PromotionActivate422"},"423":{"$ref":"#/components/responses/promotions-ProfilePromotionsBlockedError"},"500":{"$ref":"#/components/responses/promotions-500"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/ActivateAPromotion"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/promotion/activate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/promotion/activate\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"key\": \"code\",\n  \"value\": \"7893467834GG\",\n  \"pointsToUse\": 100\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion/activate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/activate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({key: 'code', value: '7893467834GG', pointsToUse: 100}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/activate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion/activate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}\")\n  .asString();"}]}},"/v4/promotions/promotion/batch-activate":{"post":{"tags":["Promotions"],"summary":"Batch activate promotions","description":"A Profile can change the status of a number of promotions from `assigned` to `active`, the promotion can now be applied to a purchase.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n","operationId":"BatchActivate","requestBody":{"description":"","content":{"application/json":{"schema":{"type":"array","minItems":1,"maxItems":200,"items":{"$ref":"#/components/schemas/promotions-promotionActivation"}}}},"required":true},"responses":{"200":{"description":"Promotions activated","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"$ref":"#/components/responses/promotions-Promotion404"},"409":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"},"412":{"$ref":"#/components/responses/promotions-PromotionActivate412"},"423":{"$ref":"#/components/responses/promotions-ProfilePromotionsBlockedError"},"500":{"$ref":"#/components/responses/promotions-500"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchActivate"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/promotion/batch-activate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/promotion/batch-activate\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  {\n    \"key\": \"code\",\n    \"value\": \"7893467834GG\",\n    \"pointsToUse\": 100\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion/batch-activate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/batch-activate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([{key: 'code', value: '7893467834GG', pointsToUse: 100}]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/batch-activate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion/batch-activate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}]\")\n  .asString();"}]}},"/v4/promotions/promotion/deactivate":{"post":{"tags":["Promotions"],"summary":"Deactivate a promotion","description":"A Profile can change the status of an activated promotion back to `assigned`.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n","operationId":"DeactivateAPromotion","requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionActivation"}}},"required":true},"responses":{"200":{"description":"Promotion deactivated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-PromotionDeactivationForbiddenError"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Promotion for profile not found"}}}},"429":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/DeactivateAPromotion"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/promotion/deactivate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/promotion/deactivate\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"key\": \"code\",\n  \"value\": \"7893467834GG\",\n  \"pointsToUse\": 100\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion/deactivate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/deactivate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({key: 'code', value: '7893467834GG', pointsToUse: 100}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/deactivate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion/deactivate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}\")\n  .asString();"}]}},"/v4/promotions/promotion/batch-deactivate":{"post":{"tags":["Promotions"],"summary":"Batch deactivate promotions","description":"A Profile can change the status of a number of activated promotions back to `assigned`.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n","operationId":"BatchDeactivate","requestBody":{"description":"","content":{"application/json":{"schema":{"type":"array","minItems":1,"maxItems":200,"items":{"$ref":"#/components/schemas/promotions-promotionActivation"}}}},"required":true},"responses":{"200":{"description":"Promotions deactivated","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Promotions for profile not found"}}}},"429":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchDeactivate"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/promotion/batch-deactivate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/promotion/batch-deactivate\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  {\n    \"key\": \"code\",\n    \"value\": \"7893467834GG\",\n    \"pointsToUse\": 100\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion/batch-deactivate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/batch-deactivate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([{key: 'code', value: '7893467834GG', pointsToUse: 100}]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/batch-deactivate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion/batch-deactivate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}]\")\n  .asString();"}]}},"/v4/promotions/promotion/deactivate-all-for-client/{identifierType}/{identifierValue}":{"post":{"tags":["Promotions"],"summary":"Deactivate all promotions for a Profile as Workspace","description":"You can deactivate all promotions assigned to a Profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_DEACTIVATE_PROMOTIONS_UPDATE`\n\n**User role permission required:** `campaigns_promotions: update`\n","operationId":"deactivateAllPromotions","parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"},{"$ref":"#/components/parameters/promotions-queryReturnCodes"},{"$ref":"#/components/parameters/promotions-queryLockPoints"},{"$ref":"#/components/parameters/promotions-queryExcludeTag"}],"responses":{"200":{"description":"All promotions deactivated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Profile not found"}}}}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/deactivateAllPromotions"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"POST\", \"/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setQueryData([\n  'returnCodes' => 'true',\n  'lockPoints' => 'true',\n  'excludeTags' => 'SOME_ARRAY_VALUE'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion/deactivate-all-for-client/email/%7BidentifierValue%7D?returnCodes=true&lockPoints=true&excludeTags=SOME_ARRAY_VALUE\")\n  .asString();"}]}},"/v4/promotions/promotion/redeem":{"post":{"tags":["Promotions"],"summary":"Redeem a promotion","description":"You can redeem a promotion and loyalty points.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_REDEEM_PROMOTIONS_CREATE`\n\n**User role permission required:** `campaigns_promotions: create`\n","operationId":"RedeemAPromotion","requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-RedeemPromotionsRequest"}}},"required":true},"responses":{"201":{"description":"Promotion redeemed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Promotion redeemed successfully"}}}},"209":{"description":"Promotion is already redeemed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Promotion is already redeemed"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"description":"Not found error","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/promotions-ProfileNotFoundErrorV1"},{"$ref":"#/components/schemas/promotions-PromotionNotFoundErrorV1"}]}}}},"409":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"},"412":{"description":"Unprocessable redemption","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/promotions-PromotionNotActivatedErrorV1"},{"$ref":"#/components/schemas/promotions-PromotionRedeemLimitExceededErrorV1"},{"$ref":"#/components/schemas/promotions-PromotionAlreadyRedeemedErrorV1"}]}}}},"423":{"$ref":"#/components/responses/promotions-ProfilePromotionsBlockedError"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/RedeemAPromotion"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/promotion/redeem \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"code\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"code\\\":\\\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\\\",\\\"clientKey\\\":\\\"clientId\\\",\\\"clientKeyValue\\\":\\\"434428563\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/promotion/redeem\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"code\": \"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\n  \"clientKey\": \"clientId\",\n  \"clientKeyValue\": \"434428563\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion/redeem\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/redeem\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  code: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9',\n  clientKey: 'clientId',\n  clientKeyValue: '434428563'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/redeem');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"code\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion/redeem\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"code\\\":\\\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\\\",\\\"clientKey\\\":\\\"clientId\\\",\\\"clientKeyValue\\\":\\\"434428563\\\"}\")\n  .asString();"}]}},"/v4/promotions/promotion/batch-redeem":{"post":{"tags":["Promotions"],"summary":"Batch redeem promotions","description":"You can redeem up to 100 promotions and loyalty points relevant to them.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_BATCH_REDEEM_PROMOTIONS_CREATE`\n\n**User role permission required:** `campaigns_promotions: create`\n","operationId":"BatchRedeemPromotions","requestBody":{"content":{"application/json":{"schema":{"type":"array","minItems":1,"maxItems":200,"items":{"$ref":"#/components/schemas/promotions-RedeemPromotionsRequest"}}}},"required":true},"responses":{"201":{"description":"Promotion redeemed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Promotion redeemed successfully"}}}},"209":{"description":"Promotion is already redeemed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Promotion is already redeemed"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"description":"Not found error","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/promotions-ProfileNotFoundErrorV1"},{"$ref":"#/components/schemas/promotions-PromotionNotFoundErrorV1"}]}}}},"409":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"},"412":{"description":"Unprocessable redemption","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/promotions-PromotionNotActivatedErrorV1"},{"$ref":"#/components/schemas/promotions-PromotionRedeemLimitExceededErrorV1"},{"$ref":"#/components/schemas/promotions-PromotionAlreadyRedeemedErrorV1"}]}}}},"423":{"$ref":"#/components/responses/promotions-ProfilePromotionsBlockedError"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchRedeemPromotions"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/promotion/batch-redeem \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"code\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\"}]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[{\\\"code\\\":\\\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\\\",\\\"clientKey\\\":\\\"clientId\\\",\\\"clientKeyValue\\\":\\\"434428563\\\"}]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/promotion/batch-redeem\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  {\n    \"code\": \"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\n    \"clientKey\": \"clientId\",\n    \"clientKeyValue\": \"434428563\"\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion/batch-redeem\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/batch-redeem\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([\n  {\n    code: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9',\n    clientKey: 'clientId',\n    clientKeyValue: '434428563'\n  }\n]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/batch-redeem');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[{\"code\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\"}]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion/batch-redeem\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[{\\\"code\\\":\\\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\\\",\\\"clientKey\\\":\\\"clientId\\\",\\\"clientKeyValue\\\":\\\"434428563\\\"}]\")\n  .asString();"}]}},"/v4/promotions/v2/promotion/get-for-client/{identifierType}/{identifierValue}":{"get":{"tags":["Promotions"],"summary":"Get a Profile's promotions as Workspace (v2)","description":"A Workspace can retrieve a list of a profile's promotions. By default, only non-expired promotions are retrieved.\n\n**IMPORTANT**: \n- As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.\n- The endpoint is limited to 25000 requests per minute (per workspace).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_LIST_PROMOTIONS_READ`\n\n**User role permission required:** `campaigns_promotions: read`\n","operationId":"GetAllClientPromotionsV2","parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"},{"$ref":"#/components/parameters/promotions-queryPromotionSort"},{"$ref":"#/components/parameters/promotions-queryPromotionStatus"},{"$ref":"#/components/parameters/promotions-queryPromotionPresentOnly"},{"$ref":"#/components/parameters/promotions-queryPromotionDisplayableOnly"},{"$ref":"#/components/parameters/promotions-queryTagNames"},{"$ref":"#/components/parameters/promotions-queryLimit"},{"$ref":"#/components/parameters/promotions-queryPage"},{"$ref":"#/components/parameters/promotions-queryIncludeMeta"},{"$ref":"#/components/parameters/promotions-queryPromotionFields"},{"$ref":"#/components/parameters/promotions-queryPromotionUuids"},{"$ref":"#/components/parameters/promotions-queryCheckGlobalActivationLimits"},{"$ref":"#/components/parameters/promotions-queryIncludeVouchers"},{"$ref":"#/components/parameters/promotions-queryStoreIds"}],"responses":{"200":{"description":"An array of promotions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"},"description":"An array of promotions"},"meta":{"$ref":"#/components/schemas/promotions-responseMeta"}}}}}},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"$ref":"#/components/responses/promotions-ClientNotFoundError"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/GetAllClientPromotionsV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'sort' => 'requireRedeemedPoints,desc',\n  'status' => 'SOME_ARRAY_VALUE',\n  'presentOnly' => 'true',\n  'displayableOnly' => 'true',\n  'tagNames' => 'SOME_ARRAY_VALUE',\n  'limit' => '100',\n  'page' => '4',\n  'includeMeta' => 'false',\n  'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt',\n  'promotionUuids' => 'fc1ee5bf-ad97-47a8-a474-e1b6e755ff38,aabaed4e-4ee7-44d5-b079-445a017ec6fe',\n  'checkGlobalActivationLimits' => 'true',\n  'includeVouchers' => 'false',\n  'storeIds' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&presentOnly=true&displayableOnly=true&tagNames=SOME_ARRAY_VALUE&limit=100&page=4&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&checkGlobalActivationLimits=true&includeVouchers=false&storeIds=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/promotion/get-item-for-client/{identifierType}/{identifierValue}":{"get":{"tags":["Promotions"],"summary":"View promotion details as Profile","description":"A Profile can view all the details of an assigned or activated promotion.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**User role permission required:** `campaigns_promotions: read`\n","operationId":"ViewPromotionDetailsAsClient","parameters":[{"$ref":"#/components/parameters/promotions-pathPromoIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"},{"$ref":"#/components/parameters/promotions-queryLastingOnly"}],"responses":{"200":{"description":"Details of a promotion","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Object not found"}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/ViewPromotionDetailsAsClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'lastingOnly' => 'true'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/get-item-for-client/%7BidentifierType%7D/%7BidentifierValue%7D?lastingOnly=true\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/promotion/get-item-for-client-no-data/{identifierType}/{identifierValue}":{"get":{"tags":["Promotions"],"summary":"View promotion details as Profile","description":"A Profile can view all the details of an assigned or activated promotion.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**User role permission required:** `campaigns_promotions: read`\n","operationId":"ViewPromotionDetailsAsClientNoData","parameters":[{"$ref":"#/components/parameters/promotions-pathPromoIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"}],"responses":{"200":{"description":"Details of a promotion","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Object not found"}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/ViewPromotionDetailsAsClientNoData"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/get-item-for-client-no-data/%7BidentifierType%7D/%7BidentifierValue%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/promotion/list":{"get":{"tags":["Promotions"],"summary":"View Workspace promotions","description":"You can retrieve a list of all promotions defined in your Workspaces. It includes configured promotions, ready to be used or already in use.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_LIST_PROMOTIONS_READ`\n\n**User role permission required:** `campaigns_promotions: read`\n","operationId":"ViewBusinessProfilePromotions","parameters":[{"$ref":"#/components/parameters/promotions-queryLimit"},{"$ref":"#/components/parameters/promotions-queryPage"},{"$ref":"#/components/parameters/promotions-queryStoreCatalog"},{"$ref":"#/components/parameters/promotions-queryStoreIds"},{"$ref":"#/components/parameters/promotions-queryIncludeMeta"},{"$ref":"#/components/parameters/promotions-queryOrderFieldName"},{"$ref":"#/components/parameters/promotions-queryOrder"},{"$ref":"#/components/parameters/promotions-queryQuery"},{"$ref":"#/components/parameters/promotions-queryPromotionUuids"},{"$ref":"#/components/parameters/promotions-queryTargetByType"}],"responses":{"200":{"description":"An array of promotions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/promotions-promotionDataResponse"},"description":"An array of promotions"},"meta":{"$ref":"#/components/schemas/promotions-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/ViewBusinessProfilePromotions"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/list');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'limit' => '100',\n  'page' => '4',\n  'storeCatalog' => 'SOME_STRING_VALUE',\n  'storeIds' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'false',\n  'orderFieldName' => 'SOME_STRING_VALUE',\n  'order' => 'SOME_STRING_VALUE',\n  'query' => 'SOME_STRING_VALUE',\n  'promotionUuids' => 'fc1ee5bf-ad97-47a8-a474-e1b6e755ff38,aabaed4e-4ee7-44d5-b079-445a017ec6fe',\n  'targetByType' => '[SEGMENT]=ACTIVE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&promotionUuids=fc1ee5bf-ad97-47a8-a474-e1b6e755ff38%2Caabaed4e-4ee7-44d5-b079-445a017ec6fe&targetByType=%5BSEGMENT%5D%3DACTIVE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/promotion/diff-list":{"get":{"tags":["Promotions"],"summary":"View recently updated promotions","description":"You can retrieve a list of promotions that were updated. You can filter, sort, and paginate the results.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_DIFF_LIST_PROMOTIONS_READ`\n\n**User role permission required:** `campaigns_promotions: read`\n","operationId":"ViewBusinessProfilePromotionsDiff","parameters":[{"$ref":"#/components/parameters/promotions-queryLimit"},{"$ref":"#/components/parameters/promotions-queryPage"},{"$ref":"#/components/parameters/promotions-queryStoreCatalog"},{"$ref":"#/components/parameters/promotions-queryStoreIds"},{"$ref":"#/components/parameters/promotions-queryTarget"},{"$ref":"#/components/parameters/promotions-queryIncludeMeta"},{"$ref":"#/components/parameters/promotions-queryPromotionPresentOnly"},{"$ref":"#/components/parameters/promotions-queryVisibilityStatus"},{"in":"query","name":"upsertTimestamp","description":"Defines the date since which the differences are shown. If not defined, defaults to infinity.","schema":{"type":"string","format":"date-time"}},{"$ref":"#/components/parameters/promotions-queryOrderFieldName"},{"$ref":"#/components/parameters/promotions-queryOrder"},{"$ref":"#/components/parameters/promotions-queryQuery"}],"responses":{"200":{"description":"An array of promotions. If a promotion was deleted, the `deletedAt` field is included","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/promotions-promotionDataResponse"},"description":"An array of promotions"},"meta":{"$ref":"#/components/schemas/promotions-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/ViewBusinessProfilePromotionsDiff"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/diff-list');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'limit' => '100',\n  'page' => '4',\n  'storeCatalog' => 'SOME_STRING_VALUE',\n  'storeIds' => 'SOME_STRING_VALUE',\n  'target' => 'SOME_ARRAY_VALUE',\n  'includeMeta' => 'false',\n  'presentOnly' => 'true',\n  'visibilityStatus' => 'SOME_ARRAY_VALUE',\n  'upsertTimestamp' => 'SOME_STRING_VALUE',\n  'orderFieldName' => 'SOME_STRING_VALUE',\n  'order' => 'SOME_STRING_VALUE',\n  'query' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/diff-list?limit=100&page=4&storeCatalog=SOME_STRING_VALUE&storeIds=SOME_STRING_VALUE&target=SOME_ARRAY_VALUE&includeMeta=false&presentOnly=true&visibilityStatus=SOME_ARRAY_VALUE&upsertTimestamp=SOME_STRING_VALUE&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/promotion/get-for-client/{identifierType}/{identifierValue}":{"get":{"tags":["Promotions"],"summary":"Get a Profile's promotions as Workspace","description":"**Deprecated.** Use [/v2/promotion/get-for-client/{identifierType}/{identifierValue}](#operation/GetAllClientPromotionsV2) instead.\n\nA Workspace can retrieve a list of all promotions assigned to a Profile.\n\n**IMPORTANT**:\n- As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.\n- The endpoint does not support redemption limits per client for Multi-buy promotions (promotions with redeemQuantityPerActivation greater than 1). For redemption limits, please use [/v2/promotion/get-for-client/{identifierType}/{identifierValue}](#operation/GetAllClientPromotionsV2).\n- The endpoint is limited to 25000 requests per minute (per workspace).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_LIST_PROMOTIONS_READ`\n\n**User role permission required:** `campaigns_promotions: read`\n","operationId":"GetAllClientPromotions","parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"},{"$ref":"#/components/parameters/promotions-queryPromotionSort"},{"name":"status","in":"query","description":"Filter by promotion status. If not provided, defaults to ACTIVE. If status is not provided and no promotions are active, the response is an empty array.","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["ACTIVE","ASSIGNED","REDEEMED"],"default":"ACTIVE"}}},{"$ref":"#/components/parameters/promotions-queryTagNames"},{"$ref":"#/components/parameters/promotions-queryTarget"},{"$ref":"#/components/parameters/promotions-queryPromotionType"},{"$ref":"#/components/parameters/promotions-queryPromotionPresentOnly"},{"$ref":"#/components/parameters/promotions-queryLastingOnly"},{"$ref":"#/components/parameters/promotions-queryPromotionDisplayableOnly"},{"$ref":"#/components/parameters/promotions-queryLimit"},{"$ref":"#/components/parameters/promotions-queryPage"},{"$ref":"#/components/parameters/promotions-queryIncludeMeta"},{"$ref":"#/components/parameters/promotions-queryIncludeVouchers"},{"$ref":"#/components/parameters/promotions-queryStoreIds"}],"responses":{"200":{"description":"An array of promotions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"},"description":"An array of promotions"},"meta":{"$ref":"#/components/schemas/promotions-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"$ref":"#/components/responses/promotions-ClientNotFoundError"}},"deprecated":true,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/GetAllClientPromotions"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'sort' => 'requireRedeemedPoints,desc',\n  'status' => 'SOME_ARRAY_VALUE',\n  'tagNames' => 'SOME_ARRAY_VALUE',\n  'target' => 'SOME_ARRAY_VALUE',\n  'type' => 'SOME_ARRAY_VALUE',\n  'presentOnly' => 'true',\n  'lastingOnly' => 'true',\n  'displayableOnly' => 'true',\n  'limit' => '100',\n  'page' => '4',\n  'includeMeta' => 'false',\n  'includeVouchers' => 'false',\n  'storeIds' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&status=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&displayableOnly=true&limit=100&page=4&includeMeta=false&includeVouchers=false&storeIds=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/promotion/get-for-client-possible-to-redeem/{identifierType}/{identifierValue}":{"get":{"tags":["Promotions"],"summary":"Get redeemable promotions of a Profile","description":"Retrieve all redeemable promotions related to a Profile.\n\n**IMPORTANT**: \n- As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.\n- The endpoint is limited to 25000 requests per minute (per workspace).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_REDEEM_PROMOTIONS_READ`\n\n**User role permission required:** `campaigns_promotions: read`\n","operationId":"GetRedeemablePromotions","parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"},{"$ref":"#/components/parameters/promotions-queryPromotionSort"},{"$ref":"#/components/parameters/promotions-queryPromotionPresentOnly"},{"$ref":"#/components/parameters/promotions-queryLastingOnly"},{"$ref":"#/components/parameters/promotions-queryPromotionDisplayableOnly"},{"$ref":"#/components/parameters/promotions-queryPromotionStatus"},{"$ref":"#/components/parameters/promotions-queryPromotionType"},{"$ref":"#/components/parameters/promotions-queryStatusByType"},{"$ref":"#/components/parameters/promotions-queryTargetByType"},{"$ref":"#/components/parameters/promotions-queryIncludeMeta"},{"$ref":"#/components/parameters/promotions-queryPage"},{"$ref":"#/components/parameters/promotions-queryLimit"},{"$ref":"#/components/parameters/promotions-queryTarget"},{"$ref":"#/components/parameters/promotions-queryStoreIds"}],"responses":{"200":{"description":"An array of promotions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/promotions-promotionClientPossibleToRedeemResponse"}},"meta":{"$ref":"#/components/schemas/promotions-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/GetRedeemablePromotions"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'sort' => 'requireRedeemedPoints,desc',\n  'presentOnly' => 'true',\n  'lastingOnly' => 'true',\n  'displayableOnly' => 'true',\n  'status' => 'SOME_ARRAY_VALUE',\n  'type' => 'SOME_ARRAY_VALUE',\n  'statusByType' => '[CUSTOM]=ACTIVE',\n  'targetByType' => '[SEGMENT]=ACTIVE',\n  'includeMeta' => 'false',\n  'page' => '4',\n  'limit' => '100',\n  'target' => 'SOME_ARRAY_VALUE',\n  'storeIds' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/get-for-client-possible-to-redeem/email/%7BidentifierValue%7D?sort=requireRedeemedPoints%2Cdesc&presentOnly=true&lastingOnly=true&displayableOnly=true&status=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&statusByType=%5BCUSTOM%5D%3DACTIVE&targetByType=%5BSEGMENT%5D%3DACTIVE&includeMeta=false&page=4&limit=100&target=SOME_ARRAY_VALUE&storeIds=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/promotion/{identifierType}/{identifierValue}":{"get":{"tags":["Promotions"],"summary":"Get promotion details as Workspace","description":"Retrieve the details of a promotion by its code.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_DETAILS_FOR_PROFILE_PROMOTIONS_READ`\n\n**User role permission required:** `campaigns_promotions: read`\n","operationId":"GetPromotionDetailsAsBusinessProfile","parameters":[{"$ref":"#/components/parameters/promotions-pathPromoIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"}],"responses":{"200":{"description":"Details of a promotion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-Viewpromotiondetails-HTTP200"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Object not found"}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/GetPromotionDetailsAsBusinessProfile"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Promotions"],"summary":"Update a promotion","description":"You can update an existing promotion. Include only the fields that you want to change. Inserting a null value overwrites an existing value.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_DETAILS_FOR_PROFILE_PROMOTIONS_UPDATE`\n\n**User role permission required:** `campaigns_promotions: update`\n","operationId":"UpdateAPromotion","parameters":[{"$ref":"#/components/parameters/promotions-pathPromoIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionDataCreate"}}},"required":true},"responses":{"200":{"description":"Promotion updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionCreateUpdateDeleteRes"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/UpdateAPromotion"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"steps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"excludeCatalogFilterQuery\":\"brand==acme\",\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"visibilityStatus\\\":\\\"DRAFT\\\",\\\"type\\\":\\\"MEMBERS_ONLY\\\",\\\"redeemLimitPerClient\\\":0,\\\"redeemQuantityPerActivation\\\":8388607,\\\"redeemLimitGlobal\\\":0,\\\"redeemType\\\":\\\"FULL\\\",\\\"details\\\":{\\\"discountType\\\":{\\\"name\\\":\\\"BOGO\\\",\\\"outerScope\\\":true,\\\"requiredItemsCount\\\":2,\\\"requiredItems\\\":{\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\"},\\\"discountedItemsCount\\\":1},\\\"cashbackSettings\\\":{\\\"exchangeRate\\\":0.0001,\\\"limits\\\":{\\\"minPoints\\\":10,\\\"maxPoints\\\":1000,\\\"maxTransactionAmount\\\":20,\\\"maxTransactionPercentage\\\":50}}},\\\"discountType\\\":\\\"PERCENT\\\",\\\"discountValue\\\":0,\\\"discountMode\\\":\\\"STATIC\\\",\\\"discountModeDetails\\\":{\\\"steps\\\":[{\\\"discountValue\\\":0,\\\"usageThreshold\\\":0}],\\\"discountUsageTrigger\\\":\\\"TRANSACTION\\\"},\\\"preDiscountValue\\\":0,\\\"requireRedeemedPoints\\\":0,\\\"headerName\\\":\\\"string\\\",\\\"headerDescription\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"headline\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"images\\\":[{\\\"url\\\":\\\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\\\",\\\"type\\\":\\\"image\\\"}],\\\"tags\\\":[{\\\"hash\\\":\\\"6f54671d-157f-4c4e-a577-11fac3111293\\\"}],\\\"startAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"expireAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"displayFrom\\\":\\\"string\\\",\\\"displayTo\\\":\\\"string\\\",\\\"lastingTime\\\":0,\\\"params\\\":{},\\\"itemScope\\\":\\\"LINE_ITEM\\\",\\\"minBasketValue\\\":null,\\\"maxBasketValue\\\":null,\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\",\\\"excludeCatalog\\\":[\\\"311\\\"],\\\"excludeCatalogItemType\\\":\\\"SELECTED\\\",\\\"excludeCatalogIndexItems\\\":[\\\"29727276\\\"],\\\"excludeCatalogFilterIds\\\":[],\\\"excludeCatalogFilterQuery\\\":\\\"brand==acme\\\",\\\"activationLimitGlobalType\\\":\\\"RELATIVE\\\",\\\"activationLimitGlobalLimit\\\":1,\\\"activationLimitGlobalRelativeMinutes\\\":null,\\\"storeCatalog\\\":\\\"string\\\",\\\"storeItemType\\\":\\\"ALL\\\",\\\"storeIds\\\":[\\\"string\\\"],\\\"targetType\\\":\\\"ALL\\\",\\\"targetSegment\\\":[\\\"string\\\"],\\\"price\\\":0,\\\"priority\\\":250,\\\"voucherPool\\\":{\\\"enabled\\\":false,\\\"uuid\\\":\\\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\\\",\\\"transferable\\\":false},\\\"importHash\\\":\\\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"visibilityStatus\": \"DRAFT\",\n  \"type\": \"MEMBERS_ONLY\",\n  \"redeemLimitPerClient\": 0,\n  \"redeemQuantityPerActivation\": 8388607,\n  \"redeemLimitGlobal\": 0,\n  \"redeemType\": \"FULL\",\n  \"details\": {\n    \"discountType\": {\n      \"name\": \"BOGO\",\n      \"outerScope\": true,\n      \"requiredItemsCount\": 2,\n      \"requiredItems\": {\n        \"catalog\": \"221\",\n        \"catalogItemType\": \"FILTERED\",\n        \"catalogIndexItems\": [],\n        \"catalogFilterIds\": [\n          \"f978b20f-7156-40ed-99c2-3af62b76af12\"\n        ],\n        \"catalogFilterQuery\": \"color==green;price=lt=100\"\n      },\n      \"discountedItemsCount\": 1\n    },\n    \"cashbackSettings\": {\n      \"exchangeRate\": 0.0001,\n      \"limits\": {\n        \"minPoints\": 10,\n        \"maxPoints\": 1000,\n        \"maxTransactionAmount\": 20,\n        \"maxTransactionPercentage\": 50\n      }\n    }\n  },\n  \"discountType\": \"PERCENT\",\n  \"discountValue\": 0,\n  \"discountMode\": \"STATIC\",\n  \"discountModeDetails\": {\n    \"steps\": [\n      {\n        \"discountValue\": 0,\n        \"usageThreshold\": 0\n      }\n    ],\n    \"discountUsageTrigger\": \"TRANSACTION\"\n  },\n  \"preDiscountValue\": 0,\n  \"requireRedeemedPoints\": 0,\n  \"headerName\": \"string\",\n  \"headerDescription\": \"string\",\n  \"name\": \"string\",\n  \"headline\": \"string\",\n  \"description\": \"string\",\n  \"images\": [\n    {\n      \"url\": \"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\n      \"type\": \"image\"\n    }\n  ],\n  \"tags\": [\n    {\n      \"hash\": \"6f54671d-157f-4c4e-a577-11fac3111293\"\n    }\n  ],\n  \"startAt\": \"2019-08-24T14:15:22Z\",\n  \"expireAt\": \"2019-08-24T14:15:22Z\",\n  \"displayFrom\": \"string\",\n  \"displayTo\": \"string\",\n  \"lastingTime\": 0,\n  \"params\": {},\n  \"itemScope\": \"LINE_ITEM\",\n  \"minBasketValue\": null,\n  \"maxBasketValue\": null,\n  \"catalog\": \"221\",\n  \"catalogItemType\": \"FILTERED\",\n  \"catalogIndexItems\": [],\n  \"catalogFilterIds\": [\n    \"f978b20f-7156-40ed-99c2-3af62b76af12\"\n  ],\n  \"catalogFilterQuery\": \"color==green;price=lt=100\",\n  \"excludeCatalog\": [\n    \"311\"\n  ],\n  \"excludeCatalogItemType\": \"SELECTED\",\n  \"excludeCatalogIndexItems\": [\n    \"29727276\"\n  ],\n  \"excludeCatalogFilterIds\": [],\n  \"excludeCatalogFilterQuery\": \"brand==acme\",\n  \"activationLimitGlobalType\": \"RELATIVE\",\n  \"activationLimitGlobalLimit\": 1,\n  \"activationLimitGlobalRelativeMinutes\": null,\n  \"storeCatalog\": \"string\",\n  \"storeItemType\": \"ALL\",\n  \"storeIds\": [\n    \"string\"\n  ],\n  \"targetType\": \"ALL\",\n  \"targetSegment\": [\n    \"string\"\n  ],\n  \"price\": 0,\n  \"priority\": 250,\n  \"voucherPool\": {\n    \"enabled\": false,\n    \"uuid\": \"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\n    \"transferable\": false\n  },\n  \"importHash\": \"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  visibilityStatus: 'DRAFT',\n  type: 'MEMBERS_ONLY',\n  redeemLimitPerClient: 0,\n  redeemQuantityPerActivation: 8388607,\n  redeemLimitGlobal: 0,\n  redeemType: 'FULL',\n  details: {\n    discountType: {\n      name: 'BOGO',\n      outerScope: true,\n      requiredItemsCount: 2,\n      requiredItems: {\n        catalog: '221',\n        catalogItemType: 'FILTERED',\n        catalogIndexItems: [],\n        catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12'],\n        catalogFilterQuery: 'color==green;price=lt=100'\n      },\n      discountedItemsCount: 1\n    },\n    cashbackSettings: {\n      exchangeRate: 0.0001,\n      limits: {\n        minPoints: 10,\n        maxPoints: 1000,\n        maxTransactionAmount: 20,\n        maxTransactionPercentage: 50\n      }\n    }\n  },\n  discountType: 'PERCENT',\n  discountValue: 0,\n  discountMode: 'STATIC',\n  discountModeDetails: {\n    steps: [{discountValue: 0, usageThreshold: 0}],\n    discountUsageTrigger: 'TRANSACTION'\n  },\n  preDiscountValue: 0,\n  requireRedeemedPoints: 0,\n  headerName: 'string',\n  headerDescription: 'string',\n  name: 'string',\n  headline: 'string',\n  description: 'string',\n  images: [\n    {\n      url: 'https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png',\n      type: 'image'\n    }\n  ],\n  tags: [{hash: '6f54671d-157f-4c4e-a577-11fac3111293'}],\n  startAt: '2019-08-24T14:15:22Z',\n  expireAt: '2019-08-24T14:15:22Z',\n  displayFrom: 'string',\n  displayTo: 'string',\n  lastingTime: 0,\n  params: {},\n  itemScope: 'LINE_ITEM',\n  minBasketValue: null,\n  maxBasketValue: null,\n  catalog: '221',\n  catalogItemType: 'FILTERED',\n  catalogIndexItems: [],\n  catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12'],\n  catalogFilterQuery: 'color==green;price=lt=100',\n  excludeCatalog: ['311'],\n  excludeCatalogItemType: 'SELECTED',\n  excludeCatalogIndexItems: ['29727276'],\n  excludeCatalogFilterIds: [],\n  excludeCatalogFilterQuery: 'brand==acme',\n  activationLimitGlobalType: 'RELATIVE',\n  activationLimitGlobalLimit: 1,\n  activationLimitGlobalRelativeMinutes: null,\n  storeCatalog: 'string',\n  storeItemType: 'ALL',\n  storeIds: ['string'],\n  targetType: 'ALL',\n  targetSegment: ['string'],\n  price: 0,\n  priority: 250,\n  voucherPool: {\n    enabled: false,\n    uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',\n    transferable: false\n  },\n  importHash: 'ced8a4ad-6d6e-48ca-a663-3fb07e6216a9'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"steps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"excludeCatalogFilterQuery\":\"brand==acme\",\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/v4/promotions/promotion/%7BidentifierType%7D/%7BidentifierValue%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"visibilityStatus\\\":\\\"DRAFT\\\",\\\"type\\\":\\\"MEMBERS_ONLY\\\",\\\"redeemLimitPerClient\\\":0,\\\"redeemQuantityPerActivation\\\":8388607,\\\"redeemLimitGlobal\\\":0,\\\"redeemType\\\":\\\"FULL\\\",\\\"details\\\":{\\\"discountType\\\":{\\\"name\\\":\\\"BOGO\\\",\\\"outerScope\\\":true,\\\"requiredItemsCount\\\":2,\\\"requiredItems\\\":{\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\"},\\\"discountedItemsCount\\\":1},\\\"cashbackSettings\\\":{\\\"exchangeRate\\\":0.0001,\\\"limits\\\":{\\\"minPoints\\\":10,\\\"maxPoints\\\":1000,\\\"maxTransactionAmount\\\":20,\\\"maxTransactionPercentage\\\":50}}},\\\"discountType\\\":\\\"PERCENT\\\",\\\"discountValue\\\":0,\\\"discountMode\\\":\\\"STATIC\\\",\\\"discountModeDetails\\\":{\\\"steps\\\":[{\\\"discountValue\\\":0,\\\"usageThreshold\\\":0}],\\\"discountUsageTrigger\\\":\\\"TRANSACTION\\\"},\\\"preDiscountValue\\\":0,\\\"requireRedeemedPoints\\\":0,\\\"headerName\\\":\\\"string\\\",\\\"headerDescription\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"headline\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"images\\\":[{\\\"url\\\":\\\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\\\",\\\"type\\\":\\\"image\\\"}],\\\"tags\\\":[{\\\"hash\\\":\\\"6f54671d-157f-4c4e-a577-11fac3111293\\\"}],\\\"startAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"expireAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"displayFrom\\\":\\\"string\\\",\\\"displayTo\\\":\\\"string\\\",\\\"lastingTime\\\":0,\\\"params\\\":{},\\\"itemScope\\\":\\\"LINE_ITEM\\\",\\\"minBasketValue\\\":null,\\\"maxBasketValue\\\":null,\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\",\\\"excludeCatalog\\\":[\\\"311\\\"],\\\"excludeCatalogItemType\\\":\\\"SELECTED\\\",\\\"excludeCatalogIndexItems\\\":[\\\"29727276\\\"],\\\"excludeCatalogFilterIds\\\":[],\\\"excludeCatalogFilterQuery\\\":\\\"brand==acme\\\",\\\"activationLimitGlobalType\\\":\\\"RELATIVE\\\",\\\"activationLimitGlobalLimit\\\":1,\\\"activationLimitGlobalRelativeMinutes\\\":null,\\\"storeCatalog\\\":\\\"string\\\",\\\"storeItemType\\\":\\\"ALL\\\",\\\"storeIds\\\":[\\\"string\\\"],\\\"targetType\\\":\\\"ALL\\\",\\\"targetSegment\\\":[\\\"string\\\"],\\\"price\\\":0,\\\"priority\\\":250,\\\"voucherPool\\\":{\\\"enabled\\\":false,\\\"uuid\\\":\\\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\\\",\\\"transferable\\\":false},\\\"importHash\\\":\\\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\\\"}\")\n  .asString();"}]}},"/v4/promotions/promotion/get-for-client-by-custom-settings/{identifierType}/{identifierValue}":{"get":{"tags":["Promotions"],"summary":"Get Profile promotions by a custom filter","description":"Retrieve a list of promotions related to a Profile by a custom,\npre-defined filter.\n\nThe filter is maintained by your backend administrator.\n\n**IMPORTANT**: \n- As a result of this request, the `targetSegments` of all the matching promotions are checked. If this results in checking more than 30 unique segments, any segments above this limit may be ignored.\n- The endpoint is limited to 25000 requests per minute (per workspace).\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_GET_FOR_CLIENT_BY_CUSTOM_SETTINGS_PROMOTIONS_READ`\n\n**User role permission required:** `campaigns_promotions: read`\n","operationId":"GetClientPromotionsByACustomFilter","parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"},{"$ref":"#/components/parameters/promotions-queryPage"},{"$ref":"#/components/parameters/promotions-queryLimit"},{"$ref":"#/components/parameters/promotions-queryLockIdentifier"}],"responses":{"200":{"description":"An array of promotions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"},"description":"An array of promotions"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"409":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/GetClientPromotionsByACustomFilter"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => '4',\n  'limit' => '100',\n  'lockIdentifier' => '6561d87b-2697-46ad-8f9a-0550736b86e3'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/get-for-client-by-custom-settings/email/%7BidentifierValue%7D?page=4&limit=100&lockIdentifier=6561d87b-2697-46ad-8f9a-0550736b86e3\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/promotion/activate-for-client/{identifierType}/{identifierValue}":{"post":{"tags":["Promotions"],"summary":"Activate a promotion as Workspace","description":"You can change the status of a Profile's promotion from `assigned` to `active`, the promotion can now be applied to a purchase.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_ACTIVATE_PROMOTIONS_UPDATE`\n\n**User role permission required:** `campaigns_promotions: update`\n","operationId":"ActivateAPromotionAsProfile","parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionActivation"}}},"required":true},"responses":{"200":{"description":"Promotion activated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Promotion for profile not found"}}}},"409":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"},"412":{"$ref":"#/components/responses/promotions-PromotionActivate412"},"422":{"$ref":"#/components/responses/promotions-PromotionActivate422"},"423":{"$ref":"#/components/responses/promotions-ProfilePromotionsBlockedError"},"500":{"$ref":"#/components/responses/promotions-500"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/ActivateAPromotionAsProfile"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"key\": \"code\",\n  \"value\": \"7893467834GG\",\n  \"pointsToUse\": 100\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({key: 'code', value: '7893467834GG', pointsToUse: 100}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion/activate-for-client/email/%7BidentifierValue%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}\")\n  .asString();"}]}},"/v4/promotions/promotion/batch-activate-for-client/{identifierType}/{identifierValue}":{"post":{"tags":["Promotions"],"summary":"Batch activate promotions as Workspace","description":"You can change the status of a number of Profile's promotions promotion from `assigned` to `active`, the promotion can now be applied to a purchase.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_BATCH_ACTIVATE_PROMOTIONS_UPDATE`\n\n**User role permission required:** `campaigns_promotions: update`\n","operationId":"BatchActivateAsProfile","parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"array","minItems":1,"maxItems":200,"items":{"$ref":"#/components/schemas/promotions-promotionActivation"}}}},"required":true},"responses":{"200":{"description":"Promotions activated","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Promotions for profile not found"}}}},"409":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"},"412":{"$ref":"#/components/responses/promotions-PromotionActivate412"},"500":{"$ref":"#/components/responses/promotions-500"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchActivateAsProfile"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  {\n    \"key\": \"code\",\n    \"value\": \"7893467834GG\",\n    \"pointsToUse\": 100\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([{key: 'code', value: '7893467834GG', pointsToUse: 100}]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion/batch-activate-for-client/email/%7BidentifierValue%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}]\")\n  .asString();"}]}},"/v4/promotions/promotion/deactivate-for-client/{identifierType}/{identifierValue}":{"post":{"tags":["Promotions"],"summary":"Deactivate a promotion as Workspace","description":"You can change the status of a Profile's activated promotion back to `assigned`.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_DEACTIVATE_PROMOTIONS_UPDATE`\n\n**User role permission required:** `campaigns_promotions: update`\n","operationId":"DeactivateAPromotionProfile","parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionActivation"}}},"required":true},"responses":{"200":{"description":"Promotion deactivated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Promotion for profile not found"}}}},"429":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/DeactivateAPromotionProfile"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"key\": \"code\",\n  \"value\": \"7893467834GG\",\n  \"pointsToUse\": 100\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({key: 'code', value: '7893467834GG', pointsToUse: 100}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion/deactivate-for-client/email/%7BidentifierValue%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}\")\n  .asString();"}]}},"/v4/promotions/promotion/batch-deactivate-for-client/{identifierType}/{identifierValue}":{"post":{"tags":["Promotions"],"summary":"Batch deactivate promotions","description":"You can change the status of a number of Profile's activated promotions back to `assigned`.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_BATCH_DEACTIVATE_PROMOTIONS_UPDATE`\n\n**User role permission required:** `campaigns_promotions: update`\n","operationId":"BatchDeactivateAsProfile","parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"array","minItems":1,"maxItems":200,"items":{"$ref":"#/components/schemas/promotions-promotionActivation"}}}},"required":true},"responses":{"200":{"description":"Promotions deactivated","content":{"application/json":{"schema":{"type":"object","example":"{}"},"example":"{}"}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Promotions for profile not found"}}}},"429":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchDeactivateAsProfile"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  {\n    \"key\": \"code\",\n    \"value\": \"7893467834GG\",\n    \"pointsToUse\": 100\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([{key: 'code', value: '7893467834GG', pointsToUse: 100}]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion/batch-deactivate-for-client/email/%7BidentifierValue%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}]\")\n  .asString();"}]}},"/v4/promotions/promotion":{"post":{"tags":["Promotions"],"summary":"Create a promotion","description":"You can create a new promotion in the Synerise application.\n\n\nIf you don't enter a code or UUID, they are generated automatically.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_PROMOTIONS_CREATE`\n\n**User role permission required:** `campaigns_promotions: create`\n","operationId":"CreateAPromotion","requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionDataCreate"}}},"required":true},"responses":{"201":{"description":"Promotion created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionCreateUpdateDeleteRes"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/CreateAPromotion"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/promotion \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"steps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"excludeCatalogFilterQuery\":\"brand==acme\",\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"visibilityStatus\\\":\\\"DRAFT\\\",\\\"type\\\":\\\"MEMBERS_ONLY\\\",\\\"redeemLimitPerClient\\\":0,\\\"redeemQuantityPerActivation\\\":8388607,\\\"redeemLimitGlobal\\\":0,\\\"redeemType\\\":\\\"FULL\\\",\\\"details\\\":{\\\"discountType\\\":{\\\"name\\\":\\\"BOGO\\\",\\\"outerScope\\\":true,\\\"requiredItemsCount\\\":2,\\\"requiredItems\\\":{\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\"},\\\"discountedItemsCount\\\":1},\\\"cashbackSettings\\\":{\\\"exchangeRate\\\":0.0001,\\\"limits\\\":{\\\"minPoints\\\":10,\\\"maxPoints\\\":1000,\\\"maxTransactionAmount\\\":20,\\\"maxTransactionPercentage\\\":50}}},\\\"discountType\\\":\\\"PERCENT\\\",\\\"discountValue\\\":0,\\\"discountMode\\\":\\\"STATIC\\\",\\\"discountModeDetails\\\":{\\\"steps\\\":[{\\\"discountValue\\\":0,\\\"usageThreshold\\\":0}],\\\"discountUsageTrigger\\\":\\\"TRANSACTION\\\"},\\\"preDiscountValue\\\":0,\\\"requireRedeemedPoints\\\":0,\\\"headerName\\\":\\\"string\\\",\\\"headerDescription\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"headline\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"images\\\":[{\\\"url\\\":\\\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\\\",\\\"type\\\":\\\"image\\\"}],\\\"tags\\\":[{\\\"hash\\\":\\\"6f54671d-157f-4c4e-a577-11fac3111293\\\"}],\\\"startAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"expireAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"displayFrom\\\":\\\"string\\\",\\\"displayTo\\\":\\\"string\\\",\\\"lastingTime\\\":0,\\\"params\\\":{},\\\"itemScope\\\":\\\"LINE_ITEM\\\",\\\"minBasketValue\\\":null,\\\"maxBasketValue\\\":null,\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\",\\\"excludeCatalog\\\":[\\\"311\\\"],\\\"excludeCatalogItemType\\\":\\\"SELECTED\\\",\\\"excludeCatalogIndexItems\\\":[\\\"29727276\\\"],\\\"excludeCatalogFilterIds\\\":[],\\\"excludeCatalogFilterQuery\\\":\\\"brand==acme\\\",\\\"activationLimitGlobalType\\\":\\\"RELATIVE\\\",\\\"activationLimitGlobalLimit\\\":1,\\\"activationLimitGlobalRelativeMinutes\\\":null,\\\"storeCatalog\\\":\\\"string\\\",\\\"storeItemType\\\":\\\"ALL\\\",\\\"storeIds\\\":[\\\"string\\\"],\\\"targetType\\\":\\\"ALL\\\",\\\"targetSegment\\\":[\\\"string\\\"],\\\"price\\\":0,\\\"priority\\\":250,\\\"voucherPool\\\":{\\\"enabled\\\":false,\\\"uuid\\\":\\\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\\\",\\\"transferable\\\":false},\\\"importHash\\\":\\\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/promotion\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"visibilityStatus\": \"DRAFT\",\n  \"type\": \"MEMBERS_ONLY\",\n  \"redeemLimitPerClient\": 0,\n  \"redeemQuantityPerActivation\": 8388607,\n  \"redeemLimitGlobal\": 0,\n  \"redeemType\": \"FULL\",\n  \"details\": {\n    \"discountType\": {\n      \"name\": \"BOGO\",\n      \"outerScope\": true,\n      \"requiredItemsCount\": 2,\n      \"requiredItems\": {\n        \"catalog\": \"221\",\n        \"catalogItemType\": \"FILTERED\",\n        \"catalogIndexItems\": [],\n        \"catalogFilterIds\": [\n          \"f978b20f-7156-40ed-99c2-3af62b76af12\"\n        ],\n        \"catalogFilterQuery\": \"color==green;price=lt=100\"\n      },\n      \"discountedItemsCount\": 1\n    },\n    \"cashbackSettings\": {\n      \"exchangeRate\": 0.0001,\n      \"limits\": {\n        \"minPoints\": 10,\n        \"maxPoints\": 1000,\n        \"maxTransactionAmount\": 20,\n        \"maxTransactionPercentage\": 50\n      }\n    }\n  },\n  \"discountType\": \"PERCENT\",\n  \"discountValue\": 0,\n  \"discountMode\": \"STATIC\",\n  \"discountModeDetails\": {\n    \"steps\": [\n      {\n        \"discountValue\": 0,\n        \"usageThreshold\": 0\n      }\n    ],\n    \"discountUsageTrigger\": \"TRANSACTION\"\n  },\n  \"preDiscountValue\": 0,\n  \"requireRedeemedPoints\": 0,\n  \"headerName\": \"string\",\n  \"headerDescription\": \"string\",\n  \"name\": \"string\",\n  \"headline\": \"string\",\n  \"description\": \"string\",\n  \"images\": [\n    {\n      \"url\": \"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\n      \"type\": \"image\"\n    }\n  ],\n  \"tags\": [\n    {\n      \"hash\": \"6f54671d-157f-4c4e-a577-11fac3111293\"\n    }\n  ],\n  \"startAt\": \"2019-08-24T14:15:22Z\",\n  \"expireAt\": \"2019-08-24T14:15:22Z\",\n  \"displayFrom\": \"string\",\n  \"displayTo\": \"string\",\n  \"lastingTime\": 0,\n  \"params\": {},\n  \"itemScope\": \"LINE_ITEM\",\n  \"minBasketValue\": null,\n  \"maxBasketValue\": null,\n  \"catalog\": \"221\",\n  \"catalogItemType\": \"FILTERED\",\n  \"catalogIndexItems\": [],\n  \"catalogFilterIds\": [\n    \"f978b20f-7156-40ed-99c2-3af62b76af12\"\n  ],\n  \"catalogFilterQuery\": \"color==green;price=lt=100\",\n  \"excludeCatalog\": [\n    \"311\"\n  ],\n  \"excludeCatalogItemType\": \"SELECTED\",\n  \"excludeCatalogIndexItems\": [\n    \"29727276\"\n  ],\n  \"excludeCatalogFilterIds\": [],\n  \"excludeCatalogFilterQuery\": \"brand==acme\",\n  \"activationLimitGlobalType\": \"RELATIVE\",\n  \"activationLimitGlobalLimit\": 1,\n  \"activationLimitGlobalRelativeMinutes\": null,\n  \"storeCatalog\": \"string\",\n  \"storeItemType\": \"ALL\",\n  \"storeIds\": [\n    \"string\"\n  ],\n  \"targetType\": \"ALL\",\n  \"targetSegment\": [\n    \"string\"\n  ],\n  \"price\": 0,\n  \"priority\": 250,\n  \"voucherPool\": {\n    \"enabled\": false,\n    \"uuid\": \"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\n    \"transferable\": false\n  },\n  \"importHash\": \"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  visibilityStatus: 'DRAFT',\n  type: 'MEMBERS_ONLY',\n  redeemLimitPerClient: 0,\n  redeemQuantityPerActivation: 8388607,\n  redeemLimitGlobal: 0,\n  redeemType: 'FULL',\n  details: {\n    discountType: {\n      name: 'BOGO',\n      outerScope: true,\n      requiredItemsCount: 2,\n      requiredItems: {\n        catalog: '221',\n        catalogItemType: 'FILTERED',\n        catalogIndexItems: [],\n        catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12'],\n        catalogFilterQuery: 'color==green;price=lt=100'\n      },\n      discountedItemsCount: 1\n    },\n    cashbackSettings: {\n      exchangeRate: 0.0001,\n      limits: {\n        minPoints: 10,\n        maxPoints: 1000,\n        maxTransactionAmount: 20,\n        maxTransactionPercentage: 50\n      }\n    }\n  },\n  discountType: 'PERCENT',\n  discountValue: 0,\n  discountMode: 'STATIC',\n  discountModeDetails: {\n    steps: [{discountValue: 0, usageThreshold: 0}],\n    discountUsageTrigger: 'TRANSACTION'\n  },\n  preDiscountValue: 0,\n  requireRedeemedPoints: 0,\n  headerName: 'string',\n  headerDescription: 'string',\n  name: 'string',\n  headline: 'string',\n  description: 'string',\n  images: [\n    {\n      url: 'https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png',\n      type: 'image'\n    }\n  ],\n  tags: [{hash: '6f54671d-157f-4c4e-a577-11fac3111293'}],\n  startAt: '2019-08-24T14:15:22Z',\n  expireAt: '2019-08-24T14:15:22Z',\n  displayFrom: 'string',\n  displayTo: 'string',\n  lastingTime: 0,\n  params: {},\n  itemScope: 'LINE_ITEM',\n  minBasketValue: null,\n  maxBasketValue: null,\n  catalog: '221',\n  catalogItemType: 'FILTERED',\n  catalogIndexItems: [],\n  catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12'],\n  catalogFilterQuery: 'color==green;price=lt=100',\n  excludeCatalog: ['311'],\n  excludeCatalogItemType: 'SELECTED',\n  excludeCatalogIndexItems: ['29727276'],\n  excludeCatalogFilterIds: [],\n  excludeCatalogFilterQuery: 'brand==acme',\n  activationLimitGlobalType: 'RELATIVE',\n  activationLimitGlobalLimit: 1,\n  activationLimitGlobalRelativeMinutes: null,\n  storeCatalog: 'string',\n  storeItemType: 'ALL',\n  storeIds: ['string'],\n  targetType: 'ALL',\n  targetSegment: ['string'],\n  price: 0,\n  priority: 250,\n  voucherPool: {\n    enabled: false,\n    uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',\n    transferable: false\n  },\n  importHash: 'ced8a4ad-6d6e-48ca-a663-3fb07e6216a9'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountType\":\"PERCENT\",\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"steps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"excludeCatalogFilterQuery\":\"brand==acme\",\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"visibilityStatus\\\":\\\"DRAFT\\\",\\\"type\\\":\\\"MEMBERS_ONLY\\\",\\\"redeemLimitPerClient\\\":0,\\\"redeemQuantityPerActivation\\\":8388607,\\\"redeemLimitGlobal\\\":0,\\\"redeemType\\\":\\\"FULL\\\",\\\"details\\\":{\\\"discountType\\\":{\\\"name\\\":\\\"BOGO\\\",\\\"outerScope\\\":true,\\\"requiredItemsCount\\\":2,\\\"requiredItems\\\":{\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\"},\\\"discountedItemsCount\\\":1},\\\"cashbackSettings\\\":{\\\"exchangeRate\\\":0.0001,\\\"limits\\\":{\\\"minPoints\\\":10,\\\"maxPoints\\\":1000,\\\"maxTransactionAmount\\\":20,\\\"maxTransactionPercentage\\\":50}}},\\\"discountType\\\":\\\"PERCENT\\\",\\\"discountValue\\\":0,\\\"discountMode\\\":\\\"STATIC\\\",\\\"discountModeDetails\\\":{\\\"steps\\\":[{\\\"discountValue\\\":0,\\\"usageThreshold\\\":0}],\\\"discountUsageTrigger\\\":\\\"TRANSACTION\\\"},\\\"preDiscountValue\\\":0,\\\"requireRedeemedPoints\\\":0,\\\"headerName\\\":\\\"string\\\",\\\"headerDescription\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"headline\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"images\\\":[{\\\"url\\\":\\\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\\\",\\\"type\\\":\\\"image\\\"}],\\\"tags\\\":[{\\\"hash\\\":\\\"6f54671d-157f-4c4e-a577-11fac3111293\\\"}],\\\"startAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"expireAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"displayFrom\\\":\\\"string\\\",\\\"displayTo\\\":\\\"string\\\",\\\"lastingTime\\\":0,\\\"params\\\":{},\\\"itemScope\\\":\\\"LINE_ITEM\\\",\\\"minBasketValue\\\":null,\\\"maxBasketValue\\\":null,\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\",\\\"excludeCatalog\\\":[\\\"311\\\"],\\\"excludeCatalogItemType\\\":\\\"SELECTED\\\",\\\"excludeCatalogIndexItems\\\":[\\\"29727276\\\"],\\\"excludeCatalogFilterIds\\\":[],\\\"excludeCatalogFilterQuery\\\":\\\"brand==acme\\\",\\\"activationLimitGlobalType\\\":\\\"RELATIVE\\\",\\\"activationLimitGlobalLimit\\\":1,\\\"activationLimitGlobalRelativeMinutes\\\":null,\\\"storeCatalog\\\":\\\"string\\\",\\\"storeItemType\\\":\\\"ALL\\\",\\\"storeIds\\\":[\\\"string\\\"],\\\"targetType\\\":\\\"ALL\\\",\\\"targetSegment\\\":[\\\"string\\\"],\\\"price\\\":0,\\\"priority\\\":250,\\\"voucherPool\\\":{\\\"enabled\\\":false,\\\"uuid\\\":\\\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\\\",\\\"transferable\\\":false},\\\"importHash\\\":\\\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\\\"}\")\n  .asString();"}]},"delete":{"tags":["Promotions"],"summary":"Delete a promotion","description":"This method is used to delete an existing promotion. It can be used by a backend business administrator.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_PROMOTIONS_DELETE`\n\n**User role permission required:** `campaigns_promotions: delete`\n","operationId":"DeleteAPromotion","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionDataDelete"},"example":{"value":"8f3457075b2769d039"}}},"required":true},"responses":{"200":{"description":"Promotion deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionCreateUpdateDeleteRes"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"$ref":"#/components/responses/promotions-Promotion404"},"409":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/DeleteAPromotion"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/v4/promotions/promotion \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"value\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"value\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"DELETE\", \"/v4/promotions/promotion\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"value\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/v4/promotions/promotion\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({value: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"value\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/v4/promotions/promotion\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"value\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/v4/promotions/promotion/create-or-update":{"post":{"tags":["Promotions"],"summary":"Create or update a promotion","description":"You can use this endpoint to create a new promotion or update an existing one that matches the UUID or promotion code that you send.\n\n\nWhen updating an existing promotion include only the fields that you want to change. Inserting a null value overwrites an existing value.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permissions required (at least one):** `PROMOTIONS_PROMOTIONS_CREATE`, `PROMOTIONS_PROMOTIONS_UPDATE`\n\n**User role permission required:** `campaigns_promotions: create`\n","operationId":"CreateOrUpdateAPromotion","requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionDataCreateOrUpdate"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/promotions-PromotionUpdated"},"201":{"$ref":"#/components/responses/promotions-PromotionCreated"},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/CreateOrUpdateAPromotion"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/promotion/create-or-update \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"uuid\":\"string\",\"code\":\"string\",\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"discountType\":\"PERCENT\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"steps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"excludeCatalogFilterQuery\":\"brand==acme\",\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"uuid\\\":\\\"string\\\",\\\"code\\\":\\\"string\\\",\\\"visibilityStatus\\\":\\\"DRAFT\\\",\\\"type\\\":\\\"MEMBERS_ONLY\\\",\\\"redeemLimitPerClient\\\":0,\\\"redeemQuantityPerActivation\\\":8388607,\\\"redeemLimitGlobal\\\":0,\\\"redeemType\\\":\\\"FULL\\\",\\\"discountType\\\":\\\"PERCENT\\\",\\\"details\\\":{\\\"discountType\\\":{\\\"name\\\":\\\"BOGO\\\",\\\"outerScope\\\":true,\\\"requiredItemsCount\\\":2,\\\"requiredItems\\\":{\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\"},\\\"discountedItemsCount\\\":1},\\\"cashbackSettings\\\":{\\\"exchangeRate\\\":0.0001,\\\"limits\\\":{\\\"minPoints\\\":10,\\\"maxPoints\\\":1000,\\\"maxTransactionAmount\\\":20,\\\"maxTransactionPercentage\\\":50}}},\\\"discountValue\\\":0,\\\"discountMode\\\":\\\"STATIC\\\",\\\"discountModeDetails\\\":{\\\"steps\\\":[{\\\"discountValue\\\":0,\\\"usageThreshold\\\":0}],\\\"discountUsageTrigger\\\":\\\"TRANSACTION\\\"},\\\"preDiscountValue\\\":0,\\\"requireRedeemedPoints\\\":0,\\\"headerName\\\":\\\"string\\\",\\\"headerDescription\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"headline\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"images\\\":[{\\\"url\\\":\\\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\\\",\\\"type\\\":\\\"image\\\"}],\\\"tags\\\":[{\\\"hash\\\":\\\"6f54671d-157f-4c4e-a577-11fac3111293\\\"}],\\\"startAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"expireAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"displayFrom\\\":\\\"string\\\",\\\"displayTo\\\":\\\"string\\\",\\\"lastingTime\\\":0,\\\"params\\\":{},\\\"itemScope\\\":\\\"LINE_ITEM\\\",\\\"minBasketValue\\\":null,\\\"maxBasketValue\\\":null,\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\",\\\"excludeCatalog\\\":[\\\"311\\\"],\\\"excludeCatalogItemType\\\":\\\"SELECTED\\\",\\\"excludeCatalogIndexItems\\\":[\\\"29727276\\\"],\\\"excludeCatalogFilterIds\\\":[],\\\"excludeCatalogFilterQuery\\\":\\\"brand==acme\\\",\\\"storeCatalog\\\":\\\"string\\\",\\\"storeItemType\\\":\\\"ALL\\\",\\\"storeIds\\\":[\\\"string\\\"],\\\"targetType\\\":\\\"ALL\\\",\\\"targetSegment\\\":[\\\"string\\\"],\\\"price\\\":0,\\\"priority\\\":250,\\\"voucherPool\\\":{\\\"enabled\\\":false,\\\"uuid\\\":\\\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\\\",\\\"transferable\\\":false},\\\"importHash\\\":\\\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/promotion/create-or-update\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"uuid\": \"string\",\n  \"code\": \"string\",\n  \"visibilityStatus\": \"DRAFT\",\n  \"type\": \"MEMBERS_ONLY\",\n  \"redeemLimitPerClient\": 0,\n  \"redeemQuantityPerActivation\": 8388607,\n  \"redeemLimitGlobal\": 0,\n  \"redeemType\": \"FULL\",\n  \"discountType\": \"PERCENT\",\n  \"details\": {\n    \"discountType\": {\n      \"name\": \"BOGO\",\n      \"outerScope\": true,\n      \"requiredItemsCount\": 2,\n      \"requiredItems\": {\n        \"catalog\": \"221\",\n        \"catalogItemType\": \"FILTERED\",\n        \"catalogIndexItems\": [],\n        \"catalogFilterIds\": [\n          \"f978b20f-7156-40ed-99c2-3af62b76af12\"\n        ],\n        \"catalogFilterQuery\": \"color==green;price=lt=100\"\n      },\n      \"discountedItemsCount\": 1\n    },\n    \"cashbackSettings\": {\n      \"exchangeRate\": 0.0001,\n      \"limits\": {\n        \"minPoints\": 10,\n        \"maxPoints\": 1000,\n        \"maxTransactionAmount\": 20,\n        \"maxTransactionPercentage\": 50\n      }\n    }\n  },\n  \"discountValue\": 0,\n  \"discountMode\": \"STATIC\",\n  \"discountModeDetails\": {\n    \"steps\": [\n      {\n        \"discountValue\": 0,\n        \"usageThreshold\": 0\n      }\n    ],\n    \"discountUsageTrigger\": \"TRANSACTION\"\n  },\n  \"preDiscountValue\": 0,\n  \"requireRedeemedPoints\": 0,\n  \"headerName\": \"string\",\n  \"headerDescription\": \"string\",\n  \"name\": \"string\",\n  \"headline\": \"string\",\n  \"description\": \"string\",\n  \"images\": [\n    {\n      \"url\": \"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\n      \"type\": \"image\"\n    }\n  ],\n  \"tags\": [\n    {\n      \"hash\": \"6f54671d-157f-4c4e-a577-11fac3111293\"\n    }\n  ],\n  \"startAt\": \"2019-08-24T14:15:22Z\",\n  \"expireAt\": \"2019-08-24T14:15:22Z\",\n  \"displayFrom\": \"string\",\n  \"displayTo\": \"string\",\n  \"lastingTime\": 0,\n  \"params\": {},\n  \"itemScope\": \"LINE_ITEM\",\n  \"minBasketValue\": null,\n  \"maxBasketValue\": null,\n  \"catalog\": \"221\",\n  \"catalogItemType\": \"FILTERED\",\n  \"catalogIndexItems\": [],\n  \"catalogFilterIds\": [\n    \"f978b20f-7156-40ed-99c2-3af62b76af12\"\n  ],\n  \"catalogFilterQuery\": \"color==green;price=lt=100\",\n  \"excludeCatalog\": [\n    \"311\"\n  ],\n  \"excludeCatalogItemType\": \"SELECTED\",\n  \"excludeCatalogIndexItems\": [\n    \"29727276\"\n  ],\n  \"excludeCatalogFilterIds\": [],\n  \"excludeCatalogFilterQuery\": \"brand==acme\",\n  \"storeCatalog\": \"string\",\n  \"storeItemType\": \"ALL\",\n  \"storeIds\": [\n    \"string\"\n  ],\n  \"targetType\": \"ALL\",\n  \"targetSegment\": [\n    \"string\"\n  ],\n  \"price\": 0,\n  \"priority\": 250,\n  \"voucherPool\": {\n    \"enabled\": false,\n    \"uuid\": \"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\n    \"transferable\": false\n  },\n  \"importHash\": \"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/promotion/create-or-update\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/create-or-update\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  uuid: 'string',\n  code: 'string',\n  visibilityStatus: 'DRAFT',\n  type: 'MEMBERS_ONLY',\n  redeemLimitPerClient: 0,\n  redeemQuantityPerActivation: 8388607,\n  redeemLimitGlobal: 0,\n  redeemType: 'FULL',\n  discountType: 'PERCENT',\n  details: {\n    discountType: {\n      name: 'BOGO',\n      outerScope: true,\n      requiredItemsCount: 2,\n      requiredItems: {\n        catalog: '221',\n        catalogItemType: 'FILTERED',\n        catalogIndexItems: [],\n        catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12'],\n        catalogFilterQuery: 'color==green;price=lt=100'\n      },\n      discountedItemsCount: 1\n    },\n    cashbackSettings: {\n      exchangeRate: 0.0001,\n      limits: {\n        minPoints: 10,\n        maxPoints: 1000,\n        maxTransactionAmount: 20,\n        maxTransactionPercentage: 50\n      }\n    }\n  },\n  discountValue: 0,\n  discountMode: 'STATIC',\n  discountModeDetails: {\n    steps: [{discountValue: 0, usageThreshold: 0}],\n    discountUsageTrigger: 'TRANSACTION'\n  },\n  preDiscountValue: 0,\n  requireRedeemedPoints: 0,\n  headerName: 'string',\n  headerDescription: 'string',\n  name: 'string',\n  headline: 'string',\n  description: 'string',\n  images: [\n    {\n      url: 'https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png',\n      type: 'image'\n    }\n  ],\n  tags: [{hash: '6f54671d-157f-4c4e-a577-11fac3111293'}],\n  startAt: '2019-08-24T14:15:22Z',\n  expireAt: '2019-08-24T14:15:22Z',\n  displayFrom: 'string',\n  displayTo: 'string',\n  lastingTime: 0,\n  params: {},\n  itemScope: 'LINE_ITEM',\n  minBasketValue: null,\n  maxBasketValue: null,\n  catalog: '221',\n  catalogItemType: 'FILTERED',\n  catalogIndexItems: [],\n  catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12'],\n  catalogFilterQuery: 'color==green;price=lt=100',\n  excludeCatalog: ['311'],\n  excludeCatalogItemType: 'SELECTED',\n  excludeCatalogIndexItems: ['29727276'],\n  excludeCatalogFilterIds: [],\n  excludeCatalogFilterQuery: 'brand==acme',\n  storeCatalog: 'string',\n  storeItemType: 'ALL',\n  storeIds: ['string'],\n  targetType: 'ALL',\n  targetSegment: ['string'],\n  price: 0,\n  priority: 250,\n  voucherPool: {\n    enabled: false,\n    uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',\n    transferable: false\n  },\n  importHash: 'ced8a4ad-6d6e-48ca-a663-3fb07e6216a9'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/create-or-update');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"uuid\":\"string\",\"code\":\"string\",\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"discountType\":\"PERCENT\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"steps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":[\"311\"],\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"29727276\"],\"excludeCatalogFilterIds\":[],\"excludeCatalogFilterQuery\":\"brand==acme\",\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false},\"importHash\":\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/promotion/create-or-update\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"uuid\\\":\\\"string\\\",\\\"code\\\":\\\"string\\\",\\\"visibilityStatus\\\":\\\"DRAFT\\\",\\\"type\\\":\\\"MEMBERS_ONLY\\\",\\\"redeemLimitPerClient\\\":0,\\\"redeemQuantityPerActivation\\\":8388607,\\\"redeemLimitGlobal\\\":0,\\\"redeemType\\\":\\\"FULL\\\",\\\"discountType\\\":\\\"PERCENT\\\",\\\"details\\\":{\\\"discountType\\\":{\\\"name\\\":\\\"BOGO\\\",\\\"outerScope\\\":true,\\\"requiredItemsCount\\\":2,\\\"requiredItems\\\":{\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\"},\\\"discountedItemsCount\\\":1},\\\"cashbackSettings\\\":{\\\"exchangeRate\\\":0.0001,\\\"limits\\\":{\\\"minPoints\\\":10,\\\"maxPoints\\\":1000,\\\"maxTransactionAmount\\\":20,\\\"maxTransactionPercentage\\\":50}}},\\\"discountValue\\\":0,\\\"discountMode\\\":\\\"STATIC\\\",\\\"discountModeDetails\\\":{\\\"steps\\\":[{\\\"discountValue\\\":0,\\\"usageThreshold\\\":0}],\\\"discountUsageTrigger\\\":\\\"TRANSACTION\\\"},\\\"preDiscountValue\\\":0,\\\"requireRedeemedPoints\\\":0,\\\"headerName\\\":\\\"string\\\",\\\"headerDescription\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"headline\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"images\\\":[{\\\"url\\\":\\\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\\\",\\\"type\\\":\\\"image\\\"}],\\\"tags\\\":[{\\\"hash\\\":\\\"6f54671d-157f-4c4e-a577-11fac3111293\\\"}],\\\"startAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"expireAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"displayFrom\\\":\\\"string\\\",\\\"displayTo\\\":\\\"string\\\",\\\"lastingTime\\\":0,\\\"params\\\":{},\\\"itemScope\\\":\\\"LINE_ITEM\\\",\\\"minBasketValue\\\":null,\\\"maxBasketValue\\\":null,\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\",\\\"excludeCatalog\\\":[\\\"311\\\"],\\\"excludeCatalogItemType\\\":\\\"SELECTED\\\",\\\"excludeCatalogIndexItems\\\":[\\\"29727276\\\"],\\\"excludeCatalogFilterIds\\\":[],\\\"excludeCatalogFilterQuery\\\":\\\"brand==acme\\\",\\\"storeCatalog\\\":\\\"string\\\",\\\"storeItemType\\\":\\\"ALL\\\",\\\"storeIds\\\":[\\\"string\\\"],\\\"targetType\\\":\\\"ALL\\\",\\\"targetSegment\\\":[\\\"string\\\"],\\\"price\\\":0,\\\"priority\\\":250,\\\"voucherPool\\\":{\\\"enabled\\\":false,\\\"uuid\\\":\\\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\\\",\\\"transferable\\\":false},\\\"importHash\\\":\\\"ced8a4ad-6d6e-48ca-a663-3fb07e6216a9\\\"}\")\n  .asString();"}]}},"/v4/promotions/promotion/locking/check-client":{"get":{"tags":["Promotion locks"],"summary":"Check account lock","description":"You can check if a Profile account is locked due to processing of batch promotion/voucher activations or deactivations.\n\n\nYou must be logged in as the Profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n","operationId":"CheckAccountLock","responses":{"200":{"description":"Information about Profile lock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-HTTP200withMessage"},"example":{"message":"Profile is unlocked and ready for traffic"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/CheckAccountLock"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/promotions/promotion/locking/check-client \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/locking/check-client\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/locking/check-client\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/locking/check-client\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/locking/check-client');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/locking/check-client\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/voucher/batch-redeem":{"post":{"tags":["Promotions"],"summary":"Batch redeem vouchers","description":"You can redeem up to 100 vouchers.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**User role permission required:** `campaigns_promotions: create`\n","operationId":"BatchRedeemVouchers","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-RedeemVouchersRequest"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/promotions-VouchersRedeemedResponse"},"207":{"$ref":"#/components/responses/promotions-VouchersRedeemedResponseWithErrors"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchRedeemVouchers"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/voucher/batch-redeem \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"voucherKey\":\"code\",\"voucherValue\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"options\":{\"quantity\":1,\"sourceId\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\"orderId\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\"lockIdentifier\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\"}}]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[{\\\"voucherKey\\\":\\\"code\\\",\\\"voucherValue\\\":\\\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\\\",\\\"options\\\":{\\\"quantity\\\":1,\\\"sourceId\\\":\\\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\\\",\\\"orderId\\\":\\\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\\\",\\\"lockIdentifier\\\":\\\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\\\"}}]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/voucher/batch-redeem\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  {\n    \"voucherKey\": \"code\",\n    \"voucherValue\": \"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\n    \"options\": {\n      \"quantity\": 1,\n      \"sourceId\": \"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\n      \"orderId\": \"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\n      \"lockIdentifier\": \"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\"\n    }\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/voucher/batch-redeem\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/voucher/batch-redeem\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([\n  {\n    voucherKey: 'code',\n    voucherValue: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9',\n    options: {\n      quantity: 1,\n      sourceId: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1',\n      orderId: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1',\n      lockIdentifier: '75d9090f-06ac-46a2-a0ce-4b8eb287efb9'\n    }\n  }\n]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/voucher/batch-redeem');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[{\"voucherKey\":\"code\",\"voucherValue\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\",\"options\":{\"quantity\":1,\"sourceId\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\"orderId\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\",\"lockIdentifier\":\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\"}}]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/voucher/batch-redeem\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[{\\\"voucherKey\\\":\\\"code\\\",\\\"voucherValue\\\":\\\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\\\",\\\"options\\\":{\\\"quantity\\\":1,\\\"sourceId\\\":\\\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\\\",\\\"orderId\\\":\\\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1\\\",\\\"lockIdentifier\\\":\\\"75d9090f-06ac-46a2-a0ce-4b8eb287efb9\\\"}}]\")\n  .asString();"}]}},"/v4/promotions/voucher/batch-redeem-for-profile":{"post":{"tags":["Promotions"],"summary":"Batch redeem vouchers for profiles","description":"You can redeem up to 100 vouchers.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_BATCH_REDEEM_VOUCHERS_PROMOTIONS_CREATE`\n\n**User role permission required:** `campaigns_promotions: create`\n","operationId":"BatchRedeemVouchersForProfile","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-RedeemVouchersForProfileRequest"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/promotions-VouchersRedeemedResponse"},"207":{"$ref":"#/components/responses/promotions-VouchersRedeemedResponseWithErrors"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchRedeemVouchersForProfile"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/voucher/batch-redeem-for-profile \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"profileKey\":\"clientId\",\"profileValue\":\"434428563\",\"voucherKey\":\"code\",\"voucherValue\":\"434428563\",\"options\":{\"quantity\":2,\"sourceId\":\"3f0a1670-eb63-43f1-a6b8-895a74621964-3\",\"orderId\":\"3f0a1670-eb63-43f1-a6b8-895a74621964\"}}]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[{\\\"profileKey\\\":\\\"clientId\\\",\\\"profileValue\\\":\\\"434428563\\\",\\\"voucherKey\\\":\\\"code\\\",\\\"voucherValue\\\":\\\"434428563\\\",\\\"options\\\":{\\\"quantity\\\":2,\\\"sourceId\\\":\\\"3f0a1670-eb63-43f1-a6b8-895a74621964-3\\\",\\\"orderId\\\":\\\"3f0a1670-eb63-43f1-a6b8-895a74621964\\\"}}]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/voucher/batch-redeem-for-profile\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  {\n    \"profileKey\": \"clientId\",\n    \"profileValue\": \"434428563\",\n    \"voucherKey\": \"code\",\n    \"voucherValue\": \"434428563\",\n    \"options\": {\n      \"quantity\": 2,\n      \"sourceId\": \"3f0a1670-eb63-43f1-a6b8-895a74621964-3\",\n      \"orderId\": \"3f0a1670-eb63-43f1-a6b8-895a74621964\"\n    }\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/voucher/batch-redeem-for-profile\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/voucher/batch-redeem-for-profile\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify([\n  {\n    profileKey: 'clientId',\n    profileValue: '434428563',\n    voucherKey: 'code',\n    voucherValue: '434428563',\n    options: {\n      quantity: 2,\n      sourceId: '3f0a1670-eb63-43f1-a6b8-895a74621964-3',\n      orderId: '3f0a1670-eb63-43f1-a6b8-895a74621964'\n    }\n  }\n]));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/voucher/batch-redeem-for-profile');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[{\"profileKey\":\"clientId\",\"profileValue\":\"434428563\",\"voucherKey\":\"code\",\"voucherValue\":\"434428563\",\"options\":{\"quantity\":2,\"sourceId\":\"3f0a1670-eb63-43f1-a6b8-895a74621964-3\",\"orderId\":\"3f0a1670-eb63-43f1-a6b8-895a74621964\"}}]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/voucher/batch-redeem-for-profile\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[{\\\"profileKey\\\":\\\"clientId\\\",\\\"profileValue\\\":\\\"434428563\\\",\\\"voucherKey\\\":\\\"code\\\",\\\"voucherValue\\\":\\\"434428563\\\",\\\"options\\\":{\\\"quantity\\\":2,\\\"sourceId\\\":\\\"3f0a1670-eb63-43f1-a6b8-895a74621964-3\\\",\\\"orderId\\\":\\\"3f0a1670-eb63-43f1-a6b8-895a74621964\\\"}}]\")\n  .asString();"}]}},"/v4/promotions/v2/promotion/batch":{"post":{"tags":["Promotions"],"summary":"Batch import promotions","description":"Submit a batch of promotions for asynchronous import (upsert). Items are validated individually and queued for processing. Returns 202 if all items are valid, or 207 if some fail validation.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_IMPORT_PROMOTIONS_CREATE`\n\n**User role permission required:** `campaigns_promotions: create`\n","operationId":"BatchImportPromotions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionImportBatchRequest"}}},"required":true},"responses":{"202":{"description":"All items accepted for processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionImportBatchAcceptedResponse"}}}},"207":{"$ref":"#/components/responses/promotions-PromotionImportBatchPartialError"},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchImportPromotions"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/v2/promotion/batch \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"data\":[{\"uuid\":\"string\",\"code\":\"string\",\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"autoRedeem\":true,\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"discountType\":\"PERCENT\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"steps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"metric\":\"string\",\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"string\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[\"string\"],\"catalogFilterIds\":[\"string\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":\"string\",\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"string\"],\"excludeCatalogFilterIds\":[\"string\"],\"excludeCatalogFilterQuery\":\"brand==acme\",\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false}}],\"extra\":{\"importHash\":\"string\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"data\\\":[{\\\"uuid\\\":\\\"string\\\",\\\"code\\\":\\\"string\\\",\\\"visibilityStatus\\\":\\\"DRAFT\\\",\\\"type\\\":\\\"MEMBERS_ONLY\\\",\\\"redeemLimitPerClient\\\":0,\\\"redeemQuantityPerActivation\\\":8388607,\\\"redeemLimitGlobal\\\":0,\\\"redeemType\\\":\\\"FULL\\\",\\\"autoRedeem\\\":true,\\\"activationLimitGlobalType\\\":\\\"RELATIVE\\\",\\\"activationLimitGlobalLimit\\\":1,\\\"activationLimitGlobalRelativeMinutes\\\":null,\\\"discountType\\\":\\\"PERCENT\\\",\\\"details\\\":{\\\"discountType\\\":{\\\"name\\\":\\\"BOGO\\\",\\\"outerScope\\\":true,\\\"requiredItemsCount\\\":2,\\\"requiredItems\\\":{\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\"},\\\"discountedItemsCount\\\":1},\\\"cashbackSettings\\\":{\\\"exchangeRate\\\":0.0001,\\\"limits\\\":{\\\"minPoints\\\":10,\\\"maxPoints\\\":1000,\\\"maxTransactionAmount\\\":20,\\\"maxTransactionPercentage\\\":50}}},\\\"discountValue\\\":0,\\\"discountMode\\\":\\\"STATIC\\\",\\\"discountModeDetails\\\":{\\\"steps\\\":[{\\\"discountValue\\\":0,\\\"usageThreshold\\\":0}],\\\"discountUsageTrigger\\\":\\\"TRANSACTION\\\"},\\\"preDiscountValue\\\":0,\\\"requireRedeemedPoints\\\":0,\\\"headerName\\\":\\\"string\\\",\\\"headerDescription\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"headline\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"images\\\":[{\\\"url\\\":\\\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\\\",\\\"type\\\":\\\"image\\\"}],\\\"tags\\\":[{\\\"hash\\\":\\\"6f54671d-157f-4c4e-a577-11fac3111293\\\"}],\\\"metric\\\":\\\"string\\\",\\\"startAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"expireAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"displayFrom\\\":\\\"string\\\",\\\"displayTo\\\":\\\"string\\\",\\\"lastingTime\\\":0,\\\"params\\\":{},\\\"itemScope\\\":\\\"LINE_ITEM\\\",\\\"minBasketValue\\\":null,\\\"maxBasketValue\\\":null,\\\"catalog\\\":\\\"string\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[\\\"string\\\"],\\\"catalogFilterIds\\\":[\\\"string\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\",\\\"excludeCatalog\\\":\\\"string\\\",\\\"excludeCatalogItemType\\\":\\\"SELECTED\\\",\\\"excludeCatalogIndexItems\\\":[\\\"string\\\"],\\\"excludeCatalogFilterIds\\\":[\\\"string\\\"],\\\"excludeCatalogFilterQuery\\\":\\\"brand==acme\\\",\\\"storeCatalog\\\":\\\"string\\\",\\\"storeItemType\\\":\\\"ALL\\\",\\\"storeIds\\\":[\\\"string\\\"],\\\"targetType\\\":\\\"ALL\\\",\\\"targetSegment\\\":[\\\"string\\\"],\\\"price\\\":0,\\\"priority\\\":250,\\\"voucherPool\\\":{\\\"enabled\\\":false,\\\"uuid\\\":\\\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\\\",\\\"transferable\\\":false}}],\\\"extra\\\":{\\\"importHash\\\":\\\"string\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/v2/promotion/batch\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"data\": [\n    {\n      \"uuid\": \"string\",\n      \"code\": \"string\",\n      \"visibilityStatus\": \"DRAFT\",\n      \"type\": \"MEMBERS_ONLY\",\n      \"redeemLimitPerClient\": 0,\n      \"redeemQuantityPerActivation\": 8388607,\n      \"redeemLimitGlobal\": 0,\n      \"redeemType\": \"FULL\",\n      \"autoRedeem\": true,\n      \"activationLimitGlobalType\": \"RELATIVE\",\n      \"activationLimitGlobalLimit\": 1,\n      \"activationLimitGlobalRelativeMinutes\": null,\n      \"discountType\": \"PERCENT\",\n      \"details\": {\n        \"discountType\": {\n          \"name\": \"BOGO\",\n          \"outerScope\": true,\n          \"requiredItemsCount\": 2,\n          \"requiredItems\": {\n            \"catalog\": \"221\",\n            \"catalogItemType\": \"FILTERED\",\n            \"catalogIndexItems\": [],\n            \"catalogFilterIds\": [\n              \"f978b20f-7156-40ed-99c2-3af62b76af12\"\n            ],\n            \"catalogFilterQuery\": \"color==green;price=lt=100\"\n          },\n          \"discountedItemsCount\": 1\n        },\n        \"cashbackSettings\": {\n          \"exchangeRate\": 0.0001,\n          \"limits\": {\n            \"minPoints\": 10,\n            \"maxPoints\": 1000,\n            \"maxTransactionAmount\": 20,\n            \"maxTransactionPercentage\": 50\n          }\n        }\n      },\n      \"discountValue\": 0,\n      \"discountMode\": \"STATIC\",\n      \"discountModeDetails\": {\n        \"steps\": [\n          {\n            \"discountValue\": 0,\n            \"usageThreshold\": 0\n          }\n        ],\n        \"discountUsageTrigger\": \"TRANSACTION\"\n      },\n      \"preDiscountValue\": 0,\n      \"requireRedeemedPoints\": 0,\n      \"headerName\": \"string\",\n      \"headerDescription\": \"string\",\n      \"name\": \"string\",\n      \"headline\": \"string\",\n      \"description\": \"string\",\n      \"images\": [\n        {\n          \"url\": \"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\n          \"type\": \"image\"\n        }\n      ],\n      \"tags\": [\n        {\n          \"hash\": \"6f54671d-157f-4c4e-a577-11fac3111293\"\n        }\n      ],\n      \"metric\": \"string\",\n      \"startAt\": \"2019-08-24T14:15:22Z\",\n      \"expireAt\": \"2019-08-24T14:15:22Z\",\n      \"displayFrom\": \"string\",\n      \"displayTo\": \"string\",\n      \"lastingTime\": 0,\n      \"params\": {},\n      \"itemScope\": \"LINE_ITEM\",\n      \"minBasketValue\": null,\n      \"maxBasketValue\": null,\n      \"catalog\": \"string\",\n      \"catalogItemType\": \"FILTERED\",\n      \"catalogIndexItems\": [\n        \"string\"\n      ],\n      \"catalogFilterIds\": [\n        \"string\"\n      ],\n      \"catalogFilterQuery\": \"color==green;price=lt=100\",\n      \"excludeCatalog\": \"string\",\n      \"excludeCatalogItemType\": \"SELECTED\",\n      \"excludeCatalogIndexItems\": [\n        \"string\"\n      ],\n      \"excludeCatalogFilterIds\": [\n        \"string\"\n      ],\n      \"excludeCatalogFilterQuery\": \"brand==acme\",\n      \"storeCatalog\": \"string\",\n      \"storeItemType\": \"ALL\",\n      \"storeIds\": [\n        \"string\"\n      ],\n      \"targetType\": \"ALL\",\n      \"targetSegment\": [\n        \"string\"\n      ],\n      \"price\": 0,\n      \"priority\": 250,\n      \"voucherPool\": {\n        \"enabled\": false,\n        \"uuid\": \"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\n        \"transferable\": false\n      }\n    }\n  ],\n  \"extra\": {\n    \"importHash\": \"string\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/v2/promotion/batch\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/v2/promotion/batch\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  data: [\n    {\n      uuid: 'string',\n      code: 'string',\n      visibilityStatus: 'DRAFT',\n      type: 'MEMBERS_ONLY',\n      redeemLimitPerClient: 0,\n      redeemQuantityPerActivation: 8388607,\n      redeemLimitGlobal: 0,\n      redeemType: 'FULL',\n      autoRedeem: true,\n      activationLimitGlobalType: 'RELATIVE',\n      activationLimitGlobalLimit: 1,\n      activationLimitGlobalRelativeMinutes: null,\n      discountType: 'PERCENT',\n      details: {\n        discountType: {\n          name: 'BOGO',\n          outerScope: true,\n          requiredItemsCount: 2,\n          requiredItems: {\n            catalog: '221',\n            catalogItemType: 'FILTERED',\n            catalogIndexItems: [],\n            catalogFilterIds: ['f978b20f-7156-40ed-99c2-3af62b76af12'],\n            catalogFilterQuery: 'color==green;price=lt=100'\n          },\n          discountedItemsCount: 1\n        },\n        cashbackSettings: {\n          exchangeRate: 0.0001,\n          limits: {\n            minPoints: 10,\n            maxPoints: 1000,\n            maxTransactionAmount: 20,\n            maxTransactionPercentage: 50\n          }\n        }\n      },\n      discountValue: 0,\n      discountMode: 'STATIC',\n      discountModeDetails: {\n        steps: [{discountValue: 0, usageThreshold: 0}],\n        discountUsageTrigger: 'TRANSACTION'\n      },\n      preDiscountValue: 0,\n      requireRedeemedPoints: 0,\n      headerName: 'string',\n      headerDescription: 'string',\n      name: 'string',\n      headline: 'string',\n      description: 'string',\n      images: [\n        {\n          url: 'https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png',\n          type: 'image'\n        }\n      ],\n      tags: [{hash: '6f54671d-157f-4c4e-a577-11fac3111293'}],\n      metric: 'string',\n      startAt: '2019-08-24T14:15:22Z',\n      expireAt: '2019-08-24T14:15:22Z',\n      displayFrom: 'string',\n      displayTo: 'string',\n      lastingTime: 0,\n      params: {},\n      itemScope: 'LINE_ITEM',\n      minBasketValue: null,\n      maxBasketValue: null,\n      catalog: 'string',\n      catalogItemType: 'FILTERED',\n      catalogIndexItems: ['string'],\n      catalogFilterIds: ['string'],\n      catalogFilterQuery: 'color==green;price=lt=100',\n      excludeCatalog: 'string',\n      excludeCatalogItemType: 'SELECTED',\n      excludeCatalogIndexItems: ['string'],\n      excludeCatalogFilterIds: ['string'],\n      excludeCatalogFilterQuery: 'brand==acme',\n      storeCatalog: 'string',\n      storeItemType: 'ALL',\n      storeIds: ['string'],\n      targetType: 'ALL',\n      targetSegment: ['string'],\n      price: 0,\n      priority: 250,\n      voucherPool: {\n        enabled: false,\n        uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',\n        transferable: false\n      }\n    }\n  ],\n  extra: {importHash: 'string'}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/v2/promotion/batch');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"data\":[{\"uuid\":\"string\",\"code\":\"string\",\"visibilityStatus\":\"DRAFT\",\"type\":\"MEMBERS_ONLY\",\"redeemLimitPerClient\":0,\"redeemQuantityPerActivation\":8388607,\"redeemLimitGlobal\":0,\"redeemType\":\"FULL\",\"autoRedeem\":true,\"activationLimitGlobalType\":\"RELATIVE\",\"activationLimitGlobalLimit\":1,\"activationLimitGlobalRelativeMinutes\":null,\"discountType\":\"PERCENT\",\"details\":{\"discountType\":{\"name\":\"BOGO\",\"outerScope\":true,\"requiredItemsCount\":2,\"requiredItems\":{\"catalog\":\"221\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[],\"catalogFilterIds\":[\"f978b20f-7156-40ed-99c2-3af62b76af12\"],\"catalogFilterQuery\":\"color==green;price=lt=100\"},\"discountedItemsCount\":1},\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}},\"discountValue\":0,\"discountMode\":\"STATIC\",\"discountModeDetails\":{\"steps\":[{\"discountValue\":0,\"usageThreshold\":0}],\"discountUsageTrigger\":\"TRANSACTION\"},\"preDiscountValue\":0,\"requireRedeemedPoints\":0,\"headerName\":\"string\",\"headerDescription\":\"string\",\"name\":\"string\",\"headline\":\"string\",\"description\":\"string\",\"images\":[{\"url\":\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\",\"type\":\"image\"}],\"tags\":[{\"hash\":\"6f54671d-157f-4c4e-a577-11fac3111293\"}],\"metric\":\"string\",\"startAt\":\"2019-08-24T14:15:22Z\",\"expireAt\":\"2019-08-24T14:15:22Z\",\"displayFrom\":\"string\",\"displayTo\":\"string\",\"lastingTime\":0,\"params\":{},\"itemScope\":\"LINE_ITEM\",\"minBasketValue\":null,\"maxBasketValue\":null,\"catalog\":\"string\",\"catalogItemType\":\"FILTERED\",\"catalogIndexItems\":[\"string\"],\"catalogFilterIds\":[\"string\"],\"catalogFilterQuery\":\"color==green;price=lt=100\",\"excludeCatalog\":\"string\",\"excludeCatalogItemType\":\"SELECTED\",\"excludeCatalogIndexItems\":[\"string\"],\"excludeCatalogFilterIds\":[\"string\"],\"excludeCatalogFilterQuery\":\"brand==acme\",\"storeCatalog\":\"string\",\"storeItemType\":\"ALL\",\"storeIds\":[\"string\"],\"targetType\":\"ALL\",\"targetSegment\":[\"string\"],\"price\":0,\"priority\":250,\"voucherPool\":{\"enabled\":false,\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"transferable\":false}}],\"extra\":{\"importHash\":\"string\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/v2/promotion/batch\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"data\\\":[{\\\"uuid\\\":\\\"string\\\",\\\"code\\\":\\\"string\\\",\\\"visibilityStatus\\\":\\\"DRAFT\\\",\\\"type\\\":\\\"MEMBERS_ONLY\\\",\\\"redeemLimitPerClient\\\":0,\\\"redeemQuantityPerActivation\\\":8388607,\\\"redeemLimitGlobal\\\":0,\\\"redeemType\\\":\\\"FULL\\\",\\\"autoRedeem\\\":true,\\\"activationLimitGlobalType\\\":\\\"RELATIVE\\\",\\\"activationLimitGlobalLimit\\\":1,\\\"activationLimitGlobalRelativeMinutes\\\":null,\\\"discountType\\\":\\\"PERCENT\\\",\\\"details\\\":{\\\"discountType\\\":{\\\"name\\\":\\\"BOGO\\\",\\\"outerScope\\\":true,\\\"requiredItemsCount\\\":2,\\\"requiredItems\\\":{\\\"catalog\\\":\\\"221\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[],\\\"catalogFilterIds\\\":[\\\"f978b20f-7156-40ed-99c2-3af62b76af12\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\"},\\\"discountedItemsCount\\\":1},\\\"cashbackSettings\\\":{\\\"exchangeRate\\\":0.0001,\\\"limits\\\":{\\\"minPoints\\\":10,\\\"maxPoints\\\":1000,\\\"maxTransactionAmount\\\":20,\\\"maxTransactionPercentage\\\":50}}},\\\"discountValue\\\":0,\\\"discountMode\\\":\\\"STATIC\\\",\\\"discountModeDetails\\\":{\\\"steps\\\":[{\\\"discountValue\\\":0,\\\"usageThreshold\\\":0}],\\\"discountUsageTrigger\\\":\\\"TRANSACTION\\\"},\\\"preDiscountValue\\\":0,\\\"requireRedeemedPoints\\\":0,\\\"headerName\\\":\\\"string\\\",\\\"headerDescription\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"headline\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"images\\\":[{\\\"url\\\":\\\"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png\\\",\\\"type\\\":\\\"image\\\"}],\\\"tags\\\":[{\\\"hash\\\":\\\"6f54671d-157f-4c4e-a577-11fac3111293\\\"}],\\\"metric\\\":\\\"string\\\",\\\"startAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"expireAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"displayFrom\\\":\\\"string\\\",\\\"displayTo\\\":\\\"string\\\",\\\"lastingTime\\\":0,\\\"params\\\":{},\\\"itemScope\\\":\\\"LINE_ITEM\\\",\\\"minBasketValue\\\":null,\\\"maxBasketValue\\\":null,\\\"catalog\\\":\\\"string\\\",\\\"catalogItemType\\\":\\\"FILTERED\\\",\\\"catalogIndexItems\\\":[\\\"string\\\"],\\\"catalogFilterIds\\\":[\\\"string\\\"],\\\"catalogFilterQuery\\\":\\\"color==green;price=lt=100\\\",\\\"excludeCatalog\\\":\\\"string\\\",\\\"excludeCatalogItemType\\\":\\\"SELECTED\\\",\\\"excludeCatalogIndexItems\\\":[\\\"string\\\"],\\\"excludeCatalogFilterIds\\\":[\\\"string\\\"],\\\"excludeCatalogFilterQuery\\\":\\\"brand==acme\\\",\\\"storeCatalog\\\":\\\"string\\\",\\\"storeItemType\\\":\\\"ALL\\\",\\\"storeIds\\\":[\\\"string\\\"],\\\"targetType\\\":\\\"ALL\\\",\\\"targetSegment\\\":[\\\"string\\\"],\\\"price\\\":0,\\\"priority\\\":250,\\\"voucherPool\\\":{\\\"enabled\\\":false,\\\"uuid\\\":\\\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\\\",\\\"transferable\\\":false}}],\\\"extra\\\":{\\\"importHash\\\":\\\"string\\\"}}\")\n  .asString();"}]},"delete":{"tags":["Promotions"],"summary":"Batch delete promotions","description":"Submit a batch of promotion codes for asynchronous deletion. Items are validated individually and queued for processing . Returns 202 if all items are valid, or 207 if some fail validation.  \nThis method doesn't check if a promotion with the provide code exists.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_IMPORT_PROMOTIONS_DELETE`\n\n**User role permission required:** `campaigns_promotions: delete`\n","operationId":"BatchDeletePromotions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionDeleteBatchRequest"}}},"required":true},"responses":{"202":{"description":"All items accepted for processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionImportBatchDeleteAcceptedResponse"}}}},"207":{"$ref":"#/components/responses/promotions-PromotionImportBatchPartialError"},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/BatchDeletePromotions"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/v4/promotions/v2/promotion/batch \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"data\":[{\"code\":\"string\"}],\"extra\":{\"importHash\":\"string\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"data\\\":[{\\\"code\\\":\\\"string\\\"}],\\\"extra\\\":{\\\"importHash\\\":\\\"string\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"DELETE\", \"/v4/promotions/v2/promotion/batch\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"data\": [\n    {\n      \"code\": \"string\"\n    }\n  ],\n  \"extra\": {\n    \"importHash\": \"string\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/v4/promotions/v2/promotion/batch\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/v2/promotion/batch\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({data: [{code: 'string'}], extra: {importHash: 'string'}}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/v2/promotion/batch');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"data\":[{\"code\":\"string\"}],\"extra\":{\"importHash\":\"string\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/v4/promotions/v2/promotion/batch\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"data\\\":[{\\\"code\\\":\\\"string\\\"}],\\\"extra\\\":{\\\"importHash\\\":\\\"string\\\"}}\")\n  .asString();"}]}},"/v4/promotions/v2/sale/process-sale/{identifierType}/{identifierValue}":{"post":{"tags":["Promotions"],"summary":"Process basket","description":"Assign promotions to a basket and recalculate item values after discount.\n\nThis method DOES NOT redeem any promotions or create a transaction.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_SALE_PROMOTIONS_READ`\n\n**User role permission required:** `campaigns_promotions: read`\n","operationId":"processSale_POST","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-processSaleReq"}}}},"responses":{"200":{"description":"Basket processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-processSaleRes"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/processSale_POST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"promotionsToActivate\":[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"operationId\\\":0,\\\"clientDateTime\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"terminal\\\":{\\\"storeId\\\":\\\"string\\\",\\\"posId\\\":0},\\\"transactionMetric\\\":{\\\"posTransactionId\\\":0,\\\"beginDateTime\\\":null,\\\"globalTransactionId\\\":\\\"string\\\"},\\\"finalValue\\\":\\\"string\\\",\\\"transactionItems\\\":[{\\\"seqNo\\\":0,\\\"articleRef\\\":\\\"string\\\",\\\"quantity\\\":\\\"3.231\\\",\\\"evidPrice\\\":\\\"34.23\\\",\\\"finalPrice\\\":\\\"30.23\\\",\\\"finalValue\\\":\\\"123.23\\\"}],\\\"transactionAdditionalItems\\\":[{\\\"seqNo\\\":0,\\\"type\\\":\\\"COUPON\\\",\\\"code\\\":\\\"string\\\"}],\\\"promotionsToActivate\\\":[{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"operationId\": 0,\n  \"clientDateTime\": \"2019-08-24T14:15:22Z\",\n  \"terminal\": {\n    \"storeId\": \"string\",\n    \"posId\": 0\n  },\n  \"transactionMetric\": {\n    \"posTransactionId\": 0,\n    \"beginDateTime\": null,\n    \"globalTransactionId\": \"string\"\n  },\n  \"finalValue\": \"string\",\n  \"transactionItems\": [\n    {\n      \"seqNo\": 0,\n      \"articleRef\": \"string\",\n      \"quantity\": \"3.231\",\n      \"evidPrice\": \"34.23\",\n      \"finalPrice\": \"30.23\",\n      \"finalValue\": \"123.23\"\n    }\n  ],\n  \"transactionAdditionalItems\": [\n    {\n      \"seqNo\": 0,\n      \"type\": \"COUPON\",\n      \"code\": \"string\"\n    }\n  ],\n  \"promotionsToActivate\": [\n    {\n      \"key\": \"code\",\n      \"value\": \"7893467834GG\",\n      \"pointsToUse\": 100\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  operationId: 0,\n  clientDateTime: '2019-08-24T14:15:22Z',\n  terminal: {storeId: 'string', posId: 0},\n  transactionMetric: {posTransactionId: 0, beginDateTime: null, globalTransactionId: 'string'},\n  finalValue: 'string',\n  transactionItems: [\n    {\n      seqNo: 0,\n      articleRef: 'string',\n      quantity: '3.231',\n      evidPrice: '34.23',\n      finalPrice: '30.23',\n      finalValue: '123.23'\n    }\n  ],\n  transactionAdditionalItems: [{seqNo: 0, type: 'COUPON', code: 'string'}],\n  promotionsToActivate: [{key: 'code', value: '7893467834GG', pointsToUse: 100}]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"promotionsToActivate\":[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/v2/sale/process-sale/email/%7BidentifierValue%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"operationId\\\":0,\\\"clientDateTime\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"terminal\\\":{\\\"storeId\\\":\\\"string\\\",\\\"posId\\\":0},\\\"transactionMetric\\\":{\\\"posTransactionId\\\":0,\\\"beginDateTime\\\":null,\\\"globalTransactionId\\\":\\\"string\\\"},\\\"finalValue\\\":\\\"string\\\",\\\"transactionItems\\\":[{\\\"seqNo\\\":0,\\\"articleRef\\\":\\\"string\\\",\\\"quantity\\\":\\\"3.231\\\",\\\"evidPrice\\\":\\\"34.23\\\",\\\"finalPrice\\\":\\\"30.23\\\",\\\"finalValue\\\":\\\"123.23\\\"}],\\\"transactionAdditionalItems\\\":[{\\\"seqNo\\\":0,\\\"type\\\":\\\"COUPON\\\",\\\"code\\\":\\\"string\\\"}],\\\"promotionsToActivate\\\":[{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}]}\")\n  .asString();"}]}},"/v4/promotions/sale/process-checkout/{identifierType}/{identifierValue}":{"post":{"tags":["Promotions"],"summary":"Process checkout on POS","description":"Assign checkout handbill coupons for a profile, based on items in the basket and historical transactions.\n\nThis method DOES NOT redeem any promotions or create a transaction.\n\n**IMPORTANT**: When assigning handbill promotions, candidate promotions are bounded by configurable limits: at most 40,000 candidates are read per handbill slot (ordered by priority), and the total number of candidates sent to the recommendation (AI) engine in a single request is capped at 45,000. If the combined candidates across all slots exceed the AI request cap, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_SALE_PROMOTIONS_READ`\n\n**User role permission required:** `campaigns_promotions: read`\n","operationId":"processCheckout_POST","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-processCheckoutReq"}}}},"responses":{"200":{"description":"POS checkout processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-processCheckoutRes"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/processCheckout_POST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"operationId\\\":0,\\\"clientDateTime\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"terminal\\\":{\\\"storeId\\\":\\\"string\\\",\\\"posId\\\":0},\\\"transactionMetric\\\":{\\\"posTransactionId\\\":0,\\\"beginDateTime\\\":null,\\\"globalTransactionId\\\":\\\"string\\\"},\\\"finalValue\\\":\\\"string\\\",\\\"transactionItems\\\":[{\\\"seqNo\\\":0,\\\"articleRef\\\":\\\"string\\\",\\\"quantity\\\":\\\"3.231\\\",\\\"evidPrice\\\":\\\"34.23\\\",\\\"finalPrice\\\":\\\"30.23\\\",\\\"finalValue\\\":\\\"123.23\\\"}],\\\"transactionAdditionalItems\\\":[{\\\"seqNo\\\":0,\\\"type\\\":\\\"COUPON\\\",\\\"code\\\":\\\"string\\\"}],\\\"paymentsReport\\\":{\\\"paymentItems\\\":[{\\\"seqNo\\\":0,\\\"type\\\":0,\\\"name\\\":\\\"string\\\",\\\"amount\\\":\\\"string\\\",\\\"hashCode\\\":\\\"string\\\"}]}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"operationId\": 0,\n  \"clientDateTime\": \"2019-08-24T14:15:22Z\",\n  \"terminal\": {\n    \"storeId\": \"string\",\n    \"posId\": 0\n  },\n  \"transactionMetric\": {\n    \"posTransactionId\": 0,\n    \"beginDateTime\": null,\n    \"globalTransactionId\": \"string\"\n  },\n  \"finalValue\": \"string\",\n  \"transactionItems\": [\n    {\n      \"seqNo\": 0,\n      \"articleRef\": \"string\",\n      \"quantity\": \"3.231\",\n      \"evidPrice\": \"34.23\",\n      \"finalPrice\": \"30.23\",\n      \"finalValue\": \"123.23\"\n    }\n  ],\n  \"transactionAdditionalItems\": [\n    {\n      \"seqNo\": 0,\n      \"type\": \"COUPON\",\n      \"code\": \"string\"\n    }\n  ],\n  \"paymentsReport\": {\n    \"paymentItems\": [\n      {\n        \"seqNo\": 0,\n        \"type\": 0,\n        \"name\": \"string\",\n        \"amount\": \"string\",\n        \"hashCode\": \"string\"\n      }\n    ]\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  operationId: 0,\n  clientDateTime: '2019-08-24T14:15:22Z',\n  terminal: {storeId: 'string', posId: 0},\n  transactionMetric: {posTransactionId: 0, beginDateTime: null, globalTransactionId: 'string'},\n  finalValue: 'string',\n  transactionItems: [\n    {\n      seqNo: 0,\n      articleRef: 'string',\n      quantity: '3.231',\n      evidPrice: '34.23',\n      finalPrice: '30.23',\n      finalValue: '123.23'\n    }\n  ],\n  transactionAdditionalItems: [{seqNo: 0, type: 'COUPON', code: 'string'}],\n  paymentsReport: {\n    paymentItems: [{seqNo: 0, type: 0, name: 'string', amount: 'string', hashCode: 'string'}]\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/sale/process-checkout/email/%7BidentifierValue%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"operationId\\\":0,\\\"clientDateTime\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"terminal\\\":{\\\"storeId\\\":\\\"string\\\",\\\"posId\\\":0},\\\"transactionMetric\\\":{\\\"posTransactionId\\\":0,\\\"beginDateTime\\\":null,\\\"globalTransactionId\\\":\\\"string\\\"},\\\"finalValue\\\":\\\"string\\\",\\\"transactionItems\\\":[{\\\"seqNo\\\":0,\\\"articleRef\\\":\\\"string\\\",\\\"quantity\\\":\\\"3.231\\\",\\\"evidPrice\\\":\\\"34.23\\\",\\\"finalPrice\\\":\\\"30.23\\\",\\\"finalValue\\\":\\\"123.23\\\"}],\\\"transactionAdditionalItems\\\":[{\\\"seqNo\\\":0,\\\"type\\\":\\\"COUPON\\\",\\\"code\\\":\\\"string\\\"}],\\\"paymentsReport\\\":{\\\"paymentItems\\\":[{\\\"seqNo\\\":0,\\\"type\\\":0,\\\"name\\\":\\\"string\\\",\\\"amount\\\":\\\"string\\\",\\\"hashCode\\\":\\\"string\\\"}]}}\")\n  .asString();"}]}},"/v4/promotions/v2/sale/process-anonymous-sale":{"post":{"tags":["Promotions"],"summary":"Process anonymous Profile's basket","description":"Assign promotions to a basket and recalculate item values after discount.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_SALE_PROMOTIONS_READ`\n\n**User role permission required:** `campaigns_promotions: read`\n","operationId":"processAnonymousSale_POST","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-processSaleReq"}}}},"responses":{"200":{"description":"Basket processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-processSaleRes"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"428":{"$ref":"#/components/responses/promotions-ProcessSale428"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/processAnonymousSale_POST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/v2/sale/process-anonymous-sale \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"promotionsToActivate\":[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"operationId\\\":0,\\\"clientDateTime\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"terminal\\\":{\\\"storeId\\\":\\\"string\\\",\\\"posId\\\":0},\\\"transactionMetric\\\":{\\\"posTransactionId\\\":0,\\\"beginDateTime\\\":null,\\\"globalTransactionId\\\":\\\"string\\\"},\\\"finalValue\\\":\\\"string\\\",\\\"transactionItems\\\":[{\\\"seqNo\\\":0,\\\"articleRef\\\":\\\"string\\\",\\\"quantity\\\":\\\"3.231\\\",\\\"evidPrice\\\":\\\"34.23\\\",\\\"finalPrice\\\":\\\"30.23\\\",\\\"finalValue\\\":\\\"123.23\\\"}],\\\"transactionAdditionalItems\\\":[{\\\"seqNo\\\":0,\\\"type\\\":\\\"COUPON\\\",\\\"code\\\":\\\"string\\\"}],\\\"promotionsToActivate\\\":[{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/v2/sale/process-anonymous-sale\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"operationId\": 0,\n  \"clientDateTime\": \"2019-08-24T14:15:22Z\",\n  \"terminal\": {\n    \"storeId\": \"string\",\n    \"posId\": 0\n  },\n  \"transactionMetric\": {\n    \"posTransactionId\": 0,\n    \"beginDateTime\": null,\n    \"globalTransactionId\": \"string\"\n  },\n  \"finalValue\": \"string\",\n  \"transactionItems\": [\n    {\n      \"seqNo\": 0,\n      \"articleRef\": \"string\",\n      \"quantity\": \"3.231\",\n      \"evidPrice\": \"34.23\",\n      \"finalPrice\": \"30.23\",\n      \"finalValue\": \"123.23\"\n    }\n  ],\n  \"transactionAdditionalItems\": [\n    {\n      \"seqNo\": 0,\n      \"type\": \"COUPON\",\n      \"code\": \"string\"\n    }\n  ],\n  \"promotionsToActivate\": [\n    {\n      \"key\": \"code\",\n      \"value\": \"7893467834GG\",\n      \"pointsToUse\": 100\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/v2/sale/process-anonymous-sale\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/v2/sale/process-anonymous-sale\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  operationId: 0,\n  clientDateTime: '2019-08-24T14:15:22Z',\n  terminal: {storeId: 'string', posId: 0},\n  transactionMetric: {posTransactionId: 0, beginDateTime: null, globalTransactionId: 'string'},\n  finalValue: 'string',\n  transactionItems: [\n    {\n      seqNo: 0,\n      articleRef: 'string',\n      quantity: '3.231',\n      evidPrice: '34.23',\n      finalPrice: '30.23',\n      finalValue: '123.23'\n    }\n  ],\n  transactionAdditionalItems: [{seqNo: 0, type: 'COUPON', code: 'string'}],\n  promotionsToActivate: [{key: 'code', value: '7893467834GG', pointsToUse: 100}]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/v2/sale/process-anonymous-sale');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"promotionsToActivate\":[{\"key\":\"code\",\"value\":\"7893467834GG\",\"pointsToUse\":100}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/v2/sale/process-anonymous-sale\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"operationId\\\":0,\\\"clientDateTime\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"terminal\\\":{\\\"storeId\\\":\\\"string\\\",\\\"posId\\\":0},\\\"transactionMetric\\\":{\\\"posTransactionId\\\":0,\\\"beginDateTime\\\":null,\\\"globalTransactionId\\\":\\\"string\\\"},\\\"finalValue\\\":\\\"string\\\",\\\"transactionItems\\\":[{\\\"seqNo\\\":0,\\\"articleRef\\\":\\\"string\\\",\\\"quantity\\\":\\\"3.231\\\",\\\"evidPrice\\\":\\\"34.23\\\",\\\"finalPrice\\\":\\\"30.23\\\",\\\"finalValue\\\":\\\"123.23\\\"}],\\\"transactionAdditionalItems\\\":[{\\\"seqNo\\\":0,\\\"type\\\":\\\"COUPON\\\",\\\"code\\\":\\\"string\\\"}],\\\"promotionsToActivate\\\":[{\\\"key\\\":\\\"code\\\",\\\"value\\\":\\\"7893467834GG\\\",\\\"pointsToUse\\\":100}]}\")\n  .asString();"}]}},"/v4/promotions/sale/process-anonymous-checkout":{"post":{"tags":["Promotions"],"summary":"Process anonymous Profile's checkout on POS","description":"Assign checkout handbill coupons for anonymous profile, based on items in basket and historical transactions.\n\n**IMPORTANT**: When assigning handbill promotions, candidate promotions are bounded by configurable limits: at most 40,000 candidates are read per handbill slot (ordered by priority), and the total number of candidates sent to the recommendation (AI) engine in a single request is capped at 45,000. If the combined candidates across all slots exceed the AI request cap, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_SALE_PROMOTIONS_READ`\n\n**User role permission required:** `campaigns_promotions: read`\n","operationId":"processAnonymousCheckout_POST","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-processCheckoutReq"}}}},"responses":{"200":{"description":"POS checkout processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-processCheckoutRes"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions/operation/processAnonymousCheckout_POST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/sale/process-anonymous-checkout \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"operationId\\\":0,\\\"clientDateTime\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"terminal\\\":{\\\"storeId\\\":\\\"string\\\",\\\"posId\\\":0},\\\"transactionMetric\\\":{\\\"posTransactionId\\\":0,\\\"beginDateTime\\\":null,\\\"globalTransactionId\\\":\\\"string\\\"},\\\"finalValue\\\":\\\"string\\\",\\\"transactionItems\\\":[{\\\"seqNo\\\":0,\\\"articleRef\\\":\\\"string\\\",\\\"quantity\\\":\\\"3.231\\\",\\\"evidPrice\\\":\\\"34.23\\\",\\\"finalPrice\\\":\\\"30.23\\\",\\\"finalValue\\\":\\\"123.23\\\"}],\\\"transactionAdditionalItems\\\":[{\\\"seqNo\\\":0,\\\"type\\\":\\\"COUPON\\\",\\\"code\\\":\\\"string\\\"}],\\\"paymentsReport\\\":{\\\"paymentItems\\\":[{\\\"seqNo\\\":0,\\\"type\\\":0,\\\"name\\\":\\\"string\\\",\\\"amount\\\":\\\"string\\\",\\\"hashCode\\\":\\\"string\\\"}]}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/sale/process-anonymous-checkout\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"operationId\": 0,\n  \"clientDateTime\": \"2019-08-24T14:15:22Z\",\n  \"terminal\": {\n    \"storeId\": \"string\",\n    \"posId\": 0\n  },\n  \"transactionMetric\": {\n    \"posTransactionId\": 0,\n    \"beginDateTime\": null,\n    \"globalTransactionId\": \"string\"\n  },\n  \"finalValue\": \"string\",\n  \"transactionItems\": [\n    {\n      \"seqNo\": 0,\n      \"articleRef\": \"string\",\n      \"quantity\": \"3.231\",\n      \"evidPrice\": \"34.23\",\n      \"finalPrice\": \"30.23\",\n      \"finalValue\": \"123.23\"\n    }\n  ],\n  \"transactionAdditionalItems\": [\n    {\n      \"seqNo\": 0,\n      \"type\": \"COUPON\",\n      \"code\": \"string\"\n    }\n  ],\n  \"paymentsReport\": {\n    \"paymentItems\": [\n      {\n        \"seqNo\": 0,\n        \"type\": 0,\n        \"name\": \"string\",\n        \"amount\": \"string\",\n        \"hashCode\": \"string\"\n      }\n    ]\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/sale/process-anonymous-checkout\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/sale/process-anonymous-checkout\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  operationId: 0,\n  clientDateTime: '2019-08-24T14:15:22Z',\n  terminal: {storeId: 'string', posId: 0},\n  transactionMetric: {posTransactionId: 0, beginDateTime: null, globalTransactionId: 'string'},\n  finalValue: 'string',\n  transactionItems: [\n    {\n      seqNo: 0,\n      articleRef: 'string',\n      quantity: '3.231',\n      evidPrice: '34.23',\n      finalPrice: '30.23',\n      finalValue: '123.23'\n    }\n  ],\n  transactionAdditionalItems: [{seqNo: 0, type: 'COUPON', code: 'string'}],\n  paymentsReport: {\n    paymentItems: [{seqNo: 0, type: 0, name: 'string', amount: 'string', hashCode: 'string'}]\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/sale/process-anonymous-checkout');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"operationId\":0,\"clientDateTime\":\"2019-08-24T14:15:22Z\",\"terminal\":{\"storeId\":\"string\",\"posId\":0},\"transactionMetric\":{\"posTransactionId\":0,\"beginDateTime\":null,\"globalTransactionId\":\"string\"},\"finalValue\":\"string\",\"transactionItems\":[{\"seqNo\":0,\"articleRef\":\"string\",\"quantity\":\"3.231\",\"evidPrice\":\"34.23\",\"finalPrice\":\"30.23\",\"finalValue\":\"123.23\"}],\"transactionAdditionalItems\":[{\"seqNo\":0,\"type\":\"COUPON\",\"code\":\"string\"}],\"paymentsReport\":{\"paymentItems\":[{\"seqNo\":0,\"type\":0,\"name\":\"string\",\"amount\":\"string\",\"hashCode\":\"string\"}]}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/sale/process-anonymous-checkout\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"operationId\\\":0,\\\"clientDateTime\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"terminal\\\":{\\\"storeId\\\":\\\"string\\\",\\\"posId\\\":0},\\\"transactionMetric\\\":{\\\"posTransactionId\\\":0,\\\"beginDateTime\\\":null,\\\"globalTransactionId\\\":\\\"string\\\"},\\\"finalValue\\\":\\\"string\\\",\\\"transactionItems\\\":[{\\\"seqNo\\\":0,\\\"articleRef\\\":\\\"string\\\",\\\"quantity\\\":\\\"3.231\\\",\\\"evidPrice\\\":\\\"34.23\\\",\\\"finalPrice\\\":\\\"30.23\\\",\\\"finalValue\\\":\\\"123.23\\\"}],\\\"transactionAdditionalItems\\\":[{\\\"seqNo\\\":0,\\\"type\\\":\\\"COUPON\\\",\\\"code\\\":\\\"string\\\"}],\\\"paymentsReport\\\":{\\\"paymentItems\\\":[{\\\"seqNo\\\":0,\\\"type\\\":0,\\\"name\\\":\\\"string\\\",\\\"amount\\\":\\\"string\\\",\\\"hashCode\\\":\\\"string\\\"}]}}\")\n  .asString();"}]}},"/v4/promotions/handbill":{"get":{"tags":["Handbills"],"summary":"Get all handbill configurations","description":"Retrieve a list of all handbill configurations available in the current Workspace.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_HANDBILL_READ`\n\n**User role permission required:** `campaigns_personalised_promotions: read`\n","operationId":"getAllHandbillConfigs_GET","parameters":[{"$ref":"#/components/parameters/promotions-queryLimit"},{"$ref":"#/components/parameters/promotions-queryPage"},{"$ref":"#/components/parameters/promotions-queryHandbillSort"},{"$ref":"#/components/parameters/promotions-queryIncludeMeta"}],"responses":{"200":{"description":"List of handbill configurations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"List of handbill configurations with simplified information about variants","items":{"$ref":"#/components/schemas/promotions-handbillConfigWithSimplifiedVariants"}},"meta":{"$ref":"#/components/schemas/promotions-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Handbills/operation/getAllHandbillConfigs_GET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/handbill');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'limit' => '100',\n  'page' => '4',\n  'sort' => 'createdAt,desc',\n  'includeMeta' => 'false'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/handbill?limit=100&page=4&sort=createdAt%2Cdesc&includeMeta=false\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Handbills"],"summary":"Create handbill configuration","description":"Create a new handbill configuration for use in handbill-type promotions.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_HANDBILL_CREATE`\n\n**User role permission required:** `campaigns_personalised_promotions: create`\n","operationId":"createHandbillConfiguration_POST","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-handbillConfigCreateRequest"}}}},"responses":{"200":{"description":"Configuration created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/promotions-handbillConfig"},"message":{"type":"string","description":"Status of the operation"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"422":{"$ref":"#/components/responses/promotions-Validation422"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Handbills/operation/createHandbillConfiguration_POST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/handbill \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"channel\":\"MOBILE\",\"status\":\"DRAFT\",\"name\":\"string\",\"description\":\"string\",\"controlGroup\":{\"name\":\"string\",\"percentage\":100},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":100,\"ai\":{\"controlVariant\":true,\"varietyFactor\":0.5,\"varietyGroupSize\":1,\"redistributionFrequencyFactor\":0.5,\"popularityBoosting\":1},\"limits\":{\"limitPerDay\":6,\"limitExceptions\":[{\"dayOfWeek\":5,\"limitPerDay\":8}],\"limitsPerBasket\":[{\"basketSize\":12,\"basketValue\":30.5,\"condition\":\"AND\"}],\"limitExclusion\":[{\"catalogId\":22424,\"products\":[\"UGG-BB-PUR-06\"],\"filters\":[\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"]}]},\"activity\":{\"lastingType\":\"RELATIVE\",\"lasting\":{\"unit\":\"HOURS\",\"value\":24},\"cronWeekdays\":[0,1,6],\"cronTime\":\"12:34\",\"lastingAt\":\"2019-08-24T14:15:22Z\",\"timeExclusions\":{\"uuid\":\"6a177f3e-748f-44d4-ac30-a457a5199685\"}},\"printout\":{\"template\":\"|#{promotion.name};#{promotion.discountType == '\\''EXACT_PRICE'\\'' ? '\\''Price'\\'':'\\''Discount'\\''} #{promotion.discountValue} #{promotion.discountType == '\\''PERCENT'\\''? '\\''%'\\'' : '\\''USD'\\''};Valid for;#{moment.utc(coupon.createdAt).tz('\\''Europe/Warsaw'\\'').format('\\''DD.MM.YYYY HH:mm'\\'')} - #{moment.utc(coupon.lastingAt).tz('\\''Europe/Warsaw'\\'').format('\\''DD.MM.YYYY HH:mm'\\'')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\"maxLineLength\":18,\"newLineDelimiter\":\";\"},\"filterIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5,\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true}}]},\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"channel\\\":\\\"MOBILE\\\",\\\"status\\\":\\\"DRAFT\\\",\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"controlGroup\\\":{\\\"name\\\":\\\"string\\\",\\\"percentage\\\":100},\\\"variants\\\":[{\\\"name\\\":\\\"string\\\",\\\"uuid\\\":\\\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\\\",\\\"percentage\\\":100,\\\"ai\\\":{\\\"controlVariant\\\":true,\\\"varietyFactor\\\":0.5,\\\"varietyGroupSize\\\":1,\\\"redistributionFrequencyFactor\\\":0.5,\\\"popularityBoosting\\\":1},\\\"limits\\\":{\\\"limitPerDay\\\":6,\\\"limitExceptions\\\":[{\\\"dayOfWeek\\\":5,\\\"limitPerDay\\\":8}],\\\"limitsPerBasket\\\":[{\\\"basketSize\\\":12,\\\"basketValue\\\":30.5,\\\"condition\\\":\\\"AND\\\"}],\\\"limitExclusion\\\":[{\\\"catalogId\\\":22424,\\\"products\\\":[\\\"UGG-BB-PUR-06\\\"],\\\"filters\\\":[\\\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\\\"]}]},\\\"activity\\\":{\\\"lastingType\\\":\\\"RELATIVE\\\",\\\"lasting\\\":{\\\"unit\\\":\\\"HOURS\\\",\\\"value\\\":24},\\\"cronWeekdays\\\":[0,1,6],\\\"cronTime\\\":\\\"12:34\\\",\\\"lastingAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"timeExclusions\\\":{\\\"uuid\\\":\\\"6a177f3e-748f-44d4-ac30-a457a5199685\\\"}},\\\"printout\\\":{\\\"template\\\":\\\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\\\",\\\"maxLineLength\\\":18,\\\"newLineDelimiter\\\":\\\";\\\"},\\\"filterIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"types\\\":[\\\"MEMBERS_ONLY\\\",\\\"HANDBILL\\\"],\\\"excludeByAvailableProducts\\\":true,\\\"slotFilters\\\":{\\\"order\\\":\\\"GIVEN\\\",\\\"slots\\\":[{\\\"filterId\\\":\\\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\\\",\\\"limit\\\":5,\\\"distinctFilter\\\":{\\\"filters\\\":[{\\\"field\\\":\\\"brand\\\",\\\"maxNumItems\\\":2,\\\"levelRangeModifier\\\":1}],\\\"elastic\\\":true}}]},\\\"distinctFilter\\\":{\\\"filters\\\":[{\\\"field\\\":\\\"brand\\\",\\\"maxNumItems\\\":2,\\\"levelRangeModifier\\\":1}],\\\"elastic\\\":true}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/handbill\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"channel\": \"MOBILE\",\n  \"status\": \"DRAFT\",\n  \"name\": \"string\",\n  \"description\": \"string\",\n  \"controlGroup\": {\n    \"name\": \"string\",\n    \"percentage\": 100\n  },\n  \"variants\": [\n    {\n      \"name\": \"string\",\n      \"uuid\": \"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\n      \"percentage\": 100,\n      \"ai\": {\n        \"controlVariant\": true,\n        \"varietyFactor\": 0.5,\n        \"varietyGroupSize\": 1,\n        \"redistributionFrequencyFactor\": 0.5,\n        \"popularityBoosting\": 1\n      },\n      \"limits\": {\n        \"limitPerDay\": 6,\n        \"limitExceptions\": [\n          {\n            \"dayOfWeek\": 5,\n            \"limitPerDay\": 8\n          }\n        ],\n        \"limitsPerBasket\": [\n          {\n            \"basketSize\": 12,\n            \"basketValue\": 30.5,\n            \"condition\": \"AND\"\n          }\n        ],\n        \"limitExclusion\": [\n          {\n            \"catalogId\": 22424,\n            \"products\": [\n              \"UGG-BB-PUR-06\"\n            ],\n            \"filters\": [\n              \"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"\n            ]\n          }\n        ]\n      },\n      \"activity\": {\n        \"lastingType\": \"RELATIVE\",\n        \"lasting\": {\n          \"unit\": \"HOURS\",\n          \"value\": 24\n        },\n        \"cronWeekdays\": [\n          0,\n          1,\n          6\n        ],\n        \"cronTime\": \"12:34\",\n        \"lastingAt\": \"2019-08-24T14:15:22Z\",\n        \"timeExclusions\": {\n          \"uuid\": \"6a177f3e-748f-44d4-ac30-a457a5199685\"\n        }\n      },\n      \"printout\": {\n        \"template\": \"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\n        \"maxLineLength\": 18,\n        \"newLineDelimiter\": \";\"\n      },\n      \"filterIds\": [\n        \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n      ],\n      \"types\": [\n        \"MEMBERS_ONLY\",\n        \"HANDBILL\"\n      ],\n      \"excludeByAvailableProducts\": true,\n      \"slotFilters\": {\n        \"order\": \"GIVEN\",\n        \"slots\": [\n          {\n            \"filterId\": \"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\n            \"limit\": 5,\n            \"distinctFilter\": {\n              \"filters\": [\n                {\n                  \"field\": \"brand\",\n                  \"maxNumItems\": 2,\n                  \"levelRangeModifier\": 1\n                }\n              ],\n              \"elastic\": true\n            }\n          }\n        ]\n      },\n      \"distinctFilter\": {\n        \"filters\": [\n          {\n            \"field\": \"brand\",\n            \"maxNumItems\": 2,\n            \"levelRangeModifier\": 1\n          }\n        ],\n        \"elastic\": true\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/handbill\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/handbill\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  channel: 'MOBILE',\n  status: 'DRAFT',\n  name: 'string',\n  description: 'string',\n  controlGroup: {name: 'string', percentage: 100},\n  variants: [\n    {\n      name: 'string',\n      uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',\n      percentage: 100,\n      ai: {\n        controlVariant: true,\n        varietyFactor: 0.5,\n        varietyGroupSize: 1,\n        redistributionFrequencyFactor: 0.5,\n        popularityBoosting: 1\n      },\n      limits: {\n        limitPerDay: 6,\n        limitExceptions: [{dayOfWeek: 5, limitPerDay: 8}],\n        limitsPerBasket: [{basketSize: 12, basketValue: 30.5, condition: 'AND'}],\n        limitExclusion: [\n          {\n            catalogId: 22424,\n            products: ['UGG-BB-PUR-06'],\n            filters: ['7c1fbdf6-dd27-11ea-87d0-0242ac130003']\n          }\n        ]\n      },\n      activity: {\n        lastingType: 'RELATIVE',\n        lasting: {unit: 'HOURS', value: 24},\n        cronWeekdays: [0, 1, 6],\n        cronTime: '12:34',\n        lastingAt: '2019-08-24T14:15:22Z',\n        timeExclusions: {uuid: '6a177f3e-748f-44d4-ac30-a457a5199685'}\n      },\n      printout: {\n        template: '|#{promotion.name};#{promotion.discountType == \\'EXACT_PRICE\\' ? \\'Price\\':\\'Discount\\'} #{promotion.discountValue} #{promotion.discountType == \\'PERCENT\\'? \\'%\\' : \\'USD\\'};Valid for;#{moment.utc(coupon.createdAt).tz(\\'Europe/Warsaw\\').format(\\'DD.MM.YYYY HH:mm\\')} - #{moment.utc(coupon.lastingAt).tz(\\'Europe/Warsaw\\').format(\\'DD.MM.YYYY HH:mm\\')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!',\n        maxLineLength: 18,\n        newLineDelimiter: ';'\n      },\n      filterIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n      types: ['MEMBERS_ONLY', 'HANDBILL'],\n      excludeByAvailableProducts: true,\n      slotFilters: {\n        order: 'GIVEN',\n        slots: [\n          {\n            filterId: 'aff0ee0f-f371-4b82-82c6-dc3b96f05c91',\n            limit: 5,\n            distinctFilter: {\n              filters: [{field: 'brand', maxNumItems: 2, levelRangeModifier: 1}],\n              elastic: true\n            }\n          }\n        ]\n      },\n      distinctFilter: {\n        filters: [{field: 'brand', maxNumItems: 2, levelRangeModifier: 1}],\n        elastic: true\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/handbill');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"channel\":\"MOBILE\",\"status\":\"DRAFT\",\"name\":\"string\",\"description\":\"string\",\"controlGroup\":{\"name\":\"string\",\"percentage\":100},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":100,\"ai\":{\"controlVariant\":true,\"varietyFactor\":0.5,\"varietyGroupSize\":1,\"redistributionFrequencyFactor\":0.5,\"popularityBoosting\":1},\"limits\":{\"limitPerDay\":6,\"limitExceptions\":[{\"dayOfWeek\":5,\"limitPerDay\":8}],\"limitsPerBasket\":[{\"basketSize\":12,\"basketValue\":30.5,\"condition\":\"AND\"}],\"limitExclusion\":[{\"catalogId\":22424,\"products\":[\"UGG-BB-PUR-06\"],\"filters\":[\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"]}]},\"activity\":{\"lastingType\":\"RELATIVE\",\"lasting\":{\"unit\":\"HOURS\",\"value\":24},\"cronWeekdays\":[0,1,6],\"cronTime\":\"12:34\",\"lastingAt\":\"2019-08-24T14:15:22Z\",\"timeExclusions\":{\"uuid\":\"6a177f3e-748f-44d4-ac30-a457a5199685\"}},\"printout\":{\"template\":\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\"maxLineLength\":18,\"newLineDelimiter\":\";\"},\"filterIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5,\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true}}]},\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/handbill\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"channel\\\":\\\"MOBILE\\\",\\\"status\\\":\\\"DRAFT\\\",\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"controlGroup\\\":{\\\"name\\\":\\\"string\\\",\\\"percentage\\\":100},\\\"variants\\\":[{\\\"name\\\":\\\"string\\\",\\\"uuid\\\":\\\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\\\",\\\"percentage\\\":100,\\\"ai\\\":{\\\"controlVariant\\\":true,\\\"varietyFactor\\\":0.5,\\\"varietyGroupSize\\\":1,\\\"redistributionFrequencyFactor\\\":0.5,\\\"popularityBoosting\\\":1},\\\"limits\\\":{\\\"limitPerDay\\\":6,\\\"limitExceptions\\\":[{\\\"dayOfWeek\\\":5,\\\"limitPerDay\\\":8}],\\\"limitsPerBasket\\\":[{\\\"basketSize\\\":12,\\\"basketValue\\\":30.5,\\\"condition\\\":\\\"AND\\\"}],\\\"limitExclusion\\\":[{\\\"catalogId\\\":22424,\\\"products\\\":[\\\"UGG-BB-PUR-06\\\"],\\\"filters\\\":[\\\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\\\"]}]},\\\"activity\\\":{\\\"lastingType\\\":\\\"RELATIVE\\\",\\\"lasting\\\":{\\\"unit\\\":\\\"HOURS\\\",\\\"value\\\":24},\\\"cronWeekdays\\\":[0,1,6],\\\"cronTime\\\":\\\"12:34\\\",\\\"lastingAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"timeExclusions\\\":{\\\"uuid\\\":\\\"6a177f3e-748f-44d4-ac30-a457a5199685\\\"}},\\\"printout\\\":{\\\"template\\\":\\\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\\\",\\\"maxLineLength\\\":18,\\\"newLineDelimiter\\\":\\\";\\\"},\\\"filterIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"types\\\":[\\\"MEMBERS_ONLY\\\",\\\"HANDBILL\\\"],\\\"excludeByAvailableProducts\\\":true,\\\"slotFilters\\\":{\\\"order\\\":\\\"GIVEN\\\",\\\"slots\\\":[{\\\"filterId\\\":\\\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\\\",\\\"limit\\\":5,\\\"distinctFilter\\\":{\\\"filters\\\":[{\\\"field\\\":\\\"brand\\\",\\\"maxNumItems\\\":2,\\\"levelRangeModifier\\\":1}],\\\"elastic\\\":true}}]},\\\"distinctFilter\\\":{\\\"filters\\\":[{\\\"field\\\":\\\"brand\\\",\\\"maxNumItems\\\":2,\\\"levelRangeModifier\\\":1}],\\\"elastic\\\":true}}]}\")\n  .asString();"}]}},"/v4/promotions/handbill/{handbillUuid}":{"get":{"tags":["Handbills"],"summary":"Get handbill configuration","description":"Retrieve the details of a single handbill configuration.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_HANDBILL_READ`\n\n**User role permission required:** `campaigns_personalised_promotions: read`\n","operationId":"getHandbillConfig_GET","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/promotions-pathHandbillUuid"}],"responses":{"200":{"description":"Handbill configuration","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/promotions-handbillConfig"},"message":{"type":"string","description":"Status of the operation"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Handbills/operation/getHandbillConfig_GET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/handbill/%7BhandbillUuid%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/handbill/%7BhandbillUuid%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"patch":{"tags":["Handbills"],"summary":"Update handbill configuration","description":"Update an existing handbill configuration.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_HANDBILL_UPDATE`\n\n**User role permission required:** `campaigns_personalised_promotions: update`\n","operationId":"updateHandbill_PATCH","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/promotions-pathHandbillUuid"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-handbillConfigUpdateRequest"}}}},"responses":{"200":{"description":"Configuration updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/promotions-handbillConfig"},"message":{"type":"string","description":"Status of the operation"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"422":{"$ref":"#/components/responses/promotions-Validation422"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Handbills/operation/updateHandbill_PATCH"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PATCH \\\n  --url https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"channel\":\"MOBILE\",\"status\":\"DRAFT\",\"name\":\"string\",\"description\":\"string\",\"controlGroup\":{\"name\":\"string\",\"percentage\":100},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":100,\"ai\":{\"controlVariant\":true,\"varietyFactor\":0.5,\"varietyGroupSize\":1,\"redistributionFrequencyFactor\":0.5,\"popularityBoosting\":1},\"limits\":{\"limitPerDay\":6,\"limitExceptions\":[{\"dayOfWeek\":5,\"limitPerDay\":8}],\"limitsPerBasket\":[{\"basketSize\":12,\"basketValue\":30.5,\"condition\":\"AND\"}],\"limitExclusion\":[{\"catalogId\":22424,\"products\":[\"UGG-BB-PUR-06\"],\"filters\":[\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"]}]},\"activity\":{\"lastingType\":\"RELATIVE\",\"lasting\":{\"unit\":\"HOURS\",\"value\":24},\"cronWeekdays\":[0,1,6],\"cronTime\":\"12:34\",\"lastingAt\":\"2019-08-24T14:15:22Z\",\"timeExclusions\":{\"uuid\":\"6a177f3e-748f-44d4-ac30-a457a5199685\"}},\"printout\":{\"template\":\"|#{promotion.name};#{promotion.discountType == '\\''EXACT_PRICE'\\'' ? '\\''Price'\\'':'\\''Discount'\\''} #{promotion.discountValue} #{promotion.discountType == '\\''PERCENT'\\''? '\\''%'\\'' : '\\''USD'\\''};Valid for;#{moment.utc(coupon.createdAt).tz('\\''Europe/Warsaw'\\'').format('\\''DD.MM.YYYY HH:mm'\\'')} - #{moment.utc(coupon.lastingAt).tz('\\''Europe/Warsaw'\\'').format('\\''DD.MM.YYYY HH:mm'\\'')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\"maxLineLength\":18,\"newLineDelimiter\":\";\"},\"filterIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5,\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true}}]},\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"channel\\\":\\\"MOBILE\\\",\\\"status\\\":\\\"DRAFT\\\",\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"controlGroup\\\":{\\\"name\\\":\\\"string\\\",\\\"percentage\\\":100},\\\"variants\\\":[{\\\"name\\\":\\\"string\\\",\\\"uuid\\\":\\\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\\\",\\\"percentage\\\":100,\\\"ai\\\":{\\\"controlVariant\\\":true,\\\"varietyFactor\\\":0.5,\\\"varietyGroupSize\\\":1,\\\"redistributionFrequencyFactor\\\":0.5,\\\"popularityBoosting\\\":1},\\\"limits\\\":{\\\"limitPerDay\\\":6,\\\"limitExceptions\\\":[{\\\"dayOfWeek\\\":5,\\\"limitPerDay\\\":8}],\\\"limitsPerBasket\\\":[{\\\"basketSize\\\":12,\\\"basketValue\\\":30.5,\\\"condition\\\":\\\"AND\\\"}],\\\"limitExclusion\\\":[{\\\"catalogId\\\":22424,\\\"products\\\":[\\\"UGG-BB-PUR-06\\\"],\\\"filters\\\":[\\\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\\\"]}]},\\\"activity\\\":{\\\"lastingType\\\":\\\"RELATIVE\\\",\\\"lasting\\\":{\\\"unit\\\":\\\"HOURS\\\",\\\"value\\\":24},\\\"cronWeekdays\\\":[0,1,6],\\\"cronTime\\\":\\\"12:34\\\",\\\"lastingAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"timeExclusions\\\":{\\\"uuid\\\":\\\"6a177f3e-748f-44d4-ac30-a457a5199685\\\"}},\\\"printout\\\":{\\\"template\\\":\\\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\\\",\\\"maxLineLength\\\":18,\\\"newLineDelimiter\\\":\\\";\\\"},\\\"filterIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"types\\\":[\\\"MEMBERS_ONLY\\\",\\\"HANDBILL\\\"],\\\"excludeByAvailableProducts\\\":true,\\\"slotFilters\\\":{\\\"order\\\":\\\"GIVEN\\\",\\\"slots\\\":[{\\\"filterId\\\":\\\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\\\",\\\"limit\\\":5,\\\"distinctFilter\\\":{\\\"filters\\\":[{\\\"field\\\":\\\"brand\\\",\\\"maxNumItems\\\":2,\\\"levelRangeModifier\\\":1}],\\\"elastic\\\":true}}]},\\\"distinctFilter\\\":{\\\"filters\\\":[{\\\"field\\\":\\\"brand\\\",\\\"maxNumItems\\\":2,\\\"levelRangeModifier\\\":1}],\\\"elastic\\\":true}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PATCH\", \"/v4/promotions/handbill/%7BhandbillUuid%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"channel\": \"MOBILE\",\n  \"status\": \"DRAFT\",\n  \"name\": \"string\",\n  \"description\": \"string\",\n  \"controlGroup\": {\n    \"name\": \"string\",\n    \"percentage\": 100\n  },\n  \"variants\": [\n    {\n      \"name\": \"string\",\n      \"uuid\": \"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\n      \"percentage\": 100,\n      \"ai\": {\n        \"controlVariant\": true,\n        \"varietyFactor\": 0.5,\n        \"varietyGroupSize\": 1,\n        \"redistributionFrequencyFactor\": 0.5,\n        \"popularityBoosting\": 1\n      },\n      \"limits\": {\n        \"limitPerDay\": 6,\n        \"limitExceptions\": [\n          {\n            \"dayOfWeek\": 5,\n            \"limitPerDay\": 8\n          }\n        ],\n        \"limitsPerBasket\": [\n          {\n            \"basketSize\": 12,\n            \"basketValue\": 30.5,\n            \"condition\": \"AND\"\n          }\n        ],\n        \"limitExclusion\": [\n          {\n            \"catalogId\": 22424,\n            \"products\": [\n              \"UGG-BB-PUR-06\"\n            ],\n            \"filters\": [\n              \"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"\n            ]\n          }\n        ]\n      },\n      \"activity\": {\n        \"lastingType\": \"RELATIVE\",\n        \"lasting\": {\n          \"unit\": \"HOURS\",\n          \"value\": 24\n        },\n        \"cronWeekdays\": [\n          0,\n          1,\n          6\n        ],\n        \"cronTime\": \"12:34\",\n        \"lastingAt\": \"2019-08-24T14:15:22Z\",\n        \"timeExclusions\": {\n          \"uuid\": \"6a177f3e-748f-44d4-ac30-a457a5199685\"\n        }\n      },\n      \"printout\": {\n        \"template\": \"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\n        \"maxLineLength\": 18,\n        \"newLineDelimiter\": \";\"\n      },\n      \"filterIds\": [\n        \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n      ],\n      \"types\": [\n        \"MEMBERS_ONLY\",\n        \"HANDBILL\"\n      ],\n      \"excludeByAvailableProducts\": true,\n      \"slotFilters\": {\n        \"order\": \"GIVEN\",\n        \"slots\": [\n          {\n            \"filterId\": \"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\n            \"limit\": 5,\n            \"distinctFilter\": {\n              \"filters\": [\n                {\n                  \"field\": \"brand\",\n                  \"maxNumItems\": 2,\n                  \"levelRangeModifier\": 1\n                }\n              ],\n              \"elastic\": true\n            }\n          }\n        ]\n      },\n      \"distinctFilter\": {\n        \"filters\": [\n          {\n            \"field\": \"brand\",\n            \"maxNumItems\": 2,\n            \"levelRangeModifier\": 1\n          }\n        ],\n        \"elastic\": true\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PATCH\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/handbill/%7BhandbillUuid%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  channel: 'MOBILE',\n  status: 'DRAFT',\n  name: 'string',\n  description: 'string',\n  controlGroup: {name: 'string', percentage: 100},\n  variants: [\n    {\n      name: 'string',\n      uuid: '095be615-a8ad-4c33-8e9c-c7612fbf6c9f',\n      percentage: 100,\n      ai: {\n        controlVariant: true,\n        varietyFactor: 0.5,\n        varietyGroupSize: 1,\n        redistributionFrequencyFactor: 0.5,\n        popularityBoosting: 1\n      },\n      limits: {\n        limitPerDay: 6,\n        limitExceptions: [{dayOfWeek: 5, limitPerDay: 8}],\n        limitsPerBasket: [{basketSize: 12, basketValue: 30.5, condition: 'AND'}],\n        limitExclusion: [\n          {\n            catalogId: 22424,\n            products: ['UGG-BB-PUR-06'],\n            filters: ['7c1fbdf6-dd27-11ea-87d0-0242ac130003']\n          }\n        ]\n      },\n      activity: {\n        lastingType: 'RELATIVE',\n        lasting: {unit: 'HOURS', value: 24},\n        cronWeekdays: [0, 1, 6],\n        cronTime: '12:34',\n        lastingAt: '2019-08-24T14:15:22Z',\n        timeExclusions: {uuid: '6a177f3e-748f-44d4-ac30-a457a5199685'}\n      },\n      printout: {\n        template: '|#{promotion.name};#{promotion.discountType == \\'EXACT_PRICE\\' ? \\'Price\\':\\'Discount\\'} #{promotion.discountValue} #{promotion.discountType == \\'PERCENT\\'? \\'%\\' : \\'USD\\'};Valid for;#{moment.utc(coupon.createdAt).tz(\\'Europe/Warsaw\\').format(\\'DD.MM.YYYY HH:mm\\')} - #{moment.utc(coupon.lastingAt).tz(\\'Europe/Warsaw\\').format(\\'DD.MM.YYYY HH:mm\\')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!',\n        maxLineLength: 18,\n        newLineDelimiter: ';'\n      },\n      filterIds: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n      types: ['MEMBERS_ONLY', 'HANDBILL'],\n      excludeByAvailableProducts: true,\n      slotFilters: {\n        order: 'GIVEN',\n        slots: [\n          {\n            filterId: 'aff0ee0f-f371-4b82-82c6-dc3b96f05c91',\n            limit: 5,\n            distinctFilter: {\n              filters: [{field: 'brand', maxNumItems: 2, levelRangeModifier: 1}],\n              elastic: true\n            }\n          }\n        ]\n      },\n      distinctFilter: {\n        filters: [{field: 'brand', maxNumItems: 2, levelRangeModifier: 1}],\n        elastic: true\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\nHttpRequest::methodRegister('PATCH');\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D');\n$request->setMethod(HttpRequest::HTTP_METH_PATCH);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"channel\":\"MOBILE\",\"status\":\"DRAFT\",\"name\":\"string\",\"description\":\"string\",\"controlGroup\":{\"name\":\"string\",\"percentage\":100},\"variants\":[{\"name\":\"string\",\"uuid\":\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\",\"percentage\":100,\"ai\":{\"controlVariant\":true,\"varietyFactor\":0.5,\"varietyGroupSize\":1,\"redistributionFrequencyFactor\":0.5,\"popularityBoosting\":1},\"limits\":{\"limitPerDay\":6,\"limitExceptions\":[{\"dayOfWeek\":5,\"limitPerDay\":8}],\"limitsPerBasket\":[{\"basketSize\":12,\"basketValue\":30.5,\"condition\":\"AND\"}],\"limitExclusion\":[{\"catalogId\":22424,\"products\":[\"UGG-BB-PUR-06\"],\"filters\":[\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\"]}]},\"activity\":{\"lastingType\":\"RELATIVE\",\"lasting\":{\"unit\":\"HOURS\",\"value\":24},\"cronWeekdays\":[0,1,6],\"cronTime\":\"12:34\",\"lastingAt\":\"2019-08-24T14:15:22Z\",\"timeExclusions\":{\"uuid\":\"6a177f3e-748f-44d4-ac30-a457a5199685\"}},\"printout\":{\"template\":\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\",\"maxLineLength\":18,\"newLineDelimiter\":\";\"},\"filterIds\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"types\":[\"MEMBERS_ONLY\",\"HANDBILL\"],\"excludeByAvailableProducts\":true,\"slotFilters\":{\"order\":\"GIVEN\",\"slots\":[{\"filterId\":\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\",\"limit\":5,\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true}}]},\"distinctFilter\":{\"filters\":[{\"field\":\"brand\",\"maxNumItems\":2,\"levelRangeModifier\":1}],\"elastic\":true}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.patch(\"https://api.synerise.com/v4/promotions/handbill/%7BhandbillUuid%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"channel\\\":\\\"MOBILE\\\",\\\"status\\\":\\\"DRAFT\\\",\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"controlGroup\\\":{\\\"name\\\":\\\"string\\\",\\\"percentage\\\":100},\\\"variants\\\":[{\\\"name\\\":\\\"string\\\",\\\"uuid\\\":\\\"095be615-a8ad-4c33-8e9c-c7612fbf6c9f\\\",\\\"percentage\\\":100,\\\"ai\\\":{\\\"controlVariant\\\":true,\\\"varietyFactor\\\":0.5,\\\"varietyGroupSize\\\":1,\\\"redistributionFrequencyFactor\\\":0.5,\\\"popularityBoosting\\\":1},\\\"limits\\\":{\\\"limitPerDay\\\":6,\\\"limitExceptions\\\":[{\\\"dayOfWeek\\\":5,\\\"limitPerDay\\\":8}],\\\"limitsPerBasket\\\":[{\\\"basketSize\\\":12,\\\"basketValue\\\":30.5,\\\"condition\\\":\\\"AND\\\"}],\\\"limitExclusion\\\":[{\\\"catalogId\\\":22424,\\\"products\\\":[\\\"UGG-BB-PUR-06\\\"],\\\"filters\\\":[\\\"7c1fbdf6-dd27-11ea-87d0-0242ac130003\\\"]}]},\\\"activity\\\":{\\\"lastingType\\\":\\\"RELATIVE\\\",\\\"lasting\\\":{\\\"unit\\\":\\\"HOURS\\\",\\\"value\\\":24},\\\"cronWeekdays\\\":[0,1,6],\\\"cronTime\\\":\\\"12:34\\\",\\\"lastingAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"timeExclusions\\\":{\\\"uuid\\\":\\\"6a177f3e-748f-44d4-ac30-a457a5199685\\\"}},\\\"printout\\\":{\\\"template\\\":\\\"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!\\\",\\\"maxLineLength\\\":18,\\\"newLineDelimiter\\\":\\\";\\\"},\\\"filterIds\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"types\\\":[\\\"MEMBERS_ONLY\\\",\\\"HANDBILL\\\"],\\\"excludeByAvailableProducts\\\":true,\\\"slotFilters\\\":{\\\"order\\\":\\\"GIVEN\\\",\\\"slots\\\":[{\\\"filterId\\\":\\\"aff0ee0f-f371-4b82-82c6-dc3b96f05c91\\\",\\\"limit\\\":5,\\\"distinctFilter\\\":{\\\"filters\\\":[{\\\"field\\\":\\\"brand\\\",\\\"maxNumItems\\\":2,\\\"levelRangeModifier\\\":1}],\\\"elastic\\\":true}}]},\\\"distinctFilter\\\":{\\\"filters\\\":[{\\\"field\\\":\\\"brand\\\",\\\"maxNumItems\\\":2,\\\"levelRangeModifier\\\":1}],\\\"elastic\\\":true}}]}\")\n  .asString();"}]}},"/v4/promotions/promotion/get-for-client/handbill/{handbillUuid}":{"get":{"tags":["Handbills"],"summary":"Generate handbill for Profile","description":"Assign handbill promotions to a Profile. They can be randomized or suggested by the AI engine.\n\n**IMPORTANT**: \n- The endpoint is limited to 1000 requests per minute (per workspace).\n- The algorithm that selects promotions for assignment candidates applies all the following filters:\n    - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.\n    - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. \n    - Promotions can't currently be assigned within another handbill campaign.\n    - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.\n    - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.\n    - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)\n    - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).\n    - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.\n    - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.\n    - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.\n    - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n","operationId":"getHandbillForClient_GET","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/promotions-pathHandbillUuid"},{"$ref":"#/components/parameters/promotions-queryLimit"},{"$ref":"#/components/parameters/promotions-queryPage"},{"$ref":"#/components/parameters/promotions-queryPromotionFields"}],"responses":{"200":{"description":"A list of handbill-type promotions assigned to this profile","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"An array of promotions","items":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"}},"meta":{"$ref":"#/components/schemas/promotions-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"409":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Handbills/operation/getHandbillForClient_GET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'limit' => '100',\n  'page' => '4',\n  'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/get-for-client/handbill/%7BhandbillUuid%7D?limit=100&page=4&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/promotion/get-for-client/handbills":{"get":{"tags":["Handbills"],"summary":"Generate batch of handbills for Profile","description":"Assign a batch of handbill promotions to a Profile. They can be randomized or suggested by the AI engine.\n\n**IMPORTANT**: \n- The endpoint is limited to 1000 requests per minute (per workspace).\n- The algorithm that selects promotions for assignment candidates applies all the following filters:\n    - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.\n    - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. \n    - Promotions can't currently be assigned within another handbill campaign.\n    - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.\n    - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.\n    - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)\n    - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).\n    - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.\n    - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.\n    - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.\n    - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n","operationId":"getBatchHandbillForClient_GET","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/promotions-queryHandbillUuid"},{"$ref":"#/components/parameters/promotions-queryPage"},{"$ref":"#/components/parameters/promotions-queryLimit"},{"$ref":"#/components/parameters/promotions-queryIncludeMeta"},{"$ref":"#/components/parameters/promotions-queryPromotionFields"}],"responses":{"200":{"description":"A list of handbill-type promotions assigned to this profile","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"An array of promotions","items":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"}},"meta":{"$ref":"#/components/schemas/promotions-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"409":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Handbills/operation/getBatchHandbillForClient_GET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client/handbills');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'handbillUuid' => 'SOME_ARRAY_VALUE',\n  'page' => '4',\n  'limit' => '100',\n  'includeMeta' => 'false',\n  'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/get-for-client/handbills?handbillUuid=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}":{"get":{"tags":["Handbills"],"summary":"Generate handbill for Profile and get Profile promotions","description":"**Deprecated.** Use [/v2/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}](#operation/getHandbillForClientV2_GET) instead.\n\nAssign a handbill to a Profile and retrieve a list of promotions assigned to the Profile.\n\n**IMPORTANT**:\n- The endpoint is limited to 1000 requests per minute (per workspace).\n- The algorithm that selects promotions for assignment candidates applies all the following filters:\n    - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.\n    - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. \n    - Promotions can't currently be assigned within another handbill campaign.\n    - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.\n    - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.\n    - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)\n    - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).\n    - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.\n    - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.\n    - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.\n    - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_FOR_CLIENT_HANDBILL_READ`\n\n**User role permission required:** `campaigns_personalised_promotions: read`\n","operationId":"getAssignHandbillForClient_GET","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"},{"$ref":"#/components/parameters/promotions-pathHandbillUuid"},{"$ref":"#/components/parameters/promotions-queryPromotionType"},{"$ref":"#/components/parameters/promotions-queryPromotionStatus"},{"$ref":"#/components/parameters/promotions-queryVisibilityStatus"},{"$ref":"#/components/parameters/promotions-queryTagNames"},{"$ref":"#/components/parameters/promotions-queryTarget"},{"$ref":"#/components/parameters/promotions-queryPromotionPresentOnly"},{"$ref":"#/components/parameters/promotions-queryLastingOnly"},{"$ref":"#/components/parameters/promotions-queryPage"},{"$ref":"#/components/parameters/promotions-queryLimit"},{"$ref":"#/components/parameters/promotions-queryHandbillSort"},{"$ref":"#/components/parameters/promotions-queryIncludeMeta"},{"$ref":"#/components/parameters/promotions-queryPromotionFields"}],"responses":{"200":{"description":"A list of promotions assigned to this profile","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"An array of promotions","items":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"}},"meta":{"$ref":"#/components/schemas/promotions-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"deprecated":true,"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Handbills/operation/getAssignHandbillForClient_GET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'type' => 'SOME_ARRAY_VALUE',\n  'status' => 'SOME_ARRAY_VALUE',\n  'visibilityStatus' => 'SOME_ARRAY_VALUE',\n  'tagNames' => 'SOME_ARRAY_VALUE',\n  'target' => 'SOME_ARRAY_VALUE',\n  'presentOnly' => 'true',\n  'lastingOnly' => 'true',\n  'page' => '4',\n  'limit' => '100',\n  'sort' => 'createdAt,desc',\n  'includeMeta' => 'false',\n  'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?type=SOME_ARRAY_VALUE&status=SOME_ARRAY_VALUE&visibilityStatus=SOME_ARRAY_VALUE&tagNames=SOME_ARRAY_VALUE&target=SOME_ARRAY_VALUE&presentOnly=true&lastingOnly=true&page=4&limit=100&sort=createdAt%2Cdesc&includeMeta=false&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/v2/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}":{"get":{"tags":["Handbills"],"summary":"Generate handbill for Profile (v2)","description":"Assign handbill promotions to a Profile. They can be randomized or suggested by the AI engine.\n\n**IMPORTANT**: \n- The endpoint is limited to 1000 requests per minute (per workspace).\n- The algorithm that selects promotions for assignment candidates applies all the following filters:\n    - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.\n    - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. \n    - Promotions can't currently be assigned within another handbill campaign.\n    - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.\n    - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.\n    - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)\n    - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).\n    - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.\n    - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.\n    - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.\n    - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_FOR_CLIENT_HANDBILL_READ`\n\n**User role permission required:** `campaigns_personalised_promotions: read`\n","operationId":"getHandbillForClientV2_GET","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"},{"$ref":"#/components/parameters/promotions-pathHandbillUuid"},{"$ref":"#/components/parameters/promotions-queryLimit"},{"$ref":"#/components/parameters/promotions-queryPage"}],"responses":{"200":{"description":"A list of handbill-type promotions assigned to this profile","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"An array of promotions","items":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"}},"meta":{"$ref":"#/components/schemas/promotions-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"409":{"$ref":"#/components/responses/promotions-WaitingForProfileLockReleaseError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Handbills/operation/getHandbillForClientV2_GET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'limit' => '100',\n  'page' => '4'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/v2/promotion/get-for-client/email/%7BidentifierValue%7D/handbill/%7BhandbillUuid%7D?limit=100&page=4\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/promotion/get-for-client/{identifierType}/{identifierValue}/with-handbills":{"get":{"tags":["Handbills"],"summary":"Generate batch handbill for Profile and get Profile promotions","description":"\nAssign a batch handbill to a Profile and retrieve a list of promotions assigned to the Profile.\n\n**IMPORTANT**: \n- The endpoint is limited to 1000 requests per minute (per workspace).\n- The algorithm that selects promotions for assignment candidates applies all the following filters:\n    - Promotions must be of the specified type, assigned to a handbill campaign, and with the `PUBLISH` or `HIDDEN` status.\n    - Promotions must be available for the entire duration of the handbill assignment, considering `startAt` and `expireAt` dates. For example, when generating assignments on May 1, 2024 at 9:00 a.m. that are expected to last 3 hours, the algorithm will consider promotions whose `startAt` date is equal to or earlier than May 1, 2024 9:00 a.m. and `expireAt` date is equal to or later than May 1, 2024 12:00 p.m. \n    - Promotions can't currently be assigned within another handbill campaign.\n    - Promotions must match the filter for the slot (if applicable). Promotions are handled by the `binoculars` service and identified by UUID.\n    - Promotions are deduplicated. First they are sorted by priority, then the algorithm rejects promotions with at least one product that occurred earlier. In a special case, if a promotion with a high priority has an extensive catalog of products covering other promotions, it could exclude all promotions with a lower priority.\n    - If `excludeByAvailableProducts` is set to `true`, the algorithm rejects promotions for items that are available as part of other promotions (regardless of their type)\n    - After sorting promotions by priority, the algorithm rejects promotions for segments that occur after the 100th unique segment is encountered. (only 100 segments can be checked per handbill assignment, consider limiting the number of segments and reusing them).\n    - After checking the first 100 unique segments, the algorithm rejects promotions for segments that don't match the user.\n    - To ensure the correctness of promotion usage and redemption, the algorithm rejects promotions that are currently in the `ACTIVE` or `REDEEMED` status.\n    - Candidate promotions are gathered per handbill slot. For each slot, at most a configurable number of promotions (default 40,000) is read from the database, ordered by priority ascending (`1` = highest); any promotions beyond that limit are not considered for that slot. Promotions sharing the same priority have no guaranteed order between them, so when the limit falls within a group of equal priority it is not defined which of them are kept — assign distinct priorities to control this.\n    - When using the AI engine, the total number of candidate promotions sent to the recommendation engine in a single request is capped by a configurable limit (default 45,000). If the combined candidates across all slots exceed this limit, each slot is reduced proportionally to the number of candidates it contributed, but never below a configurable per-slot floor (default 1,000), so the smallest slots are left intact.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_FOR_CLIENT_HANDBILL_READ`\n\n**User role permission required:** `campaigns_personalised_promotions: read`\n","operationId":"getAssignHandbillsForClient_GET","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"},{"$ref":"#/components/parameters/promotions-queryHandbillUuid"},{"$ref":"#/components/parameters/promotions-queryPromotionType"},{"$ref":"#/components/parameters/promotions-queryPage"},{"$ref":"#/components/parameters/promotions-queryLimit"},{"$ref":"#/components/parameters/promotions-queryIncludeMeta"},{"$ref":"#/components/parameters/promotions-queryPromotionStatus"},{"$ref":"#/components/parameters/promotions-queryPromotionFields"}],"responses":{"200":{"description":"A list of promotions assigned to this profile","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"An array of promotions","items":{"$ref":"#/components/schemas/promotions-promotionClientDataResponse"}},"meta":{"$ref":"#/components/schemas/promotions-responseMeta"}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Handbills/operation/getAssignHandbillsForClient_GET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'handbillUuid' => 'SOME_ARRAY_VALUE',\n  'type' => 'SOME_ARRAY_VALUE',\n  'page' => '4',\n  'limit' => '100',\n  'includeMeta' => 'false',\n  'status' => 'SOME_ARRAY_VALUE',\n  'fields' => 'uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/promotion/get-for-client/email/%7BidentifierValue%7D/with-handbills?handbillUuid=SOME_ARRAY_VALUE&type=SOME_ARRAY_VALUE&page=4&limit=100&includeMeta=false&status=SOME_ARRAY_VALUE&fields=uuid%2CrequireRedeemedPoints%2CrequireRedeemedPoints%2CpossibleRedeems%2Cstatus%2CcurrentRedeemedQuantity%2ClastingAt\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/settings":{"get":{"tags":["Promotion settings"],"summary":"Get settings for current Workspace","operationId":"endpointSettingsGetSettingsGET","parameters":[{"in":"query","name":"only","required":false,"description":"Return only the settings property at this dotted path (e.g. `saleSettings.discountOrder.strategy`) instead of the whole settings object. Responds with 404 when the property is not defined.\n","schema":{"type":"string","pattern":"^[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*$"},"example":"saleSettings.combineBasketDiscounts"},{"in":"query","name":"withDefaults","required":false,"description":"When true, missing values are filled from the server-side defaults before the response is built. Combined with `only`, a property that has a configured default resolves even when the Workspace has not stored it; a property without a default still responds with 404.\n","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/promotions-promotionsSettingsBody"}}},"example":{"data":{"expression":"xxxxxxx-d047-40fd-99c8-yyyyxxxxyyy","blockTag":"BLOCK_PROMOTIONS","checkoutSettings":{"handbilUuids":["1eb6c8f0-dc7a-4d9c-9e0e-bb995ee87699"]},"cashbackSettings":{"exchangeRate":10,"limits":{"minPoints":10,"maxPoints":100,"maxTransactionAmount":80,"maxTransactionPercentage":60}},"promotionListSettings":{"fields":["code","possibleRedeems","lastingAt","vouchers"],"sort":"NONE","limit":200,"where":{"status":["ASSIGNED","ACTIVE"],"type":["CUSTOM","MEMBERS_ONLY","HANDBILL"],"target":["ALL","SEGMENT"],"tagNames":null,"lastingOnly":true,"presentOnly":true,"statusByType":{"CUSTOM":["ACTIVE"],"HANDBILL":["ASSIGNED"]},"targetByType":{"CUSTOM":["ALL"],"HANDBILL":["ALL"],"MEMBERS_ONLY":["SEGMENT"]},"visibilityStatus":["PUBLISH","HIDDEN"]}}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"$ref":"#/components/responses/promotions-404"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotion-settings/operation/endpointSettingsGetSettingsGET"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_SETTINGS_PROMOTIONS_READ`\n\n**User role permission required:** `campaigns_personalised_promotions: read`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/promotions/settings?only=saleSettings.combineBasketDiscounts&withDefaults=SOME_BOOLEAN_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/v4/promotions/settings?only=saleSettings.combineBasketDiscounts&withDefaults=SOME_BOOLEAN_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/promotions/settings?only=saleSettings.combineBasketDiscounts&withDefaults=SOME_BOOLEAN_VALUE\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/settings?only=saleSettings.combineBasketDiscounts&withDefaults=SOME_BOOLEAN_VALUE\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/settings');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'only' => 'saleSettings.combineBasketDiscounts',\n  'withDefaults' => 'SOME_BOOLEAN_VALUE'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/promotions/settings?only=saleSettings.combineBasketDiscounts&withDefaults=SOME_BOOLEAN_VALUE\")\n  .asString();"}]},"put":{"tags":["Promotion settings"],"summary":"Update settings for current Workspace","description":"This method overrides all current settings. If you do not send a setting that currently exists, it will be reverted to default value.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_SETTINGS_PROMOTIONS_UPDATE`\n\n**User role permission required:** `campaigns_personalised_promotions: update`\n","operationId":"endpointSettingsUpdateSettingsPUT","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-promotionsSettingsBody"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"saleSettings":{"$ref":"#/components/schemas/promotions-saleSettings"}},"additionalProperties":{"description":"More settings"},"default":{}}}},"example":{"application/json":{"data":{"expression":"xxxxxxx-d047-40fd-99c8-yyyyxxxxyyy","blockTag":"BLOCK_PROMOTIONS","promotionListSettings":{"fields":["code","possibleRedeems","lastingAt","vouchers"],"sort":"NONE","limit":200,"where":{"status":["ASSIGNED","ACTIVE"],"type":["CUSTOM","MEMBERS_ONLY","HANDBILL"],"target":["ALL","SEGMENT"],"tagNames":null,"lastingOnly":true,"presentOnly":true,"statusByType":{"CUSTOM":["ACTIVE"],"HANDBILL":["ASSIGNED"]},"targetByType":{"CUSTOM":["ALL"],"HANDBILL":["ALL"],"MEMBERS_ONLY":["SEGMENT"]},"visibilityStatus":["PUBLISH","HIDDEN"]}}}}}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotion-settings/operation/endpointSettingsUpdateSettingsPUT"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/v4/promotions/settings \\\n  --header 'content-type: application/json' \\\n  --data '{\"checkoutSettings\":{\"handbillUuidsForCheckout\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"codeGeneration\":{\"prefix\":\"string\",\"length\":36,\"crc\":true}},\"enableCodeGeneration\":true,\"codePrefix\":\"SYN\",\"blockTag\":\"BLOCKED\",\"expression\":\"8e30707e-988c-498c-a88e-47375a3dcfb5\",\"promotionListSettings\":{\"setFieldsValues\":{},\"where\":{\"excludeIds\":[3],\"handbillPromotionIds\":[3],\"visibilityStatus\":[\"DRAFT\"],\"status\":[\"ASSIGNED\"],\"statusByType\":{\"GENERAL\":[\"ASSIGNED\"],\"CUSTOM\":[\"ASSIGNED\"],\"MEMBERS_ONLY\":[\"ASSIGNED\"],\"HANDBILL\":[\"ASSIGNED\"]},\"target\":[\"ALL\"],\"targetByType\":{\"GENERAL\":[\"ALL\"],\"CUSTOM\":[\"ALL\"],\"MEMBERS_ONLY\":[\"ALL\"],\"HANDBILL\":[\"ALL\"]},\"type\":[\"MEMBERS_ONLY\"],\"presentOnly\":true,\"lastingOnly\":true,\"displayableOnly\":true,\"checkExistsInTarget\":true,\"tagNames\":[\"string\"]},\"fields\":[\"string\"],\"sort\":{\"forDBQuery\":[{\"field\":\"headerName\",\"direction\":\"asc\"}]},\"page\":0,\"limit\":0},\"promotionAssignmentSettings\":{\"setFieldsValues\":{},\"where\":{\"excludeIds\":[3],\"handbillPromotionIds\":[3],\"visibilityStatus\":[\"DRAFT\"],\"status\":[\"ASSIGNED\"],\"statusByType\":{\"GENERAL\":[\"ASSIGNED\"],\"CUSTOM\":[\"ASSIGNED\"],\"MEMBERS_ONLY\":[\"ASSIGNED\"],\"HANDBILL\":[\"ASSIGNED\"]},\"target\":[\"ALL\"],\"targetByType\":{\"GENERAL\":[\"ALL\"],\"CUSTOM\":[\"ALL\"],\"MEMBERS_ONLY\":[\"ALL\"],\"HANDBILL\":[\"ALL\"]},\"type\":[\"MEMBERS_ONLY\"],\"presentOnly\":true,\"lastingOnly\":true,\"displayableOnly\":true,\"checkExistsInTarget\":true,\"tagNames\":[\"string\"]},\"fields\":[\"string\"],\"sort\":{\"forDBQuery\":[{\"field\":\"headerName\",\"direction\":\"asc\"}]},\"page\":0,\"limit\":0},\"restorePointsOnProfileDeactivation\":true,\"allowRedeemCompletionWhenBlocked\":false,\"saleSettings\":{\"discountSourceType\":0,\"clientIdCardType\":0,\"handbillCheckout\":\"04845f2a-86bf-4319-89c4-1f24d4e1f58e\",\"priceValueBaseStrategy\":\"CONSTANT\",\"combineBasketDiscounts\":false,\"discountOrder\":{\"strategy\":\"DISCOUNT_VALUE\",\"direction\":\"asc\"},\"returnFields\":[\"string\"]},\"lockSettings\":{\"promotionRequestedLockTtl\":60,\"processSalePromotionActivationLockWaitTime\":0,\"lockPromotionRequestByIdentifier\":true},\"transferSettings\":[{\"expression\":\"2395fc33-f2f0-420c-8e7b-0ac63c3454de\",\"recipient\":{\"segments\":[\"string\"]},\"sender\":{\"segments\":[\"string\"]}}],\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"checkoutSettings\\\":{\\\"handbillUuidsForCheckout\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"codeGeneration\\\":{\\\"prefix\\\":\\\"string\\\",\\\"length\\\":36,\\\"crc\\\":true}},\\\"enableCodeGeneration\\\":true,\\\"codePrefix\\\":\\\"SYN\\\",\\\"blockTag\\\":\\\"BLOCKED\\\",\\\"expression\\\":\\\"8e30707e-988c-498c-a88e-47375a3dcfb5\\\",\\\"promotionListSettings\\\":{\\\"setFieldsValues\\\":{},\\\"where\\\":{\\\"excludeIds\\\":[3],\\\"handbillPromotionIds\\\":[3],\\\"visibilityStatus\\\":[\\\"DRAFT\\\"],\\\"status\\\":[\\\"ASSIGNED\\\"],\\\"statusByType\\\":{\\\"GENERAL\\\":[\\\"ASSIGNED\\\"],\\\"CUSTOM\\\":[\\\"ASSIGNED\\\"],\\\"MEMBERS_ONLY\\\":[\\\"ASSIGNED\\\"],\\\"HANDBILL\\\":[\\\"ASSIGNED\\\"]},\\\"target\\\":[\\\"ALL\\\"],\\\"targetByType\\\":{\\\"GENERAL\\\":[\\\"ALL\\\"],\\\"CUSTOM\\\":[\\\"ALL\\\"],\\\"MEMBERS_ONLY\\\":[\\\"ALL\\\"],\\\"HANDBILL\\\":[\\\"ALL\\\"]},\\\"type\\\":[\\\"MEMBERS_ONLY\\\"],\\\"presentOnly\\\":true,\\\"lastingOnly\\\":true,\\\"displayableOnly\\\":true,\\\"checkExistsInTarget\\\":true,\\\"tagNames\\\":[\\\"string\\\"]},\\\"fields\\\":[\\\"string\\\"],\\\"sort\\\":{\\\"forDBQuery\\\":[{\\\"field\\\":\\\"headerName\\\",\\\"direction\\\":\\\"asc\\\"}]},\\\"page\\\":0,\\\"limit\\\":0},\\\"promotionAssignmentSettings\\\":{\\\"setFieldsValues\\\":{},\\\"where\\\":{\\\"excludeIds\\\":[3],\\\"handbillPromotionIds\\\":[3],\\\"visibilityStatus\\\":[\\\"DRAFT\\\"],\\\"status\\\":[\\\"ASSIGNED\\\"],\\\"statusByType\\\":{\\\"GENERAL\\\":[\\\"ASSIGNED\\\"],\\\"CUSTOM\\\":[\\\"ASSIGNED\\\"],\\\"MEMBERS_ONLY\\\":[\\\"ASSIGNED\\\"],\\\"HANDBILL\\\":[\\\"ASSIGNED\\\"]},\\\"target\\\":[\\\"ALL\\\"],\\\"targetByType\\\":{\\\"GENERAL\\\":[\\\"ALL\\\"],\\\"CUSTOM\\\":[\\\"ALL\\\"],\\\"MEMBERS_ONLY\\\":[\\\"ALL\\\"],\\\"HANDBILL\\\":[\\\"ALL\\\"]},\\\"type\\\":[\\\"MEMBERS_ONLY\\\"],\\\"presentOnly\\\":true,\\\"lastingOnly\\\":true,\\\"displayableOnly\\\":true,\\\"checkExistsInTarget\\\":true,\\\"tagNames\\\":[\\\"string\\\"]},\\\"fields\\\":[\\\"string\\\"],\\\"sort\\\":{\\\"forDBQuery\\\":[{\\\"field\\\":\\\"headerName\\\",\\\"direction\\\":\\\"asc\\\"}]},\\\"page\\\":0,\\\"limit\\\":0},\\\"restorePointsOnProfileDeactivation\\\":true,\\\"allowRedeemCompletionWhenBlocked\\\":false,\\\"saleSettings\\\":{\\\"discountSourceType\\\":0,\\\"clientIdCardType\\\":0,\\\"handbillCheckout\\\":\\\"04845f2a-86bf-4319-89c4-1f24d4e1f58e\\\",\\\"priceValueBaseStrategy\\\":\\\"CONSTANT\\\",\\\"combineBasketDiscounts\\\":false,\\\"discountOrder\\\":{\\\"strategy\\\":\\\"DISCOUNT_VALUE\\\",\\\"direction\\\":\\\"asc\\\"},\\\"returnFields\\\":[\\\"string\\\"]},\\\"lockSettings\\\":{\\\"promotionRequestedLockTtl\\\":60,\\\"processSalePromotionActivationLockWaitTime\\\":0,\\\"lockPromotionRequestByIdentifier\\\":true},\\\"transferSettings\\\":[{\\\"expression\\\":\\\"2395fc33-f2f0-420c-8e7b-0ac63c3454de\\\",\\\"recipient\\\":{\\\"segments\\\":[\\\"string\\\"]},\\\"sender\\\":{\\\"segments\\\":[\\\"string\\\"]}}],\\\"cashbackSettings\\\":{\\\"exchangeRate\\\":0.0001,\\\"limits\\\":{\\\"minPoints\\\":10,\\\"maxPoints\\\":1000,\\\"maxTransactionAmount\\\":20,\\\"maxTransactionPercentage\\\":50}}}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"PUT\", \"/v4/promotions/settings\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"checkoutSettings\": {\n    \"handbillUuidsForCheckout\": [\n      \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n    ],\n    \"codeGeneration\": {\n      \"prefix\": \"string\",\n      \"length\": 36,\n      \"crc\": true\n    }\n  },\n  \"enableCodeGeneration\": true,\n  \"codePrefix\": \"SYN\",\n  \"blockTag\": \"BLOCKED\",\n  \"expression\": \"8e30707e-988c-498c-a88e-47375a3dcfb5\",\n  \"promotionListSettings\": {\n    \"setFieldsValues\": {},\n    \"where\": {\n      \"excludeIds\": [\n        3\n      ],\n      \"handbillPromotionIds\": [\n        3\n      ],\n      \"visibilityStatus\": [\n        \"DRAFT\"\n      ],\n      \"status\": [\n        \"ASSIGNED\"\n      ],\n      \"statusByType\": {\n        \"GENERAL\": [\n          \"ASSIGNED\"\n        ],\n        \"CUSTOM\": [\n          \"ASSIGNED\"\n        ],\n        \"MEMBERS_ONLY\": [\n          \"ASSIGNED\"\n        ],\n        \"HANDBILL\": [\n          \"ASSIGNED\"\n        ]\n      },\n      \"target\": [\n        \"ALL\"\n      ],\n      \"targetByType\": {\n        \"GENERAL\": [\n          \"ALL\"\n        ],\n        \"CUSTOM\": [\n          \"ALL\"\n        ],\n        \"MEMBERS_ONLY\": [\n          \"ALL\"\n        ],\n        \"HANDBILL\": [\n          \"ALL\"\n        ]\n      },\n      \"type\": [\n        \"MEMBERS_ONLY\"\n      ],\n      \"presentOnly\": true,\n      \"lastingOnly\": true,\n      \"displayableOnly\": true,\n      \"checkExistsInTarget\": true,\n      \"tagNames\": [\n        \"string\"\n      ]\n    },\n    \"fields\": [\n      \"string\"\n    ],\n    \"sort\": {\n      \"forDBQuery\": [\n        {\n          \"field\": \"headerName\",\n          \"direction\": \"asc\"\n        }\n      ]\n    },\n    \"page\": 0,\n    \"limit\": 0\n  },\n  \"promotionAssignmentSettings\": {\n    \"setFieldsValues\": {},\n    \"where\": {\n      \"excludeIds\": [\n        3\n      ],\n      \"handbillPromotionIds\": [\n        3\n      ],\n      \"visibilityStatus\": [\n        \"DRAFT\"\n      ],\n      \"status\": [\n        \"ASSIGNED\"\n      ],\n      \"statusByType\": {\n        \"GENERAL\": [\n          \"ASSIGNED\"\n        ],\n        \"CUSTOM\": [\n          \"ASSIGNED\"\n        ],\n        \"MEMBERS_ONLY\": [\n          \"ASSIGNED\"\n        ],\n        \"HANDBILL\": [\n          \"ASSIGNED\"\n        ]\n      },\n      \"target\": [\n        \"ALL\"\n      ],\n      \"targetByType\": {\n        \"GENERAL\": [\n          \"ALL\"\n        ],\n        \"CUSTOM\": [\n          \"ALL\"\n        ],\n        \"MEMBERS_ONLY\": [\n          \"ALL\"\n        ],\n        \"HANDBILL\": [\n          \"ALL\"\n        ]\n      },\n      \"type\": [\n        \"MEMBERS_ONLY\"\n      ],\n      \"presentOnly\": true,\n      \"lastingOnly\": true,\n      \"displayableOnly\": true,\n      \"checkExistsInTarget\": true,\n      \"tagNames\": [\n        \"string\"\n      ]\n    },\n    \"fields\": [\n      \"string\"\n    ],\n    \"sort\": {\n      \"forDBQuery\": [\n        {\n          \"field\": \"headerName\",\n          \"direction\": \"asc\"\n        }\n      ]\n    },\n    \"page\": 0,\n    \"limit\": 0\n  },\n  \"restorePointsOnProfileDeactivation\": true,\n  \"allowRedeemCompletionWhenBlocked\": false,\n  \"saleSettings\": {\n    \"discountSourceType\": 0,\n    \"clientIdCardType\": 0,\n    \"handbillCheckout\": \"04845f2a-86bf-4319-89c4-1f24d4e1f58e\",\n    \"priceValueBaseStrategy\": \"CONSTANT\",\n    \"combineBasketDiscounts\": false,\n    \"discountOrder\": {\n      \"strategy\": \"DISCOUNT_VALUE\",\n      \"direction\": \"asc\"\n    },\n    \"returnFields\": [\n      \"string\"\n    ]\n  },\n  \"lockSettings\": {\n    \"promotionRequestedLockTtl\": 60,\n    \"processSalePromotionActivationLockWaitTime\": 0,\n    \"lockPromotionRequestByIdentifier\": true\n  },\n  \"transferSettings\": [\n    {\n      \"expression\": \"2395fc33-f2f0-420c-8e7b-0ac63c3454de\",\n      \"recipient\": {\n        \"segments\": [\n          \"string\"\n        ]\n      },\n      \"sender\": {\n        \"segments\": [\n          \"string\"\n        ]\n      }\n    }\n  ],\n  \"cashbackSettings\": {\n    \"exchangeRate\": 0.0001,\n    \"limits\": {\n      \"minPoints\": 10,\n      \"maxPoints\": 1000,\n      \"maxTransactionAmount\": 20,\n      \"maxTransactionPercentage\": 50\n    }\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/v4/promotions/settings\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/settings\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  checkoutSettings: {\n    handbillUuidsForCheckout: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],\n    codeGeneration: {prefix: 'string', length: 36, crc: true}\n  },\n  enableCodeGeneration: true,\n  codePrefix: 'SYN',\n  blockTag: 'BLOCKED',\n  expression: '8e30707e-988c-498c-a88e-47375a3dcfb5',\n  promotionListSettings: {\n    setFieldsValues: {},\n    where: {\n      excludeIds: [3],\n      handbillPromotionIds: [3],\n      visibilityStatus: ['DRAFT'],\n      status: ['ASSIGNED'],\n      statusByType: {\n        GENERAL: ['ASSIGNED'],\n        CUSTOM: ['ASSIGNED'],\n        MEMBERS_ONLY: ['ASSIGNED'],\n        HANDBILL: ['ASSIGNED']\n      },\n      target: ['ALL'],\n      targetByType: {GENERAL: ['ALL'], CUSTOM: ['ALL'], MEMBERS_ONLY: ['ALL'], HANDBILL: ['ALL']},\n      type: ['MEMBERS_ONLY'],\n      presentOnly: true,\n      lastingOnly: true,\n      displayableOnly: true,\n      checkExistsInTarget: true,\n      tagNames: ['string']\n    },\n    fields: ['string'],\n    sort: {forDBQuery: [{field: 'headerName', direction: 'asc'}]},\n    page: 0,\n    limit: 0\n  },\n  promotionAssignmentSettings: {\n    setFieldsValues: {},\n    where: {\n      excludeIds: [3],\n      handbillPromotionIds: [3],\n      visibilityStatus: ['DRAFT'],\n      status: ['ASSIGNED'],\n      statusByType: {\n        GENERAL: ['ASSIGNED'],\n        CUSTOM: ['ASSIGNED'],\n        MEMBERS_ONLY: ['ASSIGNED'],\n        HANDBILL: ['ASSIGNED']\n      },\n      target: ['ALL'],\n      targetByType: {GENERAL: ['ALL'], CUSTOM: ['ALL'], MEMBERS_ONLY: ['ALL'], HANDBILL: ['ALL']},\n      type: ['MEMBERS_ONLY'],\n      presentOnly: true,\n      lastingOnly: true,\n      displayableOnly: true,\n      checkExistsInTarget: true,\n      tagNames: ['string']\n    },\n    fields: ['string'],\n    sort: {forDBQuery: [{field: 'headerName', direction: 'asc'}]},\n    page: 0,\n    limit: 0\n  },\n  restorePointsOnProfileDeactivation: true,\n  allowRedeemCompletionWhenBlocked: false,\n  saleSettings: {\n    discountSourceType: 0,\n    clientIdCardType: 0,\n    handbillCheckout: '04845f2a-86bf-4319-89c4-1f24d4e1f58e',\n    priceValueBaseStrategy: 'CONSTANT',\n    combineBasketDiscounts: false,\n    discountOrder: {strategy: 'DISCOUNT_VALUE', direction: 'asc'},\n    returnFields: ['string']\n  },\n  lockSettings: {\n    promotionRequestedLockTtl: 60,\n    processSalePromotionActivationLockWaitTime: 0,\n    lockPromotionRequestByIdentifier: true\n  },\n  transferSettings: [\n    {\n      expression: '2395fc33-f2f0-420c-8e7b-0ac63c3454de',\n      recipient: {segments: ['string']},\n      sender: {segments: ['string']}\n    }\n  ],\n  cashbackSettings: {\n    exchangeRate: 0.0001,\n    limits: {\n      minPoints: 10,\n      maxPoints: 1000,\n      maxTransactionAmount: 20,\n      maxTransactionPercentage: 50\n    }\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/settings');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"checkoutSettings\":{\"handbillUuidsForCheckout\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"codeGeneration\":{\"prefix\":\"string\",\"length\":36,\"crc\":true}},\"enableCodeGeneration\":true,\"codePrefix\":\"SYN\",\"blockTag\":\"BLOCKED\",\"expression\":\"8e30707e-988c-498c-a88e-47375a3dcfb5\",\"promotionListSettings\":{\"setFieldsValues\":{},\"where\":{\"excludeIds\":[3],\"handbillPromotionIds\":[3],\"visibilityStatus\":[\"DRAFT\"],\"status\":[\"ASSIGNED\"],\"statusByType\":{\"GENERAL\":[\"ASSIGNED\"],\"CUSTOM\":[\"ASSIGNED\"],\"MEMBERS_ONLY\":[\"ASSIGNED\"],\"HANDBILL\":[\"ASSIGNED\"]},\"target\":[\"ALL\"],\"targetByType\":{\"GENERAL\":[\"ALL\"],\"CUSTOM\":[\"ALL\"],\"MEMBERS_ONLY\":[\"ALL\"],\"HANDBILL\":[\"ALL\"]},\"type\":[\"MEMBERS_ONLY\"],\"presentOnly\":true,\"lastingOnly\":true,\"displayableOnly\":true,\"checkExistsInTarget\":true,\"tagNames\":[\"string\"]},\"fields\":[\"string\"],\"sort\":{\"forDBQuery\":[{\"field\":\"headerName\",\"direction\":\"asc\"}]},\"page\":0,\"limit\":0},\"promotionAssignmentSettings\":{\"setFieldsValues\":{},\"where\":{\"excludeIds\":[3],\"handbillPromotionIds\":[3],\"visibilityStatus\":[\"DRAFT\"],\"status\":[\"ASSIGNED\"],\"statusByType\":{\"GENERAL\":[\"ASSIGNED\"],\"CUSTOM\":[\"ASSIGNED\"],\"MEMBERS_ONLY\":[\"ASSIGNED\"],\"HANDBILL\":[\"ASSIGNED\"]},\"target\":[\"ALL\"],\"targetByType\":{\"GENERAL\":[\"ALL\"],\"CUSTOM\":[\"ALL\"],\"MEMBERS_ONLY\":[\"ALL\"],\"HANDBILL\":[\"ALL\"]},\"type\":[\"MEMBERS_ONLY\"],\"presentOnly\":true,\"lastingOnly\":true,\"displayableOnly\":true,\"checkExistsInTarget\":true,\"tagNames\":[\"string\"]},\"fields\":[\"string\"],\"sort\":{\"forDBQuery\":[{\"field\":\"headerName\",\"direction\":\"asc\"}]},\"page\":0,\"limit\":0},\"restorePointsOnProfileDeactivation\":true,\"allowRedeemCompletionWhenBlocked\":false,\"saleSettings\":{\"discountSourceType\":0,\"clientIdCardType\":0,\"handbillCheckout\":\"04845f2a-86bf-4319-89c4-1f24d4e1f58e\",\"priceValueBaseStrategy\":\"CONSTANT\",\"combineBasketDiscounts\":false,\"discountOrder\":{\"strategy\":\"DISCOUNT_VALUE\",\"direction\":\"asc\"},\"returnFields\":[\"string\"]},\"lockSettings\":{\"promotionRequestedLockTtl\":60,\"processSalePromotionActivationLockWaitTime\":0,\"lockPromotionRequestByIdentifier\":true},\"transferSettings\":[{\"expression\":\"2395fc33-f2f0-420c-8e7b-0ac63c3454de\",\"recipient\":{\"segments\":[\"string\"]},\"sender\":{\"segments\":[\"string\"]}}],\"cashbackSettings\":{\"exchangeRate\":0.0001,\"limits\":{\"minPoints\":10,\"maxPoints\":1000,\"maxTransactionAmount\":20,\"maxTransactionPercentage\":50}}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/v4/promotions/settings\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"checkoutSettings\\\":{\\\"handbillUuidsForCheckout\\\":[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"],\\\"codeGeneration\\\":{\\\"prefix\\\":\\\"string\\\",\\\"length\\\":36,\\\"crc\\\":true}},\\\"enableCodeGeneration\\\":true,\\\"codePrefix\\\":\\\"SYN\\\",\\\"blockTag\\\":\\\"BLOCKED\\\",\\\"expression\\\":\\\"8e30707e-988c-498c-a88e-47375a3dcfb5\\\",\\\"promotionListSettings\\\":{\\\"setFieldsValues\\\":{},\\\"where\\\":{\\\"excludeIds\\\":[3],\\\"handbillPromotionIds\\\":[3],\\\"visibilityStatus\\\":[\\\"DRAFT\\\"],\\\"status\\\":[\\\"ASSIGNED\\\"],\\\"statusByType\\\":{\\\"GENERAL\\\":[\\\"ASSIGNED\\\"],\\\"CUSTOM\\\":[\\\"ASSIGNED\\\"],\\\"MEMBERS_ONLY\\\":[\\\"ASSIGNED\\\"],\\\"HANDBILL\\\":[\\\"ASSIGNED\\\"]},\\\"target\\\":[\\\"ALL\\\"],\\\"targetByType\\\":{\\\"GENERAL\\\":[\\\"ALL\\\"],\\\"CUSTOM\\\":[\\\"ALL\\\"],\\\"MEMBERS_ONLY\\\":[\\\"ALL\\\"],\\\"HANDBILL\\\":[\\\"ALL\\\"]},\\\"type\\\":[\\\"MEMBERS_ONLY\\\"],\\\"presentOnly\\\":true,\\\"lastingOnly\\\":true,\\\"displayableOnly\\\":true,\\\"checkExistsInTarget\\\":true,\\\"tagNames\\\":[\\\"string\\\"]},\\\"fields\\\":[\\\"string\\\"],\\\"sort\\\":{\\\"forDBQuery\\\":[{\\\"field\\\":\\\"headerName\\\",\\\"direction\\\":\\\"asc\\\"}]},\\\"page\\\":0,\\\"limit\\\":0},\\\"promotionAssignmentSettings\\\":{\\\"setFieldsValues\\\":{},\\\"where\\\":{\\\"excludeIds\\\":[3],\\\"handbillPromotionIds\\\":[3],\\\"visibilityStatus\\\":[\\\"DRAFT\\\"],\\\"status\\\":[\\\"ASSIGNED\\\"],\\\"statusByType\\\":{\\\"GENERAL\\\":[\\\"ASSIGNED\\\"],\\\"CUSTOM\\\":[\\\"ASSIGNED\\\"],\\\"MEMBERS_ONLY\\\":[\\\"ASSIGNED\\\"],\\\"HANDBILL\\\":[\\\"ASSIGNED\\\"]},\\\"target\\\":[\\\"ALL\\\"],\\\"targetByType\\\":{\\\"GENERAL\\\":[\\\"ALL\\\"],\\\"CUSTOM\\\":[\\\"ALL\\\"],\\\"MEMBERS_ONLY\\\":[\\\"ALL\\\"],\\\"HANDBILL\\\":[\\\"ALL\\\"]},\\\"type\\\":[\\\"MEMBERS_ONLY\\\"],\\\"presentOnly\\\":true,\\\"lastingOnly\\\":true,\\\"displayableOnly\\\":true,\\\"checkExistsInTarget\\\":true,\\\"tagNames\\\":[\\\"string\\\"]},\\\"fields\\\":[\\\"string\\\"],\\\"sort\\\":{\\\"forDBQuery\\\":[{\\\"field\\\":\\\"headerName\\\",\\\"direction\\\":\\\"asc\\\"}]},\\\"page\\\":0,\\\"limit\\\":0},\\\"restorePointsOnProfileDeactivation\\\":true,\\\"allowRedeemCompletionWhenBlocked\\\":false,\\\"saleSettings\\\":{\\\"discountSourceType\\\":0,\\\"clientIdCardType\\\":0,\\\"handbillCheckout\\\":\\\"04845f2a-86bf-4319-89c4-1f24d4e1f58e\\\",\\\"priceValueBaseStrategy\\\":\\\"CONSTANT\\\",\\\"combineBasketDiscounts\\\":false,\\\"discountOrder\\\":{\\\"strategy\\\":\\\"DISCOUNT_VALUE\\\",\\\"direction\\\":\\\"asc\\\"},\\\"returnFields\\\":[\\\"string\\\"]},\\\"lockSettings\\\":{\\\"promotionRequestedLockTtl\\\":60,\\\"processSalePromotionActivationLockWaitTime\\\":0,\\\"lockPromotionRequestByIdentifier\\\":true},\\\"transferSettings\\\":[{\\\"expression\\\":\\\"2395fc33-f2f0-420c-8e7b-0ac63c3454de\\\",\\\"recipient\\\":{\\\"segments\\\":[\\\"string\\\"]},\\\"sender\\\":{\\\"segments\\\":[\\\"string\\\"]}}],\\\"cashbackSettings\\\":{\\\"exchangeRate\\\":0.0001,\\\"limits\\\":{\\\"minPoints\\\":10,\\\"maxPoints\\\":1000,\\\"maxTransactionAmount\\\":20,\\\"maxTransactionPercentage\\\":50}}}\")\n  .asString();"}]}},"/v4/promotions/lock/create-points-lock-for-client/{identifierType}/{identifierValue}":{"post":{"tags":["Promotion locks"],"summary":"Create point lock for profile","description":"Create a point lock for a profile. That profile cannot activate or de-activate promotions based on loyalty points until the lock is released. The profile can still redeem promotions.  \nThis lock is released with the [\"Release point lock for profile\" endpoint](#operation/endpointLockReleaseLockForClientPOST) or when its TTL (defined in the query parameters) expires.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_LOCK_UPDATE`\n\n**User role permission required:** `campaigns_promotions: update`\n","operationId":"endpointLockCreateLockForClientPOST","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/promotions-queryLockTtlSec"},{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"}],"responses":{"200":{"description":"Lock created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-createLockRes"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"$ref":"#/components/responses/promotions-ClientNotFoundError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/endpointLockCreateLockForClientPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setQueryData([\n  'lockTtlSec' => 'SOME_NUMBER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/lock/create-points-lock-for-client/email/%7BidentifierValue%7D?lockTtlSec=SOME_NUMBER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/lock/release-points-lock-for-client/{identifierType}/{identifierValue}/{lockIdentifier}":{"post":{"tags":["Promotion locks"],"summary":"Release point lock for profile","description":"Release a [point lock](#operation/endpointLockCreateLockForClientPOST) from a profile. That profile can now activate and de-activate promotions based on loyalty points.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_LOCK_UPDATE`\n\n**User role permission required:** `campaigns_promotions: update`\n","operationId":"endpointLockReleaseLockForClientPOST","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/promotions-pathLockIdentifier"},{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"}],"responses":{"200":{"description":"Lock released","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-releaseLockRes"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"$ref":"#/components/responses/promotions-ClientNotFoundError"},"409":{"$ref":"#/components/responses/promotions-LockAlreadyExistsError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/endpointLockReleaseLockForClientPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119 \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/lock/release-points-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/lock/release-promotion-requested-lock-for-client/{identifierType}/{identifierValue}/{lockIdentifier}":{"post":{"tags":["Promotion locks"],"summary":"Release \"promotion requested\" lock from profile","description":"Release a \"promotion requested\" lock from a profile. That profile can now fetch promotion lists. This kind of lock can be applied when using the [Get Profile promotions by a custom filter](#operation/GetClientPromotionsByACustomFilter) endpoint.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `PROMOTIONS_LOCK_UPDATE`\n\n**User role permission required:** `campaigns_promotions: update`\n","operationId":"endpointLockReleasePromotionRequestedLockForClientPOST","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/promotions-pathLockIdentifier"},{"$ref":"#/components/parameters/promotions-pathClientIdentifierType"},{"$ref":"#/components/parameters/promotions-pathIdentifierValue"}],"responses":{"200":{"description":"Lock released","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-releaseLockRes"}}}},"400":{"$ref":"#/components/responses/promotions-400"},"401":{"$ref":"#/components/responses/promotions-401"},"403":{"$ref":"#/components/responses/promotions-403"},"404":{"description":"Not found","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/promotions-ProfileNotFoundErrorV1"},{"$ref":"#/components/schemas/promotions-LockNotFoundErrorV1"}]}}}}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotion-locks/operation/endpointLockReleasePromotionRequestedLockForClientPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119 \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/lock/release-promotion-requested-lock-for-client/email/%7BidentifierValue%7D/2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/promotions/v2/points/transfer":{"post":{"tags":["Promotions points"],"summary":"Transfer points to another profile","description":"With this method, a profile can send some of their points to another profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n","operationId":"PointsTransfer","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"required":["pointsAmount","recipient"],"properties":{"pointsAmount":{"type":"integer","description":"How many points to send","minimum":1},"recipient":{"type":"object","description":"Identifier of the recipient","required":["clientKey","clientKeyValue"],"properties":{"clientKey":{"$ref":"#/components/schemas/promotions-clientKey"},"clientKeyValue":{"$ref":"#/components/schemas/promotions-clientKeyValue"},"name":{"$ref":"#/components/schemas/promotions-recipientName"}}},"sender":{"type":"object","description":"Information about the sender","properties":{"name":{"$ref":"#/components/schemas/promotions-senderName"}}},"message":{"type":"string","description":"A message that the recipient will receive with the points","maxLength":256}}}}}},"responses":{"202":{"description":"Point transfer scheduled","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Point transfer scheduled"}}}}}},"400":{"$ref":"#/components/responses/promotions-InvalidDataErrorResponseV2"},"404":{"$ref":"#/components/responses/promotions-ClientNotFoundErrorResponseV2"},"422":{"description":"Unprocessable point transfer","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/promotions-ClientNotHaveRequiredPointsError"},{"$ref":"#/components/schemas/promotions-ClientPointsSenderNotInSegmentError"},{"$ref":"#/components/schemas/promotions-ClientPointsRecipientNotInSegmentError"}]}}}},"423":{"$ref":"#/components/responses/promotions-ClientPointsLockErrorResponseV2"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Promotions-points/operation/PointsTransfer"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/promotions/v2/points/transfer \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"pointsAmount\":1,\"recipient\":{\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\",\"name\":\"string\"},\"sender\":{\"name\":\"string\"},\"message\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"pointsAmount\\\":1,\\\"recipient\\\":{\\\"clientKey\\\":\\\"clientId\\\",\\\"clientKeyValue\\\":\\\"434428563\\\",\\\"name\\\":\\\"string\\\"},\\\"sender\\\":{\\\"name\\\":\\\"string\\\"},\\\"message\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/promotions/v2/points/transfer\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"pointsAmount\": 1,\n  \"recipient\": {\n    \"clientKey\": \"clientId\",\n    \"clientKeyValue\": \"434428563\",\n    \"name\": \"string\"\n  },\n  \"sender\": {\n    \"name\": \"string\"\n  },\n  \"message\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/promotions/v2/points/transfer\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/promotions/v2/points/transfer\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  pointsAmount: 1,\n  recipient: {clientKey: 'clientId', clientKeyValue: '434428563', name: 'string'},\n  sender: {name: 'string'},\n  message: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/promotions/v2/points/transfer');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"pointsAmount\":1,\"recipient\":{\"clientKey\":\"clientId\",\"clientKeyValue\":\"434428563\",\"name\":\"string\"},\"sender\":{\"name\":\"string\"},\"message\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/promotions/v2/points/transfer\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"pointsAmount\\\":1,\\\"recipient\\\":{\\\"clientKey\\\":\\\"clientId\\\",\\\"clientKeyValue\\\":\\\"434428563\\\",\\\"name\\\":\\\"string\\\"},\\\"sender\\\":{\\\"name\\\":\\\"string\\\"},\\\"message\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/push-devices/web-push/clean-up/{clientId}":{"post":{"security":[{"JWT":[]}],"tags":["Profile devices"],"operationId":"cleanUpWebPushSubscriber","summary":"Clean up web push tokens\n","description":"Remove mobile push Firebase tokens from profile. You can use this endpoint to clean up tokens updated before a selected date or by service worker version. \n\nUsing this endpoint generates a `webpush.tokenDelete` event for each deleted token.\n\nIf no tokens are left after the clean-up, the `has_webpush_devices` attribute in the profile is set to false.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `PUSH_DEVICES_SERVICE_WEB_PUSH_DEVICES_DELETE`\n\n**User role permission required:** `client_detail: delete`\n","parameters":[{"$ref":"#/components/parameters/push-devices-service-pathClientId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/push-devices-service-WebPushCleanupRequest"}}},"required":true},"responses":{"200":{"description":"Tokens deleted"},"4xx":{"$ref":"#/components/responses/push-devices-service-4xx"}},"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-devices/operation/cleanUpWebPushSubscriber"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/push-devices/web-push/clean-up/%7BclientId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"type\":\"BY_UPDATED_BEFORE\",\"updated\":\"2019-08-24T14:15:22Z\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"type\\\":\\\"BY_UPDATED_BEFORE\\\",\\\"updated\\\":\\\"2019-08-24T14:15:22Z\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/push-devices/web-push/clean-up/%7BclientId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"type\": \"BY_UPDATED_BEFORE\",\n  \"updated\": \"2019-08-24T14:15:22Z\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/push-devices/web-push/clean-up/%7BclientId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/push-devices/web-push/clean-up/%7BclientId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({type: 'BY_UPDATED_BEFORE', updated: '2019-08-24T14:15:22Z'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/push-devices/web-push/clean-up/%7BclientId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"type\":\"BY_UPDATED_BEFORE\",\"updated\":\"2019-08-24T14:15:22Z\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/push-devices/web-push/clean-up/%7BclientId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"type\\\":\\\"BY_UPDATED_BEFORE\\\",\\\"updated\\\":\\\"2019-08-24T14:15:22Z\\\"}\")\n  .asString();"}]}},"/push-devices/mobile-push-subscriber/clean-up/{clientId}":{"post":{"security":[{"JWT":[]}],"tags":["Profile devices"],"operationId":"cleanUpMobilePushSubscriber","summary":"Clean up mobile push tokens","description":"Remove mobile push Firebase tokens from profile. You can use this endpoint to clean up tokens updated before a selected date. \n\nUsing this endpoint generates a `push.tokenDelete` event for each deleted token.  \n\nIf no tokens are left after the clean-up, the `has_mobile_push_devices` attribute in the profile is set to false.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `PUSH_DEVICES_SERVICE_MOBILE_PUSH_DEVICES_DELETE`\n\n**User role permission required:** `client_detail: delete`\n","parameters":[{"$ref":"#/components/parameters/push-devices-service-pathClientId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/push-devices-service-MobilePushCleanupRequest"}}},"required":true},"responses":{"200":{"description":"Tokens deleted"},"4xx":{"$ref":"#/components/responses/push-devices-service-4xx"}},"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-devices/operation/cleanUpMobilePushSubscriber"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"type\":\"BY_UPDATED_BEFORE\",\"updated\":\"2019-08-24T14:15:22Z\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"type\\\":\\\"BY_UPDATED_BEFORE\\\",\\\"updated\\\":\\\"2019-08-24T14:15:22Z\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"type\": \"BY_UPDATED_BEFORE\",\n  \"updated\": \"2019-08-24T14:15:22Z\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({type: 'BY_UPDATED_BEFORE', updated: '2019-08-24T14:15:22Z'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"type\":\"BY_UPDATED_BEFORE\",\"updated\":\"2019-08-24T14:15:22Z\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"type\\\":\\\"BY_UPDATED_BEFORE\\\",\\\"updated\\\":\\\"2019-08-24T14:15:22Z\\\"}\")\n  .asString();"}]}},"/push-devices/clients/by-uuid/{identifierValue}/linked-devices":{"post":{"security":[{"JWT":[]}],"summary":"Link a device by other parameters","description":" Assign a device to a profile UUID. A profile may have many devices assigned. If request is made by PROFILE or ANONYMOUS_PROFILE uuid is taken from jwt token.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `API_BY_IDENTIFY_DEVICE_CLIENT_UPDATE`\n\n**User role permission required:** `client_info: update`\n","operationId":"LinkAClientDeviceByClientUuid","parameters":[{"name":"identifierType","in":"path","required":true,"description":"The profile identifier to use for the request","schema":{"type":"string","enum":["by-customId","by-uuid"]}},{"$ref":"#/components/parameters/push-devices-service-pathIdentifierValue"},{"$ref":"#/components/parameters/push-devices-service-acceptHeader"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/push-devices-service-LinkaClientdeviceRequest"}}},"required":true},"responses":{"202":{"description":"Request accepted","headers":{}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/push-devices-service-HTTP400"},"example":{"error":"Bad Request","status":400,"timestamp":"2020-10-29T12:34:02.222Z","path":"/clients/by-uuid/779465fc-a0c5-41e5-9be2-51c00b2588b4/linked-devices","message":"Some fields did not pass validation","errors":[{"code":12301,"field":"deviceId","message":"12301"}]}}}},"401":{"$ref":"#/components/responses/push-devices-service-401"},"403":{"$ref":"#/components/responses/push-devices-service-403"},"404":{"description":"Profile not found"},"415":{"$ref":"#/components/responses/push-devices-service-415"}},"deprecated":false,"tags":["Profile devices"],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceByClientUuid"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"deviceId\\\":\\\"string\\\",\\\"registrationId\\\":\\\"string\\\",\\\"type\\\":\\\"android\\\",\\\"bluetoothAddress\\\":\\\"string\\\",\\\"macAddress\\\":\\\"string\\\",\\\"manufacturer\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"osVersion\\\":\\\"string\\\",\\\"product\\\":\\\"a51ul_htc_europe\\\",\\\"screenHeight\\\":0,\\\"screenWidth\\\":0,\\\"publicKey\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"deviceId\": \"string\",\n  \"registrationId\": \"string\",\n  \"type\": \"android\",\n  \"bluetoothAddress\": \"string\",\n  \"macAddress\": \"string\",\n  \"manufacturer\": \"string\",\n  \"model\": \"string\",\n  \"osVersion\": \"string\",\n  \"product\": \"a51ul_htc_europe\",\n  \"screenHeight\": 0,\n  \"screenWidth\": 0,\n  \"publicKey\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  deviceId: 'string',\n  registrationId: 'string',\n  type: 'android',\n  bluetoothAddress: 'string',\n  macAddress: 'string',\n  manufacturer: 'string',\n  model: 'string',\n  osVersion: 'string',\n  product: 'a51ul_htc_europe',\n  screenHeight: 0,\n  screenWidth: 0,\n  publicKey: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"deviceId\\\":\\\"string\\\",\\\"registrationId\\\":\\\"string\\\",\\\"type\\\":\\\"android\\\",\\\"bluetoothAddress\\\":\\\"string\\\",\\\"macAddress\\\":\\\"string\\\",\\\"manufacturer\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"osVersion\\\":\\\"string\\\",\\\"product\\\":\\\"a51ul_htc_europe\\\",\\\"screenHeight\\\":0,\\\"screenWidth\\\":0,\\\"publicKey\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/push-devices/clients/linked-devices":{"post":{"security":[{"JWT":[]}],"summary":"Link a device by other parameters","description":" Assign a device to a profile UUID from JWT token. A profile may have many devices assigned.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**User role permission required:** `client_info: update`\n","operationId":"LinkAClientDeviceByClientUuidFromJwtToken","parameters":[{"name":"identifierType","in":"path","required":true,"description":"The profile identifier to use for the request","schema":{"type":"string","enum":["by-customId","by-uuid"]}},{"$ref":"#/components/parameters/push-devices-service-pathIdentifierValue"},{"$ref":"#/components/parameters/push-devices-service-acceptHeader"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/push-devices-service-LinkaClientdeviceRequest"}}},"required":true},"responses":{"202":{"description":"Request accepted","headers":{}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/push-devices-service-HTTP400"},"example":{"error":"Bad Request","status":400,"timestamp":"2020-10-29T12:34:02.222Z","path":"/clients/linked-devices","message":"Some fields did not pass validation","errors":[{"code":12301,"field":"deviceId","message":"12301"}]}}}},"401":{"$ref":"#/components/responses/push-devices-service-401"},"403":{"$ref":"#/components/responses/push-devices-service-403"},"404":{"description":"Profile not found"},"415":{"$ref":"#/components/responses/push-devices-service-415"}},"deprecated":false,"tags":["Profile devices"],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceByClientUuidFromJwtToken"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/push-devices/clients/linked-devices \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"deviceId\\\":\\\"string\\\",\\\"registrationId\\\":\\\"string\\\",\\\"type\\\":\\\"android\\\",\\\"bluetoothAddress\\\":\\\"string\\\",\\\"macAddress\\\":\\\"string\\\",\\\"manufacturer\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"osVersion\\\":\\\"string\\\",\\\"product\\\":\\\"a51ul_htc_europe\\\",\\\"screenHeight\\\":0,\\\"screenWidth\\\":0,\\\"publicKey\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/push-devices/clients/linked-devices\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"deviceId\": \"string\",\n  \"registrationId\": \"string\",\n  \"type\": \"android\",\n  \"bluetoothAddress\": \"string\",\n  \"macAddress\": \"string\",\n  \"manufacturer\": \"string\",\n  \"model\": \"string\",\n  \"osVersion\": \"string\",\n  \"product\": \"a51ul_htc_europe\",\n  \"screenHeight\": 0,\n  \"screenWidth\": 0,\n  \"publicKey\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/push-devices/clients/linked-devices\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/push-devices/clients/linked-devices\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  deviceId: 'string',\n  registrationId: 'string',\n  type: 'android',\n  bluetoothAddress: 'string',\n  macAddress: 'string',\n  manufacturer: 'string',\n  model: 'string',\n  osVersion: 'string',\n  product: 'a51ul_htc_europe',\n  screenHeight: 0,\n  screenWidth: 0,\n  publicKey: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/push-devices/clients/linked-devices');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/push-devices/clients/linked-devices\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"deviceId\\\":\\\"string\\\",\\\"registrationId\\\":\\\"string\\\",\\\"type\\\":\\\"android\\\",\\\"bluetoothAddress\\\":\\\"string\\\",\\\"macAddress\\\":\\\"string\\\",\\\"manufacturer\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"osVersion\\\":\\\"string\\\",\\\"product\\\":\\\"a51ul_htc_europe\\\",\\\"screenHeight\\\":0,\\\"screenWidth\\\":0,\\\"publicKey\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/rules":{"get":{"summary":"Get rules","description":"Retrieves a list of rules.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `QUERY_RULES_SEARCH_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"GetRulesV2","tags":["Query Rules"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/query-rules-v2-inPathIndexId"},{"$ref":"#/components/parameters/query-rules-v2-statusFilter"},{"$ref":"#/components/parameters/query-rules-v2-nameFilter"},{"$ref":"#/components/parameters/query-rules-v2-paginationPage"},{"$ref":"#/components/parameters/query-rules-v2-paginationLimit"},{"$ref":"#/components/parameters/query-rules-v2-paginationSortBy"},{"$ref":"#/components/parameters/query-rules-v2-paginationOrdering"},{"$ref":"#/components/parameters/query-rules-v2-paginationIncludeMeta"},{"$ref":"#/components/parameters/query-rules-v2-inQueryDirectoryId"},{"$ref":"#/components/parameters/query-rules-v2-InQuerySearch"},{"$ref":"#/components/parameters/query-rules-v2-consequenceTypeFilter"}],"responses":{"200":{"description":"List of rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-PaginatedRules"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Query-Rules/operation/GetRulesV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'status' => 'SOME_STRING_VALUE',\n  'name' => 'SOME_STRING_VALUE',\n  'page' => '4',\n  'limit' => '100',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'SOME_BOOLEAN_VALUE',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'consequenceType' => 'SOME_ARRAY_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules?status=SOME_STRING_VALUE&name=SOME_STRING_VALUE&page=4&limit=100&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&directoryId=SOME_STRING_VALUE&search=SOME_STRING_VALUE&consequenceType=SOME_ARRAY_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Create rule","description":"Creates a new rule.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `QUERY_RULES_SEARCH_CREATE`\n\n**User role permission required:** `assets_search: create`\n","operationId":"PostRuleV2","tags":["Query Rules"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/query-rules-v2-inPathIndexId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/query-rules-v2-RuleName"},"author":{"$ref":"#/components/schemas/query-rules-v2-RuleAuthor"},"activeFrom":{"$ref":"#/components/schemas/query-rules-v2-RuleActiveFromDatetime"},"activeTo":{"$ref":"#/components/schemas/query-rules-v2-RuleActiveToDatetime"},"timezone":{"$ref":"#/components/schemas/query-rules-v2-RuleTimezoneSchema"},"data":{"$ref":"#/components/schemas/query-rules-v2-RuleDataSchema"}}}}},"description":"Request for posting a new rule or updating an existing one","required":true},"responses":{"200":{"description":"ID of the new rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-RuleWithStatus"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Query-Rules/operation/PostRuleV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"author\":0,\"activeFrom\":\"string\",\"activeTo\":\"string\",\"timezone\":\"string\",\"data\":{\"audience\":{\"segmentationIds\":[\"34ab56cd-789be-22ee-11ab-123456789abc\",\"12xy34z5-456b-33cc-7o52-987654321ece\"]},\"conditions\":{\"patterns\":[\"phone\",\"notebook\",\"mouse {color} {brand}\"],\"matchingType\":\"is\",\"contexts\":[\"listing\",\"web\",\"mobile\"],\"filters\":{\"textFilters\":{\"color\":{\"values\":[\"green\",\"red\"],\"matchingType\":\"InUserFilters\"}},\"rangeFilters\":{\"price\":{\"ranges\":[{\"rightEnd\":{\"value\":20,\"inclusive\":true}}],\"matchingType\":\"Exact\"}},\"datetimeFilters\":{\"created\":{\"ranges\":[{\"rightEnd\":{\"value\":\"2024-01-01\",\"inclusive\":true}}],\"matchingType\":\"Exact\"}}}},\"queryConsequences\":[{\"type\":\"removeWord\",\"word\":\"string\",\"replacement\":\"string\"}],\"postQueryConsequences\":{\"hideHits\":[\"string\"],\"promoteHits\":[{\"id\":\"string\",\"position\":0}],\"promoteHitsPositionStrategy\":{\"type\":\"custom\"},\"standardFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"elasticFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"boostFilters\":[{\"weight\":-100,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"topHitsFilters\":[{\"hitsNumber\":1,\"positions\":[1],\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":0,\"categoryLevelModifier\":0},\"sortBy\":{\"attribute\":\"string\",\"ordering\":\"desc\"},\"customData\":\"{\\\"customLandingPage\\\": \\\"https://synerise.com/\\\"}\",\"returnNoData\":false,\"pinFacets\":[{\"attribute\":\"size\",\"position\":1},{\"attribute\":\"width\",\"position\":2},{\"attribute\":\"gift_wrap\"}],\"hideFacets\":[\"material\",\"fabric\",\"sleeve_length\"],\"scoringOverride\":{\"type\":\"ranking\",\"weights\":{\"personalized\":5,\"pageVisitsPopularity\":5,\"transactionsPopularity\":5,\"pageVisits7DaysPopularity\":5,\"transactions7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5}}}}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"author\\\":0,\\\"activeFrom\\\":\\\"string\\\",\\\"activeTo\\\":\\\"string\\\",\\\"timezone\\\":\\\"string\\\",\\\"data\\\":{\\\"audience\\\":{\\\"segmentationIds\\\":[\\\"34ab56cd-789be-22ee-11ab-123456789abc\\\",\\\"12xy34z5-456b-33cc-7o52-987654321ece\\\"]},\\\"conditions\\\":{\\\"patterns\\\":[\\\"phone\\\",\\\"notebook\\\",\\\"mouse {color} {brand}\\\"],\\\"matchingType\\\":\\\"is\\\",\\\"contexts\\\":[\\\"listing\\\",\\\"web\\\",\\\"mobile\\\"],\\\"filters\\\":{\\\"textFilters\\\":{\\\"color\\\":{\\\"values\\\":[\\\"green\\\",\\\"red\\\"],\\\"matchingType\\\":\\\"InUserFilters\\\"}},\\\"rangeFilters\\\":{\\\"price\\\":{\\\"ranges\\\":[{\\\"rightEnd\\\":{\\\"value\\\":20,\\\"inclusive\\\":true}}],\\\"matchingType\\\":\\\"Exact\\\"}},\\\"datetimeFilters\\\":{\\\"created\\\":{\\\"ranges\\\":[{\\\"rightEnd\\\":{\\\"value\\\":\\\"2024-01-01\\\",\\\"inclusive\\\":true}}],\\\"matchingType\\\":\\\"Exact\\\"}}}},\\\"queryConsequences\\\":[{\\\"type\\\":\\\"removeWord\\\",\\\"word\\\":\\\"string\\\",\\\"replacement\\\":\\\"string\\\"}],\\\"postQueryConsequences\\\":{\\\"hideHits\\\":[\\\"string\\\"],\\\"promoteHits\\\":[{\\\"id\\\":\\\"string\\\",\\\"position\\\":0}],\\\"promoteHitsPositionStrategy\\\":{\\\"type\\\":\\\"custom\\\"},\\\"standardFilters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]},\\\"elasticFilters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]},\\\"boostFilters\\\":[{\\\"weight\\\":-100,\\\"filters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]}}],\\\"topHitsFilters\\\":[{\\\"hitsNumber\\\":1,\\\"positions\\\":[1],\\\"filters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]}}],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"categoryLevelModifier\\\":0},\\\"sortBy\\\":{\\\"attribute\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\"},\\\"customData\\\":\\\"{\\\\\\\"customLandingPage\\\\\\\": \\\\\\\"https://synerise.com/\\\\\\\"}\\\",\\\"returnNoData\\\":false,\\\"pinFacets\\\":[{\\\"attribute\\\":\\\"size\\\",\\\"position\\\":1},{\\\"attribute\\\":\\\"width\\\",\\\"position\\\":2},{\\\"attribute\\\":\\\"gift_wrap\\\"}],\\\"hideFacets\\\":[\\\"material\\\",\\\"fabric\\\",\\\"sleeve_length\\\"],\\\"scoringOverride\\\":{\\\"type\\\":\\\"ranking\\\",\\\"weights\\\":{\\\"personalized\\\":5,\\\"pageVisitsPopularity\\\":5,\\\"transactionsPopularity\\\":5,\\\"pageVisits7DaysPopularity\\\":5,\\\"transactions7DaysPopularity\\\":5,\\\"revenueBoost\\\":5,\\\"conversionRateBoost\\\":5}}}}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/rules\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"author\": 0,\n  \"activeFrom\": \"string\",\n  \"activeTo\": \"string\",\n  \"timezone\": \"string\",\n  \"data\": {\n    \"audience\": {\n      \"segmentationIds\": [\n        \"34ab56cd-789be-22ee-11ab-123456789abc\",\n        \"12xy34z5-456b-33cc-7o52-987654321ece\"\n      ]\n    },\n    \"conditions\": {\n      \"patterns\": [\n        \"phone\",\n        \"notebook\",\n        \"mouse {color} {brand}\"\n      ],\n      \"matchingType\": \"is\",\n      \"contexts\": [\n        \"listing\",\n        \"web\",\n        \"mobile\"\n      ],\n      \"filters\": {\n        \"textFilters\": {\n          \"color\": {\n            \"values\": [\n              \"green\",\n              \"red\"\n            ],\n            \"matchingType\": \"InUserFilters\"\n          }\n        },\n        \"rangeFilters\": {\n          \"price\": {\n            \"ranges\": [\n              {\n                \"rightEnd\": {\n                  \"value\": 20,\n                  \"inclusive\": true\n                }\n              }\n            ],\n            \"matchingType\": \"Exact\"\n          }\n        },\n        \"datetimeFilters\": {\n          \"created\": {\n            \"ranges\": [\n              {\n                \"rightEnd\": {\n                  \"value\": \"2024-01-01\",\n                  \"inclusive\": true\n                }\n              }\n            ],\n            \"matchingType\": \"Exact\"\n          }\n        }\n      }\n    },\n    \"queryConsequences\": [\n      {\n        \"type\": \"removeWord\",\n        \"word\": \"string\",\n        \"replacement\": \"string\"\n      }\n    ],\n    \"postQueryConsequences\": {\n      \"hideHits\": [\n        \"string\"\n      ],\n      \"promoteHits\": [\n        {\n          \"id\": \"string\",\n          \"position\": 0\n        }\n      ],\n      \"promoteHitsPositionStrategy\": {\n        \"type\": \"custom\"\n      },\n      \"standardFilters\": {\n        \"textFilters\": [\n          {\n            \"attribute\": \"brand\",\n            \"mode\": \"include\",\n            \"values\": [\n              \"A-Brand\",\n              \"B-Brand\",\n              \"{brand}\"\n            ]\n          }\n        ],\n        \"rangeFilters\": [\n          {\n            \"attribute\": \"price\",\n            \"operator\": \"gt\",\n            \"value\": \"{price}\"\n          }\n        ],\n        \"datetimeFilters\": [\n          {\n            \"attribute\": \"created\",\n            \"operator\": \"gt\",\n            \"value\": \"{created}\"\n          }\n        ]\n      },\n      \"elasticFilters\": {\n        \"textFilters\": [\n          {\n            \"attribute\": \"brand\",\n            \"mode\": \"include\",\n            \"values\": [\n              \"A-Brand\",\n              \"B-Brand\",\n              \"{brand}\"\n            ]\n          }\n        ],\n        \"rangeFilters\": [\n          {\n            \"attribute\": \"price\",\n            \"operator\": \"gt\",\n            \"value\": \"{price}\"\n          }\n        ],\n        \"datetimeFilters\": [\n          {\n            \"attribute\": \"created\",\n            \"operator\": \"gt\",\n            \"value\": \"{created}\"\n          }\n        ]\n      },\n      \"boostFilters\": [\n        {\n          \"weight\": -100,\n          \"filters\": {\n            \"textFilters\": [\n              {\n                \"attribute\": \"brand\",\n                \"mode\": \"include\",\n                \"values\": [\n                  \"A-Brand\",\n                  \"B-Brand\",\n                  \"{brand}\"\n                ]\n              }\n            ],\n            \"rangeFilters\": [\n              {\n                \"attribute\": \"price\",\n                \"operator\": \"gt\",\n                \"value\": \"{price}\"\n              }\n            ],\n            \"datetimeFilters\": [\n              {\n                \"attribute\": \"created\",\n                \"operator\": \"gt\",\n                \"value\": \"{created}\"\n              }\n            ]\n          }\n        }\n      ],\n      \"topHitsFilters\": [\n        {\n          \"hitsNumber\": 1,\n          \"positions\": [\n            1\n          ],\n          \"filters\": {\n            \"textFilters\": [\n              {\n                \"attribute\": \"brand\",\n                \"mode\": \"include\",\n                \"values\": [\n                  \"A-Brand\",\n                  \"B-Brand\",\n                  \"{brand}\"\n                ]\n              }\n            ],\n            \"rangeFilters\": [\n              {\n                \"attribute\": \"price\",\n                \"operator\": \"gt\",\n                \"value\": \"{price}\"\n              }\n            ],\n            \"datetimeFilters\": [\n              {\n                \"attribute\": \"created\",\n                \"operator\": \"gt\",\n                \"value\": \"{created}\"\n              }\n            ]\n          }\n        }\n      ],\n      \"distinctFilter\": {\n        \"attribute\": \"string\",\n        \"maxNumItems\": 0,\n        \"categoryLevelModifier\": 0\n      },\n      \"sortBy\": {\n        \"attribute\": \"string\",\n        \"ordering\": \"desc\"\n      },\n      \"customData\": \"{\\\"customLandingPage\\\": \\\"https://synerise.com/\\\"}\",\n      \"returnNoData\": false,\n      \"pinFacets\": [\n        {\n          \"attribute\": \"size\",\n          \"position\": 1\n        },\n        {\n          \"attribute\": \"width\",\n          \"position\": 2\n        },\n        {\n          \"attribute\": \"gift_wrap\"\n        }\n      ],\n      \"hideFacets\": [\n        \"material\",\n        \"fabric\",\n        \"sleeve_length\"\n      ],\n      \"scoringOverride\": {\n        \"type\": \"ranking\",\n        \"weights\": {\n          \"personalized\": 5,\n          \"pageVisitsPopularity\": 5,\n          \"transactionsPopularity\": 5,\n          \"pageVisits7DaysPopularity\": 5,\n          \"transactions7DaysPopularity\": 5,\n          \"revenueBoost\": 5,\n          \"conversionRateBoost\": 5\n        }\n      }\n    }\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/rules\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  name: 'string',\n  author: 0,\n  activeFrom: 'string',\n  activeTo: 'string',\n  timezone: 'string',\n  data: {\n    audience: {\n      segmentationIds: [\n        '34ab56cd-789be-22ee-11ab-123456789abc',\n        '12xy34z5-456b-33cc-7o52-987654321ece'\n      ]\n    },\n    conditions: {\n      patterns: ['phone', 'notebook', 'mouse {color} {brand}'],\n      matchingType: 'is',\n      contexts: ['listing', 'web', 'mobile'],\n      filters: {\n        textFilters: {color: {values: ['green', 'red'], matchingType: 'InUserFilters'}},\n        rangeFilters: {\n          price: {ranges: [{rightEnd: {value: 20, inclusive: true}}], matchingType: 'Exact'}\n        },\n        datetimeFilters: {\n          created: {\n            ranges: [{rightEnd: {value: '2024-01-01', inclusive: true}}],\n            matchingType: 'Exact'\n          }\n        }\n      }\n    },\n    queryConsequences: [{type: 'removeWord', word: 'string', replacement: 'string'}],\n    postQueryConsequences: {\n      hideHits: ['string'],\n      promoteHits: [{id: 'string', position: 0}],\n      promoteHitsPositionStrategy: {type: 'custom'},\n      standardFilters: {\n        textFilters: [\n          {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}\n        ],\n        rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],\n        datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]\n      },\n      elasticFilters: {\n        textFilters: [\n          {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}\n        ],\n        rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],\n        datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]\n      },\n      boostFilters: [\n        {\n          weight: -100,\n          filters: {\n            textFilters: [\n              {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}\n            ],\n            rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],\n            datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]\n          }\n        }\n      ],\n      topHitsFilters: [\n        {\n          hitsNumber: 1,\n          positions: [1],\n          filters: {\n            textFilters: [\n              {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}\n            ],\n            rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],\n            datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]\n          }\n        }\n      ],\n      distinctFilter: {attribute: 'string', maxNumItems: 0, categoryLevelModifier: 0},\n      sortBy: {attribute: 'string', ordering: 'desc'},\n      customData: '{\"customLandingPage\": \"https://synerise.com/\"}',\n      returnNoData: false,\n      pinFacets: [\n        {attribute: 'size', position: 1},\n        {attribute: 'width', position: 2},\n        {attribute: 'gift_wrap'}\n      ],\n      hideFacets: ['material', 'fabric', 'sleeve_length'],\n      scoringOverride: {\n        type: 'ranking',\n        weights: {\n          personalized: 5,\n          pageVisitsPopularity: 5,\n          transactionsPopularity: 5,\n          pageVisits7DaysPopularity: 5,\n          transactions7DaysPopularity: 5,\n          revenueBoost: 5,\n          conversionRateBoost: 5\n        }\n      }\n    }\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"author\":0,\"activeFrom\":\"string\",\"activeTo\":\"string\",\"timezone\":\"string\",\"data\":{\"audience\":{\"segmentationIds\":[\"34ab56cd-789be-22ee-11ab-123456789abc\",\"12xy34z5-456b-33cc-7o52-987654321ece\"]},\"conditions\":{\"patterns\":[\"phone\",\"notebook\",\"mouse {color} {brand}\"],\"matchingType\":\"is\",\"contexts\":[\"listing\",\"web\",\"mobile\"],\"filters\":{\"textFilters\":{\"color\":{\"values\":[\"green\",\"red\"],\"matchingType\":\"InUserFilters\"}},\"rangeFilters\":{\"price\":{\"ranges\":[{\"rightEnd\":{\"value\":20,\"inclusive\":true}}],\"matchingType\":\"Exact\"}},\"datetimeFilters\":{\"created\":{\"ranges\":[{\"rightEnd\":{\"value\":\"2024-01-01\",\"inclusive\":true}}],\"matchingType\":\"Exact\"}}}},\"queryConsequences\":[{\"type\":\"removeWord\",\"word\":\"string\",\"replacement\":\"string\"}],\"postQueryConsequences\":{\"hideHits\":[\"string\"],\"promoteHits\":[{\"id\":\"string\",\"position\":0}],\"promoteHitsPositionStrategy\":{\"type\":\"custom\"},\"standardFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"elasticFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"boostFilters\":[{\"weight\":-100,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"topHitsFilters\":[{\"hitsNumber\":1,\"positions\":[1],\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":0,\"categoryLevelModifier\":0},\"sortBy\":{\"attribute\":\"string\",\"ordering\":\"desc\"},\"customData\":\"{\\\\\"customLandingPage\\\\\": \\\\\"https://synerise.com/\\\\\"}\",\"returnNoData\":false,\"pinFacets\":[{\"attribute\":\"size\",\"position\":1},{\"attribute\":\"width\",\"position\":2},{\"attribute\":\"gift_wrap\"}],\"hideFacets\":[\"material\",\"fabric\",\"sleeve_length\"],\"scoringOverride\":{\"type\":\"ranking\",\"weights\":{\"personalized\":5,\"pageVisitsPopularity\":5,\"transactionsPopularity\":5,\"pageVisits7DaysPopularity\":5,\"transactions7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5}}}}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"author\\\":0,\\\"activeFrom\\\":\\\"string\\\",\\\"activeTo\\\":\\\"string\\\",\\\"timezone\\\":\\\"string\\\",\\\"data\\\":{\\\"audience\\\":{\\\"segmentationIds\\\":[\\\"34ab56cd-789be-22ee-11ab-123456789abc\\\",\\\"12xy34z5-456b-33cc-7o52-987654321ece\\\"]},\\\"conditions\\\":{\\\"patterns\\\":[\\\"phone\\\",\\\"notebook\\\",\\\"mouse {color} {brand}\\\"],\\\"matchingType\\\":\\\"is\\\",\\\"contexts\\\":[\\\"listing\\\",\\\"web\\\",\\\"mobile\\\"],\\\"filters\\\":{\\\"textFilters\\\":{\\\"color\\\":{\\\"values\\\":[\\\"green\\\",\\\"red\\\"],\\\"matchingType\\\":\\\"InUserFilters\\\"}},\\\"rangeFilters\\\":{\\\"price\\\":{\\\"ranges\\\":[{\\\"rightEnd\\\":{\\\"value\\\":20,\\\"inclusive\\\":true}}],\\\"matchingType\\\":\\\"Exact\\\"}},\\\"datetimeFilters\\\":{\\\"created\\\":{\\\"ranges\\\":[{\\\"rightEnd\\\":{\\\"value\\\":\\\"2024-01-01\\\",\\\"inclusive\\\":true}}],\\\"matchingType\\\":\\\"Exact\\\"}}}},\\\"queryConsequences\\\":[{\\\"type\\\":\\\"removeWord\\\",\\\"word\\\":\\\"string\\\",\\\"replacement\\\":\\\"string\\\"}],\\\"postQueryConsequences\\\":{\\\"hideHits\\\":[\\\"string\\\"],\\\"promoteHits\\\":[{\\\"id\\\":\\\"string\\\",\\\"position\\\":0}],\\\"promoteHitsPositionStrategy\\\":{\\\"type\\\":\\\"custom\\\"},\\\"standardFilters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]},\\\"elasticFilters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]},\\\"boostFilters\\\":[{\\\"weight\\\":-100,\\\"filters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]}}],\\\"topHitsFilters\\\":[{\\\"hitsNumber\\\":1,\\\"positions\\\":[1],\\\"filters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]}}],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"categoryLevelModifier\\\":0},\\\"sortBy\\\":{\\\"attribute\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\"},\\\"customData\\\":\\\"{\\\\\\\"customLandingPage\\\\\\\": \\\\\\\"https://synerise.com/\\\\\\\"}\\\",\\\"returnNoData\\\":false,\\\"pinFacets\\\":[{\\\"attribute\\\":\\\"size\\\",\\\"position\\\":1},{\\\"attribute\\\":\\\"width\\\",\\\"position\\\":2},{\\\"attribute\\\":\\\"gift_wrap\\\"}],\\\"hideFacets\\\":[\\\"material\\\",\\\"fabric\\\",\\\"sleeve_length\\\"],\\\"scoringOverride\\\":{\\\"type\\\":\\\"ranking\\\",\\\"weights\\\":{\\\"personalized\\\":5,\\\"pageVisitsPopularity\\\":5,\\\"transactionsPopularity\\\":5,\\\"pageVisits7DaysPopularity\\\":5,\\\"transactions7DaysPopularity\\\":5,\\\"revenueBoost\\\":5,\\\"conversionRateBoost\\\":5}}}}}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/rules/{ruleId}":{"get":{"summary":"Get rule","description":"Retrieves a rule.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `QUERY_RULES_SEARCH_CREATE`\n\n**User role permission required:** `assets_search: create`\n","operationId":"GetRuleV2","tags":["Query Rules"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/query-rules-v2-inPathIndexId"},{"$ref":"#/components/parameters/query-rules-v2-inPathRuleId"}],"responses":{"200":{"description":"Query rule returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-RuleWithStatus"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Query-Rules/operation/GetRuleV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"summary":"Update query rule","description":"Updates a rule identified by `id`.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `QUERY_RULES_SEARCH_UPDATE`\n\n**User role permission required:** `assets_search: update`\n","operationId":"PutRuleV2","tags":["Query Rules"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/query-rules-v2-inPathIndexId"},{"$ref":"#/components/parameters/query-rules-v2-inPathRuleId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/query-rules-v2-RuleName"},"author":{"$ref":"#/components/schemas/query-rules-v2-RuleAuthor"},"activeFrom":{"$ref":"#/components/schemas/query-rules-v2-RuleActiveFromDatetime"},"activeTo":{"$ref":"#/components/schemas/query-rules-v2-RuleActiveToDatetime"},"timezone":{"$ref":"#/components/schemas/query-rules-v2-RuleTimezoneSchema"},"data":{"$ref":"#/components/schemas/query-rules-v2-RuleDataSchema"}}}}},"description":"Request for posting a new rule or updating an existing one","required":true},"responses":{"200":{"description":"Query rule updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-RuleWithStatus"}}}},"409":{"description":"The rule is inherited from the parent index and cannot be modified on the child index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Query-Rules/operation/PutRuleV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"author\":0,\"activeFrom\":\"string\",\"activeTo\":\"string\",\"timezone\":\"string\",\"data\":{\"audience\":{\"segmentationIds\":[\"34ab56cd-789be-22ee-11ab-123456789abc\",\"12xy34z5-456b-33cc-7o52-987654321ece\"]},\"conditions\":{\"patterns\":[\"phone\",\"notebook\",\"mouse {color} {brand}\"],\"matchingType\":\"is\",\"contexts\":[\"listing\",\"web\",\"mobile\"],\"filters\":{\"textFilters\":{\"color\":{\"values\":[\"green\",\"red\"],\"matchingType\":\"InUserFilters\"}},\"rangeFilters\":{\"price\":{\"ranges\":[{\"rightEnd\":{\"value\":20,\"inclusive\":true}}],\"matchingType\":\"Exact\"}},\"datetimeFilters\":{\"created\":{\"ranges\":[{\"rightEnd\":{\"value\":\"2024-01-01\",\"inclusive\":true}}],\"matchingType\":\"Exact\"}}}},\"queryConsequences\":[{\"type\":\"removeWord\",\"word\":\"string\",\"replacement\":\"string\"}],\"postQueryConsequences\":{\"hideHits\":[\"string\"],\"promoteHits\":[{\"id\":\"string\",\"position\":0}],\"promoteHitsPositionStrategy\":{\"type\":\"custom\"},\"standardFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"elasticFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"boostFilters\":[{\"weight\":-100,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"topHitsFilters\":[{\"hitsNumber\":1,\"positions\":[1],\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":0,\"categoryLevelModifier\":0},\"sortBy\":{\"attribute\":\"string\",\"ordering\":\"desc\"},\"customData\":\"{\\\"customLandingPage\\\": \\\"https://synerise.com/\\\"}\",\"returnNoData\":false,\"pinFacets\":[{\"attribute\":\"size\",\"position\":1},{\"attribute\":\"width\",\"position\":2},{\"attribute\":\"gift_wrap\"}],\"hideFacets\":[\"material\",\"fabric\",\"sleeve_length\"],\"scoringOverride\":{\"type\":\"ranking\",\"weights\":{\"personalized\":5,\"pageVisitsPopularity\":5,\"transactionsPopularity\":5,\"pageVisits7DaysPopularity\":5,\"transactions7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5}}}}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"author\\\":0,\\\"activeFrom\\\":\\\"string\\\",\\\"activeTo\\\":\\\"string\\\",\\\"timezone\\\":\\\"string\\\",\\\"data\\\":{\\\"audience\\\":{\\\"segmentationIds\\\":[\\\"34ab56cd-789be-22ee-11ab-123456789abc\\\",\\\"12xy34z5-456b-33cc-7o52-987654321ece\\\"]},\\\"conditions\\\":{\\\"patterns\\\":[\\\"phone\\\",\\\"notebook\\\",\\\"mouse {color} {brand}\\\"],\\\"matchingType\\\":\\\"is\\\",\\\"contexts\\\":[\\\"listing\\\",\\\"web\\\",\\\"mobile\\\"],\\\"filters\\\":{\\\"textFilters\\\":{\\\"color\\\":{\\\"values\\\":[\\\"green\\\",\\\"red\\\"],\\\"matchingType\\\":\\\"InUserFilters\\\"}},\\\"rangeFilters\\\":{\\\"price\\\":{\\\"ranges\\\":[{\\\"rightEnd\\\":{\\\"value\\\":20,\\\"inclusive\\\":true}}],\\\"matchingType\\\":\\\"Exact\\\"}},\\\"datetimeFilters\\\":{\\\"created\\\":{\\\"ranges\\\":[{\\\"rightEnd\\\":{\\\"value\\\":\\\"2024-01-01\\\",\\\"inclusive\\\":true}}],\\\"matchingType\\\":\\\"Exact\\\"}}}},\\\"queryConsequences\\\":[{\\\"type\\\":\\\"removeWord\\\",\\\"word\\\":\\\"string\\\",\\\"replacement\\\":\\\"string\\\"}],\\\"postQueryConsequences\\\":{\\\"hideHits\\\":[\\\"string\\\"],\\\"promoteHits\\\":[{\\\"id\\\":\\\"string\\\",\\\"position\\\":0}],\\\"promoteHitsPositionStrategy\\\":{\\\"type\\\":\\\"custom\\\"},\\\"standardFilters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]},\\\"elasticFilters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]},\\\"boostFilters\\\":[{\\\"weight\\\":-100,\\\"filters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]}}],\\\"topHitsFilters\\\":[{\\\"hitsNumber\\\":1,\\\"positions\\\":[1],\\\"filters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]}}],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"categoryLevelModifier\\\":0},\\\"sortBy\\\":{\\\"attribute\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\"},\\\"customData\\\":\\\"{\\\\\\\"customLandingPage\\\\\\\": \\\\\\\"https://synerise.com/\\\\\\\"}\\\",\\\"returnNoData\\\":false,\\\"pinFacets\\\":[{\\\"attribute\\\":\\\"size\\\",\\\"position\\\":1},{\\\"attribute\\\":\\\"width\\\",\\\"position\\\":2},{\\\"attribute\\\":\\\"gift_wrap\\\"}],\\\"hideFacets\\\":[\\\"material\\\",\\\"fabric\\\",\\\"sleeve_length\\\"],\\\"scoringOverride\\\":{\\\"type\\\":\\\"ranking\\\",\\\"weights\\\":{\\\"personalized\\\":5,\\\"pageVisitsPopularity\\\":5,\\\"transactionsPopularity\\\":5,\\\"pageVisits7DaysPopularity\\\":5,\\\"transactions7DaysPopularity\\\":5,\\\"revenueBoost\\\":5,\\\"conversionRateBoost\\\":5}}}}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"author\": 0,\n  \"activeFrom\": \"string\",\n  \"activeTo\": \"string\",\n  \"timezone\": \"string\",\n  \"data\": {\n    \"audience\": {\n      \"segmentationIds\": [\n        \"34ab56cd-789be-22ee-11ab-123456789abc\",\n        \"12xy34z5-456b-33cc-7o52-987654321ece\"\n      ]\n    },\n    \"conditions\": {\n      \"patterns\": [\n        \"phone\",\n        \"notebook\",\n        \"mouse {color} {brand}\"\n      ],\n      \"matchingType\": \"is\",\n      \"contexts\": [\n        \"listing\",\n        \"web\",\n        \"mobile\"\n      ],\n      \"filters\": {\n        \"textFilters\": {\n          \"color\": {\n            \"values\": [\n              \"green\",\n              \"red\"\n            ],\n            \"matchingType\": \"InUserFilters\"\n          }\n        },\n        \"rangeFilters\": {\n          \"price\": {\n            \"ranges\": [\n              {\n                \"rightEnd\": {\n                  \"value\": 20,\n                  \"inclusive\": true\n                }\n              }\n            ],\n            \"matchingType\": \"Exact\"\n          }\n        },\n        \"datetimeFilters\": {\n          \"created\": {\n            \"ranges\": [\n              {\n                \"rightEnd\": {\n                  \"value\": \"2024-01-01\",\n                  \"inclusive\": true\n                }\n              }\n            ],\n            \"matchingType\": \"Exact\"\n          }\n        }\n      }\n    },\n    \"queryConsequences\": [\n      {\n        \"type\": \"removeWord\",\n        \"word\": \"string\",\n        \"replacement\": \"string\"\n      }\n    ],\n    \"postQueryConsequences\": {\n      \"hideHits\": [\n        \"string\"\n      ],\n      \"promoteHits\": [\n        {\n          \"id\": \"string\",\n          \"position\": 0\n        }\n      ],\n      \"promoteHitsPositionStrategy\": {\n        \"type\": \"custom\"\n      },\n      \"standardFilters\": {\n        \"textFilters\": [\n          {\n            \"attribute\": \"brand\",\n            \"mode\": \"include\",\n            \"values\": [\n              \"A-Brand\",\n              \"B-Brand\",\n              \"{brand}\"\n            ]\n          }\n        ],\n        \"rangeFilters\": [\n          {\n            \"attribute\": \"price\",\n            \"operator\": \"gt\",\n            \"value\": \"{price}\"\n          }\n        ],\n        \"datetimeFilters\": [\n          {\n            \"attribute\": \"created\",\n            \"operator\": \"gt\",\n            \"value\": \"{created}\"\n          }\n        ]\n      },\n      \"elasticFilters\": {\n        \"textFilters\": [\n          {\n            \"attribute\": \"brand\",\n            \"mode\": \"include\",\n            \"values\": [\n              \"A-Brand\",\n              \"B-Brand\",\n              \"{brand}\"\n            ]\n          }\n        ],\n        \"rangeFilters\": [\n          {\n            \"attribute\": \"price\",\n            \"operator\": \"gt\",\n            \"value\": \"{price}\"\n          }\n        ],\n        \"datetimeFilters\": [\n          {\n            \"attribute\": \"created\",\n            \"operator\": \"gt\",\n            \"value\": \"{created}\"\n          }\n        ]\n      },\n      \"boostFilters\": [\n        {\n          \"weight\": -100,\n          \"filters\": {\n            \"textFilters\": [\n              {\n                \"attribute\": \"brand\",\n                \"mode\": \"include\",\n                \"values\": [\n                  \"A-Brand\",\n                  \"B-Brand\",\n                  \"{brand}\"\n                ]\n              }\n            ],\n            \"rangeFilters\": [\n              {\n                \"attribute\": \"price\",\n                \"operator\": \"gt\",\n                \"value\": \"{price}\"\n              }\n            ],\n            \"datetimeFilters\": [\n              {\n                \"attribute\": \"created\",\n                \"operator\": \"gt\",\n                \"value\": \"{created}\"\n              }\n            ]\n          }\n        }\n      ],\n      \"topHitsFilters\": [\n        {\n          \"hitsNumber\": 1,\n          \"positions\": [\n            1\n          ],\n          \"filters\": {\n            \"textFilters\": [\n              {\n                \"attribute\": \"brand\",\n                \"mode\": \"include\",\n                \"values\": [\n                  \"A-Brand\",\n                  \"B-Brand\",\n                  \"{brand}\"\n                ]\n              }\n            ],\n            \"rangeFilters\": [\n              {\n                \"attribute\": \"price\",\n                \"operator\": \"gt\",\n                \"value\": \"{price}\"\n              }\n            ],\n            \"datetimeFilters\": [\n              {\n                \"attribute\": \"created\",\n                \"operator\": \"gt\",\n                \"value\": \"{created}\"\n              }\n            ]\n          }\n        }\n      ],\n      \"distinctFilter\": {\n        \"attribute\": \"string\",\n        \"maxNumItems\": 0,\n        \"categoryLevelModifier\": 0\n      },\n      \"sortBy\": {\n        \"attribute\": \"string\",\n        \"ordering\": \"desc\"\n      },\n      \"customData\": \"{\\\"customLandingPage\\\": \\\"https://synerise.com/\\\"}\",\n      \"returnNoData\": false,\n      \"pinFacets\": [\n        {\n          \"attribute\": \"size\",\n          \"position\": 1\n        },\n        {\n          \"attribute\": \"width\",\n          \"position\": 2\n        },\n        {\n          \"attribute\": \"gift_wrap\"\n        }\n      ],\n      \"hideFacets\": [\n        \"material\",\n        \"fabric\",\n        \"sleeve_length\"\n      ],\n      \"scoringOverride\": {\n        \"type\": \"ranking\",\n        \"weights\": {\n          \"personalized\": 5,\n          \"pageVisitsPopularity\": 5,\n          \"transactionsPopularity\": 5,\n          \"pageVisits7DaysPopularity\": 5,\n          \"transactions7DaysPopularity\": 5,\n          \"revenueBoost\": 5,\n          \"conversionRateBoost\": 5\n        }\n      }\n    }\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  name: 'string',\n  author: 0,\n  activeFrom: 'string',\n  activeTo: 'string',\n  timezone: 'string',\n  data: {\n    audience: {\n      segmentationIds: [\n        '34ab56cd-789be-22ee-11ab-123456789abc',\n        '12xy34z5-456b-33cc-7o52-987654321ece'\n      ]\n    },\n    conditions: {\n      patterns: ['phone', 'notebook', 'mouse {color} {brand}'],\n      matchingType: 'is',\n      contexts: ['listing', 'web', 'mobile'],\n      filters: {\n        textFilters: {color: {values: ['green', 'red'], matchingType: 'InUserFilters'}},\n        rangeFilters: {\n          price: {ranges: [{rightEnd: {value: 20, inclusive: true}}], matchingType: 'Exact'}\n        },\n        datetimeFilters: {\n          created: {\n            ranges: [{rightEnd: {value: '2024-01-01', inclusive: true}}],\n            matchingType: 'Exact'\n          }\n        }\n      }\n    },\n    queryConsequences: [{type: 'removeWord', word: 'string', replacement: 'string'}],\n    postQueryConsequences: {\n      hideHits: ['string'],\n      promoteHits: [{id: 'string', position: 0}],\n      promoteHitsPositionStrategy: {type: 'custom'},\n      standardFilters: {\n        textFilters: [\n          {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}\n        ],\n        rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],\n        datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]\n      },\n      elasticFilters: {\n        textFilters: [\n          {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}\n        ],\n        rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],\n        datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]\n      },\n      boostFilters: [\n        {\n          weight: -100,\n          filters: {\n            textFilters: [\n              {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}\n            ],\n            rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],\n            datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]\n          }\n        }\n      ],\n      topHitsFilters: [\n        {\n          hitsNumber: 1,\n          positions: [1],\n          filters: {\n            textFilters: [\n              {attribute: 'brand', mode: 'include', values: ['A-Brand', 'B-Brand', '{brand}']}\n            ],\n            rangeFilters: [{attribute: 'price', operator: 'gt', value: '{price}'}],\n            datetimeFilters: [{attribute: 'created', operator: 'gt', value: '{created}'}]\n          }\n        }\n      ],\n      distinctFilter: {attribute: 'string', maxNumItems: 0, categoryLevelModifier: 0},\n      sortBy: {attribute: 'string', ordering: 'desc'},\n      customData: '{\"customLandingPage\": \"https://synerise.com/\"}',\n      returnNoData: false,\n      pinFacets: [\n        {attribute: 'size', position: 1},\n        {attribute: 'width', position: 2},\n        {attribute: 'gift_wrap'}\n      ],\n      hideFacets: ['material', 'fabric', 'sleeve_length'],\n      scoringOverride: {\n        type: 'ranking',\n        weights: {\n          personalized: 5,\n          pageVisitsPopularity: 5,\n          transactionsPopularity: 5,\n          pageVisits7DaysPopularity: 5,\n          transactions7DaysPopularity: 5,\n          revenueBoost: 5,\n          conversionRateBoost: 5\n        }\n      }\n    }\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"author\":0,\"activeFrom\":\"string\",\"activeTo\":\"string\",\"timezone\":\"string\",\"data\":{\"audience\":{\"segmentationIds\":[\"34ab56cd-789be-22ee-11ab-123456789abc\",\"12xy34z5-456b-33cc-7o52-987654321ece\"]},\"conditions\":{\"patterns\":[\"phone\",\"notebook\",\"mouse {color} {brand}\"],\"matchingType\":\"is\",\"contexts\":[\"listing\",\"web\",\"mobile\"],\"filters\":{\"textFilters\":{\"color\":{\"values\":[\"green\",\"red\"],\"matchingType\":\"InUserFilters\"}},\"rangeFilters\":{\"price\":{\"ranges\":[{\"rightEnd\":{\"value\":20,\"inclusive\":true}}],\"matchingType\":\"Exact\"}},\"datetimeFilters\":{\"created\":{\"ranges\":[{\"rightEnd\":{\"value\":\"2024-01-01\",\"inclusive\":true}}],\"matchingType\":\"Exact\"}}}},\"queryConsequences\":[{\"type\":\"removeWord\",\"word\":\"string\",\"replacement\":\"string\"}],\"postQueryConsequences\":{\"hideHits\":[\"string\"],\"promoteHits\":[{\"id\":\"string\",\"position\":0}],\"promoteHitsPositionStrategy\":{\"type\":\"custom\"},\"standardFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"elasticFilters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]},\"boostFilters\":[{\"weight\":-100,\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"topHitsFilters\":[{\"hitsNumber\":1,\"positions\":[1],\"filters\":{\"textFilters\":[{\"attribute\":\"brand\",\"mode\":\"include\",\"values\":[\"A-Brand\",\"B-Brand\",\"{brand}\"]}],\"rangeFilters\":[{\"attribute\":\"price\",\"operator\":\"gt\",\"value\":\"{price}\"}],\"datetimeFilters\":[{\"attribute\":\"created\",\"operator\":\"gt\",\"value\":\"{created}\"}]}}],\"distinctFilter\":{\"attribute\":\"string\",\"maxNumItems\":0,\"categoryLevelModifier\":0},\"sortBy\":{\"attribute\":\"string\",\"ordering\":\"desc\"},\"customData\":\"{\\\\\"customLandingPage\\\\\": \\\\\"https://synerise.com/\\\\\"}\",\"returnNoData\":false,\"pinFacets\":[{\"attribute\":\"size\",\"position\":1},{\"attribute\":\"width\",\"position\":2},{\"attribute\":\"gift_wrap\"}],\"hideFacets\":[\"material\",\"fabric\",\"sleeve_length\"],\"scoringOverride\":{\"type\":\"ranking\",\"weights\":{\"personalized\":5,\"pageVisitsPopularity\":5,\"transactionsPopularity\":5,\"pageVisits7DaysPopularity\":5,\"transactions7DaysPopularity\":5,\"revenueBoost\":5,\"conversionRateBoost\":5}}}}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"author\\\":0,\\\"activeFrom\\\":\\\"string\\\",\\\"activeTo\\\":\\\"string\\\",\\\"timezone\\\":\\\"string\\\",\\\"data\\\":{\\\"audience\\\":{\\\"segmentationIds\\\":[\\\"34ab56cd-789be-22ee-11ab-123456789abc\\\",\\\"12xy34z5-456b-33cc-7o52-987654321ece\\\"]},\\\"conditions\\\":{\\\"patterns\\\":[\\\"phone\\\",\\\"notebook\\\",\\\"mouse {color} {brand}\\\"],\\\"matchingType\\\":\\\"is\\\",\\\"contexts\\\":[\\\"listing\\\",\\\"web\\\",\\\"mobile\\\"],\\\"filters\\\":{\\\"textFilters\\\":{\\\"color\\\":{\\\"values\\\":[\\\"green\\\",\\\"red\\\"],\\\"matchingType\\\":\\\"InUserFilters\\\"}},\\\"rangeFilters\\\":{\\\"price\\\":{\\\"ranges\\\":[{\\\"rightEnd\\\":{\\\"value\\\":20,\\\"inclusive\\\":true}}],\\\"matchingType\\\":\\\"Exact\\\"}},\\\"datetimeFilters\\\":{\\\"created\\\":{\\\"ranges\\\":[{\\\"rightEnd\\\":{\\\"value\\\":\\\"2024-01-01\\\",\\\"inclusive\\\":true}}],\\\"matchingType\\\":\\\"Exact\\\"}}}},\\\"queryConsequences\\\":[{\\\"type\\\":\\\"removeWord\\\",\\\"word\\\":\\\"string\\\",\\\"replacement\\\":\\\"string\\\"}],\\\"postQueryConsequences\\\":{\\\"hideHits\\\":[\\\"string\\\"],\\\"promoteHits\\\":[{\\\"id\\\":\\\"string\\\",\\\"position\\\":0}],\\\"promoteHitsPositionStrategy\\\":{\\\"type\\\":\\\"custom\\\"},\\\"standardFilters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]},\\\"elasticFilters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]},\\\"boostFilters\\\":[{\\\"weight\\\":-100,\\\"filters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]}}],\\\"topHitsFilters\\\":[{\\\"hitsNumber\\\":1,\\\"positions\\\":[1],\\\"filters\\\":{\\\"textFilters\\\":[{\\\"attribute\\\":\\\"brand\\\",\\\"mode\\\":\\\"include\\\",\\\"values\\\":[\\\"A-Brand\\\",\\\"B-Brand\\\",\\\"{brand}\\\"]}],\\\"rangeFilters\\\":[{\\\"attribute\\\":\\\"price\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{price}\\\"}],\\\"datetimeFilters\\\":[{\\\"attribute\\\":\\\"created\\\",\\\"operator\\\":\\\"gt\\\",\\\"value\\\":\\\"{created}\\\"}]}}],\\\"distinctFilter\\\":{\\\"attribute\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"categoryLevelModifier\\\":0},\\\"sortBy\\\":{\\\"attribute\\\":\\\"string\\\",\\\"ordering\\\":\\\"desc\\\"},\\\"customData\\\":\\\"{\\\\\\\"customLandingPage\\\\\\\": \\\\\\\"https://synerise.com/\\\\\\\"}\\\",\\\"returnNoData\\\":false,\\\"pinFacets\\\":[{\\\"attribute\\\":\\\"size\\\",\\\"position\\\":1},{\\\"attribute\\\":\\\"width\\\",\\\"position\\\":2},{\\\"attribute\\\":\\\"gift_wrap\\\"}],\\\"hideFacets\\\":[\\\"material\\\",\\\"fabric\\\",\\\"sleeve_length\\\"],\\\"scoringOverride\\\":{\\\"type\\\":\\\"ranking\\\",\\\"weights\\\":{\\\"personalized\\\":5,\\\"pageVisitsPopularity\\\":5,\\\"transactionsPopularity\\\":5,\\\"pageVisits7DaysPopularity\\\":5,\\\"transactions7DaysPopularity\\\":5,\\\"revenueBoost\\\":5,\\\"conversionRateBoost\\\":5}}}}}\")\n  .asString();"}]},"delete":{"summary":"Delete rule","description":"Deletes a rule identified by `id`.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `QUERY_RULES_SEARCH_DELETE`\n\n**User role permission required:** `assets_search: delete`\n","operationId":"DeleteRuleV2","tags":["Query Rules"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/query-rules-v2-inPathIndexId"},{"$ref":"#/components/parameters/query-rules-v2-inPathRuleId"}],"responses":{"204":{"description":"Query rule deleted"},"409":{"description":"The rule is inherited from the parent index and cannot be modified on the child index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Query-Rules/operation/DeleteRuleV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/rules/{ruleId}/activate":{"post":{"summary":"Activate rule","description":"Activates a rule identified by `id`.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `QUERY_RULES_SEARCH_UPDATE`\n\n**User role permission required:** `assets_search: update`\n","operationId":"ActivateRuleV2","tags":["Query Rules"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/query-rules-v2-inPathIndexId"},{"$ref":"#/components/parameters/query-rules-v2-inPathRuleId"}],"responses":{"204":{"description":"Query rule activated"},"409":{"description":"The rule is inherited from the parent index and cannot be modified on the child index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Query-Rules/operation/ActivateRuleV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/activate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/rules/{ruleId}/pause":{"post":{"summary":"Pause rule","description":"Pauses a rule identified by `id`.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `QUERY_RULES_SEARCH_UPDATE`\n\n**User role permission required:** `assets_search: update`\n","operationId":"PauseRuleV2","tags":["Query Rules"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/query-rules-v2-inPathIndexId"},{"$ref":"#/components/parameters/query-rules-v2-inPathRuleId"}],"responses":{"204":{"description":"Query rule paused"},"409":{"description":"The rule is inherited from the parent index and cannot be modified on the child index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Query-Rules/operation/PauseRuleV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/pause\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/rules/{ruleId}/draft":{"post":{"summary":"Draft rule","description":"Marks a rule as draft.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `QUERY_RULES_SEARCH_UPDATE`\n\n**User role permission required:** `assets_search: update`\n","operationId":"DraftRuleV2","tags":["Query Rules"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/query-rules-v2-inPathIndexId"},{"$ref":"#/components/parameters/query-rules-v2-inPathRuleId"}],"responses":{"204":{"description":"Query rule marked as draft"},"409":{"description":"The rule is inherited from the parent index and cannot be modified on the child index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Query-Rules/operation/DraftRuleV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/draft\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/rules/{ruleId}/finish":{"post":{"summary":"Finish rule","description":"Marks a rule as finished. The rule becomes inactive and can never be activated again.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `QUERY_RULES_SEARCH_UPDATE`\n\n**User role permission required:** `assets_search: update`\n","operationId":"FinishRuleV2","tags":["Query Rules"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/query-rules-v2-inPathIndexId"},{"$ref":"#/components/parameters/query-rules-v2-inPathRuleId"}],"responses":{"204":{"description":"Query rule marked as finished"},"409":{"description":"The rule is inherited from the parent index and cannot be modified on the child index","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/query-rules-v2-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Query-Rules/operation/FinishRuleV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/rules/%7BruleId%7D/finish\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/recommendations/v2/campaigns":{"get":{"summary":"Get all recommendation campaigns","description":"Fetch all recommendation campaigns.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_MANY_CAMPAIGN_READ`\n\n**User role permission required:** `campaigns_recommendations: read`\n","operationId":"GetRecommendationCampaignsV2","tags":["Recommendation campaigns"],"security":[{"JWT":[]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","required":false,"description":"Maximum number of campaigns on a page","schema":{"type":"integer","default":50}},{"name":"sortBy","in":"query","required":false,"description":"Name of the field by which data will be sorted","schema":{"type":"string","default":"createdAt","enum":["createdAt","updatedAt","startDate","endDate","state","type"]}},{"name":"ordering","in":"query","required":false,"description":"Sorting order","schema":{"type":"string","default":"desc","enum":["asc","desc"]}},{"name":"includeMeta","in":"query","required":false,"description":"If true, a `meta` JSON block with pagination data is included in the response body.\nIf false, the pagination data is included in the response headers.\n","schema":{"type":"boolean","default":false}},{"name":"type","in":"query","required":false,"description":"Filters the results by campaign type.","schema":{"type":"string"}},{"name":"state","in":"query","required":false,"description":"Shows only results with states matching this parameter. When this parameter is omitted, all campaigns are returned regardless of state.","schema":{"type":"array","items":{"type":"string","enum":["draft","active","paused"]}}},{"name":"search","in":"query","required":false,"description":"Searches campaigns by the specified phrase in their `id` and `title`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns paginated campaigns. If `showMeta` was set to `true`, the metadata is included in the JSON response. If it was set to `false`, the metadata is included in the headers.","headers":{"Link":{"description":"Links to neighboring pages, first page, and last page in pagination","schema":{"type":"string"}},"X-Pagination-Total-Count":{"description":"Total number of campaigns","schema":{"type":"integer"}},"X-Pagination-Total-Pages":{"description":"Total number of pages","schema":{"type":"integer"}},"X-Pagination-Page":{"description":"The current page","schema":{"type":"integer"}},"X-Pagination-Limit":{"description":"Maximal number of items on a page","schema":{"type":"integer"}},"X-Pagination-Sorted-By":{"description":"The column (attribute) that the campaigns were sorted by","schema":{"type":"string"}},"X-Pagination-Ordering":{"description":"Sorting order","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationCampaignsResponseV2"}}}},"404":{"description":"Could not find campaigns","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/GetRecommendationCampaignsV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/campaigns?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&type=SOME_STRING_VALUE&state=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/campaigns?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&type=SOME_STRING_VALUE&state=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/campaigns?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&type=SOME_STRING_VALUE&state=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/campaigns?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&type=SOME_STRING_VALUE&state=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/campaigns');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'ordering' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'SOME_BOOLEAN_VALUE',\n  'type' => 'SOME_STRING_VALUE',\n  'state' => 'SOME_ARRAY_VALUE',\n  'search' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/campaigns?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&type=SOME_STRING_VALUE&state=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Create a recommendation campaign","description":"Create a new recommendation campaign.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_CAMPAIGN_CREATE`\n\n**User role permission required:** `campaigns_recommendations: create`\n","operationId":"CreateRecommendationCampaignV2","tags":["Recommendation campaigns"],"security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/recommendation-campaigns-SimilarRecommendationCampaignsCreateRequestV2"},{"$ref":"#/components/schemas/recommendation-campaigns-MetricsRecommendationCampaignsCreateRequestV2"},{"$ref":"#/components/schemas/recommendation-campaigns-CrossSellRecommendationCampaignsCreateRequestV2"},{"$ref":"#/components/schemas/recommendation-campaigns-SetComplementRecommendationCampaignsCreateRequestV2"},{"$ref":"#/components/schemas/recommendation-campaigns-LastViewedRecommendationCampaignsCreateRequestV2"},{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizedRecommendationCampaignsCreateRequestV2"},{"$ref":"#/components/schemas/recommendation-campaigns-VisuallySimilarRecommendationCampaignsCreateRequestV2"},{"$ref":"#/components/schemas/recommendation-campaigns-ItemComparisonRecommendationCampaignsCreateRequestV2"},{"$ref":"#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationCampaignsCreateRequestV2"},{"$ref":"#/components/schemas/recommendation-campaigns-SectionRecommendationCampaignsCreateRequestV2"},{"$ref":"#/components/schemas/recommendation-campaigns-AttributeRecommendationCampaignsCreateRequestV2"},{"$ref":"#/components/schemas/recommendation-campaigns-ExternalItemsRecommendationCampaignCreateRequestV2"},{"$ref":"#/components/schemas/recommendation-campaigns-NextInteractionRecommendationCampaignsCreateRequestV2"}]}}},"description":"All the details of a campaign","required":true},"responses":{"200":{"description":"OK campaign has been returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/CreateRecommendationCampaignV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/campaigns \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"type\":\"similar\",\"parameters\":{\"additionalResponseAttributes\":[\"string\"],\"boostMetric\":\"string\",\"sortMetric\":\"string\",\"boostMetricStrength\":-100,\"shuffleNumItems\":0,\"personalizedBoostingStrength\":0},\"title\":\"string\",\"slug\":\"string\",\"description\":\"string\",\"startDate\":\"string\",\"endDate\":\"string\",\"state\":\"draft\",\"filterRules\":{\"excludePurchasedItems\":true,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":true,\"elasticExcludePurchasedItemsSinceDays\":0},\"itemsCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"itemMin\":0,\"itemMax\":0,\"filterRules\":{\"filters\":\"string\",\"elasticFilters\":\"string\"},\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]},\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":0,\"numItems\":0,\"useDefaultDistinctFilters\":true,\"useDefaultItemFilters\":true}],\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"type\\\":\\\"similar\\\",\\\"parameters\\\":{\\\"additionalResponseAttributes\\\":[\\\"string\\\"],\\\"boostMetric\\\":\\\"string\\\",\\\"sortMetric\\\":\\\"string\\\",\\\"boostMetricStrength\\\":-100,\\\"shuffleNumItems\\\":0,\\\"personalizedBoostingStrength\\\":0},\\\"title\\\":\\\"string\\\",\\\"slug\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"startDate\\\":\\\"string\\\",\\\"endDate\\\":\\\"string\\\",\\\"state\\\":\\\"draft\\\",\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":true,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":true,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"itemsCatalogId\\\":\\\"string\\\",\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"itemMin\\\":0,\\\"itemMax\\\":0,\\\"filterRules\\\":{\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\"},\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]},\\\"attribute\\\":{\\\"name\\\":\\\"string\\\",\\\"levelRangeModifier\\\":0},\\\"numRows\\\":0,\\\"numItems\\\":0,\\\"useDefaultDistinctFilters\\\":true,\\\"useDefaultItemFilters\\\":true}],\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"itemsSource\\\":{\\\"type\\\":\\\"aggregate\\\",\\\"id\\\":\\\"string\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/campaigns\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"type\": \"similar\",\n  \"parameters\": {\n    \"additionalResponseAttributes\": [\n      \"string\"\n    ],\n    \"boostMetric\": \"string\",\n    \"sortMetric\": \"string\",\n    \"boostMetricStrength\": -100,\n    \"shuffleNumItems\": 0,\n    \"personalizedBoostingStrength\": 0\n  },\n  \"title\": \"string\",\n  \"slug\": \"string\",\n  \"description\": \"string\",\n  \"startDate\": \"string\",\n  \"endDate\": \"string\",\n  \"state\": \"draft\",\n  \"filterRules\": {\n    \"excludePurchasedItems\": true,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": true,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"itemsCatalogId\": \"string\",\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"itemMin\": 0,\n      \"itemMax\": 0,\n      \"filterRules\": {\n        \"filters\": \"string\",\n        \"elasticFilters\": \"string\"\n      },\n      \"distinctFilter\": {\n        \"elastic\": true,\n        \"filters\": [\n          {\n            \"field\": \"string\",\n            \"maxNumItems\": 0,\n            \"levelRangeModifier\": 0\n          }\n        ]\n      },\n      \"attribute\": {\n        \"name\": \"string\",\n        \"levelRangeModifier\": 0\n      },\n      \"numRows\": 0,\n      \"numItems\": 0,\n      \"useDefaultDistinctFilters\": true,\n      \"useDefaultItemFilters\": true\n    }\n  ],\n  \"keepSlotsOrder\": true,\n  \"personalizeSlotsOrder\": false,\n  \"boostingStrategies\": [\n    {\n      \"name\": \"string\",\n      \"condition\": \"string\",\n      \"strength\": 1\n    }\n  ],\n  \"itemsSource\": {\n    \"type\": \"aggregate\",\n    \"id\": \"string\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/campaigns\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/campaigns\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  type: 'similar',\n  parameters: {\n    additionalResponseAttributes: ['string'],\n    boostMetric: 'string',\n    sortMetric: 'string',\n    boostMetricStrength: -100,\n    shuffleNumItems: 0,\n    personalizedBoostingStrength: 0\n  },\n  title: 'string',\n  slug: 'string',\n  description: 'string',\n  startDate: 'string',\n  endDate: 'string',\n  state: 'draft',\n  filterRules: {\n    excludePurchasedItems: true,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: true,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  itemsCatalogId: 'string',\n  slots: [\n    {\n      name: 'string',\n      itemMin: 0,\n      itemMax: 0,\n      filterRules: {filters: 'string', elasticFilters: 'string'},\n      distinctFilter: {\n        elastic: true,\n        filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]\n      },\n      attribute: {name: 'string', levelRangeModifier: 0},\n      numRows: 0,\n      numItems: 0,\n      useDefaultDistinctFilters: true,\n      useDefaultItemFilters: true\n    }\n  ],\n  keepSlotsOrder: true,\n  personalizeSlotsOrder: false,\n  boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],\n  itemsSource: {type: 'aggregate', id: 'string'}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/campaigns');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"type\":\"similar\",\"parameters\":{\"additionalResponseAttributes\":[\"string\"],\"boostMetric\":\"string\",\"sortMetric\":\"string\",\"boostMetricStrength\":-100,\"shuffleNumItems\":0,\"personalizedBoostingStrength\":0},\"title\":\"string\",\"slug\":\"string\",\"description\":\"string\",\"startDate\":\"string\",\"endDate\":\"string\",\"state\":\"draft\",\"filterRules\":{\"excludePurchasedItems\":true,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":true,\"elasticExcludePurchasedItemsSinceDays\":0},\"itemsCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"itemMin\":0,\"itemMax\":0,\"filterRules\":{\"filters\":\"string\",\"elasticFilters\":\"string\"},\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]},\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":0,\"numItems\":0,\"useDefaultDistinctFilters\":true,\"useDefaultItemFilters\":true}],\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/campaigns\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"type\\\":\\\"similar\\\",\\\"parameters\\\":{\\\"additionalResponseAttributes\\\":[\\\"string\\\"],\\\"boostMetric\\\":\\\"string\\\",\\\"sortMetric\\\":\\\"string\\\",\\\"boostMetricStrength\\\":-100,\\\"shuffleNumItems\\\":0,\\\"personalizedBoostingStrength\\\":0},\\\"title\\\":\\\"string\\\",\\\"slug\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"startDate\\\":\\\"string\\\",\\\"endDate\\\":\\\"string\\\",\\\"state\\\":\\\"draft\\\",\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":true,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":true,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"itemsCatalogId\\\":\\\"string\\\",\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"itemMin\\\":0,\\\"itemMax\\\":0,\\\"filterRules\\\":{\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\"},\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]},\\\"attribute\\\":{\\\"name\\\":\\\"string\\\",\\\"levelRangeModifier\\\":0},\\\"numRows\\\":0,\\\"numItems\\\":0,\\\"useDefaultDistinctFilters\\\":true,\\\"useDefaultItemFilters\\\":true}],\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"itemsSource\\\":{\\\"type\\\":\\\"aggregate\\\",\\\"id\\\":\\\"string\\\"}}\")\n  .asString();"}]}},"/recommendations/v2/campaigns/{campaignId}":{"parameters":[{"$ref":"#/components/parameters/recommendation-campaigns-campaignId"}],"get":{"summary":"Get recommendation campaign details","description":"Retrieve the details of a single campaign.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_SINGLE_CAMPAIGN_READ`\n\n**User role permission required:** `campaigns_recommendations: read`\n","operationId":"GetRecommendationCampaignV2","tags":["Recommendation campaigns"],"security":[{"JWT":[]}],"responses":{"200":{"description":"Data of a single campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"}}}},"404":{"description":"Could not find campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/GetRecommendationCampaignV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/campaigns/%7BcampaignId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/campaigns/%7BcampaignId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Update a recommendation campaign","description":"Update a recommendation campaign by changing the parameters or copying the definition from another campaign.\n\nWhen you copy from another campaign:\n- the following campaign data is NOT updated:\n  - `title`\n  - `state`\n  - `start_date`\n  - `end_date`\n  - `campaignId`\n  - `createdAt`\n- `modified_by_user_id` changes to the user who performed the update\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_CAMPAIGN_UPDATE`\n\n**User role permission required:** `campaigns_recommendations: update`\n","operationId":"UpdateRecommendationCampaignV2","tags":["Recommendation campaigns"],"security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationCampaignUpdateRequest"}}},"description":"Definition of the updated campaign.","required":true},"responses":{"200":{"description":"Campaign updated and returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"}}}},"404":{"description":"Could not find campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/UpdateRecommendationCampaignV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"type\":\"similar\",\"parameters\":{\"additionalResponseAttributes\":[\"string\"],\"boostMetric\":\"string\",\"sortMetric\":\"string\",\"boostMetricStrength\":-100,\"shuffleNumItems\":0},\"campaignId\":\"string\",\"title\":\"string\",\"slug\":\"string\",\"description\":\"string\",\"startDate\":\"string\",\"endDate\":\"string\",\"createdAt\":\"string\",\"updatedAt\":\"string\",\"state\":\"draft\",\"filterRules\":{\"excludePurchasedItems\":true,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":true,\"elasticExcludePurchasedItemsSinceDays\":0},\"itemsCatalogId\":\"string\",\"additionalResponseAttributes\":[\"string\"],\"slots\":[{\"name\":\"string\",\"itemMin\":0,\"itemMax\":0,\"filterRules\":{\"filters\":\"string\",\"elasticFilters\":\"string\"},\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]},\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":0,\"numItems\":0,\"useDefaultDistinctFilters\":true,\"useDefaultItemFilters\":true}],\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"},\"abTest\":{\"experimentId\":0,\"variantId\":0,\"status\":\"NotStarted\",\"isBaseline\":true},\"crossWorkspaceMode\":{\"enabled\":true}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"type\\\":\\\"similar\\\",\\\"parameters\\\":{\\\"additionalResponseAttributes\\\":[\\\"string\\\"],\\\"boostMetric\\\":\\\"string\\\",\\\"sortMetric\\\":\\\"string\\\",\\\"boostMetricStrength\\\":-100,\\\"shuffleNumItems\\\":0},\\\"campaignId\\\":\\\"string\\\",\\\"title\\\":\\\"string\\\",\\\"slug\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"startDate\\\":\\\"string\\\",\\\"endDate\\\":\\\"string\\\",\\\"createdAt\\\":\\\"string\\\",\\\"updatedAt\\\":\\\"string\\\",\\\"state\\\":\\\"draft\\\",\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":true,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":true,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"itemsCatalogId\\\":\\\"string\\\",\\\"additionalResponseAttributes\\\":[\\\"string\\\"],\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"itemMin\\\":0,\\\"itemMax\\\":0,\\\"filterRules\\\":{\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\"},\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]},\\\"attribute\\\":{\\\"name\\\":\\\"string\\\",\\\"levelRangeModifier\\\":0},\\\"numRows\\\":0,\\\"numItems\\\":0,\\\"useDefaultDistinctFilters\\\":true,\\\"useDefaultItemFilters\\\":true}],\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"itemsSource\\\":{\\\"type\\\":\\\"aggregate\\\",\\\"id\\\":\\\"string\\\"},\\\"abTest\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":0,\\\"status\\\":\\\"NotStarted\\\",\\\"isBaseline\\\":true},\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/campaigns/%7BcampaignId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"type\": \"similar\",\n  \"parameters\": {\n    \"additionalResponseAttributes\": [\n      \"string\"\n    ],\n    \"boostMetric\": \"string\",\n    \"sortMetric\": \"string\",\n    \"boostMetricStrength\": -100,\n    \"shuffleNumItems\": 0\n  },\n  \"campaignId\": \"string\",\n  \"title\": \"string\",\n  \"slug\": \"string\",\n  \"description\": \"string\",\n  \"startDate\": \"string\",\n  \"endDate\": \"string\",\n  \"createdAt\": \"string\",\n  \"updatedAt\": \"string\",\n  \"state\": \"draft\",\n  \"filterRules\": {\n    \"excludePurchasedItems\": true,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": true,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"itemsCatalogId\": \"string\",\n  \"additionalResponseAttributes\": [\n    \"string\"\n  ],\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"itemMin\": 0,\n      \"itemMax\": 0,\n      \"filterRules\": {\n        \"filters\": \"string\",\n        \"elasticFilters\": \"string\"\n      },\n      \"distinctFilter\": {\n        \"elastic\": true,\n        \"filters\": [\n          {\n            \"field\": \"string\",\n            \"maxNumItems\": 0,\n            \"levelRangeModifier\": 0\n          }\n        ]\n      },\n      \"attribute\": {\n        \"name\": \"string\",\n        \"levelRangeModifier\": 0\n      },\n      \"numRows\": 0,\n      \"numItems\": 0,\n      \"useDefaultDistinctFilters\": true,\n      \"useDefaultItemFilters\": true\n    }\n  ],\n  \"keepSlotsOrder\": true,\n  \"personalizeSlotsOrder\": false,\n  \"boostingStrategies\": [\n    {\n      \"name\": \"string\",\n      \"condition\": \"string\",\n      \"strength\": 1\n    }\n  ],\n  \"itemsSource\": {\n    \"type\": \"aggregate\",\n    \"id\": \"string\"\n  },\n  \"abTest\": {\n    \"experimentId\": 0,\n    \"variantId\": 0,\n    \"status\": \"NotStarted\",\n    \"isBaseline\": true\n  },\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/campaigns/%7BcampaignId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  type: 'similar',\n  parameters: {\n    additionalResponseAttributes: ['string'],\n    boostMetric: 'string',\n    sortMetric: 'string',\n    boostMetricStrength: -100,\n    shuffleNumItems: 0\n  },\n  campaignId: 'string',\n  title: 'string',\n  slug: 'string',\n  description: 'string',\n  startDate: 'string',\n  endDate: 'string',\n  createdAt: 'string',\n  updatedAt: 'string',\n  state: 'draft',\n  filterRules: {\n    excludePurchasedItems: true,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: true,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  itemsCatalogId: 'string',\n  additionalResponseAttributes: ['string'],\n  slots: [\n    {\n      name: 'string',\n      itemMin: 0,\n      itemMax: 0,\n      filterRules: {filters: 'string', elasticFilters: 'string'},\n      distinctFilter: {\n        elastic: true,\n        filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]\n      },\n      attribute: {name: 'string', levelRangeModifier: 0},\n      numRows: 0,\n      numItems: 0,\n      useDefaultDistinctFilters: true,\n      useDefaultItemFilters: true\n    }\n  ],\n  keepSlotsOrder: true,\n  personalizeSlotsOrder: false,\n  boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],\n  itemsSource: {type: 'aggregate', id: 'string'},\n  abTest: {experimentId: 0, variantId: 0, status: 'NotStarted', isBaseline: true},\n  crossWorkspaceMode: {enabled: true}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"type\":\"similar\",\"parameters\":{\"additionalResponseAttributes\":[\"string\"],\"boostMetric\":\"string\",\"sortMetric\":\"string\",\"boostMetricStrength\":-100,\"shuffleNumItems\":0},\"campaignId\":\"string\",\"title\":\"string\",\"slug\":\"string\",\"description\":\"string\",\"startDate\":\"string\",\"endDate\":\"string\",\"createdAt\":\"string\",\"updatedAt\":\"string\",\"state\":\"draft\",\"filterRules\":{\"excludePurchasedItems\":true,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":true,\"elasticExcludePurchasedItemsSinceDays\":0},\"itemsCatalogId\":\"string\",\"additionalResponseAttributes\":[\"string\"],\"slots\":[{\"name\":\"string\",\"itemMin\":0,\"itemMax\":0,\"filterRules\":{\"filters\":\"string\",\"elasticFilters\":\"string\"},\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]},\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":0,\"numItems\":0,\"useDefaultDistinctFilters\":true,\"useDefaultItemFilters\":true}],\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"},\"abTest\":{\"experimentId\":0,\"variantId\":0,\"status\":\"NotStarted\",\"isBaseline\":true},\"crossWorkspaceMode\":{\"enabled\":true}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"type\\\":\\\"similar\\\",\\\"parameters\\\":{\\\"additionalResponseAttributes\\\":[\\\"string\\\"],\\\"boostMetric\\\":\\\"string\\\",\\\"sortMetric\\\":\\\"string\\\",\\\"boostMetricStrength\\\":-100,\\\"shuffleNumItems\\\":0},\\\"campaignId\\\":\\\"string\\\",\\\"title\\\":\\\"string\\\",\\\"slug\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"startDate\\\":\\\"string\\\",\\\"endDate\\\":\\\"string\\\",\\\"createdAt\\\":\\\"string\\\",\\\"updatedAt\\\":\\\"string\\\",\\\"state\\\":\\\"draft\\\",\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":true,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":true,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"itemsCatalogId\\\":\\\"string\\\",\\\"additionalResponseAttributes\\\":[\\\"string\\\"],\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"itemMin\\\":0,\\\"itemMax\\\":0,\\\"filterRules\\\":{\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\"},\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]},\\\"attribute\\\":{\\\"name\\\":\\\"string\\\",\\\"levelRangeModifier\\\":0},\\\"numRows\\\":0,\\\"numItems\\\":0,\\\"useDefaultDistinctFilters\\\":true,\\\"useDefaultItemFilters\\\":true}],\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"itemsSource\\\":{\\\"type\\\":\\\"aggregate\\\",\\\"id\\\":\\\"string\\\"},\\\"abTest\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":0,\\\"status\\\":\\\"NotStarted\\\",\\\"isBaseline\\\":true},\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true}}\")\n  .asString();"}]},"delete":{"summary":"Delete a recommendation campaign","description":"Delete a recommendation campaign. This operation is irreversible.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_CAMPAIGN_DELETE`\n\n**User role permission required:** `campaigns_recommendations: delete`\n","operationId":"DeleteRecommendationCampaign","tags":["Recommendation campaigns"],"security":[{"JWT":[]}],"responses":{"200":{"description":"OK campaign has been deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"}}}},"404":{"description":"Could not find campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/DeleteRecommendationCampaign"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/recommendations/v2/campaigns/%7BcampaignId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/campaigns/%7BcampaignId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/recommendations/v2/campaigns/state":{"post":{"summary":"Change campaigns' states","description":"Change the status of one or more campaigns.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_STATE_CAMPAIGN_UPDATE`\n\n**User role permission required:** `campaigns_recommendations: update`\n","operationId":"UpdateRecommendationsStatesV2","tags":["Recommendation campaigns"],"security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationStateChangeRequestV2"}}},"description":"List of updated campaign IDs and new states.","required":true},"responses":{"200":{"description":"Campaigns status changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationStateChangeResponseV2"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/UpdateRecommendationsStatesV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/campaigns/state \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"state\":\"draft\",\"ids\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"state\\\":\\\"draft\\\",\\\"ids\\\":[\\\"string\\\"]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/campaigns/state\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"state\": \"draft\",\n  \"ids\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/campaigns/state\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/campaigns/state\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({state: 'draft', ids: ['string']}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/campaigns/state');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"state\":\"draft\",\"ids\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/campaigns/state\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"state\\\":\\\"draft\\\",\\\"ids\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/recommendations/v2/campaigns/{campaignId}/copy":{"post":{"summary":"Copy a recommendation campaign","description":"Copy a campaign. The copied campaign's `state` will be `draft` and `slug` will be undefined.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_COPY_CAMPAIGN_CREATE`\n\n**User role permission required:** `campaigns_recommendations: create`\n","operationId":"CopyRecommendationCampaignV2","tags":["Recommendation campaigns"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendation-campaigns-campaignId"}],"responses":{"200":{"description":"Copy created and returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"}}}},"404":{"description":"Could not find campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/CopyRecommendationCampaignV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D/copy \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/recommendations/v2/campaigns/%7BcampaignId%7D/copy\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D/copy\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/campaigns/%7BcampaignId%7D/copy\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D/copy');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D/copy\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/recommendations/v2/campaigns/simplified":{"get":{"summary":"Get simplified recommendation campaigns","description":"Fetch simplified recommendation campaign data.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_MANY_SIMPLIFIED_CAMPAIGN_READ`\n\n**User role permission required:** `campaigns_recommendations: read`\n","operationId":"GetSimplifiedRecommendationCampaign","tags":["Recommendation campaigns"],"security":[{"JWT":[]}],"parameters":[{"name":"type","in":"query","description":"Filter by campaign type.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"state","in":"query","description":"Filter by states.","required":false,"schema":{"type":"array","items":{"type":"string","enum":["draft","active","paused"]}}}],"responses":{"200":{"description":"Simplified campaigns returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-SimpleRecommendationCampaignsV2"}}}},"404":{"description":"Could not find campaign","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}},"500":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendation-campaigns-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/GetSimplifiedRecommendationCampaign"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/campaigns/simplified?type=SOME_ARRAY_VALUE&state=SOME_ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/campaigns/simplified?type=SOME_ARRAY_VALUE&state=SOME_ARRAY_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/campaigns/simplified?type=SOME_ARRAY_VALUE&state=SOME_ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/campaigns/simplified?type=SOME_ARRAY_VALUE&state=SOME_ARRAY_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/campaigns/simplified');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'type' => 'SOME_ARRAY_VALUE',\n  'state' => 'SOME_ARRAY_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/campaigns/simplified?type=SOME_ARRAY_VALUE&state=SOME_ARRAY_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/recommendations/v2/recommend/campaigns/{campaignIdentifier}":{"get":{"summary":"Get recommendations by campaign","description":"This method allows you to retrieve recommendations based on a campaignID or a slug and a context. The context is built based on:\n\n  - campaign identifier (required)\n  - profile UUID\n  - items (for example, items currently in the basket)\n  - item exclusions\n\n\n  This is the recommended and simplest way to fetch recommendations.\n\n  Before you use this method, you must to create a recommendations campaign in Synerise. All the recommendation filters and parameters will be handled for you automatically according to a campaign's configuration.\n\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_MATERIALIZER_V2_RECOMMEND_CAMPAIGNS_RECOMMENDATIONS_READ`\n","operationId":"GetRecommendationsByCampaignV2","security":[{"TrackerKey":[]},{"JWT":[]}],"tags":["Recommendations"],"parameters":[{"$ref":"#/components/parameters/recommendations-api-materializer-campaignIdentifier"},{"in":"query","name":"clientUUID","description":"Profile UUID. This parameter is required for these recommendation types:\n  - Personalized\n  - Last seen\n  - Recent interactions\n  - Section\n  - Attribute\n\nThis parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters.\n","required":false,"schema":{"type":"string"}},{"name":"itemId","in":"query","description":"Item ID or item IDs for the recommendation context. This parameter is:\n\n- required for similar/complementary items campaigns.\n\n- optional for personalized campaigns.\n\nThis parameter can be passed in all recommendations. In recommendations which don't use the context item as part of the recommendation model, the context item can only be used to create filters.\n\nYou can repeat this parameter in order to pass a number of context-creating items, for example, in a cart recommendation campaign.\n\nThis overrides the `itemsSource` settings of the campaign definition.\n\nAlternatively, you can pass the `itemsSourceType` and `itemsSourceId` parameters to use context items from source (aggregate or expression). These parameters can't be used at the same request with `itemId`.\n","required":false,"schema":{"type":"string"}},{"name":"inventoryChannelId","in":"query","description":"Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied.","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/recommendations-api-materializer-itemsSourceType"},{"$ref":"#/components/parameters/recommendations-api-materializer-itemsSourceId"},{"name":"externalItemId","in":"query","description":"Items provided by an external recommendation model to be returned as recommendation results.\n\nYou can repeat this parameter to pass multiple external items.\n\nThis parameter is used with campaigns of type \"external-items\".\n","required":false,"schema":{"type":"string"}},{"name":"itemIdExcluded","in":"query","description":"IDs of items that will be excluded from the generated recommendations. For example, items already added to the basket.","required":false,"schema":{"type":"string"}},{"name":"additionalFilters","in":"query","required":false,"schema":{"type":"string"},"description":"<hr>\n<strong>IMPORTANT</strong>:\n\n- The `filtersJoiner` attribute is REQUIRED when `additionalFilters` is included. If `filtersJoiner` is missing, the additional filters do not work.  \n- Do NOT send multiple instances of this parameter.\n\n<hr>\n\nAdditional filters. These are merged with the campaign's own filters according to the logic in `filtersJoiner`.\n\nThis parameter must include all the additional filters as a single string, for example `additionalFilters=effectivePrice>300 AND effectivePrice<400` (the spaces are required).\n","example":"effectivePrice>300 AND effectivePrice<400"},{"name":"filtersJoiner","in":"query","required":false,"schema":{"type":"string","enum":["AND","OR","REPLACE"]},"description":"Defines the logic of merging `additionalFilters` with the campaign's existing filters.\n- `REPLACE` replaces the campaign's filters with your filters.\n- `AND` matches if both your filters and the campaign filters are met.\n- `OR` matches if at least one of the filters is met.\n"},{"name":"additionalElasticFilters","in":"query","required":false,"schema":{"type":"string"},"description":"<hr>\n<strong>IMPORTANT</strong>:\n\n- The `elasticFiltersJoiner` attribute is REQUIRED when `additionalElasticFilters` is included. If `elasticFiltersJoiner` is missing, the additional filters do not work.  \n- Do NOT send multiple instances of this parameter.\n\n<hr>\n\nAdditional elastic filters. These are merged with the campaign's own elastic filters according to the logic in `elasticFiltersJoiner`.\n\nThis parameter must include all the additional filters as a single string, for example `additionalElasticFilters=effectivePrice>300 AND effectivePrice<400` (the spaces are required).\n","example":"effectivePrice>300 AND effectivePrice<400"},{"name":"elasticFiltersJoiner","in":"query","required":false,"schema":{"type":"string","enum":["AND","OR","REPLACE"]},"description":"Defines the logic of merging `additionalElasticFilters` with the campaign's existing elastic filters.\n- `REPLACE` replaces the campaign's filters with your filters.\n- `AND` matches if both your filters and the campaign filters are met.\n- `OR` matches if at least one of the filters is met.\n"},{"name":"displayAttribute","in":"query","required":false,"schema":{"type":"string"},"description":"Item attribute whose value will be returned in the recommendation response. The parameter value will be merged with the configuration of the recommendation. This parameter can be passed multiple times."},{"name":"includeContextItems","in":"query","description":"When true, the recommendation response will include context items metadata.","required":false,"schema":{"type":"boolean"}},{"$ref":"#/components/parameters/recommendations-api-materializer-paramsMaterializer"}],"responses":{"200":{"description":"Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-api-materializer-RecommendationResponseSchemaV2-materializer"}}}},"404":{"$ref":"#/components/responses/recommendations-api-materializer-404cannotGenerate"},"500":{"$ref":"#/components/responses/recommendations-api-materializer-500error"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/GetRecommendationsByCampaignV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D?clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&inventoryChannelId=SOME_STRING_VALUE&itemsSourceType=SOME_STRING_VALUE&itemsSourceId=SOME_STRING_VALUE&externalItemId=SOME_STRING_VALUE&itemIdExcluded=SOME_STRING_VALUE&additionalFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&filtersJoiner=SOME_STRING_VALUE&additionalElasticFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&elasticFiltersJoiner=SOME_STRING_VALUE&displayAttribute=SOME_STRING_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D?clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&inventoryChannelId=SOME_STRING_VALUE&itemsSourceType=SOME_STRING_VALUE&itemsSourceId=SOME_STRING_VALUE&externalItemId=SOME_STRING_VALUE&itemIdExcluded=SOME_STRING_VALUE&additionalFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&filtersJoiner=SOME_STRING_VALUE&additionalElasticFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&elasticFiltersJoiner=SOME_STRING_VALUE&displayAttribute=SOME_STRING_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D?clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&inventoryChannelId=SOME_STRING_VALUE&itemsSourceType=SOME_STRING_VALUE&itemsSourceId=SOME_STRING_VALUE&externalItemId=SOME_STRING_VALUE&itemIdExcluded=SOME_STRING_VALUE&additionalFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&filtersJoiner=SOME_STRING_VALUE&additionalElasticFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&elasticFiltersJoiner=SOME_STRING_VALUE&displayAttribute=SOME_STRING_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D?clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&inventoryChannelId=SOME_STRING_VALUE&itemsSourceType=SOME_STRING_VALUE&itemsSourceId=SOME_STRING_VALUE&externalItemId=SOME_STRING_VALUE&itemIdExcluded=SOME_STRING_VALUE&additionalFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&filtersJoiner=SOME_STRING_VALUE&additionalElasticFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&elasticFiltersJoiner=SOME_STRING_VALUE&displayAttribute=SOME_STRING_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'itemId' => 'SOME_STRING_VALUE',\n  'inventoryChannelId' => 'SOME_STRING_VALUE',\n  'itemsSourceType' => 'SOME_STRING_VALUE',\n  'itemsSourceId' => 'SOME_STRING_VALUE',\n  'externalItemId' => 'SOME_STRING_VALUE',\n  'itemIdExcluded' => 'SOME_STRING_VALUE',\n  'additionalFilters' => 'effectivePrice>300 AND effectivePrice<400',\n  'filtersJoiner' => 'SOME_STRING_VALUE',\n  'additionalElasticFilters' => 'effectivePrice>300 AND effectivePrice<400',\n  'elasticFiltersJoiner' => 'SOME_STRING_VALUE',\n  'displayAttribute' => 'SOME_STRING_VALUE',\n  'includeContextItems' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D?clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&inventoryChannelId=SOME_STRING_VALUE&itemsSourceType=SOME_STRING_VALUE&itemsSourceId=SOME_STRING_VALUE&externalItemId=SOME_STRING_VALUE&itemIdExcluded=SOME_STRING_VALUE&additionalFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&filtersJoiner=SOME_STRING_VALUE&additionalElasticFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&elasticFiltersJoiner=SOME_STRING_VALUE&displayAttribute=SOME_STRING_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/recommendations/v2/recommend/campaigns":{"post":{"summary":"Get recommendations by campaign","description":"This method allows you to retrieve recommendations based on a campaignID or slug and a context. The context is built based on:\n\n- campaign ID or slug (one of those is required)\n- profile UUID\n- items (for example, items currently in the basket)\n- item exclusions\n\nThis is the recommended and simplest way to fetch recommendations.\n\nBefore you use this method, you must to create a recommendations campaign in Synerise. All the recommendation filters and parameters will be handled for you automatically according to a campaign's configuration.\n\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `API_MATERIALIZER_V2_RECOMMEND_CAMPAIGNS_RECOMMENDATIONS_READ`\n","operationId":"PostRecommendationsByCampaignV2","security":[{"TrackerKey":[]},{"JWT":[]}],"tags":["Recommendations"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-api-materializer-PostRecommendationsRequest"}}}},"responses":{"200":{"description":"Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-api-materializer-RecommendationResponseSchemaV2-materializer"}}}},"404":{"$ref":"#/components/responses/recommendations-api-materializer-404cannotGenerate"},"500":{"$ref":"#/components/responses/recommendations-api-materializer-500error"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendationsByCampaignV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/campaigns \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"clientUUID\":\"string\",\"campaignId\":\"string\",\"slug\":\"string\",\"items\":[\"string\"],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"},\"itemsExcluded\":[\"string\"],\"additionalFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"filtersJoiner\":\"AND\",\"additionalElasticFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"elasticFiltersJoiner\":\"AND\",\"displayAttributes\":[\"string\"],\"includeContextItems\":true,\"recommendedItemsFromExternalModel\":[[\"string\"]],\"inventoryContext\":{\"channelIds\":[\"string\"]},\"params\":{\"source\":\"mobile\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"clientUUID\\\":\\\"string\\\",\\\"campaignId\\\":\\\"string\\\",\\\"slug\\\":\\\"string\\\",\\\"items\\\":[\\\"string\\\"],\\\"itemsSource\\\":{\\\"type\\\":\\\"aggregate\\\",\\\"id\\\":\\\"string\\\"},\\\"itemsExcluded\\\":[\\\"string\\\"],\\\"additionalFilters\\\":\\\"effectivePrice>300 AND effectivePrice<400\\\",\\\"filtersJoiner\\\":\\\"AND\\\",\\\"additionalElasticFilters\\\":\\\"effectivePrice>300 AND effectivePrice<400\\\",\\\"elasticFiltersJoiner\\\":\\\"AND\\\",\\\"displayAttributes\\\":[\\\"string\\\"],\\\"includeContextItems\\\":true,\\\"recommendedItemsFromExternalModel\\\":[[\\\"string\\\"]],\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/campaigns\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"clientUUID\": \"string\",\n  \"campaignId\": \"string\",\n  \"slug\": \"string\",\n  \"items\": [\n    \"string\"\n  ],\n  \"itemsSource\": {\n    \"type\": \"aggregate\",\n    \"id\": \"string\"\n  },\n  \"itemsExcluded\": [\n    \"string\"\n  ],\n  \"additionalFilters\": \"effectivePrice>300 AND effectivePrice<400\",\n  \"filtersJoiner\": \"AND\",\n  \"additionalElasticFilters\": \"effectivePrice>300 AND effectivePrice<400\",\n  \"elasticFiltersJoiner\": \"AND\",\n  \"displayAttributes\": [\n    \"string\"\n  ],\n  \"includeContextItems\": true,\n  \"recommendedItemsFromExternalModel\": [\n    [\n      \"string\"\n    ]\n  ],\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"params\": {\n    \"source\": \"mobile\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/campaigns\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/campaigns\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  clientUUID: 'string',\n  campaignId: 'string',\n  slug: 'string',\n  items: ['string'],\n  itemsSource: {type: 'aggregate', id: 'string'},\n  itemsExcluded: ['string'],\n  additionalFilters: 'effectivePrice>300 AND effectivePrice<400',\n  filtersJoiner: 'AND',\n  additionalElasticFilters: 'effectivePrice>300 AND effectivePrice<400',\n  elasticFiltersJoiner: 'AND',\n  displayAttributes: ['string'],\n  includeContextItems: true,\n  recommendedItemsFromExternalModel: [['string']],\n  inventoryContext: {channelIds: ['string']},\n  params: {source: 'mobile'}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/campaigns');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"clientUUID\":\"string\",\"campaignId\":\"string\",\"slug\":\"string\",\"items\":[\"string\"],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"},\"itemsExcluded\":[\"string\"],\"additionalFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"filtersJoiner\":\"AND\",\"additionalElasticFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"elasticFiltersJoiner\":\"AND\",\"displayAttributes\":[\"string\"],\"includeContextItems\":true,\"recommendedItemsFromExternalModel\":[[\"string\"]],\"inventoryContext\":{\"channelIds\":[\"string\"]},\"params\":{\"source\":\"mobile\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/campaigns\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"clientUUID\\\":\\\"string\\\",\\\"campaignId\\\":\\\"string\\\",\\\"slug\\\":\\\"string\\\",\\\"items\\\":[\\\"string\\\"],\\\"itemsSource\\\":{\\\"type\\\":\\\"aggregate\\\",\\\"id\\\":\\\"string\\\"},\\\"itemsExcluded\\\":[\\\"string\\\"],\\\"additionalFilters\\\":\\\"effectivePrice>300 AND effectivePrice<400\\\",\\\"filtersJoiner\\\":\\\"AND\\\",\\\"additionalElasticFilters\\\":\\\"effectivePrice>300 AND effectivePrice<400\\\",\\\"elasticFiltersJoiner\\\":\\\"AND\\\",\\\"displayAttributes\\\":[\\\"string\\\"],\\\"includeContextItems\\\":true,\\\"recommendedItemsFromExternalModel\\\":[[\\\"string\\\"]],\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"}}\")\n  .asString();"}]}},"/recommendations/v2/recommend/campaigns/{campaignIdentifier}/by/{identifierName}":{"post":{"summary":"Get recommendations by campaign and profile identifier","description":"\n**Before you use this method**: you must [create a recommendations campaign in Synerise](https://help.synerise.com/docs/campaign/recommendations-v2/). All the recommendation filters and parameters will be handled for you automatically according to a campaign's configuration.\n\nThe method allows you to retrieve recommendations based on a campaignID or a slug, profile's identifier name (the value of the identifier is provided in the request body), and a context. The context is built based on:\n\n- campaign identifier (required)\n- identifierName (required)\n- identifierValue (required)\n- items (for example, items currently in the basket)\n- item exclusions\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `API_MATERIALIZER_V2_RECOMMEND_WITH_CUSTOM_ID_RECOMMENDATIONS_READ`\n\n**User role permission required:** `campaigns_recommendations: read`\n","operationId":"PostRecommendationsByCampaignAndidentifierNameV2","security":[{"JWT":[]}],"tags":["Recommendations"],"parameters":[{"$ref":"#/components/parameters/recommendations-api-materializer-campaignIdentifier"},{"$ref":"#/components/parameters/recommendations-api-materializer-identifierName"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-api-materializer-PostRecommendationsWithIdentifierValueRequest"}}}},"responses":{"200":{"description":"Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-api-materializer-RecommendationResponseSchemaV2-materializer"}}}},"404":{"$ref":"#/components/responses/recommendations-api-materializer-404cannotGenerate"},"500":{"$ref":"#/components/responses/recommendations-api-materializer-500error"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendationsByCampaignAndidentifierNameV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D/by/%7BidentifierName%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\",\"items\":[\"string\"],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"},\"itemsExcluded\":[\"string\"],\"additionalFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"filtersJoiner\":\"AND\",\"additionalElasticFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"elasticFiltersJoiner\":\"AND\",\"displayAttributes\":[\"string\"],\"includeContextItems\":true,\"recommendedItemsFromExternalModel\":[[\"string\"]],\"inventoryContext\":{\"channelIds\":[\"string\"]},\"params\":{\"source\":\"mobile\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\",\\\"items\\\":[\\\"string\\\"],\\\"itemsSource\\\":{\\\"type\\\":\\\"aggregate\\\",\\\"id\\\":\\\"string\\\"},\\\"itemsExcluded\\\":[\\\"string\\\"],\\\"additionalFilters\\\":\\\"effectivePrice>300 AND effectivePrice<400\\\",\\\"filtersJoiner\\\":\\\"AND\\\",\\\"additionalElasticFilters\\\":\\\"effectivePrice>300 AND effectivePrice<400\\\",\\\"elasticFiltersJoiner\\\":\\\"AND\\\",\\\"displayAttributes\\\":[\\\"string\\\"],\\\"includeContextItems\\\":true,\\\"recommendedItemsFromExternalModel\\\":[[\\\"string\\\"]],\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D/by/%7BidentifierName%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\",\n  \"items\": [\n    \"string\"\n  ],\n  \"itemsSource\": {\n    \"type\": \"aggregate\",\n    \"id\": \"string\"\n  },\n  \"itemsExcluded\": [\n    \"string\"\n  ],\n  \"additionalFilters\": \"effectivePrice>300 AND effectivePrice<400\",\n  \"filtersJoiner\": \"AND\",\n  \"additionalElasticFilters\": \"effectivePrice>300 AND effectivePrice<400\",\n  \"elasticFiltersJoiner\": \"AND\",\n  \"displayAttributes\": [\n    \"string\"\n  ],\n  \"includeContextItems\": true,\n  \"recommendedItemsFromExternalModel\": [\n    [\n      \"string\"\n    ]\n  ],\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"params\": {\n    \"source\": \"mobile\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D/by/%7BidentifierName%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D/by/%7BidentifierName%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  identifierValue: 'string',\n  items: ['string'],\n  itemsSource: {type: 'aggregate', id: 'string'},\n  itemsExcluded: ['string'],\n  additionalFilters: 'effectivePrice>300 AND effectivePrice<400',\n  filtersJoiner: 'AND',\n  additionalElasticFilters: 'effectivePrice>300 AND effectivePrice<400',\n  elasticFiltersJoiner: 'AND',\n  displayAttributes: ['string'],\n  includeContextItems: true,\n  recommendedItemsFromExternalModel: [['string']],\n  inventoryContext: {channelIds: ['string']},\n  params: {source: 'mobile'}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D/by/%7BidentifierName%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\",\"items\":[\"string\"],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"},\"itemsExcluded\":[\"string\"],\"additionalFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"filtersJoiner\":\"AND\",\"additionalElasticFilters\":\"effectivePrice>300 AND effectivePrice<400\",\"elasticFiltersJoiner\":\"AND\",\"displayAttributes\":[\"string\"],\"includeContextItems\":true,\"recommendedItemsFromExternalModel\":[[\"string\"]],\"inventoryContext\":{\"channelIds\":[\"string\"]},\"params\":{\"source\":\"mobile\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D/by/%7BidentifierName%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\",\\\"items\\\":[\\\"string\\\"],\\\"itemsSource\\\":{\\\"type\\\":\\\"aggregate\\\",\\\"id\\\":\\\"string\\\"},\\\"itemsExcluded\\\":[\\\"string\\\"],\\\"additionalFilters\\\":\\\"effectivePrice>300 AND effectivePrice<400\\\",\\\"filtersJoiner\\\":\\\"AND\\\",\\\"additionalElasticFilters\\\":\\\"effectivePrice>300 AND effectivePrice<400\\\",\\\"elasticFiltersJoiner\\\":\\\"AND\\\",\\\"displayAttributes\\\":[\\\"string\\\"],\\\"includeContextItems\\\":true,\\\"recommendedItemsFromExternalModel\\\":[[\\\"string\\\"]],\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"}}\")\n  .asString();"}]}},"/recommendations/v2/recommend/campaigns/preview":{"post":{"summary":"Preview campaign recommendations","description":"This method allows you to preview recommendations for a campaign with a given configuration before creating it.\n\n**Note**: This method is not an alternative to creating recommendations for an existing campaign. It is intended for testing purposes only.\n\nThe recommendation context is built based on:\n- profile UUID\n- items\n- item exclusions\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `API_MATERIALIZER_V2_RECOMMEND_CAMPAIGNS_RECOMMENDATIONS_PREVIEW_READ`\n\n**User role permission required:** `campaigns_recommendations: read`\n","operationId":"PostPreviewRecommendations","security":[{"TrackerKey":[]},{"JWT":[]}],"tags":["Recommendations"],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-PreviewRecommendationContext"},{"oneOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-PreviewSimilarRecommendationCampaignsCreateRequest"},{"$ref":"#/components/schemas/recommendations-api-materializer-PreviewMetricsRecommendationCampaignsCreateRequest"},{"$ref":"#/components/schemas/recommendations-api-materializer-PreviewCrossSellRecommendationCampaignsCreateRequest"},{"$ref":"#/components/schemas/recommendations-api-materializer-PreviewSetComplementRecommendationCampaignsCreateRequest"},{"$ref":"#/components/schemas/recommendations-api-materializer-PreviewLastViewedRecommendationCampaignsCreateRequest"},{"$ref":"#/components/schemas/recommendations-api-materializer-PreviewPersonalizedRecommendationCampaignsCreateRequest"},{"$ref":"#/components/schemas/recommendations-api-materializer-PreviewVisuallySimilarRecommendationCampaignsCreateRequest"},{"$ref":"#/components/schemas/recommendations-api-materializer-PreviewItemComparisonRecommendationCampaignsCreateRequest"},{"$ref":"#/components/schemas/recommendations-api-materializer-PreviewRecentInteractionsRecommendationCampaignsCreateRequest"},{"$ref":"#/components/schemas/recommendations-api-materializer-PreviewSectionRecommendationCampaignsCreateRequest"},{"$ref":"#/components/schemas/recommendations-api-materializer-PreviewAttributeRecommendationCampaignsCreateRequest"}]}]}}}},"responses":{"200":{"description":"Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-api-materializer-RecommendationResponseSchemaV2-materializer"}}}},"404":{"$ref":"#/components/responses/recommendations-api-materializer-404cannotGenerate"},"429":{"$ref":"#/components/responses/recommendations-api-materializer-429toManyRequestsError"},"500":{"$ref":"#/components/responses/recommendations-api-materializer-500error"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostPreviewRecommendations"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/campaigns/preview \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"clientUUID\":\"50829d26-5337-410e-9365-b40f7a01bb61\",\"items\":[\"string\"],\"includeContextItems\":false,\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"type\":\"similar\",\"parameters\":{\"additionalResponseAttributes\":[\"string\"],\"boostMetric\":\"string\",\"sortMetric\":\"string\",\"boostMetricStrength\":-100,\"shuffleNumItems\":0,\"personalizedBoostingStrength\":0},\"title\":\"preview\",\"campaignId\":\"preview\",\"filterRules\":{\"excludePurchasedItems\":true,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":true,\"elasticExcludePurchasedItemsSinceDays\":0},\"itemsCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"itemMin\":0,\"itemMax\":0,\"filterRules\":{\"filters\":\"string\",\"elasticFilters\":\"string\"},\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]},\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":0,\"numItems\":0}],\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"clientUUID\\\":\\\"50829d26-5337-410e-9365-b40f7a01bb61\\\",\\\"items\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"type\\\":\\\"similar\\\",\\\"parameters\\\":{\\\"additionalResponseAttributes\\\":[\\\"string\\\"],\\\"boostMetric\\\":\\\"string\\\",\\\"sortMetric\\\":\\\"string\\\",\\\"boostMetricStrength\\\":-100,\\\"shuffleNumItems\\\":0,\\\"personalizedBoostingStrength\\\":0},\\\"title\\\":\\\"preview\\\",\\\"campaignId\\\":\\\"preview\\\",\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":true,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":true,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"itemsCatalogId\\\":\\\"string\\\",\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"itemMin\\\":0,\\\"itemMax\\\":0,\\\"filterRules\\\":{\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\"},\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]},\\\"attribute\\\":{\\\"name\\\":\\\"string\\\",\\\"levelRangeModifier\\\":0},\\\"numRows\\\":0,\\\"numItems\\\":0}],\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"itemsSource\\\":{\\\"type\\\":\\\"aggregate\\\",\\\"id\\\":\\\"string\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/campaigns/preview\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"clientUUID\": \"50829d26-5337-410e-9365-b40f7a01bb61\",\n  \"items\": [\n    \"string\"\n  ],\n  \"includeContextItems\": false,\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"type\": \"similar\",\n  \"parameters\": {\n    \"additionalResponseAttributes\": [\n      \"string\"\n    ],\n    \"boostMetric\": \"string\",\n    \"sortMetric\": \"string\",\n    \"boostMetricStrength\": -100,\n    \"shuffleNumItems\": 0,\n    \"personalizedBoostingStrength\": 0\n  },\n  \"title\": \"preview\",\n  \"campaignId\": \"preview\",\n  \"filterRules\": {\n    \"excludePurchasedItems\": true,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": true,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"itemsCatalogId\": \"string\",\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"itemMin\": 0,\n      \"itemMax\": 0,\n      \"filterRules\": {\n        \"filters\": \"string\",\n        \"elasticFilters\": \"string\"\n      },\n      \"distinctFilter\": {\n        \"elastic\": true,\n        \"filters\": [\n          {\n            \"field\": \"string\",\n            \"maxNumItems\": 0,\n            \"levelRangeModifier\": 0\n          }\n        ]\n      },\n      \"attribute\": {\n        \"name\": \"string\",\n        \"levelRangeModifier\": 0\n      },\n      \"numRows\": 0,\n      \"numItems\": 0\n    }\n  ],\n  \"keepSlotsOrder\": true,\n  \"personalizeSlotsOrder\": false,\n  \"boostingStrategies\": [\n    {\n      \"name\": \"string\",\n      \"condition\": \"string\",\n      \"strength\": 1\n    }\n  ],\n  \"itemsSource\": {\n    \"type\": \"aggregate\",\n    \"id\": \"string\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/campaigns/preview\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/campaigns/preview\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  clientUUID: '50829d26-5337-410e-9365-b40f7a01bb61',\n  items: ['string'],\n  includeContextItems: false,\n  params: {source: 'mobile'},\n  inventoryContext: {channelIds: ['string']},\n  type: 'similar',\n  parameters: {\n    additionalResponseAttributes: ['string'],\n    boostMetric: 'string',\n    sortMetric: 'string',\n    boostMetricStrength: -100,\n    shuffleNumItems: 0,\n    personalizedBoostingStrength: 0\n  },\n  title: 'preview',\n  campaignId: 'preview',\n  filterRules: {\n    excludePurchasedItems: true,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: true,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  itemsCatalogId: 'string',\n  slots: [\n    {\n      name: 'string',\n      itemMin: 0,\n      itemMax: 0,\n      filterRules: {filters: 'string', elasticFilters: 'string'},\n      distinctFilter: {\n        elastic: true,\n        filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]\n      },\n      attribute: {name: 'string', levelRangeModifier: 0},\n      numRows: 0,\n      numItems: 0\n    }\n  ],\n  keepSlotsOrder: true,\n  personalizeSlotsOrder: false,\n  boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],\n  itemsSource: {type: 'aggregate', id: 'string'}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/campaigns/preview');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"clientUUID\":\"50829d26-5337-410e-9365-b40f7a01bb61\",\"items\":[\"string\"],\"includeContextItems\":false,\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"type\":\"similar\",\"parameters\":{\"additionalResponseAttributes\":[\"string\"],\"boostMetric\":\"string\",\"sortMetric\":\"string\",\"boostMetricStrength\":-100,\"shuffleNumItems\":0,\"personalizedBoostingStrength\":0},\"title\":\"preview\",\"campaignId\":\"preview\",\"filterRules\":{\"excludePurchasedItems\":true,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":true,\"elasticExcludePurchasedItemsSinceDays\":0},\"itemsCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"itemMin\":0,\"itemMax\":0,\"filterRules\":{\"filters\":\"string\",\"elasticFilters\":\"string\"},\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]},\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":0,\"numItems\":0}],\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"itemsSource\":{\"type\":\"aggregate\",\"id\":\"string\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/campaigns/preview\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"clientUUID\\\":\\\"50829d26-5337-410e-9365-b40f7a01bb61\\\",\\\"items\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"type\\\":\\\"similar\\\",\\\"parameters\\\":{\\\"additionalResponseAttributes\\\":[\\\"string\\\"],\\\"boostMetric\\\":\\\"string\\\",\\\"sortMetric\\\":\\\"string\\\",\\\"boostMetricStrength\\\":-100,\\\"shuffleNumItems\\\":0,\\\"personalizedBoostingStrength\\\":0},\\\"title\\\":\\\"preview\\\",\\\"campaignId\\\":\\\"preview\\\",\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":true,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":true,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"itemsCatalogId\\\":\\\"string\\\",\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"itemMin\\\":0,\\\"itemMax\\\":0,\\\"filterRules\\\":{\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\"},\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]},\\\"attribute\\\":{\\\"name\\\":\\\"string\\\",\\\"levelRangeModifier\\\":0},\\\"numRows\\\":0,\\\"numItems\\\":0}],\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"itemsSource\\\":{\\\"type\\\":\\\"aggregate\\\",\\\"id\\\":\\\"string\\\"}}\")\n  .asString();"}]}},"/recommendations/v2/recommend/items/users/{clientUuid}":{"get":{"summary":"Personalized recommendations","description":"Retrieve item recommendations for a profile.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_PERSONALIZED_RECOMMENDATIONS_READ`\n","operationId":"RecommendForUserV2","tags":["Recommendations"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-inPathClientUUID"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignName"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"},{"$ref":"#/components/parameters/recommendations-rust-all-filterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-elasticFilterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-inParamsItemId"},{"$ref":"#/components/parameters/recommendations-rust-all-itemCatalogId"},{"$ref":"#/components/parameters/recommendations-rust-all-distinctFilter"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"},{"$ref":"#/components/parameters/recommendations-rust-all-params"},{"$ref":"#/components/parameters/recommendations-rust-all-inventoryChannelId"},{"$ref":"#/components/parameters/recommendations-rust-all-crossWorkspaceMode"}],"responses":{"200":{"description":"Personalized recommendations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/RecommendForUserV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'minNumItems' => 'SOME_INTEGER_VALUE',\n  'maxNumItems' => 'SOME_INTEGER_VALUE',\n  'campaignId' => 'SOME_STRING_VALUE',\n  'campaignName' => 'SOME_STRING_VALUE',\n  'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',\n  'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',\n  'filters' => 'SOME_STRING_VALUE',\n  'elastic:filters' => 'SOME_STRING_VALUE',\n  'itemId' => 'SOME_STRING_VALUE',\n  'itemCatalogId' => 'SOME_STRING_VALUE',\n  'distinctFilter' => 'SOME_OBJECT_VALUE',\n  'includeContextItems' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile',\n  'inventoryChannelId' => 'SOME_STRING_VALUE',\n  'crossWorkspaceMode' => 'SOME_BOOLEAN_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Personalized recommendations","description":"Retrieve item recommendations for a profile.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_PERSONALIZED_RECOMMENDATIONS_READ`\n","operationId":"PostRecommendForUserV2","tags":["Recommendations"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-inPathClientUUID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"}}},"description":"Definition of the requested recommendation","required":true},"responses":{"200":{"description":"Personalized recommendations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendForUserV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"campaignId\": \"defaultCampaign\",\n  \"campaignName\": \"string\",\n  \"catalogId\": \"default\",\n  \"clientUUID\": \"string\",\n  \"contextItemIds\": [\n    \"string\"\n  ],\n  \"includeContextItems\": false,\n  \"filterRules\": {\n    \"excludePurchasedItems\": false,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": false,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"displayAttributes\": \"string\",\n  \"abTestContext\": {\n    \"experimentId\": 0,\n    \"variantId\": \"string\",\n    \"requestedCampaignId\": \"string\"\n  },\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"keepSlotsOrder\": true,\n  \"personalizeSlotsOrder\": false,\n  \"sortMetric\": \"string\",\n  \"boostingParameters\": {\n    \"metric\": \"string\",\n    \"strength\": 0.1,\n    \"personalizedBoostingStrength\": 0\n  },\n  \"boostingStrategies\": [\n    {\n      \"name\": \"string\",\n      \"condition\": \"string\",\n      \"strength\": 1\n    }\n  ],\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  },\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"minNumItems\": 1,\n      \"maxNumItems\": 5,\n      \"shuffleNumItems\": 1,\n      \"filters\": \"string\",\n      \"elasticFilters\": \"string\",\n      \"distinctFilter\": {\n        \"elastic\": true,\n        \"filters\": [\n          {\n            \"field\": \"string\",\n            \"maxNumItems\": 0,\n            \"levelRangeModifier\": 0\n          }\n        ]\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  campaignId: 'defaultCampaign',\n  campaignName: 'string',\n  catalogId: 'default',\n  clientUUID: 'string',\n  contextItemIds: ['string'],\n  includeContextItems: false,\n  filterRules: {\n    excludePurchasedItems: false,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: false,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  displayAttributes: 'string',\n  abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},\n  params: {source: 'mobile'},\n  inventoryContext: {channelIds: ['string']},\n  keepSlotsOrder: true,\n  personalizeSlotsOrder: false,\n  sortMetric: 'string',\n  boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},\n  boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],\n  crossWorkspaceMode: {enabled: true},\n  slots: [\n    {\n      name: 'string',\n      minNumItems: 1,\n      maxNumItems: 5,\n      shuffleNumItems: 1,\n      filters: 'string',\n      elasticFilters: 'string',\n      distinctFilter: {\n        elastic: true,\n        filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\")\n  .asString();"}]}},"/recommendations/v2/recommend/items/users/{clientUuid}/sections":{"post":{"summary":"Section recommendations","description":"Retrieve item recommendations grouped by attribute.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_SECTION_RECOMMENDATIONS_READ`\n","operationId":"PostRecommendSectionsForUserV2","tags":["Recommendations"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-pathClientUuid"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SectionsSlotsBodySchemaV2"}}},"description":"Definition of the requested recommendation","required":true},"responses":{"200":{"description":"Section recommendations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SectionsSlotsRecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendSectionsForUserV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/sections \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"metadataCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":1,\"numItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\"}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"metadataCatalogId\\\":\\\"string\\\",\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"attribute\\\":{\\\"name\\\":\\\"string\\\",\\\"levelRangeModifier\\\":0},\\\"numRows\\\":1,\\\"numItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\"}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D/sections\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"campaignId\": \"defaultCampaign\",\n  \"campaignName\": \"string\",\n  \"catalogId\": \"default\",\n  \"clientUUID\": \"string\",\n  \"contextItemIds\": [\n    \"string\"\n  ],\n  \"includeContextItems\": false,\n  \"filterRules\": {\n    \"excludePurchasedItems\": false,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": false,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"displayAttributes\": \"string\",\n  \"abTestContext\": {\n    \"experimentId\": 0,\n    \"variantId\": \"string\",\n    \"requestedCampaignId\": \"string\"\n  },\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"metadataCatalogId\": \"string\",\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"attribute\": {\n        \"name\": \"string\",\n        \"levelRangeModifier\": 0\n      },\n      \"numRows\": 1,\n      \"numItems\": 1,\n      \"filters\": \"string\",\n      \"elasticFilters\": \"string\"\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/sections\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D/sections\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  campaignId: 'defaultCampaign',\n  campaignName: 'string',\n  catalogId: 'default',\n  clientUUID: 'string',\n  contextItemIds: ['string'],\n  includeContextItems: false,\n  filterRules: {\n    excludePurchasedItems: false,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: false,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  displayAttributes: 'string',\n  abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},\n  params: {source: 'mobile'},\n  inventoryContext: {channelIds: ['string']},\n  metadataCatalogId: 'string',\n  slots: [\n    {\n      name: 'string',\n      attribute: {name: 'string', levelRangeModifier: 0},\n      numRows: 1,\n      numItems: 1,\n      filters: 'string',\n      elasticFilters: 'string'\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/sections');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"metadataCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"numRows\":1,\"numItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\"}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/sections\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"metadataCatalogId\\\":\\\"string\\\",\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"attribute\\\":{\\\"name\\\":\\\"string\\\",\\\"levelRangeModifier\\\":0},\\\"numRows\\\":1,\\\"numItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\"}]}\")\n  .asString();"}]}},"/recommendations/v2/recommend/items/users/{clientUuid}/attributes":{"post":{"summary":"Attribute recommendations","description":"Retrieve attribute recommendations.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_ATTRIBUTE_RECOMMENDATIONS_READ`\n","operationId":"PostRecommendAttributesForUserV2","tags":["Recommendations"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-pathClientUuid"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-AttributesSlotsBodySchemaV2"}}},"description":"Definition of the requested recommendation","required":true},"responses":{"200":{"description":"Attribute recommendations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendAttributesForUserV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/attributes \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"metadataCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"minNumItems\":1,\"maxNumItems\":5,\"filters\":\"string\",\"elasticFilters\":\"string\"}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"metadataCatalogId\\\":\\\"string\\\",\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"attribute\\\":{\\\"name\\\":\\\"string\\\",\\\"levelRangeModifier\\\":0},\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\"}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D/attributes\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"campaignId\": \"defaultCampaign\",\n  \"campaignName\": \"string\",\n  \"catalogId\": \"default\",\n  \"clientUUID\": \"string\",\n  \"contextItemIds\": [\n    \"string\"\n  ],\n  \"includeContextItems\": false,\n  \"filterRules\": {\n    \"excludePurchasedItems\": false,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": false,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"displayAttributes\": \"string\",\n  \"abTestContext\": {\n    \"experimentId\": 0,\n    \"variantId\": \"string\",\n    \"requestedCampaignId\": \"string\"\n  },\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"metadataCatalogId\": \"string\",\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"attribute\": {\n        \"name\": \"string\",\n        \"levelRangeModifier\": 0\n      },\n      \"minNumItems\": 1,\n      \"maxNumItems\": 5,\n      \"filters\": \"string\",\n      \"elasticFilters\": \"string\"\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/attributes\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D/attributes\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  campaignId: 'defaultCampaign',\n  campaignName: 'string',\n  catalogId: 'default',\n  clientUUID: 'string',\n  contextItemIds: ['string'],\n  includeContextItems: false,\n  filterRules: {\n    excludePurchasedItems: false,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: false,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  displayAttributes: 'string',\n  abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},\n  params: {source: 'mobile'},\n  inventoryContext: {channelIds: ['string']},\n  metadataCatalogId: 'string',\n  slots: [\n    {\n      name: 'string',\n      attribute: {name: 'string', levelRangeModifier: 0},\n      minNumItems: 1,\n      maxNumItems: 5,\n      filters: 'string',\n      elasticFilters: 'string'\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/attributes');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"metadataCatalogId\":\"string\",\"slots\":[{\"name\":\"string\",\"attribute\":{\"name\":\"string\",\"levelRangeModifier\":0},\"minNumItems\":1,\"maxNumItems\":5,\"filters\":\"string\",\"elasticFilters\":\"string\"}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/attributes\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"metadataCatalogId\\\":\\\"string\\\",\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"attribute\\\":{\\\"name\\\":\\\"string\\\",\\\"levelRangeModifier\\\":0},\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\"}]}\")\n  .asString();"}]}},"/recommendations/v2/recommend/items/users/{clientUuid}/last":{"get":{"summary":"Last viewed recommendations","description":"Retrieve recent item recommendations seen by a profile.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_LAST_VIEWED_RECOMMENDATIONS_READ`\n","operationId":"RecommendLastViewedForUserItems","tags":["Recommendations"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-pathClientUuid"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignName"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-distinctFilter"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"},{"$ref":"#/components/parameters/recommendations-rust-all-params"},{"$ref":"#/components/parameters/recommendations-rust-all-inventoryChannelId"},{"$ref":"#/components/parameters/recommendations-rust-all-crossWorkspaceMode"}],"responses":{"200":{"description":"Last viewed recommendations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/RecommendLastViewedForUserItems"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'campaignId' => 'SOME_STRING_VALUE',\n  'campaignName' => 'SOME_STRING_VALUE',\n  'minNumItems' => 'SOME_INTEGER_VALUE',\n  'maxNumItems' => 'SOME_INTEGER_VALUE',\n  'distinctFilter' => 'SOME_OBJECT_VALUE',\n  'includeContextItems' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile',\n  'inventoryChannelId' => 'SOME_STRING_VALUE',\n  'crossWorkspaceMode' => 'SOME_BOOLEAN_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Last viewed recommendations","description":"Retrieve recent item recommendations seen by a profile.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_LAST_VIEWED_RECOMMENDATIONS_READ`\n","operationId":"PostRecommendLastViewedForUserItems","tags":["Recommendations"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-pathClientUuid"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"}}},"description":"Definition of the requested recommendation","required":true},"responses":{"200":{"description":"Last viewed recommendations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendLastViewedForUserItems"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"campaignId\": \"defaultCampaign\",\n  \"campaignName\": \"string\",\n  \"catalogId\": \"default\",\n  \"clientUUID\": \"string\",\n  \"contextItemIds\": [\n    \"string\"\n  ],\n  \"includeContextItems\": false,\n  \"filterRules\": {\n    \"excludePurchasedItems\": false,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": false,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"displayAttributes\": \"string\",\n  \"abTestContext\": {\n    \"experimentId\": 0,\n    \"variantId\": \"string\",\n    \"requestedCampaignId\": \"string\"\n  },\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"keepSlotsOrder\": true,\n  \"personalizeSlotsOrder\": false,\n  \"sortMetric\": \"string\",\n  \"boostingParameters\": {\n    \"metric\": \"string\",\n    \"strength\": 0.1,\n    \"personalizedBoostingStrength\": 0\n  },\n  \"boostingStrategies\": [\n    {\n      \"name\": \"string\",\n      \"condition\": \"string\",\n      \"strength\": 1\n    }\n  ],\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  },\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"minNumItems\": 1,\n      \"maxNumItems\": 5,\n      \"shuffleNumItems\": 1,\n      \"filters\": \"string\",\n      \"elasticFilters\": \"string\",\n      \"distinctFilter\": {\n        \"elastic\": true,\n        \"filters\": [\n          {\n            \"field\": \"string\",\n            \"maxNumItems\": 0,\n            \"levelRangeModifier\": 0\n          }\n        ]\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  campaignId: 'defaultCampaign',\n  campaignName: 'string',\n  catalogId: 'default',\n  clientUUID: 'string',\n  contextItemIds: ['string'],\n  includeContextItems: false,\n  filterRules: {\n    excludePurchasedItems: false,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: false,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  displayAttributes: 'string',\n  abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},\n  params: {source: 'mobile'},\n  inventoryContext: {channelIds: ['string']},\n  keepSlotsOrder: true,\n  personalizeSlotsOrder: false,\n  sortMetric: 'string',\n  boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},\n  boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],\n  crossWorkspaceMode: {enabled: true},\n  slots: [\n    {\n      name: 'string',\n      minNumItems: 1,\n      maxNumItems: 5,\n      shuffleNumItems: 1,\n      filters: 'string',\n      elasticFilters: 'string',\n      distinctFilter: {\n        elastic: true,\n        filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\")\n  .asString();"}]}},"/recommendations/v2/recommend/items/users/{clientUuid}/aggregates/{aggregateUUID}":{"get":{"summary":"Recent interactions recommendations","description":"Retrieve recent interactions recommendations for a profile.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_RECENT_INTERACTIONS_RECOMMENDATIONS_READ`\n","operationId":"GetRecommendRecentInteractions","tags":["Recommendations"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-pathClientUuid"},{"$ref":"#/components/parameters/recommendations-rust-all-pathAggregateUuid"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignName"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-distinctFilter"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"},{"$ref":"#/components/parameters/recommendations-rust-all-params"},{"$ref":"#/components/parameters/recommendations-rust-all-inventoryChannelId"},{"$ref":"#/components/parameters/recommendations-rust-all-crossWorkspaceMode"}],"responses":{"200":{"description":"Recent interactions recommendations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/GetRecommendRecentInteractions"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'campaignId' => 'SOME_STRING_VALUE',\n  'campaignName' => 'SOME_STRING_VALUE',\n  'minNumItems' => 'SOME_INTEGER_VALUE',\n  'maxNumItems' => 'SOME_INTEGER_VALUE',\n  'distinctFilter' => 'SOME_OBJECT_VALUE',\n  'includeContextItems' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile',\n  'inventoryChannelId' => 'SOME_STRING_VALUE',\n  'crossWorkspaceMode' => 'SOME_BOOLEAN_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Recent interactions recommendations","description":"Retrieve recent interactions recommendations for a profile.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_RECENT_INTERACTIONS_RECOMMENDATIONS_READ`\n","operationId":"PostRecommendRecentInteractions","tags":["Recommendations"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-pathClientUuid"},{"$ref":"#/components/parameters/recommendations-rust-all-pathAggregateUuid"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"}}},"description":"Definition of the requested recommendation","required":true},"responses":{"200":{"description":"Recent interactions recommendations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendRecentInteractions"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"campaignId\": \"defaultCampaign\",\n  \"campaignName\": \"string\",\n  \"catalogId\": \"default\",\n  \"clientUUID\": \"string\",\n  \"contextItemIds\": [\n    \"string\"\n  ],\n  \"includeContextItems\": false,\n  \"filterRules\": {\n    \"excludePurchasedItems\": false,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": false,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"displayAttributes\": \"string\",\n  \"abTestContext\": {\n    \"experimentId\": 0,\n    \"variantId\": \"string\",\n    \"requestedCampaignId\": \"string\"\n  },\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"keepSlotsOrder\": true,\n  \"personalizeSlotsOrder\": false,\n  \"sortMetric\": \"string\",\n  \"boostingParameters\": {\n    \"metric\": \"string\",\n    \"strength\": 0.1,\n    \"personalizedBoostingStrength\": 0\n  },\n  \"boostingStrategies\": [\n    {\n      \"name\": \"string\",\n      \"condition\": \"string\",\n      \"strength\": 1\n    }\n  ],\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  },\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"minNumItems\": 1,\n      \"maxNumItems\": 5,\n      \"shuffleNumItems\": 1,\n      \"filters\": \"string\",\n      \"elasticFilters\": \"string\",\n      \"distinctFilter\": {\n        \"elastic\": true,\n        \"filters\": [\n          {\n            \"field\": \"string\",\n            \"maxNumItems\": 0,\n            \"levelRangeModifier\": 0\n          }\n        ]\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  campaignId: 'defaultCampaign',\n  campaignName: 'string',\n  catalogId: 'default',\n  clientUUID: 'string',\n  contextItemIds: ['string'],\n  includeContextItems: false,\n  filterRules: {\n    excludePurchasedItems: false,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: false,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  displayAttributes: 'string',\n  abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},\n  params: {source: 'mobile'},\n  inventoryContext: {channelIds: ['string']},\n  keepSlotsOrder: true,\n  personalizeSlotsOrder: false,\n  sortMetric: 'string',\n  boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},\n  boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],\n  crossWorkspaceMode: {enabled: true},\n  slots: [\n    {\n      name: 'string',\n      minNumItems: 1,\n      maxNumItems: 5,\n      shuffleNumItems: 1,\n      filters: 'string',\n      elasticFilters: 'string',\n      distinctFilter: {\n        elastic: true,\n        filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\")\n  .asString();"}]}},"/recommendations/v2/recommend/items/metric":{"get":{"summary":"Scoring by metric","description":"Returns items with the highest score of a chosen metric. A list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_METRICS_RECOMMENDATIONS_READ`\n","operationId":"GetItemsByMetric","tags":["Recommendations"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsSortMetric"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignName"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsClientUUID"},{"$ref":"#/components/parameters/recommendations-rust-all-inParamsItemId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"},{"$ref":"#/components/parameters/recommendations-rust-all-filterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-elasticFilterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-itemCatalogId"},{"$ref":"#/components/parameters/recommendations-rust-all-distinctFilter"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"},{"$ref":"#/components/parameters/recommendations-rust-all-params"},{"$ref":"#/components/parameters/recommendations-rust-all-inventoryChannelId"},{"$ref":"#/components/parameters/recommendations-rust-all-crossWorkspaceMode"}],"responses":{"200":{"description":"Items with the highest metric scores","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/GetItemsByMetric"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/recommend/items/metric?sortMetric=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/recommend/items/metric?sortMetric=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/recommend/items/metric?sortMetric=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/metric?sortMetric=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/metric');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'sortMetric' => 'SOME_STRING_VALUE',\n  'minNumItems' => 'SOME_INTEGER_VALUE',\n  'maxNumItems' => 'SOME_INTEGER_VALUE',\n  'campaignId' => 'SOME_STRING_VALUE',\n  'campaignName' => 'SOME_STRING_VALUE',\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'itemId' => 'SOME_STRING_VALUE',\n  'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',\n  'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',\n  'filters' => 'SOME_STRING_VALUE',\n  'elastic:filters' => 'SOME_STRING_VALUE',\n  'itemCatalogId' => 'SOME_STRING_VALUE',\n  'distinctFilter' => 'SOME_OBJECT_VALUE',\n  'includeContextItems' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile',\n  'inventoryChannelId' => 'SOME_STRING_VALUE',\n  'crossWorkspaceMode' => 'SOME_BOOLEAN_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/recommend/items/metric?sortMetric=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Scoring by metric","description":"Returns items with the highest score of a chosen metric. A list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_METRICS_RECOMMENDATIONS_READ`\n","operationId":"PostItemsByMetric","tags":["Recommendations"],"security":[{"TrackerKey":[]},{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-MetricsBodySchemaV2"}}},"description":"Definition of the requested recommendation","required":true},"responses":{"200":{"description":"Items with the highest metric scores","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostItemsByMetric"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/items/metric \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/items/metric\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"campaignId\": \"defaultCampaign\",\n  \"campaignName\": \"string\",\n  \"catalogId\": \"default\",\n  \"clientUUID\": \"string\",\n  \"contextItemIds\": [\n    \"string\"\n  ],\n  \"includeContextItems\": false,\n  \"filterRules\": {\n    \"excludePurchasedItems\": false,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": false,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"displayAttributes\": \"string\",\n  \"abTestContext\": {\n    \"experimentId\": 0,\n    \"variantId\": \"string\",\n    \"requestedCampaignId\": \"string\"\n  },\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"keepSlotsOrder\": true,\n  \"personalizeSlotsOrder\": false,\n  \"sortMetric\": \"string\",\n  \"boostingParameters\": {\n    \"metric\": \"string\",\n    \"strength\": 0.1,\n    \"personalizedBoostingStrength\": 0\n  },\n  \"boostingStrategies\": [\n    {\n      \"name\": \"string\",\n      \"condition\": \"string\",\n      \"strength\": 1\n    }\n  ],\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  },\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"minNumItems\": 1,\n      \"maxNumItems\": 5,\n      \"shuffleNumItems\": 1,\n      \"filters\": \"string\",\n      \"elasticFilters\": \"string\",\n      \"distinctFilter\": {\n        \"elastic\": true,\n        \"filters\": [\n          {\n            \"field\": \"string\",\n            \"maxNumItems\": 0,\n            \"levelRangeModifier\": 0\n          }\n        ]\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/items/metric\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/metric\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  campaignId: 'defaultCampaign',\n  campaignName: 'string',\n  catalogId: 'default',\n  clientUUID: 'string',\n  contextItemIds: ['string'],\n  includeContextItems: false,\n  filterRules: {\n    excludePurchasedItems: false,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: false,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  displayAttributes: 'string',\n  abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},\n  params: {source: 'mobile'},\n  inventoryContext: {channelIds: ['string']},\n  keepSlotsOrder: true,\n  personalizeSlotsOrder: false,\n  sortMetric: 'string',\n  boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},\n  boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],\n  crossWorkspaceMode: {enabled: true},\n  slots: [\n    {\n      name: 'string',\n      minNumItems: 1,\n      maxNumItems: 5,\n      shuffleNumItems: 1,\n      filters: 'string',\n      elasticFilters: 'string',\n      distinctFilter: {\n        elastic: true,\n        filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/metric');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/items/metric\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\")\n  .asString();"}]}},"/recommendations/v2/recommend/items/complementary":{"get":{"summary":"Complementary items for a cart","description":"Show recommendations based on the contents of a cart.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_COMPLEMENTARY_RECOMMENDATIONS_READ`\n","operationId":"ComplementItems","tags":["Recommendations"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsClientUUID"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignName"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"},{"$ref":"#/components/parameters/recommendations-rust-all-filterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-elasticFilterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-inParamsItemIdList"},{"$ref":"#/components/parameters/recommendations-rust-all-itemCatalogId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsBoostMetric"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsSortMetric"},{"$ref":"#/components/parameters/recommendations-rust-all-distinctFilter"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"},{"$ref":"#/components/parameters/recommendations-rust-all-params"},{"$ref":"#/components/parameters/recommendations-rust-all-inventoryChannelId"},{"$ref":"#/components/parameters/recommendations-rust-all-crossWorkspaceMode"}],"responses":{"200":{"description":"Cart complementary recommendations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/ComplementItems"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/recommend/items/complementary?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/recommend/items/complementary?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/recommend/items/complementary?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/complementary?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/complementary');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'minNumItems' => 'SOME_INTEGER_VALUE',\n  'maxNumItems' => 'SOME_INTEGER_VALUE',\n  'campaignId' => 'SOME_STRING_VALUE',\n  'campaignName' => 'SOME_STRING_VALUE',\n  'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',\n  'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',\n  'filters' => 'SOME_STRING_VALUE',\n  'elastic:filters' => 'SOME_STRING_VALUE',\n  'itemId' => 'SOME_ARRAY_VALUE',\n  'itemCatalogId' => 'SOME_STRING_VALUE',\n  'boostMetric' => 'SOME_STRING_VALUE',\n  'sortMetric' => 'SOME_STRING_VALUE',\n  'distinctFilter' => 'SOME_OBJECT_VALUE',\n  'includeContextItems' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile',\n  'inventoryChannelId' => 'SOME_STRING_VALUE',\n  'crossWorkspaceMode' => 'SOME_BOOLEAN_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/recommend/items/complementary?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Complementary items for a cart","description":"Show recommendations based on the contents of a cart.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_COMPLEMENTARY_RECOMMENDATIONS_READ`\n","operationId":"PostComplementItems","tags":["Recommendations"],"security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"}}},"description":"Definition of the requested recommendation","required":true},"responses":{"200":{"description":"Cart complementary recommendations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostComplementItems"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/items/complementary \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/items/complementary\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"campaignId\": \"defaultCampaign\",\n  \"campaignName\": \"string\",\n  \"catalogId\": \"default\",\n  \"clientUUID\": \"string\",\n  \"contextItemIds\": [\n    \"string\"\n  ],\n  \"includeContextItems\": false,\n  \"filterRules\": {\n    \"excludePurchasedItems\": false,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": false,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"displayAttributes\": \"string\",\n  \"abTestContext\": {\n    \"experimentId\": 0,\n    \"variantId\": \"string\",\n    \"requestedCampaignId\": \"string\"\n  },\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"keepSlotsOrder\": true,\n  \"personalizeSlotsOrder\": false,\n  \"sortMetric\": \"string\",\n  \"boostingParameters\": {\n    \"metric\": \"string\",\n    \"strength\": 0.1,\n    \"personalizedBoostingStrength\": 0\n  },\n  \"boostingStrategies\": [\n    {\n      \"name\": \"string\",\n      \"condition\": \"string\",\n      \"strength\": 1\n    }\n  ],\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  },\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"minNumItems\": 1,\n      \"maxNumItems\": 5,\n      \"shuffleNumItems\": 1,\n      \"filters\": \"string\",\n      \"elasticFilters\": \"string\",\n      \"distinctFilter\": {\n        \"elastic\": true,\n        \"filters\": [\n          {\n            \"field\": \"string\",\n            \"maxNumItems\": 0,\n            \"levelRangeModifier\": 0\n          }\n        ]\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/items/complementary\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/complementary\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  campaignId: 'defaultCampaign',\n  campaignName: 'string',\n  catalogId: 'default',\n  clientUUID: 'string',\n  contextItemIds: ['string'],\n  includeContextItems: false,\n  filterRules: {\n    excludePurchasedItems: false,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: false,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  displayAttributes: 'string',\n  abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},\n  params: {source: 'mobile'},\n  inventoryContext: {channelIds: ['string']},\n  keepSlotsOrder: true,\n  personalizeSlotsOrder: false,\n  sortMetric: 'string',\n  boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},\n  boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],\n  crossWorkspaceMode: {enabled: true},\n  slots: [\n    {\n      name: 'string',\n      minNumItems: 1,\n      maxNumItems: 5,\n      shuffleNumItems: 1,\n      filters: 'string',\n      elasticFilters: 'string',\n      distinctFilter: {\n        elastic: true,\n        filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/complementary');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/items/complementary\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\")\n  .asString();"}]}},"/recommendations/v2/recommend/items/{itemId}/complementary":{"get":{"summary":"Complementary items","description":"Returns items complementary to the given items.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_COMPLEMENTARY_PRODUCTS_RECOMMENDATIONS_READ`\n","operationId":"GetComplementaryItems","tags":["Recommendations"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignName"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsClientUUID"},{"$ref":"#/components/parameters/recommendations-rust-all-inPathItemId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"},{"$ref":"#/components/parameters/recommendations-rust-all-filterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-elasticFilterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-itemCatalogId"},{"$ref":"#/components/parameters/recommendations-rust-all-distinctFilter"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"},{"$ref":"#/components/parameters/recommendations-rust-all-params"},{"$ref":"#/components/parameters/recommendations-rust-all-inventoryChannelId"},{"$ref":"#/components/parameters/recommendations-rust-all-crossWorkspaceMode"}],"responses":{"200":{"description":"Items complementary to the given item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/GetComplementaryItems"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/complementary?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/recommend/items/%7BitemId%7D/complementary?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/complementary?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/%7BitemId%7D/complementary?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/complementary');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'minNumItems' => 'SOME_INTEGER_VALUE',\n  'maxNumItems' => 'SOME_INTEGER_VALUE',\n  'campaignId' => 'SOME_STRING_VALUE',\n  'campaignName' => 'SOME_STRING_VALUE',\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',\n  'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',\n  'filters' => 'SOME_STRING_VALUE',\n  'elastic:filters' => 'SOME_STRING_VALUE',\n  'itemCatalogId' => 'SOME_STRING_VALUE',\n  'distinctFilter' => 'SOME_OBJECT_VALUE',\n  'includeContextItems' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile',\n  'inventoryChannelId' => 'SOME_STRING_VALUE',\n  'crossWorkspaceMode' => 'SOME_BOOLEAN_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/complementary?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Complementary items","description":"Returns items complementary to the given items.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_COMPLEMENTARY_PRODUCTS_RECOMMENDATIONS_READ`\n","operationId":"PostComplementaryItems","tags":["Recommendations"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-inPathItemId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"}}},"description":"Definition of the requested recommendation","required":true},"responses":{"200":{"description":"Items complementary to the given item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostComplementaryItems"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/complementary \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/items/%7BitemId%7D/complementary\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"campaignId\": \"defaultCampaign\",\n  \"campaignName\": \"string\",\n  \"catalogId\": \"default\",\n  \"clientUUID\": \"string\",\n  \"contextItemIds\": [\n    \"string\"\n  ],\n  \"includeContextItems\": false,\n  \"filterRules\": {\n    \"excludePurchasedItems\": false,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": false,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"displayAttributes\": \"string\",\n  \"abTestContext\": {\n    \"experimentId\": 0,\n    \"variantId\": \"string\",\n    \"requestedCampaignId\": \"string\"\n  },\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"keepSlotsOrder\": true,\n  \"personalizeSlotsOrder\": false,\n  \"sortMetric\": \"string\",\n  \"boostingParameters\": {\n    \"metric\": \"string\",\n    \"strength\": 0.1,\n    \"personalizedBoostingStrength\": 0\n  },\n  \"boostingStrategies\": [\n    {\n      \"name\": \"string\",\n      \"condition\": \"string\",\n      \"strength\": 1\n    }\n  ],\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  },\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"minNumItems\": 1,\n      \"maxNumItems\": 5,\n      \"shuffleNumItems\": 1,\n      \"filters\": \"string\",\n      \"elasticFilters\": \"string\",\n      \"distinctFilter\": {\n        \"elastic\": true,\n        \"filters\": [\n          {\n            \"field\": \"string\",\n            \"maxNumItems\": 0,\n            \"levelRangeModifier\": 0\n          }\n        ]\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/complementary\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/%7BitemId%7D/complementary\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  campaignId: 'defaultCampaign',\n  campaignName: 'string',\n  catalogId: 'default',\n  clientUUID: 'string',\n  contextItemIds: ['string'],\n  includeContextItems: false,\n  filterRules: {\n    excludePurchasedItems: false,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: false,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  displayAttributes: 'string',\n  abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},\n  params: {source: 'mobile'},\n  inventoryContext: {channelIds: ['string']},\n  keepSlotsOrder: true,\n  personalizeSlotsOrder: false,\n  sortMetric: 'string',\n  boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},\n  boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],\n  crossWorkspaceMode: {enabled: true},\n  slots: [\n    {\n      name: 'string',\n      minNumItems: 1,\n      maxNumItems: 5,\n      shuffleNumItems: 1,\n      filters: 'string',\n      elasticFilters: 'string',\n      distinctFilter: {\n        elastic: true,\n        filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/complementary');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/complementary\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\")\n  .asString();"}]}},"/recommendations/v2/recommend/items/{itemId}/similar":{"get":{"summary":"Similar items","description":"Returns items similar to a given item.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_SIMILAR_RECOMMENDATIONS_READ`\n","operationId":"GetSimilarItems","tags":["Recommendations"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignName"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsClientUUID"},{"$ref":"#/components/parameters/recommendations-rust-all-inPathItemId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"},{"$ref":"#/components/parameters/recommendations-rust-all-filterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-elasticFilterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-itemCatalogId"},{"$ref":"#/components/parameters/recommendations-rust-all-distinctFilter"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"},{"$ref":"#/components/parameters/recommendations-rust-all-params"},{"$ref":"#/components/parameters/recommendations-rust-all-inventoryChannelId"},{"$ref":"#/components/parameters/recommendations-rust-all-crossWorkspaceMode"}],"responses":{"200":{"description":"Items similar to the given item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/GetSimilarItems"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/recommend/items/%7BitemId%7D/similar?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/%7BitemId%7D/similar?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'minNumItems' => 'SOME_INTEGER_VALUE',\n  'maxNumItems' => 'SOME_INTEGER_VALUE',\n  'campaignId' => 'SOME_STRING_VALUE',\n  'campaignName' => 'SOME_STRING_VALUE',\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',\n  'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',\n  'filters' => 'SOME_STRING_VALUE',\n  'elastic:filters' => 'SOME_STRING_VALUE',\n  'itemCatalogId' => 'SOME_STRING_VALUE',\n  'distinctFilter' => 'SOME_OBJECT_VALUE',\n  'includeContextItems' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile',\n  'inventoryChannelId' => 'SOME_STRING_VALUE',\n  'crossWorkspaceMode' => 'SOME_BOOLEAN_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Similar items","description":"Returns items similar to a given item.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_SIMILAR_RECOMMENDATIONS_READ`\n","operationId":"PostSimilarItems","tags":["Recommendations"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-inPathItemId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"}}},"description":"Definition of the requested recommendation","required":true},"responses":{"200":{"description":"Items similar to the given item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostSimilarItems"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/items/%7BitemId%7D/similar\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"campaignId\": \"defaultCampaign\",\n  \"campaignName\": \"string\",\n  \"catalogId\": \"default\",\n  \"clientUUID\": \"string\",\n  \"contextItemIds\": [\n    \"string\"\n  ],\n  \"includeContextItems\": false,\n  \"filterRules\": {\n    \"excludePurchasedItems\": false,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": false,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"displayAttributes\": \"string\",\n  \"abTestContext\": {\n    \"experimentId\": 0,\n    \"variantId\": \"string\",\n    \"requestedCampaignId\": \"string\"\n  },\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"keepSlotsOrder\": true,\n  \"personalizeSlotsOrder\": false,\n  \"sortMetric\": \"string\",\n  \"boostingParameters\": {\n    \"metric\": \"string\",\n    \"strength\": 0.1,\n    \"personalizedBoostingStrength\": 0\n  },\n  \"boostingStrategies\": [\n    {\n      \"name\": \"string\",\n      \"condition\": \"string\",\n      \"strength\": 1\n    }\n  ],\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  },\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"minNumItems\": 1,\n      \"maxNumItems\": 5,\n      \"shuffleNumItems\": 1,\n      \"filters\": \"string\",\n      \"elasticFilters\": \"string\",\n      \"distinctFilter\": {\n        \"elastic\": true,\n        \"filters\": [\n          {\n            \"field\": \"string\",\n            \"maxNumItems\": 0,\n            \"levelRangeModifier\": 0\n          }\n        ]\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/%7BitemId%7D/similar\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  campaignId: 'defaultCampaign',\n  campaignName: 'string',\n  catalogId: 'default',\n  clientUUID: 'string',\n  contextItemIds: ['string'],\n  includeContextItems: false,\n  filterRules: {\n    excludePurchasedItems: false,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: false,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  displayAttributes: 'string',\n  abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},\n  params: {source: 'mobile'},\n  inventoryContext: {channelIds: ['string']},\n  keepSlotsOrder: true,\n  personalizeSlotsOrder: false,\n  sortMetric: 'string',\n  boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},\n  boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],\n  crossWorkspaceMode: {enabled: true},\n  slots: [\n    {\n      name: 'string',\n      minNumItems: 1,\n      maxNumItems: 5,\n      shuffleNumItems: 1,\n      filters: 'string',\n      elasticFilters: 'string',\n      distinctFilter: {\n        elastic: true,\n        filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\")\n  .asString();"}]}},"/recommendations/v2/recommend/items/{itemId}/similar/visual":{"get":{"summary":"Visually similar","description":"Returns items visually similar to the given items.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_VISUAL_RECOMMENDATIONS_READ`\n","operationId":"GetSimilarVisualItems","tags":["Recommendations"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsClientUUID"},{"$ref":"#/components/parameters/recommendations-rust-all-inPathItemId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"},{"$ref":"#/components/parameters/recommendations-rust-all-filterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-elasticFilterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-itemCatalogId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignName"},{"$ref":"#/components/parameters/recommendations-rust-all-distinctFilter"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"},{"$ref":"#/components/parameters/recommendations-rust-all-params"},{"$ref":"#/components/parameters/recommendations-rust-all-inventoryChannelId"},{"$ref":"#/components/parameters/recommendations-rust-all-crossWorkspaceMode"}],"responses":{"200":{"description":"Items visually similar to the given item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/GetSimilarVisualItems"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'minNumItems' => 'SOME_INTEGER_VALUE',\n  'maxNumItems' => 'SOME_INTEGER_VALUE',\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',\n  'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',\n  'filters' => 'SOME_STRING_VALUE',\n  'elastic:filters' => 'SOME_STRING_VALUE',\n  'itemCatalogId' => 'SOME_STRING_VALUE',\n  'campaignId' => 'SOME_STRING_VALUE',\n  'campaignName' => 'SOME_STRING_VALUE',\n  'distinctFilter' => 'SOME_OBJECT_VALUE',\n  'includeContextItems' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile',\n  'inventoryChannelId' => 'SOME_STRING_VALUE',\n  'crossWorkspaceMode' => 'SOME_BOOLEAN_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Visually similar","description":"Returns items visually similar to the given items.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_VISUAL_RECOMMENDATIONS_READ`\n","operationId":"PostSimilarVisualItems","tags":["Recommendations"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-inPathItemId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"}}},"description":"Definition of the requested recommendation","required":true},"responses":{"200":{"description":"Items visually similar to the given item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostSimilarVisualItems"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"campaignId\": \"defaultCampaign\",\n  \"campaignName\": \"string\",\n  \"catalogId\": \"default\",\n  \"clientUUID\": \"string\",\n  \"contextItemIds\": [\n    \"string\"\n  ],\n  \"includeContextItems\": false,\n  \"filterRules\": {\n    \"excludePurchasedItems\": false,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": false,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"displayAttributes\": \"string\",\n  \"abTestContext\": {\n    \"experimentId\": 0,\n    \"variantId\": \"string\",\n    \"requestedCampaignId\": \"string\"\n  },\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"keepSlotsOrder\": true,\n  \"personalizeSlotsOrder\": false,\n  \"sortMetric\": \"string\",\n  \"boostingParameters\": {\n    \"metric\": \"string\",\n    \"strength\": 0.1,\n    \"personalizedBoostingStrength\": 0\n  },\n  \"boostingStrategies\": [\n    {\n      \"name\": \"string\",\n      \"condition\": \"string\",\n      \"strength\": 1\n    }\n  ],\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  },\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"minNumItems\": 1,\n      \"maxNumItems\": 5,\n      \"shuffleNumItems\": 1,\n      \"filters\": \"string\",\n      \"elasticFilters\": \"string\",\n      \"distinctFilter\": {\n        \"elastic\": true,\n        \"filters\": [\n          {\n            \"field\": \"string\",\n            \"maxNumItems\": 0,\n            \"levelRangeModifier\": 0\n          }\n        ]\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  campaignId: 'defaultCampaign',\n  campaignName: 'string',\n  catalogId: 'default',\n  clientUUID: 'string',\n  contextItemIds: ['string'],\n  includeContextItems: false,\n  filterRules: {\n    excludePurchasedItems: false,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: false,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  displayAttributes: 'string',\n  abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},\n  params: {source: 'mobile'},\n  inventoryContext: {channelIds: ['string']},\n  keepSlotsOrder: true,\n  personalizeSlotsOrder: false,\n  sortMetric: 'string',\n  boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},\n  boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],\n  crossWorkspaceMode: {enabled: true},\n  slots: [\n    {\n      name: 'string',\n      minNumItems: 1,\n      maxNumItems: 5,\n      shuffleNumItems: 1,\n      filters: 'string',\n      elasticFilters: 'string',\n      distinctFilter: {\n        elastic: true,\n        filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\")\n  .asString();"}]}},"/recommendations/v2/recommend/items/next-interaction":{"get":{"summary":"Next interaction","description":"The \"next interaction\" model recommends items that are most likely to produce a `page.visit` or `product.buy` event.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_NEXT_INTERACTION_RECOMMENDATIONS_READ`\n","operationId":"NextInteractionRecommendation","tags":["Recommendations"],"security":[{"TrackerKey":[]},{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsClientUUID"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMinNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsMaxNumItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsCampaignName"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItems"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsExcludePurchasedItemsSince"},{"$ref":"#/components/parameters/recommendations-rust-all-filterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-elasticFilterExpr"},{"$ref":"#/components/parameters/recommendations-rust-all-inParamsItemIdList"},{"$ref":"#/components/parameters/recommendations-rust-all-itemCatalogId"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsBoostMetric"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsSortMetric"},{"$ref":"#/components/parameters/recommendations-rust-all-distinctFilter"},{"$ref":"#/components/parameters/recommendations-rust-all-recommendationsIncludeContextItems"},{"$ref":"#/components/parameters/recommendations-rust-all-params"}],"responses":{"200":{"description":"Next interaction recommendation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/NextInteractionRecommendation"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/recommendations/v2/recommend/items/next-interaction?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/recommendations/v2/recommend/items/next-interaction?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/recommendations/v2/recommend/items/next-interaction?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/next-interaction?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/next-interaction');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'clientUUID' => 'SOME_STRING_VALUE',\n  'minNumItems' => 'SOME_INTEGER_VALUE',\n  'maxNumItems' => 'SOME_INTEGER_VALUE',\n  'campaignId' => 'SOME_STRING_VALUE',\n  'campaignName' => 'SOME_STRING_VALUE',\n  'excludePurchasedItems' => 'SOME_BOOLEAN_VALUE',\n  'excludePurchasedItemsSinceDays' => 'SOME_INTEGER_VALUE',\n  'filters' => 'SOME_STRING_VALUE',\n  'elastic:filters' => 'SOME_STRING_VALUE',\n  'itemId' => 'SOME_ARRAY_VALUE',\n  'itemCatalogId' => 'SOME_STRING_VALUE',\n  'boostMetric' => 'SOME_STRING_VALUE',\n  'sortMetric' => 'SOME_STRING_VALUE',\n  'distinctFilter' => 'SOME_OBJECT_VALUE',\n  'includeContextItems' => 'SOME_BOOLEAN_VALUE',\n  'params' => 'source:mobile'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/recommendations/v2/recommend/items/next-interaction?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE&params=source%3Amobile\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Next interaction","description":"The \"next interaction\" model recommends items that are most likely to produce a `page.visit` or `product.buy` event.\n\n**Note:** The definition of an *item* encompasses products, but also articles, images, videos, and any other entities in the item feed.\n\n\n---\n\n**API consumers:** <span title=\"Deprecated\">AI API key (legacy)</span>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/docs/settings/tool/tracking_codes\" target=\"_blank\" rel=\"noopener\" title=\"Pass your tracker key in the request header\">Web SDK Tracker</a>\n\n**API key permission required:** `RECOMMENDATIONS_V2_NEXT_INTERACTION_RECOMMENDATIONS_READ`\n","operationId":"PostNextInteractionRecommendation","tags":["Recommendations"],"security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"}}},"description":"Definition of the requested recommendation","required":true},"responses":{"200":{"description":"Next interaction recommendations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-SlotsRecommendationResponseSchemaV2"}}}},"404":{"$ref":"#/components/responses/recommendations-rust-all-404-no-recommendation"},"500":{"$ref":"#/components/responses/recommendations-rust-all-500-error-occurred"}},"x-snr-doc-urls":["/api-reference/ai-recommendations#tag/Recommendations/operation/PostNextInteractionRecommendation"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/recommendations/v2/recommend/items/next-interaction \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/recommendations/v2/recommend/items/next-interaction\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"campaignId\": \"defaultCampaign\",\n  \"campaignName\": \"string\",\n  \"catalogId\": \"default\",\n  \"clientUUID\": \"string\",\n  \"contextItemIds\": [\n    \"string\"\n  ],\n  \"includeContextItems\": false,\n  \"filterRules\": {\n    \"excludePurchasedItems\": false,\n    \"excludePurchasedItemsSinceDays\": 0,\n    \"elasticExcludePurchasedItems\": false,\n    \"elasticExcludePurchasedItemsSinceDays\": 0\n  },\n  \"displayAttributes\": \"string\",\n  \"abTestContext\": {\n    \"experimentId\": 0,\n    \"variantId\": \"string\",\n    \"requestedCampaignId\": \"string\"\n  },\n  \"params\": {\n    \"source\": \"mobile\"\n  },\n  \"inventoryContext\": {\n    \"channelIds\": [\n      \"string\"\n    ]\n  },\n  \"keepSlotsOrder\": true,\n  \"personalizeSlotsOrder\": false,\n  \"sortMetric\": \"string\",\n  \"boostingParameters\": {\n    \"metric\": \"string\",\n    \"strength\": 0.1,\n    \"personalizedBoostingStrength\": 0\n  },\n  \"boostingStrategies\": [\n    {\n      \"name\": \"string\",\n      \"condition\": \"string\",\n      \"strength\": 1\n    }\n  ],\n  \"crossWorkspaceMode\": {\n    \"enabled\": true\n  },\n  \"slots\": [\n    {\n      \"name\": \"string\",\n      \"minNumItems\": 1,\n      \"maxNumItems\": 5,\n      \"shuffleNumItems\": 1,\n      \"filters\": \"string\",\n      \"elasticFilters\": \"string\",\n      \"distinctFilter\": {\n        \"elastic\": true,\n        \"filters\": [\n          {\n            \"field\": \"string\",\n            \"maxNumItems\": 0,\n            \"levelRangeModifier\": 0\n          }\n        ]\n      }\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/recommendations/v2/recommend/items/next-interaction\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/recommendations/v2/recommend/items/next-interaction\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  campaignId: 'defaultCampaign',\n  campaignName: 'string',\n  catalogId: 'default',\n  clientUUID: 'string',\n  contextItemIds: ['string'],\n  includeContextItems: false,\n  filterRules: {\n    excludePurchasedItems: false,\n    excludePurchasedItemsSinceDays: 0,\n    elasticExcludePurchasedItems: false,\n    elasticExcludePurchasedItemsSinceDays: 0\n  },\n  displayAttributes: 'string',\n  abTestContext: {experimentId: 0, variantId: 'string', requestedCampaignId: 'string'},\n  params: {source: 'mobile'},\n  inventoryContext: {channelIds: ['string']},\n  keepSlotsOrder: true,\n  personalizeSlotsOrder: false,\n  sortMetric: 'string',\n  boostingParameters: {metric: 'string', strength: 0.1, personalizedBoostingStrength: 0},\n  boostingStrategies: [{name: 'string', condition: 'string', strength: 1}],\n  crossWorkspaceMode: {enabled: true},\n  slots: [\n    {\n      name: 'string',\n      minNumItems: 1,\n      maxNumItems: 5,\n      shuffleNumItems: 1,\n      filters: 'string',\n      elasticFilters: 'string',\n      distinctFilter: {\n        elastic: true,\n        filters: [{field: 'string', maxNumItems: 0, levelRangeModifier: 0}]\n      }\n    }\n  ]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/recommendations/v2/recommend/items/next-interaction');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"campaignId\":\"defaultCampaign\",\"campaignName\":\"string\",\"catalogId\":\"default\",\"clientUUID\":\"string\",\"contextItemIds\":[\"string\"],\"includeContextItems\":false,\"filterRules\":{\"excludePurchasedItems\":false,\"excludePurchasedItemsSinceDays\":0,\"elasticExcludePurchasedItems\":false,\"elasticExcludePurchasedItemsSinceDays\":0},\"displayAttributes\":\"string\",\"abTestContext\":{\"experimentId\":0,\"variantId\":\"string\",\"requestedCampaignId\":\"string\"},\"params\":{\"source\":\"mobile\"},\"inventoryContext\":{\"channelIds\":[\"string\"]},\"keepSlotsOrder\":true,\"personalizeSlotsOrder\":false,\"sortMetric\":\"string\",\"boostingParameters\":{\"metric\":\"string\",\"strength\":0.1,\"personalizedBoostingStrength\":0},\"boostingStrategies\":[{\"name\":\"string\",\"condition\":\"string\",\"strength\":1}],\"crossWorkspaceMode\":{\"enabled\":true},\"slots\":[{\"name\":\"string\",\"minNumItems\":1,\"maxNumItems\":5,\"shuffleNumItems\":1,\"filters\":\"string\",\"elasticFilters\":\"string\",\"distinctFilter\":{\"elastic\":true,\"filters\":[{\"field\":\"string\",\"maxNumItems\":0,\"levelRangeModifier\":0}]}}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/recommendations/v2/recommend/items/next-interaction\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"campaignId\\\":\\\"defaultCampaign\\\",\\\"campaignName\\\":\\\"string\\\",\\\"catalogId\\\":\\\"default\\\",\\\"clientUUID\\\":\\\"string\\\",\\\"contextItemIds\\\":[\\\"string\\\"],\\\"includeContextItems\\\":false,\\\"filterRules\\\":{\\\"excludePurchasedItems\\\":false,\\\"excludePurchasedItemsSinceDays\\\":0,\\\"elasticExcludePurchasedItems\\\":false,\\\"elasticExcludePurchasedItemsSinceDays\\\":0},\\\"displayAttributes\\\":\\\"string\\\",\\\"abTestContext\\\":{\\\"experimentId\\\":0,\\\"variantId\\\":\\\"string\\\",\\\"requestedCampaignId\\\":\\\"string\\\"},\\\"params\\\":{\\\"source\\\":\\\"mobile\\\"},\\\"inventoryContext\\\":{\\\"channelIds\\\":[\\\"string\\\"]},\\\"keepSlotsOrder\\\":true,\\\"personalizeSlotsOrder\\\":false,\\\"sortMetric\\\":\\\"string\\\",\\\"boostingParameters\\\":{\\\"metric\\\":\\\"string\\\",\\\"strength\\\":0.1,\\\"personalizedBoostingStrength\\\":0},\\\"boostingStrategies\\\":[{\\\"name\\\":\\\"string\\\",\\\"condition\\\":\\\"string\\\",\\\"strength\\\":1}],\\\"crossWorkspaceMode\\\":{\\\"enabled\\\":true},\\\"slots\\\":[{\\\"name\\\":\\\"string\\\",\\\"minNumItems\\\":1,\\\"maxNumItems\\\":5,\\\"shuffleNumItems\\\":1,\\\"filters\\\":\\\"string\\\",\\\"elasticFilters\\\":\\\"string\\\",\\\"distinctFilter\\\":{\\\"elastic\\\":true,\\\"filters\\\":[{\\\"field\\\":\\\"string\\\",\\\"maxNumItems\\\":0,\\\"levelRangeModifier\\\":0}]}}]}\")\n  .asString();"}]}},"/sauth/auth/login/client":{"post":{"tags":["Authorization (deprecated)"],"summary":"Authenticate as Profile","description":"Obtain a new Profile JWT Token.\n\n---\n\n**Authentication:** Not required\n","operationId":"LogInAsClient","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-LogInAsClientRequestBody"},"example":{"apiKey":"5AEAA3D5-E147-C7EB-invalid50109A3D1","email":"testDoc@example.com","password":"testPass1!","uuid":"b3f56868-9667-4843-a8e5-0509456baa9b"}}},"required":true},"responses":{"200":{"description":"Profile authorization token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtoken"},"example":{"token":"eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2018-06-07T07:17:41.734+00:00","status":401,"error":"Unauthorized","message":"Access denied","path":"/auth/login/client","traceId":"61b4aa7c0cb1167a"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2018-06-07T07:17:41.734+00:00","status":404,"error":"Not Found","message":"Account does not exist","path":"/auth/login/client","traceId":"61b4aa7c0cb1167a"}}}},"406":{"$ref":"#/components/responses/sauth-406-account-locked"},"423":{"$ref":"#/components/responses/sauth-423-device-control-enabled"}},"deprecated":true,"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/LogInAsClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/auth/login/client \\\n  --header 'content-type: application/json' \\\n  --data '{\"apiKey\":\"string\",\"email\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"apiKey\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/auth/login/client\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"apiKey\": \"string\",\n  \"email\": \"string\",\n  \"password\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/auth/login/client\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/auth/login/client\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  apiKey: 'string',\n  email: 'string',\n  password: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/auth/login/client');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"apiKey\":\"string\",\"email\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/auth/login/client\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"apiKey\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/auth/login/client/anonymous":{"post":{"tags":["Authorization (deprecated)"],"summary":"Authenticate anonymously","description":"Obtain a new JWT for an anonymous Profile. The token can be used and refreshed in the same way as tokens of registered Profiles.\n\n---\n\n**Authentication:** Not required\n","operationId":"LogInAnonymously","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-LogInAnonymouslyRequestBody"}}},"required":true},"responses":{"200":{"description":"Anonymous authorization token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtoken"},"example":{"token":"eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2019-03-19T14:03:35.413+00:00","status":401,"error":"Unauthorized","message":"Could not fetch ApiKey","path":"/auth/login/client/anonymous"}}}}},"deprecated":true,"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/LogInAnonymously"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/auth/login/client/anonymous \\\n  --header 'content-type: application/json' \\\n  --data '{\"apiKey\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"apiKey\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/auth/login/client/anonymous\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"apiKey\": \"string\",\n  \"deviceId\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/auth/login/client/anonymous\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/auth/login/client/anonymous\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  apiKey: 'string',\n  deviceId: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/auth/login/client/anonymous');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"apiKey\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/auth/login/client/anonymous\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"apiKey\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\"}\")\n  .asString();"}]}},"/sauth/auth/login/client/facebook":{"post":{"tags":["Authorization (deprecated)"],"summary":"Authenticate with Facebook","description":"Use a Facebook token to obtain a Profile JWT. If a Facebook account is logging on for the first time, a self-managed account for the profile is registered in Synerise.\n\n---\n\n**Authentication:** Not required\n","operationId":"AuthenticateWithFacebook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-AuthenticateWithFacebookRequestBody"},"example":"{\"facebookToken\":\"EAAfsMmaWLW0BAOZAqSoh8ZB5y2ZAixtSrlvvq3fpWGlcrfcoWOiAwBCZBpBDlzwHFSZB58nUBjOz2UMuopO7p2Q65QU1ZAiB2XaxRzje0bBd7Tu87f6C2pcoZAP65agWAF0ElZCNyKn4iAtFd9RhppkwU9ll0AokBZBnDroZCIaxE3IHSWGtE567AUrXkZAsQEjYsZAZAcYx0ki1w7XUToy9Wps9NA0OuBdMhruB3htuiukwOFAZDZD\",\"apiKey\":\"5AEAA3D5-E147-C7EB-invalid\",\"uuid\":\"91b8e035-dca3-4805-8915-2cfb01d31fde\",\"deviceId\":\"deviceId\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":true,\"rfid\":true,\"wifi\":true},\"attributes\":{\"property1\":\"string\",\"property2\":\"string\"}}"}},"required":true},"responses":{"200":{"description":"Profile authorization token","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtoken"}}}}},"deprecated":true,"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/AuthenticateWithFacebook"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/auth/login/client/facebook \\\n  --header 'content-type: application/json' \\\n  --data '{\"facebookToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"facebookToken\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/auth/login/client/facebook\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"facebookToken\": \"string\",\n  \"apiKey\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\",\n  \"agreements\": {\n    \"email\": true,\n    \"sms\": true,\n    \"push\": true,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/auth/login/client/facebook\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/auth/login/client/facebook\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  facebookToken: 'string',\n  apiKey: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string',\n  agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/auth/login/client/facebook');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"facebookToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/auth/login/client/facebook\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"facebookToken\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/sauth/auth/login/client/facebook/no-registration":{"post":{"tags":["Authorization (deprecated)"],"summary":"Authenticate with Facebook without registration","description":"Use a Facebook token to obtain a Profile JWT without creating a self-managed account for this Profile in Synerise.\n\n---\n\n**Authentication:** Not required\n","operationId":"AuthenticateWithFacebookWithoutRegistration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-AuthenticateWithFacebookWithoutRegistrationRequestBody"},"example":"{\"facebookToken\":\"EAAfsMmaWLW0BAOZAqSoh8ZB5y2ZAixtSrlvvq3fpWGlcrfcoWOiAwBCZBpBDlzwHFSZB58nUBjOz2UMuopO7p2Q65QU1ZAiB2XaxRzje0bBd7Tu87f6C2pcoZAP65agWAF0ElZCNyKn4iAtFd9RhppkwU9ll0AokBZBnDroZCIaxE3IHSWGtE567AUrXkZAsQEjYsZAZAcYx0ki1w7XUToy9Wps9NA0OuBdMhruB3htuiukwOFAZDZD\",\"apiKey\":\"5AEAA3D5-E147-C7EB-invalid\",\"uuid\":\"91b8e035-dca3-4805-8915-2cfb01d31fde\",\"deviceId\":\"deviceId\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":true,\"rfid\":true,\"wifi\":true},\"attributes\":{\"property1\":\"string\",\"property2\":\"string\"}}"}},"required":true},"responses":{"200":{"description":"Profile authorization token","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtoken"}}}}},"deprecated":true,"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/AuthenticateWithFacebookWithoutRegistration"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/auth/login/client/facebook/no-registration \\\n  --header 'content-type: application/json' \\\n  --data '{\"facebookToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"facebookToken\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/auth/login/client/facebook/no-registration\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"facebookToken\": \"string\",\n  \"apiKey\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\",\n  \"agreements\": {\n    \"email\": true,\n    \"sms\": true,\n    \"push\": true,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/auth/login/client/facebook/no-registration\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/auth/login/client/facebook/no-registration\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  facebookToken: 'string',\n  apiKey: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string',\n  agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/auth/login/client/facebook/no-registration');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"facebookToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/auth/login/client/facebook/no-registration\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"facebookToken\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/sauth/auth/login/client/oauth":{"post":{"tags":["Authorization (deprecated)"],"summary":"Authenticate with OAuth","description":"Obtain a new JWT token by using OAuth authentication token.\n\n---\n\n**Authentication:** Not required\n","operationId":"AuthenticateWithOauth","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-OauthAuthBody"}}},"required":true},"responses":{"200":{"description":"Profile authorization token","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtoken"}}}}},"deprecated":true,"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/AuthenticateWithOauth"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/auth/login/client/oauth \\\n  --header 'content-type: application/json' \\\n  --data '{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"],\"customId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"accessToken\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"],\\\"customId\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/auth/login/client/oauth\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"accessToken\": \"string\",\n  \"apiKey\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\",\n  \"agreements\": {\n    \"email\": true,\n    \"sms\": true,\n    \"push\": true,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ],\n  \"customId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/auth/login/client/oauth\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/auth/login/client/oauth\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  accessToken: 'string',\n  apiKey: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string',\n  agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},\n  attributes: {property1: null, property2: null},\n  tags: ['string'],\n  customId: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/auth/login/client/oauth');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"],\"customId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/auth/login/client/oauth\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"accessToken\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"],\\\"customId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/auth/login/client/oauth/no-registration":{"post":{"tags":["Authorization (deprecated)"],"summary":"Authenticate with OAuth without registration","description":"Use an OAuth token to obtain a Profile JWT. This method does not create a Profile in Synerise.\n\n---\n\n**Authentication:** Not required\n","operationId":"loginWithOauthWithoutRegistrationUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-OauthAuthBody"}}},"required":true},"responses":{"200":{"description":"Profile authorization token","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtoken"}}}}},"deprecated":true,"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/loginWithOauthWithoutRegistrationUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/auth/login/client/oauth/no-registration \\\n  --header 'content-type: application/json' \\\n  --data '{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"],\"customId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"accessToken\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"],\\\"customId\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/auth/login/client/oauth/no-registration\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"accessToken\": \"string\",\n  \"apiKey\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\",\n  \"agreements\": {\n    \"email\": true,\n    \"sms\": true,\n    \"push\": true,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ],\n  \"customId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/auth/login/client/oauth/no-registration\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/auth/login/client/oauth/no-registration\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  accessToken: 'string',\n  apiKey: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string',\n  agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},\n  attributes: {property1: null, property2: null},\n  tags: ['string'],\n  customId: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/auth/login/client/oauth/no-registration');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"],\"customId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/auth/login/client/oauth/no-registration\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"accessToken\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"],\\\"customId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/auth/login/client/apple":{"post":{"tags":["Authorization (deprecated)"],"summary":"Authenticate with Sign in with Apple","description":"Obtain a new JWT token by using Sign in with Apple authentication token.\n\n---\n\n**Authentication:** Not required\n","operationId":"AuthenticateWithApple","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-AuthenticateWithAppleRequestBody"},"example":"{\"accessToken\":\"EAAfsMmaWLW0BAOZAqSoh8ZB5y2ZAixtSrlvvq3fpWGlcrfcoWOiAwBCZBpBDlzwHFSZB58nUBjOz2UMuopO7p2Q65QU1ZAiB2XaxRzje0bBd7Tu87f6C2pcoZAP65agWAF0ElZCNyKn4iAtFd9RhppkwU9ll0AokBZBnDroZCIaxE3IHSWGtE567AUrXkZAsQEjYsZAZAcYx0ki1w7XUToy9Wps9NA0OuBdMhruB3htuiukwOFAZDZD\",\"apiKey\":\"5AEAA3D5-E147-C7EB-invalid\",\"uuid\":\"91b8e035-dca3-4805-8915-2cfb01d31fde\",\"deviceId\":\"deviceId\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":true,\"rfid\":true,\"wifi\":true},\"attributes\":{\"property1\":\"string\",\"property2\":\"string\"}}"}},"required":true},"responses":{"200":{"description":"Profile authorization token","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtoken"}}}}},"deprecated":true,"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/AuthenticateWithApple"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/auth/login/client/apple \\\n  --header 'content-type: application/json' \\\n  --data '{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"accessToken\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/auth/login/client/apple\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"accessToken\": \"string\",\n  \"apiKey\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\",\n  \"agreements\": {\n    \"email\": true,\n    \"sms\": true,\n    \"push\": true,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/auth/login/client/apple\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/auth/login/client/apple\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  accessToken: 'string',\n  apiKey: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string',\n  agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/auth/login/client/apple');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/auth/login/client/apple\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"accessToken\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/sauth/auth/login/client/apple/no-registration":{"post":{"tags":["Authorization (deprecated)"],"summary":"Authenticate with Sign in with Apple without registration","description":"Use an Apple token to obtain a Profile JWT. This method does not create a Profile in Synerise.\n\n---\n\n**Authentication:** Not required\n","operationId":"loginWithAppleWithoutRegistrationUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-LoginWithAppleWithoutRegistrationRequestBody"}}},"required":true},"responses":{"200":{"description":"Profile authorization token","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtoken"}}}}},"deprecated":true,"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/loginWithAppleWithoutRegistrationUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/auth/login/client/apple/no-registration \\\n  --header 'content-type: application/json' \\\n  --data '{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"accessToken\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/auth/login/client/apple/no-registration\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"accessToken\": \"string\",\n  \"apiKey\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\",\n  \"agreements\": {\n    \"email\": true,\n    \"sms\": true,\n    \"push\": true,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/auth/login/client/apple/no-registration\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/auth/login/client/apple/no-registration\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  accessToken: 'string',\n  apiKey: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string',\n  agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/auth/login/client/apple/no-registration');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"accessToken\":\"string\",\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/auth/login/client/apple/no-registration\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"accessToken\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/sauth/clients/registered":{"post":{"tags":["Profile registration"],"summary":"Register a Profile","description":"Create a new account for a Profile. This account is owned by the Profile and can be accessed and edited by it. If you don't have some information about the profile, don't insert a null-value parameter - omit the parameter entirely.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SAUTH_REGISTER_CLIENT_CREATE`\n","operationId":"RegisterAClient","requestBody":{"content":{"application/json":{"schema":{"required":["uuid","email","password"],"$ref":"#/components/schemas/sauth-RegisterAClientRequestBody"}}},"required":true},"responses":{"202":{"description":"Request accepted"},"400":{"description":"Profile already exists or request body malformed","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n- `SAU-603`: A profile with this UUID already exists, you probably need to re-generate the UUID\n- `SAU-604`: A profile with this id already exists\n- `SAU-605`: A profile with this customId already exists and is registered\n- `SAU-606`: This UUID cannot be used, re-generate the UUID and try again\n"}}}]}}}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"424":{"description":"Only if customId was obtained from loyalty card code pool: provided customId does not exist in loyalty card code pool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-registration/operation/RegisterAClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/clients/registered \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\",\"password\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"whatsAppId\":\"string\",\"birthDate\":\"string\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"customId\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"whatsAppId\\\":\\\"string\\\",\\\"birthDate\\\":\\\"string\\\",\\\"company\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/clients/registered\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\",\n  \"password\": \"string\",\n  \"phone\": \"+48111222333\",\n  \"customId\": \"string\",\n  \"firstName\": \"string\",\n  \"lastName\": \"string\",\n  \"displayName\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"avatarUrl\": \"string\",\n  \"whatsAppId\": \"string\",\n  \"birthDate\": \"string\",\n  \"company\": \"string\",\n  \"city\": \"string\",\n  \"address\": \"string\",\n  \"zipCode\": \"string\",\n  \"province\": \"string\",\n  \"countryCode\": \"PL\",\n  \"sex\": \"FEMALE\",\n  \"agreements\": {\n    \"email\": true,\n    \"sms\": true,\n    \"push\": true,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/clients/registered\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/clients/registered\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  email: 'string',\n  password: 'string',\n  phone: '+48111222333',\n  customId: 'string',\n  firstName: 'string',\n  lastName: 'string',\n  displayName: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  avatarUrl: 'string',\n  whatsAppId: 'string',\n  birthDate: 'string',\n  company: 'string',\n  city: 'string',\n  address: 'string',\n  zipCode: 'string',\n  province: 'string',\n  countryCode: 'PL',\n  sex: 'FEMALE',\n  agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/clients/registered');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\",\"password\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"whatsAppId\":\"string\",\"birthDate\":\"string\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/clients/registered\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"phone\\\":\\\"+48111222333\\\",\\\"customId\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"avatarUrl\\\":\\\"string\\\",\\\"whatsAppId\\\":\\\"string\\\",\\\"birthDate\\\":\\\"string\\\",\\\"company\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"address\\\":\\\"string\\\",\\\"zipCode\\\":\\\"string\\\",\\\"province\\\":\\\"string\\\",\\\"countryCode\\\":\\\"PL\\\",\\\"sex\\\":\\\"FEMALE\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/sauth/auth/refresh/client":{"get":{"tags":["Authorization (deprecated)"],"summary":"Refresh a Profile token","description":"Retrieve a refreshed JWT Token to prolong the Profile session.\n\nThe current token must still be active at the time of the request.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**Authentication:** Not required\n","operationId":"RefreshAClientToken","responses":{"200":{"description":"New authorization token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtoken"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2019-03-19T13:57:33.244+00:00","status":401,"error":"Unauthorized","message":"Full authentication is required to access this resource","path":"/auth/refresh/client"}}}}},"security":[{"JWT":[]}],"deprecated":true,"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/RefreshAClientToken"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/sauth/auth/refresh/client \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/sauth/auth/refresh/client\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/sauth/auth/refresh/client\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/auth/refresh/client\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/auth/refresh/client');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/sauth/auth/refresh/client\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/sauth/v2/auth/refresh/client":{"post":{"deprecated":true,"tags":["Authorization (deprecated)"],"summary":"Refresh a Profile token","description":"This method is deprecated. Use [the v3 method](#operation/RefreshAClientTokenV3) instead.\n\nRetrieve a refreshed JWT Token to prolong the session.\n\nThe current token must still be active at the time of the request.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**Authentication:** Not required\n","operationId":"RefreshAClientTokenV2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ClientRefreshRequest"}}},"required":true},"responses":{"200":{"description":"New authorization token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtoken"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2019-03-19T13:57:33.244+00:00","status":401,"error":"Unauthorized","message":"Full authentication is required to access this resource","path":"/v2/auth/refresh/client"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/RefreshAClientTokenV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/v2/auth/refresh/client \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"apiKey\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"apiKey\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/v2/auth/refresh/client\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"apiKey\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/v2/auth/refresh/client\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/v2/auth/refresh/client\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({apiKey: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/v2/auth/refresh/client');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"apiKey\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/v2/auth/refresh/client\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"apiKey\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/v3/auth/refresh/client":{"post":{"tags":["Authorization"],"summary":"Refresh a Profile token","description":"Retrieve a refreshed JWT Token to prolong the session.\n\nThe current token must still be active at the time of the request.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**Authentication:** Not required\n","operationId":"RefreshAClientTokenV3","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ClientRefreshRequest"}}},"required":true},"responses":{"200":{"description":"New authorization token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtokenV3"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2019-03-19T13:57:33.244+00:00","status":401,"error":"Unauthorized","message":"Full authentication is required to access this resource","path":"/v3/auth/refresh/client"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization/operation/RefreshAClientTokenV3"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/v3/auth/refresh/client \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"apiKey\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"apiKey\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/v3/auth/refresh/client\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"apiKey\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/v3/auth/refresh/client\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/v3/auth/refresh/client\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({apiKey: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/v3/auth/refresh/client');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"apiKey\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/v3/auth/refresh/client\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"apiKey\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/clients/activation/by-pin-code/confirmation":{"post":{"security":[{"JWT":[]}],"tags":["Profile registration"],"summary":"Confirm registration with PIN code","description":"Confirm account registration with PIN code received by email (code is sent automatically at registration).\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n","operationId":"confirmByPinCodeUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-PinCodeConfirmationRequest"}}}},"responses":{"200":{"description":"OK, account confirmed"},"400":{"description":"Request failed, see error message for details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n- `SAU-602`: Account is already confirmed\n- `SAU-601`: Device ID is required and missing\n"}}}]}}}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"description":"Request failed, see error message for details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n- `SAU-304`: Wrong PIN\n- `SAU-305`: PIN expired\n- `SAU-306`: PIN was sent from a different device than the account was registered (by default, this is not allowed)\n"}}}]}}}},"404":{"description":"Not Found"}},"deprecated":false,"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-registration/operation/confirmByPinCodeUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/clients/activation/by-pin-code/confirmation \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"deviceId\":\"string\",\"email\":\"string\",\"pinCode\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"deviceId\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"pinCode\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/clients/activation/by-pin-code/confirmation\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"deviceId\": \"string\",\n  \"email\": \"string\",\n  \"pinCode\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/clients/activation/by-pin-code/confirmation\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/clients/activation/by-pin-code/confirmation\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  deviceId: 'string',\n  email: 'string',\n  pinCode: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/clients/activation/by-pin-code/confirmation');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"deviceId\":\"string\",\"email\":\"string\",\"pinCode\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/clients/activation/by-pin-code/confirmation\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"deviceId\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"pinCode\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\"}\")\n  .asString();"}]}},"/sauth/clients/activation/by-pin-code/request":{"post":{"security":[{"JWT":[]}],"tags":["Profile registration"],"summary":"Re-send PIN code","description":"Re-send a PIN code to the Profile's email.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n","operationId":"resendByPinCodeUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ClientPinActivationResendRequest"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Request failed, see error message for details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n- `SAU-601`: Device ID is required and missing\n"}}}]}}}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"description":"Request failed, see error message for details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n- `SAU-304`: Wrong PIN\n- `SAU-305`: PIN expired\n- `SAU-306`: PIN was sent from a different device than the account was registered (by default, this is not allowed)\n"}}}]}}}},"404":{"description":"Not Found"}},"deprecated":false,"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-registration/operation/resendByPinCodeUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/clients/activation/by-pin-code/request \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/clients/activation/by-pin-code/request\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\",\n  \"deviceId\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/clients/activation/by-pin-code/request\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/clients/activation/by-pin-code/request\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  email: 'string',\n  deviceId: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/clients/activation/by-pin-code/request');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/clients/activation/by-pin-code/request\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\"}\")\n  .asString();"}]}},"/sauth/clients/activation/confirmation":{"post":{"tags":["Profile registration"],"summary":"Activate a Profile's account","description":"Activate the Profile's account. This is used when registration is configured to keep the account inactive until the email is confirmed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SAUTH_CONFIRMATION_CLIENT_CREATE`\n","operationId":"ConfirmAClientAccount","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ConfirmAClientAccountRequestBody"},"example":{"token":"8a0be35a-f6be-437b-ab18-339cc6194df5"}}},"required":true},"responses":{"200":{"description":"Request accepted","headers":{}},"400":{"description":"Request failed, see error message for details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n- `SAU-602`: Account is already confirmed\n"}}}]}}}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"description":"Request failed, see error message for details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2018-08-09T07:53:32.406+00:00","status":409,"error":"Conflict","message":"Account already activated","path":"/clients/activation/request"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-registration/operation/ConfirmAClientAccount"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/clients/activation/confirmation \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"token\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"token\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/clients/activation/confirmation\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"token\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/clients/activation/confirmation\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/clients/activation/confirmation\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({token: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/clients/activation/confirmation');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"token\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/clients/activation/confirmation\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"token\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/clients/activation/request":{"post":{"tags":["Profile registration"],"summary":"Re-send email confirmation","description":"Request a re-sending of the confirmation email.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SAUTH_CONFIRMATION_CLIENT_CREATE`\n","operationId":"resendUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ClientActivationResendRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-registration/operation/resendUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/clients/activation/request \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\",\"deviceId\":\"string\",\"uuid\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/clients/activation/request\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\",\n  \"deviceId\": \"string\",\n  \"uuid\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/clients/activation/request\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/clients/activation/request\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({email: 'string', deviceId: 'string', uuid: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/clients/activation/request');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\",\"deviceId\":\"string\",\"uuid\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/clients/activation/request\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/clients/password-reset/request":{"post":{"tags":["Profile account management"],"summary":"Request Profile password reset","description":"Allows a Profile to send a password reset request. A reset link is sent to the specified email address.\nTo confirm the request, use the [Confirm a Profile's password reset](#operation/ConfirmClientPasswordReset) endpoint.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SAUTH_PASSWORD_RESET_CLIENT_CREATE`\n","operationId":"RequestClientPasswordReset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-RequestClientpasswordresetRequest"}}},"required":true},"responses":{"200":{"description":"Request accepted"},"201":{"description":"Created","content":{}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n- `SAU-307`: Cannot reset password, email confirmation by hash code (activation link) required\n- `SAU-308`: Cannot reset password, email confirmation by PIN (activation link) required\n"}}}]}}}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/RequestClientPasswordReset"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/clients/password-reset/request \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"testDoc@example.com\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"testDoc@example.com\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/clients/password-reset/request\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"testDoc@example.com\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/clients/password-reset/request\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/clients/password-reset/request\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({email: 'testDoc@example.com'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/clients/password-reset/request');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"testDoc@example.com\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/clients/password-reset/request\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"testDoc@example.com\\\"}\")\n  .asString();"}]}},"/sauth/clients/password-reset/confirmation":{"post":{"tags":["Profile account management"],"summary":"Confirm Profile password reset","description":"Confirm a password reset using the token obtained from the [Request Profile password reset](#operation/RequestClientPasswordReset) endpoint.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SAUTH_PASSWORD_RESET_CLIENT_CREATE`\n","operationId":"ConfirmClientPasswordReset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ConfirmClientpasswordresetRequest"}}},"required":true},"responses":{"200":{"description":"Request accepted","headers":{}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/ConfirmClientPasswordReset"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/clients/password-reset/confirmation \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"password\":\"testPass1!\",\"token\":\"token_from_pass_reset_req\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"password\\\":\\\"testPass1!\\\",\\\"token\\\":\\\"token_from_pass_reset_req\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/clients/password-reset/confirmation\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"password\": \"testPass1!\",\n  \"token\": \"token_from_pass_reset_req\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/clients/password-reset/confirmation\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/clients/password-reset/confirmation\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({password: 'testPass1!', token: 'token_from_pass_reset_req'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/clients/password-reset/confirmation');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"password\":\"testPass1!\",\"token\":\"token_from_pass_reset_req\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/clients/password-reset/confirmation\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"password\\\":\\\"testPass1!\\\",\\\"token\\\":\\\"token_from_pass_reset_req\\\"}\")\n  .asString();"}]}},"/sauth/my-account/change-password":{"post":{"tags":["Profile account management"],"summary":"Change Profile password","description":"A Profile can update the password to its account.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"ChangeClientPassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ChangeClientPasswordRequestBody"},"example":"{\"oldPassword\":\"test1.1234\",\"password\":\"Test.1234\",\"deviceId\":\"optional\"}"}},"required":true},"responses":{"200":{"description":"Request accepted","headers":{},"content":{"text/plain":{"schema":{"type":"object"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"error":"Bad Request","status":400,"timestamp":"2018-08-01T19:46:52.178Z","message":"Password must have at least 6 characters and must contain at least one digit, one letter and one special character","path":"/my-account/change-password"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/ChangeClientPassword"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/my-account/change-password \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"oldPassword\":\"string\",\"password\":\"string\",\"deviceId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"oldPassword\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/my-account/change-password\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"oldPassword\": \"string\",\n  \"password\": \"string\",\n  \"deviceId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/my-account/change-password\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/my-account/change-password\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({oldPassword: 'string', password: 'string', deviceId: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/my-account/change-password');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"oldPassword\":\"string\",\"password\":\"string\",\"deviceId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/my-account/change-password\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"oldPassword\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/v2/auth/login/client":{"post":{"deprecated":true,"tags":["Authorization (deprecated)"],"summary":"Authenticate as Profile","description":"This method is deprecated. Use [the v3 method](#operation/authenticateUsingPOST_v3) instead.\n\nObtain a new JWT token for a Profile. If an account for the Profile does not exist and the `identityProvider` is different than `SYNERISE`, this request creates an account.\n\n\n---\n\n**Authentication:** Not required\n","operationId":"authenticateUsingPOST_v2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-AuthenticationRequestV2_and_3"}}}},"responses":{"200":{"description":"Profile authorization token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtoken"},"example":{"token":"eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk"}}}},"400":{"description":"Request failed, see error message for details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n- `SAU-601`: Device ID is required and missing\n"}}}]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2018-06-07T07:17:41.734+00:00","status":401,"error":"Unauthorized","message":"Access denied","path":"/v2/auth/login/client","traceId":"61b4aa7c0cb1167a"}}}},"403":{"$ref":"#/components/responses/sauth-403-login"},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2018-06-07T07:17:41.734+00:00","status":404,"error":"Not Found","message":"Account does not exist","path":"/v2/auth/login/client","traceId":"61b4aa7c0cb1167a"}}}},"406":{"$ref":"#/components/responses/sauth-406-account-locked"},"423":{"$ref":"#/components/responses/sauth-423-device-control-enabled"}},"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/authenticateUsingPOST_v2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/v2/auth/login/client \\\n  --header 'content-type: application/json' \\\n  --data '{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"apiKey\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"SYNERISE\\\",\\\"identityProviderToken\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"customId\\\":null,\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/v2/auth/login/client\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"apiKey\": \"string\",\n  \"identityProvider\": \"SYNERISE\",\n  \"identityProviderToken\": \"string\",\n  \"email\": \"string\",\n  \"customId\": null,\n  \"password\": \"string\",\n  \"uuid\": \"string\",\n  \"deviceId\": \"string\",\n  \"agreements\": {\n    \"email\": true,\n    \"sms\": true,\n    \"push\": true,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/v2/auth/login/client\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/v2/auth/login/client\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  apiKey: 'string',\n  identityProvider: 'SYNERISE',\n  identityProviderToken: 'string',\n  email: 'string',\n  customId: null,\n  password: 'string',\n  uuid: 'string',\n  deviceId: 'string',\n  agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/v2/auth/login/client');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/v2/auth/login/client\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"apiKey\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"SYNERISE\\\",\\\"identityProviderToken\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"customId\\\":null,\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/sauth/v2/auth/login/client/conditional":{"post":{"deprecated":true,"summary":"Authenticate as Profile (conditional)","description":"This method is deprecated. Use [the v3 method](#operation/authenticateConditionalUsingPOSTv3) instead.      \n\n\nObtain a new JWT token for a Profile.\n\n- If the account does not exist, an account is not created.\n- If any additional conditions are required for logging in, the response is HTTP200 and lists the conditions.\n- Note that using this endpoint requires authenticating as an anonymous Profile first.\n\n\n---\n\n**Authentication:** Not required\n","security":[{"JWT":[]}],"tags":["Authorization (deprecated)"],"operationId":"authenticateConditionalUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-AuthenticationRequestV2_and_3"}}}},"responses":{"200":{"description":"Details of the login operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ConditionalAuthenticationResponse"}}}},"400":{"description":"Request failed, see error message for details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n- `SAU-601`: Device ID is required and missing\n"}}}]}}}},"401":{"description":"See error message for details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"}}}},"403":{"$ref":"#/components/responses/sauth-403-login"},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2018-06-07T07:17:41.734+00:00","status":404,"error":"Not Found","message":"Account does not exist","path":"/v2/auth/login/client/conditional","traceId":"61b4aa7c0cb1167a"}}}},"406":{"$ref":"#/components/responses/sauth-406-account-locked"},"423":{"$ref":"#/components/responses/sauth-423-device-control-enabled"}},"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/authenticateConditionalUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/v2/auth/login/client/conditional \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"apiKey\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"SYNERISE\\\",\\\"identityProviderToken\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"customId\\\":null,\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/v2/auth/login/client/conditional\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"apiKey\": \"string\",\n  \"identityProvider\": \"SYNERISE\",\n  \"identityProviderToken\": \"string\",\n  \"email\": \"string\",\n  \"customId\": null,\n  \"password\": \"string\",\n  \"uuid\": \"string\",\n  \"deviceId\": \"string\",\n  \"agreements\": {\n    \"email\": true,\n    \"sms\": true,\n    \"push\": true,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/v2/auth/login/client/conditional\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/v2/auth/login/client/conditional\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  apiKey: 'string',\n  identityProvider: 'SYNERISE',\n  identityProviderToken: 'string',\n  email: 'string',\n  customId: null,\n  password: 'string',\n  uuid: 'string',\n  deviceId: 'string',\n  agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/v2/auth/login/client/conditional');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/v2/auth/login/client/conditional\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"apiKey\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"SYNERISE\\\",\\\"identityProviderToken\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"customId\\\":null,\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/sauth/v2/auth/login/client/anonymous":{"post":{"deprecated":true,"tags":["Authorization (deprecated)"],"summary":"Authenticate anonymously","description":"This method is deprecated. Use [the v3 method](#operation/LogInAnonymouslyV3) instead.\n\nObtain a new JWT for an anonymous Profile. The token can be used and refreshed in the same way\nas tokens of registered Profiles.\n\n\n---\n\n**Authentication:** Not required\n","operationId":"LogInAnonymouslyV2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-LogInAnonymouslyV2RequestBody"}}},"required":true},"responses":{"200":{"description":"Anonymous authorization token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtoken"},"example":{"token":"eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2019-03-19T14:03:35.413+00:00","status":401,"error":"Unauthorized","message":"Could not fetch ApiKey","path":"/v2/auth/login/client/anonymous"}}}}},"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/LogInAnonymouslyV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/v2/auth/login/client/anonymous \\\n  --header 'content-type: application/json' \\\n  --data '{\"apiKey\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"apiKey\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/v2/auth/login/client/anonymous\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"apiKey\": \"string\",\n  \"deviceId\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/v2/auth/login/client/anonymous\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/v2/auth/login/client/anonymous\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  apiKey: 'string',\n  deviceId: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/v2/auth/login/client/anonymous');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"apiKey\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/v2/auth/login/client/anonymous\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"apiKey\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\"}\")\n  .asString();"}]}},"/sauth/v3/auth/login/client":{"post":{"tags":["Authorization"],"summary":"Authenticate as Profile","description":"Obtain a new JWT for a Profile. If an account for the Profile does not exist and the `identityProvider` is different than `SYNERISE`, this request creates an account.\n\n---\n\n**Authentication:** Not required\n","operationId":"authenticateUsingPOST_v3","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-AuthenticationRequestV2_and_3"}}}},"responses":{"200":{"description":"Profile authorization token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtokenV3"},"example":{"token":"eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk"}}}},"400":{"description":"Request failed, see error message for details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n- `SAU-601`: Device ID is required and missing\n"}}}]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2018-06-07T07:17:41.734+00:00","status":401,"error":"Unauthorized","message":"Access denied","path":"/v3/auth/login/client","traceId":"61b4aa7c0cb1167a"}}}},"403":{"$ref":"#/components/responses/sauth-403-login"},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2018-06-07T07:17:41.734+00:00","status":404,"error":"Not Found","message":"Account does not exist","path":"/v3/auth/login/client","traceId":"61b4aa7c0cb1167a"}}}},"406":{"$ref":"#/components/responses/sauth-406-account-locked"},"423":{"$ref":"#/components/responses/sauth-423-device-control-enabled"}},"deprecated":false,"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization/operation/authenticateUsingPOST_v3"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/v3/auth/login/client \\\n  --header 'content-type: application/json' \\\n  --data '{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"apiKey\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"SYNERISE\\\",\\\"identityProviderToken\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"customId\\\":null,\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/v3/auth/login/client\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"apiKey\": \"string\",\n  \"identityProvider\": \"SYNERISE\",\n  \"identityProviderToken\": \"string\",\n  \"email\": \"string\",\n  \"customId\": null,\n  \"password\": \"string\",\n  \"uuid\": \"string\",\n  \"deviceId\": \"string\",\n  \"agreements\": {\n    \"email\": true,\n    \"sms\": true,\n    \"push\": true,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/v3/auth/login/client\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/v3/auth/login/client\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  apiKey: 'string',\n  identityProvider: 'SYNERISE',\n  identityProviderToken: 'string',\n  email: 'string',\n  customId: null,\n  password: 'string',\n  uuid: 'string',\n  deviceId: 'string',\n  agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/v3/auth/login/client');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/v3/auth/login/client\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"apiKey\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"SYNERISE\\\",\\\"identityProviderToken\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"customId\\\":null,\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/sauth/v2/auth/server/login/client":{"post":{"deprecated":true,"tags":["Authorization (deprecated)"],"summary":"Authenticate as Profile","description":"This method is deprecated. Use [the v3 method](#operation/authenticateViaServerV3) instead.\n\nObtain a new JWT for a Profile. It is designed to be used from backend server. If an account for the Profile does not exist and the `identityProvider` is different than `SYNERISE`, this request creates an account.\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SAUTH_SERVER_LOGIN_CLIENT_CREATE`\n","operationId":"authenticateViaServerV2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ServerAuthenticationRequestV2_and_3"}}}},"responses":{"200":{"description":"Profile authorization token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtokenV3"},"example":{"token":"eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk"}}}},"400":{"description":"Request failed, see error message for details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n- `SAU-601`: Device ID is required and missing\n"}}}]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2018-06-07T07:17:41.734+00:00","status":401,"error":"Unauthorized","message":"Access denied","path":"/v3/auth/login/client","traceId":"61b4aa7c0cb1167a"}}}},"403":{"$ref":"#/components/responses/sauth-403-login"},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2018-06-07T07:17:41.734+00:00","status":404,"error":"Not Found","message":"Account does not exist","path":"/v3/auth/login/client","traceId":"61b4aa7c0cb1167a"}}}},"406":{"$ref":"#/components/responses/sauth-406-account-locked"},"423":{"$ref":"#/components/responses/sauth-423-device-control-enabled"}},"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization-(deprecated)/operation/authenticateViaServerV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/v2/auth/server/login/client \\\n  --header 'content-type: application/json' \\\n  --data '{\"ipAddress\":\"string\",\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"ipAddress\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"SYNERISE\\\",\\\"identityProviderToken\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"customId\\\":null,\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/v2/auth/server/login/client\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"ipAddress\": \"string\",\n  \"apiKey\": \"string\",\n  \"identityProvider\": \"SYNERISE\",\n  \"identityProviderToken\": \"string\",\n  \"email\": \"string\",\n  \"customId\": null,\n  \"password\": \"string\",\n  \"uuid\": \"string\",\n  \"deviceId\": \"string\",\n  \"agreements\": {\n    \"email\": true,\n    \"sms\": true,\n    \"push\": true,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/v2/auth/server/login/client\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/v2/auth/server/login/client\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  ipAddress: 'string',\n  apiKey: 'string',\n  identityProvider: 'SYNERISE',\n  identityProviderToken: 'string',\n  email: 'string',\n  customId: null,\n  password: 'string',\n  uuid: 'string',\n  deviceId: 'string',\n  agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/v2/auth/server/login/client');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"ipAddress\":\"string\",\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/v2/auth/server/login/client\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"ipAddress\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"SYNERISE\\\",\\\"identityProviderToken\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"customId\\\":null,\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/sauth/v3/auth/server/login/client":{"post":{"tags":["Authorization"],"summary":"Authenticate Profile with a server","description":"Obtain a new JWT for a Profile. This method is designed to be used from a backend server that handles login requests and communicates with Synerise to execute them.  \nIf an account for the Profile does not exist and the `identityProvider` is different than `SYNERISE`, this request creates an account.\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SAUTH_SERVER_LOGIN_CLIENT_CREATE`\n","operationId":"authenticateViaServerV3","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ServerAuthenticationRequestV2_and_3"}}}},"responses":{"200":{"description":"Profile authorization token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtokenV3"},"example":{"token":"eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk"}}}},"400":{"description":"Request failed, see error message for details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n- `SAU-601`: Device ID is required and missing\n"}}}]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2018-06-07T07:17:41.734+00:00","status":401,"error":"Unauthorized","message":"Access denied","path":"/v3/auth/login/client","traceId":"61b4aa7c0cb1167a"}}}},"403":{"$ref":"#/components/responses/sauth-403-login"},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2018-06-07T07:17:41.734+00:00","status":404,"error":"Not Found","message":"Account does not exist","path":"/v3/auth/login/client","traceId":"61b4aa7c0cb1167a"}}}},"406":{"$ref":"#/components/responses/sauth-406-account-locked"},"423":{"$ref":"#/components/responses/sauth-423-device-control-enabled"}},"deprecated":false,"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization/operation/authenticateViaServerV3"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/v3/auth/server/login/client \\\n  --header 'content-type: application/json' \\\n  --data '{\"ipAddress\":\"string\",\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"ipAddress\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"SYNERISE\\\",\\\"identityProviderToken\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"customId\\\":null,\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/v3/auth/server/login/client\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"ipAddress\": \"string\",\n  \"apiKey\": \"string\",\n  \"identityProvider\": \"SYNERISE\",\n  \"identityProviderToken\": \"string\",\n  \"email\": \"string\",\n  \"customId\": null,\n  \"password\": \"string\",\n  \"uuid\": \"string\",\n  \"deviceId\": \"string\",\n  \"agreements\": {\n    \"email\": true,\n    \"sms\": true,\n    \"push\": true,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/v3/auth/server/login/client\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/v3/auth/server/login/client\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  ipAddress: 'string',\n  apiKey: 'string',\n  identityProvider: 'SYNERISE',\n  identityProviderToken: 'string',\n  email: 'string',\n  customId: null,\n  password: 'string',\n  uuid: 'string',\n  deviceId: 'string',\n  agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/v3/auth/server/login/client');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"ipAddress\":\"string\",\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/v3/auth/server/login/client\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"ipAddress\\\":\\\"string\\\",\\\"apiKey\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"SYNERISE\\\",\\\"identityProviderToken\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"customId\\\":null,\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/sauth/v3/auth/login/client/conditional":{"post":{"summary":"Authenticate as Profile (conditional)","description":"Obtain a new JWT token for a Profile.\n\n- If the account does not exist, an account is not created.\n- If any additional conditions are required for logging in, the response is HTTP200 and lists the conditions.\n- Note that using this endpoint requires authenticating as an anonymous Profile first.\n\n\n---\n\n**Authentication:** Not required\n","security":[{"JWT":[]}],"tags":["Authorization"],"operationId":"authenticateConditionalUsingPOSTv3","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-AuthenticationRequestV2_and_3"}}}},"responses":{"200":{"description":"Details of the login operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ConditionalAuthenticationResponseV3"}}}},"400":{"description":"Request failed, see error message for details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n- `SAU-601`: Device ID is required and missing\n"}}}]}}}},"401":{"description":"See error message for details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"}}}},"403":{"$ref":"#/components/responses/sauth-403-login"},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2018-06-07T07:17:41.734+00:00","status":404,"error":"Not Found","message":"Account does not exist","path":"/v3/auth/login/client/conditional","traceId":"61b4aa7c0cb1167a"}}}},"406":{"$ref":"#/components/responses/sauth-406-account-locked"},"423":{"$ref":"#/components/responses/sauth-423-device-control-enabled"}},"deprecated":false,"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization/operation/authenticateConditionalUsingPOSTv3"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/v3/auth/login/client/conditional \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"apiKey\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"SYNERISE\\\",\\\"identityProviderToken\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"customId\\\":null,\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/v3/auth/login/client/conditional\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"apiKey\": \"string\",\n  \"identityProvider\": \"SYNERISE\",\n  \"identityProviderToken\": \"string\",\n  \"email\": \"string\",\n  \"customId\": null,\n  \"password\": \"string\",\n  \"uuid\": \"string\",\n  \"deviceId\": \"string\",\n  \"agreements\": {\n    \"email\": true,\n    \"sms\": true,\n    \"push\": true,\n    \"bluetooth\": false,\n    \"rfid\": false,\n    \"wifi\": false\n  },\n  \"attributes\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"tags\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/v3/auth/login/client/conditional\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/v3/auth/login/client/conditional\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  apiKey: 'string',\n  identityProvider: 'SYNERISE',\n  identityProviderToken: 'string',\n  email: 'string',\n  customId: null,\n  password: 'string',\n  uuid: 'string',\n  deviceId: 'string',\n  agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},\n  attributes: {property1: null, property2: null},\n  tags: ['string']\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/v3/auth/login/client/conditional');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"apiKey\":\"string\",\"identityProvider\":\"SYNERISE\",\"identityProviderToken\":\"string\",\"email\":\"string\",\"customId\":null,\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/v3/auth/login/client/conditional\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"apiKey\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"SYNERISE\\\",\\\"identityProviderToken\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"customId\\\":null,\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"agreements\\\":{\\\"email\\\":true,\\\"sms\\\":true,\\\"push\\\":true,\\\"bluetooth\\\":false,\\\"rfid\\\":false,\\\"wifi\\\":false},\\\"attributes\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"tags\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/sauth/v3/auth/login/client/anonymous":{"post":{"tags":["Authorization"],"summary":"Authenticate anonymously","description":"Obtain a new JWT for an anonymous Profile. The token can be used and refreshed in the same way as tokens of registered Profiles.\n\n---\n\n**Authentication:** Not required\n","operationId":"LogInAnonymouslyV3","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-LogInAnonymouslyV3RequestBody"}}},"required":true},"responses":{"200":{"description":"Anonymous authorization token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-JWTtokenV3"},"example":{"token":"eyJhbGciOiJSUzUxMiJ9.eyJzdinvalidwYmZkM2FkNDg2ZjQ3ZGRiMjE5MSIsImF1ZCI6IkFQSSIsInJsbSI6ImFub255bW91c19jbGllbnQiLCJjdGQiOjE1NTMwMDQxNTkxNTEsImVtbCI6IjYyMjM3NmY4LTAwMDAtMjIyMi1kN2Y5LTA3MGZhOTU2ZTk2M0Bhbm9ueW1vdXMuaW52YWxpZCIsImF1dGgiOiJINHNJQUFBQUFBQUFBSXVPQlFBcHUwd05BZ0FBQUE9PSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo0OCwiY2xJZCI6NDMzMjMwMjg4LCJleHAiOjE1NTMwMDcxNTksImFwayI6IjVBRUFBM0Q1LUUxNDctQzdFQi1ENTlFLUJDRjUwMTA5QTNEMSJ9.QOmSqrneR4mJFv4JdxTYsw_wGcDawDsVQuB-GVTcPPwijiP7lQ_Jzqq2Mypg1BS6WFlfGB8fzqCY9iMF_TdtjmoB4xBrY95ylU8L9qto-9Cw5x5TURkfxq31eryiHe2IteRAEtoVzYg2_s9QhlH6ANVcFOVp8dMno0V9bfMYfeSQa3FkjEbxFsseHkMOiADmp9-tOGtLXO942Ir-2W_Hz3Utlpt4erz0dVJBw8a-mFavPA8EEDWR7ACJNocrVHFkS3wFISh3LqLn6KkXiowaynKlJOEHGctuahzKmF3ZOJ1BvGgKohxF9OXvQs9IdmCfWhYsLr5Q2p04TJJ-MyvTipuggKVioh8mHmOFdfnN-Zused6tXzhZtKPUWTmM8cBKoAOBHExxcMQ8SVSjxnw_7_eLKm7S2wNpu0V-tiPZPCH4wYZXtWBYjmfy0V9ydjXnNunXfgxKixLeFNnONUXxEuqPLvM_xAuonQBXVN4nYrgJv8p8U6_ZlGMPjJq1szfcuBZnzI34LSEWx_nSof0XC5Czm8iG_ihG8naivNWS8h-Q-qKMP_3PPFsLSH4Egh03pH93EJUuNAeSO4RGfUX1wzMvrv1nBC1SM660uFMbq-wkplFBbKnHKMYe-qRs1-lZPG5PwPWJJdpGqOUzbnoMOJYmiq06OHHVQyJSkcEHLCk"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2019-03-19T14:03:35.413+00:00","status":401,"error":"Unauthorized","message":"Could not fetch ApiKey","path":"/v3/auth/login/client/anonymous"}}}}},"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization/operation/LogInAnonymouslyV3"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/v3/auth/login/client/anonymous \\\n  --header 'content-type: application/json' \\\n  --data '{\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/v3/auth/login/client/anonymous\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"apiKey\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/v3/auth/login/client/anonymous\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/v3/auth/login/client/anonymous\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  apiKey: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/v3/auth/login/client/anonymous');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"apiKey\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/v3/auth/login/client/anonymous\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"apiKey\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/v2/my-account/delete":{"post":{"tags":["Profile account management"],"summary":"Delete account","description":"A Profile can delete its own account. Its history shows an `client.deleteAccount` event. All marketing agreements are cancelled. The profile is signed out on all devices and cannot sign in again.\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"deleteAccountUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-DeleteAccountV2RequestBody"}}},"required":true},"responses":{"200":{"description":"Account deleted"},"400":{"$ref":"#/components/responses/sauth-400-malformed"},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-invalid-credentials-in-body"},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/deleteAccountUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/v2/my-account/delete \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"externalToken\":\"string\",\"customId\":\"string\",\"identityProvider\":\"FACEBOOK\",\"deviceId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"externalToken\\\":\\\"string\\\",\\\"customId\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"FACEBOOK\\\",\\\"deviceId\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/v2/my-account/delete\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"password\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"externalToken\": \"string\",\n  \"customId\": \"string\",\n  \"identityProvider\": \"FACEBOOK\",\n  \"deviceId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/v2/my-account/delete\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/v2/my-account/delete\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  password: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  externalToken: 'string',\n  customId: 'string',\n  identityProvider: 'FACEBOOK',\n  deviceId: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/v2/my-account/delete');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"externalToken\":\"string\",\"customId\":\"string\",\"identityProvider\":\"FACEBOOK\",\"deviceId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/v2/my-account/delete\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"externalToken\\\":\\\"string\\\",\\\"customId\\\":\\\"string\\\",\\\"identityProvider\\\":\\\"FACEBOOK\\\",\\\"deviceId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/v2/my-account/email-change/request":{"post":{"tags":["Profile account management"],"summary":"Request Profile email change","description":"A Profile can request an email change for its own account. A confirmation token is sent to the new email by and must be applied by clicking the link in the message or using the [Confirm Profile email change](#operation/confirmClientEmailChange) endpoint.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"changeEmailRequestUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-GenericClientEmailChangeRequest"}}}},"responses":{"200":{"description":"Email change requested, confirmation token sent to new email"},"400":{"$ref":"#/components/responses/sauth-400-malformed"},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-invalid-credentials-in-body"},"404":{"description":"Not Found","content":{}}},"deprecated":false,"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/changeEmailRequestUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/v2/my-account/email-change/request \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\",\"externalToken\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\",\\\"externalToken\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"customId\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/v2/my-account/email-change/request\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\",\n  \"externalToken\": \"string\",\n  \"password\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\",\n  \"customId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/v2/my-account/email-change/request\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/v2/my-account/email-change/request\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  email: 'string',\n  externalToken: 'string',\n  password: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string',\n  customId: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/v2/my-account/email-change/request');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\",\"externalToken\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/v2/my-account/email-change/request\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\",\\\"externalToken\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"customId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/v3/my-account/logout":{"post":{"tags":["Profile account management"],"summary":"Log out a Profile","description":"Log out a Profile when authenticated as that Profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, ANONYMOUS_CLIENT_CONDITIONAL\n","operationId":"logoutUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ClientLogoutRequest"}}}},"responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"404":{"description":"Profile not found"}},"deprecated":false,"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/logoutUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/v3/my-account/logout \\\n  --header 'content-type: application/json' \\\n  --data '{\"action\":\"LOGOUT\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"action\\\":\\\"LOGOUT\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/v3/my-account/logout\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"action\": \"LOGOUT\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/v3/my-account/logout\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/v3/my-account/logout\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({action: 'LOGOUT'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/v3/my-account/logout');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"action\":\"LOGOUT\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/v3/my-account/logout\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"action\\\":\\\"LOGOUT\\\"}\")\n  .asString();"}]}},"/sauth/my-account/email-change/confirmation":{"post":{"tags":["Profile account management"],"summary":"Confirm Profile email change","description":"The Profile can confirm the email change by providing the token that they received by email as a result of the [Request a Profile email change](#operation/changeEmailRequestUsingPOST) call.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"confirmClientEmailChange","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ConfirmClientEmailChangeRequestBody"},"example":"{\"token\":\"token_from_email_change_mail\",\"newsletterAgreement\":true}"}},"required":true},"responses":{"200":{"description":"Request accepted"},"400":{"$ref":"#/components/responses/sauth-400-malformed"},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"description":"Invalid confirmation token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/confirmClientEmailChange"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/my-account/email-change/confirmation \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"token\":\"58acd5bd-8efd-47ed-b101-32eb56e13839\",\"newsletterAgreement\":true}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"token\\\":\\\"58acd5bd-8efd-47ed-b101-32eb56e13839\\\",\\\"newsletterAgreement\\\":true}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/my-account/email-change/confirmation\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"token\": \"58acd5bd-8efd-47ed-b101-32eb56e13839\",\n  \"newsletterAgreement\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/my-account/email-change/confirmation\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/my-account/email-change/confirmation\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({token: '58acd5bd-8efd-47ed-b101-32eb56e13839', newsletterAgreement: true}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/my-account/email-change/confirmation');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"token\":\"58acd5bd-8efd-47ed-b101-32eb56e13839\",\"newsletterAgreement\":true}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/my-account/email-change/confirmation\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"token\\\":\\\"58acd5bd-8efd-47ed-b101-32eb56e13839\\\",\\\"newsletterAgreement\\\":true}\")\n  .asString();"}]}},"/sauth/clients/facebook/email-change/request":{"post":{"tags":["Profile account management"],"summary":"Change Facebook Profile email","description":"Change the email address of a Profile registered by Facebook\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"changeEmailUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ClientEmailChangeRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/changeEmailUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/clients/facebook/email-change/request \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/clients/facebook/email-change/request\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/clients/facebook/email-change/request\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/clients/facebook/email-change/request\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  email: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/clients/facebook/email-change/request');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/clients/facebook/email-change/request\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/management/client/{clientID}/logout":{"post":{"tags":["Profile management"],"summary":"Log out a Profile","description":"Log out a Profile when authenticated as a Synerise User or a Workspace.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SAUTH_LOGOUT_CLIENT_CREATE`\n\n**User role permission required:** `settings_customers_iam: create`\n","operationId":"logoutClientUsingPOST","parameters":[{"$ref":"#/components/parameters/sauth-pathClientId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-ClientLogoutRequest"}}}},"responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"404":{"description":"Profile not found"}},"deprecated":false,"x-snr-doc-urls":["/api-reference/data-management#tag/Profile-management/operation/logoutClientUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/management/client/434428563/logout \\\n  --header 'content-type: application/json' \\\n  --data '{\"action\":\"LOGOUT\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"action\\\":\\\"LOGOUT\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/management/client/434428563/logout\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"action\": \"LOGOUT\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/management/client/434428563/logout\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/management/client/434428563/logout\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({action: 'LOGOUT'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/management/client/434428563/logout');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"action\":\"LOGOUT\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/management/client/434428563/logout\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"action\\\":\\\"LOGOUT\\\"}\")\n  .asString();"}]}},"/sauth/settings/ban":{"get":{"tags":["Settings"],"summary":"Get ban settings","description":"Retrieve the configuration of applying bans after a number of failed logins.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_locking_policy: read`\n","operationId":"getBanSettingsUsingGET","security":[{"JWT":[]}],"responses":{"200":{"description":"Current settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-BanSettingsPayload"}}}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/getBanSettingsUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/sauth/settings/ban \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/sauth/settings/ban\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/sauth/settings/ban\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/ban\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/ban');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/sauth/settings/ban\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Settings"],"summary":"Update ban settings","description":"Update the configuration of applying bans after a number of failed logins.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_locking_policy: update`\n","operationId":"updateBanSettingsUsingPOST","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-BanSettingsPayload"}}},"required":true},"responses":{"200":{"description":"Current settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-BanSettingsPayload"}}}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/updateBanSettingsUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/settings/ban \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"blockingForClientEnabled\":true,\"firstBanCollectingTime\":0,\"firstBanDuration\":0,\"firstBanThreshold\":0,\"secondBanCollectingTime\":0,\"secondBanDuration\":0,\"secondBanThreshold\":0,\"permanentBanCollectingTime\":0,\"permanentBanDuration\":0,\"permanentBanThreshold\":0}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"blockingForClientEnabled\\\":true,\\\"firstBanCollectingTime\\\":0,\\\"firstBanDuration\\\":0,\\\"firstBanThreshold\\\":0,\\\"secondBanCollectingTime\\\":0,\\\"secondBanDuration\\\":0,\\\"secondBanThreshold\\\":0,\\\"permanentBanCollectingTime\\\":0,\\\"permanentBanDuration\\\":0,\\\"permanentBanThreshold\\\":0}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/settings/ban\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"blockingForClientEnabled\": true,\n  \"firstBanCollectingTime\": 0,\n  \"firstBanDuration\": 0,\n  \"firstBanThreshold\": 0,\n  \"secondBanCollectingTime\": 0,\n  \"secondBanDuration\": 0,\n  \"secondBanThreshold\": 0,\n  \"permanentBanCollectingTime\": 0,\n  \"permanentBanDuration\": 0,\n  \"permanentBanThreshold\": 0\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/settings/ban\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/ban\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  blockingForClientEnabled: true,\n  firstBanCollectingTime: 0,\n  firstBanDuration: 0,\n  firstBanThreshold: 0,\n  secondBanCollectingTime: 0,\n  secondBanDuration: 0,\n  secondBanThreshold: 0,\n  permanentBanCollectingTime: 0,\n  permanentBanDuration: 0,\n  permanentBanThreshold: 0\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/ban');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"blockingForClientEnabled\":true,\"firstBanCollectingTime\":0,\"firstBanDuration\":0,\"firstBanThreshold\":0,\"secondBanCollectingTime\":0,\"secondBanDuration\":0,\"secondBanThreshold\":0,\"permanentBanCollectingTime\":0,\"permanentBanDuration\":0,\"permanentBanThreshold\":0}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/settings/ban\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"blockingForClientEnabled\\\":true,\\\"firstBanCollectingTime\\\":0,\\\"firstBanDuration\\\":0,\\\"firstBanThreshold\\\":0,\\\"secondBanCollectingTime\\\":0,\\\"secondBanDuration\\\":0,\\\"secondBanThreshold\\\":0,\\\"permanentBanCollectingTime\\\":0,\\\"permanentBanDuration\\\":0,\\\"permanentBanThreshold\\\":0}\")\n  .asString();"}]}},"/sauth/settings/templates":{"get":{"security":[{"JWT":[]}],"tags":["Settings"],"summary":"Get email template settings","operationId":"getTemplateSettingsUsingGET","description":"Get settings for email templates.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_account_confirmation: read`\n","responses":{"200":{"description":"Current settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-TemplateSettingsData"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"deprecated":false,"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/getTemplateSettingsUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/sauth/settings/templates \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/sauth/settings/templates\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/sauth/settings/templates\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/templates\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/templates');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/sauth/settings/templates\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"security":[{"JWT":[]}],"tags":["Settings"],"summary":"Update email template settings","operationId":"updateTemplateSettingsUsingPOST","description":"Update email template settings. **Omitted settings are reset to null!**\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_account_confirmation: update`\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-TemplateSettingsData"}}},"required":true},"responses":{"200":{"description":"Current settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-TemplateSettingsData"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"deprecated":false,"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/updateTemplateSettingsUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/settings/templates \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"clientEmailChangeRequestMailSubject\":\"string\",\"clientEmailChangeRequestMailBody\":\"string\",\"clientEmailChangeRequestMailTemplateId\":\"string\",\"clientEmailChangeNotificationMailSubject\":\"string\",\"clientEmailChangeNotificationMailBody\":\"string\",\"clientEmailChangeNotificationMailTemplateId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"clientEmailChangeRequestMailSubject\\\":\\\"string\\\",\\\"clientEmailChangeRequestMailBody\\\":\\\"string\\\",\\\"clientEmailChangeRequestMailTemplateId\\\":\\\"string\\\",\\\"clientEmailChangeNotificationMailSubject\\\":\\\"string\\\",\\\"clientEmailChangeNotificationMailBody\\\":\\\"string\\\",\\\"clientEmailChangeNotificationMailTemplateId\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/settings/templates\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"clientEmailChangeRequestMailSubject\": \"string\",\n  \"clientEmailChangeRequestMailBody\": \"string\",\n  \"clientEmailChangeRequestMailTemplateId\": \"string\",\n  \"clientEmailChangeNotificationMailSubject\": \"string\",\n  \"clientEmailChangeNotificationMailBody\": \"string\",\n  \"clientEmailChangeNotificationMailTemplateId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/settings/templates\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/templates\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  clientEmailChangeRequestMailSubject: 'string',\n  clientEmailChangeRequestMailBody: 'string',\n  clientEmailChangeRequestMailTemplateId: 'string',\n  clientEmailChangeNotificationMailSubject: 'string',\n  clientEmailChangeNotificationMailBody: 'string',\n  clientEmailChangeNotificationMailTemplateId: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/templates');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"clientEmailChangeRequestMailSubject\":\"string\",\"clientEmailChangeRequestMailBody\":\"string\",\"clientEmailChangeRequestMailTemplateId\":\"string\",\"clientEmailChangeNotificationMailSubject\":\"string\",\"clientEmailChangeNotificationMailBody\":\"string\",\"clientEmailChangeNotificationMailTemplateId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/settings/templates\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"clientEmailChangeRequestMailSubject\\\":\\\"string\\\",\\\"clientEmailChangeRequestMailBody\\\":\\\"string\\\",\\\"clientEmailChangeRequestMailTemplateId\\\":\\\"string\\\",\\\"clientEmailChangeNotificationMailSubject\\\":\\\"string\\\",\\\"clientEmailChangeNotificationMailBody\\\":\\\"string\\\",\\\"clientEmailChangeNotificationMailTemplateId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/settings/device-control":{"get":{"tags":["Settings"],"summary":"Get device authorization settings","description":"Retrieve the settings related to authorization of logins from unknown devices.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_locking_policy: read`\n","operationId":"getDeviceControlSettingsUsingGET","security":[{"JWT":[]}],"responses":{"200":{"description":"Current settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-DeviceControlSettingsPayload"}}}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/getDeviceControlSettingsUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/sauth/settings/device-control \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/sauth/settings/device-control\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/sauth/settings/device-control\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/device-control\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/device-control');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/sauth/settings/device-control\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Settings"],"summary":"Update device authorization settings","description":"Update the settings related to authorization of logins from unknown devices.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_locking_policy: update`\n","operationId":"updateDeviceSettingsUsingPOST","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-DeviceControlSettingsPayload"}}},"required":true},"responses":{"200":{"description":"Current settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-DeviceControlSettingsPayload"}}}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/updateDeviceSettingsUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/settings/device-control \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"deviceControlMode\":\"OFF\",\"hardMailBody\":\"string\",\"hardMailTitle\":\"string\",\"hardTemplateId\":\"string\",\"softMailBody\":\"string\",\"softMailTitle\":\"string\",\"softTemplateId\":\"string\",\"deviceUnlockSuccessRedirectUrl\":\"string\",\"deviceUnlockAlreadyConfirmedRedirectUrl\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"deviceControlMode\\\":\\\"OFF\\\",\\\"hardMailBody\\\":\\\"string\\\",\\\"hardMailTitle\\\":\\\"string\\\",\\\"hardTemplateId\\\":\\\"string\\\",\\\"softMailBody\\\":\\\"string\\\",\\\"softMailTitle\\\":\\\"string\\\",\\\"softTemplateId\\\":\\\"string\\\",\\\"deviceUnlockSuccessRedirectUrl\\\":\\\"string\\\",\\\"deviceUnlockAlreadyConfirmedRedirectUrl\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/settings/device-control\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"deviceControlMode\": \"OFF\",\n  \"hardMailBody\": \"string\",\n  \"hardMailTitle\": \"string\",\n  \"hardTemplateId\": \"string\",\n  \"softMailBody\": \"string\",\n  \"softMailTitle\": \"string\",\n  \"softTemplateId\": \"string\",\n  \"deviceUnlockSuccessRedirectUrl\": \"string\",\n  \"deviceUnlockAlreadyConfirmedRedirectUrl\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/settings/device-control\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/device-control\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  deviceControlMode: 'OFF',\n  hardMailBody: 'string',\n  hardMailTitle: 'string',\n  hardTemplateId: 'string',\n  softMailBody: 'string',\n  softMailTitle: 'string',\n  softTemplateId: 'string',\n  deviceUnlockSuccessRedirectUrl: 'string',\n  deviceUnlockAlreadyConfirmedRedirectUrl: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/device-control');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"deviceControlMode\":\"OFF\",\"hardMailBody\":\"string\",\"hardMailTitle\":\"string\",\"hardTemplateId\":\"string\",\"softMailBody\":\"string\",\"softMailTitle\":\"string\",\"softTemplateId\":\"string\",\"deviceUnlockSuccessRedirectUrl\":\"string\",\"deviceUnlockAlreadyConfirmedRedirectUrl\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/settings/device-control\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"deviceControlMode\\\":\\\"OFF\\\",\\\"hardMailBody\\\":\\\"string\\\",\\\"hardMailTitle\\\":\\\"string\\\",\\\"hardTemplateId\\\":\\\"string\\\",\\\"softMailBody\\\":\\\"string\\\",\\\"softMailTitle\\\":\\\"string\\\",\\\"softTemplateId\\\":\\\"string\\\",\\\"deviceUnlockSuccessRedirectUrl\\\":\\\"string\\\",\\\"deviceUnlockAlreadyConfirmedRedirectUrl\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/settings/general":{"get":{"security":[{"JWT":[]}],"tags":["Settings"],"summary":"Get general settings","operationId":"getGeneralConfigUsingGET","description":"Retrieve the general settings of the workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_account_confirmation: read`\n","responses":{"200":{"description":"Current settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-GeneralSettingsData"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"deprecated":false,"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/getGeneralConfigUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/sauth/settings/general \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/sauth/settings/general\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/sauth/settings/general\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/general\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/general');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/sauth/settings/general\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Settings"],"security":[{"JWT":[]}],"summary":"Update general settings","operationId":"updateGeneralSettingsUsingPOST","description":"Update general settings. **Settings omitted in the request are reset to default!**.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_account_confirmation: update`\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-GeneralSettingsData"}}},"required":true},"responses":{"200":{"description":"New settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-GeneralSettingsData"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"deprecated":false,"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/updateGeneralSettingsUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/settings/general \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"tokenLifetimeInSeconds\":0,\"voucherPoolUuid\":null,\"allowOverwriteCustomIdentify\":false,\"allowOverwriteExternalId\":false,\"allowEmailChangeFromWebForm\":false,\"allowToPassCustomIdentifyWithVoucherPool\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"tokenLifetimeInSeconds\\\":0,\\\"voucherPoolUuid\\\":null,\\\"allowOverwriteCustomIdentify\\\":false,\\\"allowOverwriteExternalId\\\":false,\\\"allowEmailChangeFromWebForm\\\":false,\\\"allowToPassCustomIdentifyWithVoucherPool\\\":false}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/settings/general\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"tokenLifetimeInSeconds\": 0,\n  \"voucherPoolUuid\": null,\n  \"allowOverwriteCustomIdentify\": false,\n  \"allowOverwriteExternalId\": false,\n  \"allowEmailChangeFromWebForm\": false,\n  \"allowToPassCustomIdentifyWithVoucherPool\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/settings/general\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/general\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  tokenLifetimeInSeconds: 0,\n  voucherPoolUuid: null,\n  allowOverwriteCustomIdentify: false,\n  allowOverwriteExternalId: false,\n  allowEmailChangeFromWebForm: false,\n  allowToPassCustomIdentifyWithVoucherPool: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/general');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"tokenLifetimeInSeconds\":0,\"voucherPoolUuid\":null,\"allowOverwriteCustomIdentify\":false,\"allowOverwriteExternalId\":false,\"allowEmailChangeFromWebForm\":false,\"allowToPassCustomIdentifyWithVoucherPool\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/settings/general\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"tokenLifetimeInSeconds\\\":0,\\\"voucherPoolUuid\\\":null,\\\"allowOverwriteCustomIdentify\\\":false,\\\"allowOverwriteExternalId\\\":false,\\\"allowEmailChangeFromWebForm\\\":false,\\\"allowToPassCustomIdentifyWithVoucherPool\\\":false}\")\n  .asString();"}]}},"/sauth/settings/oauth":{"get":{"tags":["Settings"],"summary":"Get OAuth settings","description":"Retrieve OAuth authentication settings\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_oauth: read`\n","operationId":"getOauthSettingsUsingGET","security":[{"JWT":[]}],"responses":{"200":{"description":"Current settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-OauthSettingsResponse"}}}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/getOauthSettingsUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/sauth/settings/oauth \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/sauth/settings/oauth\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/sauth/settings/oauth\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/oauth\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/oauth');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/sauth/settings/oauth\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Settings"],"summary":"Update OAuth settings","description":"Update OAuth authentication settings\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_oauth: update`\n","operationId":"updateOatuhSettingsUsingPOST","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-OauthSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Current settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-OauthSettingsResponse"}}}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/updateOatuhSettingsUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/settings/oauth \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"enabled\":true,\"mode\":\"JWT_TOKEN\",\"name\":\"string\",\"endpoint\":\"string\",\"headers\":{\"Content-Type\":\"application/json\",\"Authorization\":\"Bearer {{_snrs_access_token}}\",\"Cache-control\":\"no-cache\"},\"mapping\":{\"property1\":\"string\",\"property2\":\"string\"},\"mappedExternal\":true,\"syncDataOnLogin\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"enabled\\\":true,\\\"mode\\\":\\\"JWT_TOKEN\\\",\\\"name\\\":\\\"string\\\",\\\"endpoint\\\":\\\"string\\\",\\\"headers\\\":{\\\"Content-Type\\\":\\\"application/json\\\",\\\"Authorization\\\":\\\"Bearer {{_snrs_access_token}}\\\",\\\"Cache-control\\\":\\\"no-cache\\\"},\\\"mapping\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"},\\\"mappedExternal\\\":true,\\\"syncDataOnLogin\\\":false}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/settings/oauth\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"enabled\": true,\n  \"mode\": \"JWT_TOKEN\",\n  \"name\": \"string\",\n  \"endpoint\": \"string\",\n  \"headers\": {\n    \"Content-Type\": \"application/json\",\n    \"Authorization\": \"Bearer {{_snrs_access_token}}\",\n    \"Cache-control\": \"no-cache\"\n  },\n  \"mapping\": {\n    \"property1\": \"string\",\n    \"property2\": \"string\"\n  },\n  \"mappedExternal\": true,\n  \"syncDataOnLogin\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/settings/oauth\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/oauth\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  enabled: true,\n  mode: 'JWT_TOKEN',\n  name: 'string',\n  endpoint: 'string',\n  headers: {\n    'Content-Type': 'application/json',\n    Authorization: 'Bearer {{_snrs_access_token}}',\n    'Cache-control': 'no-cache'\n  },\n  mapping: {property1: 'string', property2: 'string'},\n  mappedExternal: true,\n  syncDataOnLogin: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/oauth');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"enabled\":true,\"mode\":\"JWT_TOKEN\",\"name\":\"string\",\"endpoint\":\"string\",\"headers\":{\"Content-Type\":\"application/json\",\"Authorization\":\"Bearer {{_snrs_access_token}}\",\"Cache-control\":\"no-cache\"},\"mapping\":{\"property1\":\"string\",\"property2\":\"string\"},\"mappedExternal\":true,\"syncDataOnLogin\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/settings/oauth\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"enabled\\\":true,\\\"mode\\\":\\\"JWT_TOKEN\\\",\\\"name\\\":\\\"string\\\",\\\"endpoint\\\":\\\"string\\\",\\\"headers\\\":{\\\"Content-Type\\\":\\\"application/json\\\",\\\"Authorization\\\":\\\"Bearer {{_snrs_access_token}}\\\",\\\"Cache-control\\\":\\\"no-cache\\\"},\\\"mapping\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"},\\\"mappedExternal\\\":true,\\\"syncDataOnLogin\\\":false}\")\n  .asString();"}]}},"/sauth/settings/synerise-auth":{"get":{"tags":["Settings"],"operationId":"getSyneriseAuthConfig","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-SyneriseAuthSettingsData"}}}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/getSyneriseAuthConfig"],"description":"\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam: read`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/sauth/settings/synerise-auth"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/sauth/settings/synerise-auth\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/sauth/settings/synerise-auth\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/synerise-auth\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/synerise-auth');\n$request->setMethod(HTTP_METH_GET);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/sauth/settings/synerise-auth\")\n  .asString();"}]},"post":{"tags":["Settings"],"operationId":"updateSyneriseAuthSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-SyneriseAuthSettingsData"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-SyneriseAuthSettingsData"}}}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/updateSyneriseAuthSettings"],"description":"\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam: update`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/settings/synerise-auth \\\n  --header 'content-type: application/json' \\\n  --data '{\"enabled\":true,\"registrationType\":\"REQUIRE_ACTIVATION\",\"pinConfirmationType\":\"EVERYONE\",\"pinConfirmationLength\":6,\"pinConfirmationValidInSeconds\":300,\"allowPinResendFromDifferentDeviceId\":false,\"confirmationRedirectLink\":null,\"confirmationMailSubject\":\"string\",\"confirmationMailBody\":\"string\",\"confirmationMailTemplateId\":\"string\",\"passwordResetMailTemplateId\":\"string\",\"passwordResetMailSubject\":\"string\",\"passwordResetMailBody\":\"string\",\"pinConfirmationMailSubject\":\"string\",\"pinConfirmationMailBody\":\"string\",\"pinConfirmationMailTemplateId\":\"string\",\"maxLength\":0,\"minLength\":0,\"requireAtLeastOneLowercaseLetter\":false,\"requireAtLeastOneNonAlphaNumericCharacter\":false,\"requireAtLeastOneNumber\":false,\"requireAtLeastOneUppercaseLetter\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"enabled\\\":true,\\\"registrationType\\\":\\\"REQUIRE_ACTIVATION\\\",\\\"pinConfirmationType\\\":\\\"EVERYONE\\\",\\\"pinConfirmationLength\\\":6,\\\"pinConfirmationValidInSeconds\\\":300,\\\"allowPinResendFromDifferentDeviceId\\\":false,\\\"confirmationRedirectLink\\\":null,\\\"confirmationMailSubject\\\":\\\"string\\\",\\\"confirmationMailBody\\\":\\\"string\\\",\\\"confirmationMailTemplateId\\\":\\\"string\\\",\\\"passwordResetMailTemplateId\\\":\\\"string\\\",\\\"passwordResetMailSubject\\\":\\\"string\\\",\\\"passwordResetMailBody\\\":\\\"string\\\",\\\"pinConfirmationMailSubject\\\":\\\"string\\\",\\\"pinConfirmationMailBody\\\":\\\"string\\\",\\\"pinConfirmationMailTemplateId\\\":\\\"string\\\",\\\"maxLength\\\":0,\\\"minLength\\\":0,\\\"requireAtLeastOneLowercaseLetter\\\":false,\\\"requireAtLeastOneNonAlphaNumericCharacter\\\":false,\\\"requireAtLeastOneNumber\\\":false,\\\"requireAtLeastOneUppercaseLetter\\\":false}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/settings/synerise-auth\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"enabled\": true,\n  \"registrationType\": \"REQUIRE_ACTIVATION\",\n  \"pinConfirmationType\": \"EVERYONE\",\n  \"pinConfirmationLength\": 6,\n  \"pinConfirmationValidInSeconds\": 300,\n  \"allowPinResendFromDifferentDeviceId\": false,\n  \"confirmationRedirectLink\": null,\n  \"confirmationMailSubject\": \"string\",\n  \"confirmationMailBody\": \"string\",\n  \"confirmationMailTemplateId\": \"string\",\n  \"passwordResetMailTemplateId\": \"string\",\n  \"passwordResetMailSubject\": \"string\",\n  \"passwordResetMailBody\": \"string\",\n  \"pinConfirmationMailSubject\": \"string\",\n  \"pinConfirmationMailBody\": \"string\",\n  \"pinConfirmationMailTemplateId\": \"string\",\n  \"maxLength\": 0,\n  \"minLength\": 0,\n  \"requireAtLeastOneLowercaseLetter\": false,\n  \"requireAtLeastOneNonAlphaNumericCharacter\": false,\n  \"requireAtLeastOneNumber\": false,\n  \"requireAtLeastOneUppercaseLetter\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/settings/synerise-auth\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/synerise-auth\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  enabled: true,\n  registrationType: 'REQUIRE_ACTIVATION',\n  pinConfirmationType: 'EVERYONE',\n  pinConfirmationLength: 6,\n  pinConfirmationValidInSeconds: 300,\n  allowPinResendFromDifferentDeviceId: false,\n  confirmationRedirectLink: null,\n  confirmationMailSubject: 'string',\n  confirmationMailBody: 'string',\n  confirmationMailTemplateId: 'string',\n  passwordResetMailTemplateId: 'string',\n  passwordResetMailSubject: 'string',\n  passwordResetMailBody: 'string',\n  pinConfirmationMailSubject: 'string',\n  pinConfirmationMailBody: 'string',\n  pinConfirmationMailTemplateId: 'string',\n  maxLength: 0,\n  minLength: 0,\n  requireAtLeastOneLowercaseLetter: false,\n  requireAtLeastOneNonAlphaNumericCharacter: false,\n  requireAtLeastOneNumber: false,\n  requireAtLeastOneUppercaseLetter: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/synerise-auth');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"enabled\":true,\"registrationType\":\"REQUIRE_ACTIVATION\",\"pinConfirmationType\":\"EVERYONE\",\"pinConfirmationLength\":6,\"pinConfirmationValidInSeconds\":300,\"allowPinResendFromDifferentDeviceId\":false,\"confirmationRedirectLink\":null,\"confirmationMailSubject\":\"string\",\"confirmationMailBody\":\"string\",\"confirmationMailTemplateId\":\"string\",\"passwordResetMailTemplateId\":\"string\",\"passwordResetMailSubject\":\"string\",\"passwordResetMailBody\":\"string\",\"pinConfirmationMailSubject\":\"string\",\"pinConfirmationMailBody\":\"string\",\"pinConfirmationMailTemplateId\":\"string\",\"maxLength\":0,\"minLength\":0,\"requireAtLeastOneLowercaseLetter\":false,\"requireAtLeastOneNonAlphaNumericCharacter\":false,\"requireAtLeastOneNumber\":false,\"requireAtLeastOneUppercaseLetter\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/settings/synerise-auth\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"enabled\\\":true,\\\"registrationType\\\":\\\"REQUIRE_ACTIVATION\\\",\\\"pinConfirmationType\\\":\\\"EVERYONE\\\",\\\"pinConfirmationLength\\\":6,\\\"pinConfirmationValidInSeconds\\\":300,\\\"allowPinResendFromDifferentDeviceId\\\":false,\\\"confirmationRedirectLink\\\":null,\\\"confirmationMailSubject\\\":\\\"string\\\",\\\"confirmationMailBody\\\":\\\"string\\\",\\\"confirmationMailTemplateId\\\":\\\"string\\\",\\\"passwordResetMailTemplateId\\\":\\\"string\\\",\\\"passwordResetMailSubject\\\":\\\"string\\\",\\\"passwordResetMailBody\\\":\\\"string\\\",\\\"pinConfirmationMailSubject\\\":\\\"string\\\",\\\"pinConfirmationMailBody\\\":\\\"string\\\",\\\"pinConfirmationMailTemplateId\\\":\\\"string\\\",\\\"maxLength\\\":0,\\\"minLength\\\":0,\\\"requireAtLeastOneLowercaseLetter\\\":false,\\\"requireAtLeastOneNonAlphaNumericCharacter\\\":false,\\\"requireAtLeastOneNumber\\\":false,\\\"requireAtLeastOneUppercaseLetter\\\":false}\")\n  .asString();"}]}},"/sauth/settings/oauth/facebook":{"get":{"tags":["Settings"],"operationId":"getFacebookOauthSettings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-FacebookOauthSettingsPayload"}}}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/getFacebookOauthSettings"],"description":"\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_oauth: read`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/sauth/settings/oauth/facebook"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/sauth/settings/oauth/facebook\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/sauth/settings/oauth/facebook\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/oauth/facebook\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/oauth/facebook');\n$request->setMethod(HTTP_METH_GET);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/sauth/settings/oauth/facebook\")\n  .asString();"}]},"post":{"tags":["Settings"],"operationId":"updateFacebookOauthSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-FacebookOauthSettingsPayload"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/sauth-FacebookOauthSettingsPayload"}}}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/updateFacebookOauthSettings"],"description":"\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_oauth: update`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/settings/oauth/facebook \\\n  --header 'content-type: application/json' \\\n  --data '{\"enabled\":true}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"enabled\\\":true}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/settings/oauth/facebook\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"enabled\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/settings/oauth/facebook\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/oauth/facebook\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({enabled: true}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/oauth/facebook');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"enabled\":true}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/settings/oauth/facebook\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"enabled\\\":true}\")\n  .asString();"}]}},"/sauth/settings/oauth/google":{"get":{"tags":["Settings"],"operationId":"getGoogleOauthSettings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-GoogleOauthSettingsPayload"}}}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/getGoogleOauthSettings"],"description":"\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_oauth: read`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/sauth/settings/oauth/google"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/sauth/settings/oauth/google\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/sauth/settings/oauth/google\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/oauth/google\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/oauth/google');\n$request->setMethod(HTTP_METH_GET);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/sauth/settings/oauth/google\")\n  .asString();"}]},"post":{"tags":["Settings"],"operationId":"updateGoogleOauthSettings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-GoogleOauthSettingsPayload"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/sauth-GoogleOauthSettingsPayload"}}}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/updateGoogleOauthSettings"],"description":"\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_oauth: update`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/settings/oauth/google \\\n  --header 'content-type: application/json' \\\n  --data '{\"enabled\":true}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"enabled\\\":true}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/sauth/settings/oauth/google\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"enabled\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/settings/oauth/google\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/oauth/google\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({enabled: true}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/oauth/google');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"enabled\":true}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/settings/oauth/google\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"enabled\\\":true}\")\n  .asString();"}]}},"/sauth/settings/oauth/apple":{"get":{"tags":["Settings"],"summary":"Get Sign in with Apple settings","description":"Retrieve Sign in with Apple settings.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_oauth: read`\n","operationId":"getAppleAuthSettingsUsingGET","security":[{"JWT":[]}],"responses":{"200":{"description":"Current settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-AppleAuthSettingsPayload"}}}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/getAppleAuthSettingsUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/sauth/settings/oauth/apple \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/sauth/settings/oauth/apple\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/sauth/settings/oauth/apple\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/oauth/apple\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/oauth/apple');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/sauth/settings/oauth/apple\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Settings"],"summary":"Update Sign in with Apple settings","description":"Update Sign in with Apple settings.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_customers_iam_oauth: update`\n","operationId":"updateAppleAuthSettingsUsingPOST","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-AppleAuthSettingsPayload"}}},"required":true},"responses":{"200":{"description":"Current settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-AppleAuthSettingsPayload"}}}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/updateAppleAuthSettingsUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/settings/oauth/apple \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"enabled\":true,\"bundle\":\"com.synerise.sdk.sample-swift\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"enabled\\\":true,\\\"bundle\\\":\\\"com.synerise.sdk.sample-swift\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/settings/oauth/apple\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"enabled\": true,\n  \"bundle\": \"com.synerise.sdk.sample-swift\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/settings/oauth/apple\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/settings/oauth/apple\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({enabled: true, bundle: 'com.synerise.sdk.sample-swift'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/settings/oauth/apple');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"enabled\":true,\"bundle\":\"com.synerise.sdk.sample-swift\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/settings/oauth/apple\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"enabled\\\":true,\\\"bundle\\\":\\\"com.synerise.sdk.sample-swift\\\"}\")\n  .asString();"}]}},"/sauth/clients/oauth/deleted":{"post":{"deprecated":true,"tags":["Profile account management"],"summary":"Delete Client Account (OAuth)","description":"\nThis endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).\n\nA Client can delete their own account.\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"deleteOauthClientUsingPOST","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-DeleteOauthClientRequestBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{}},"400":{"$ref":"#/components/responses/sauth-400-malformed"},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-invalid-credentials-in-body"},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/deleteOauthClientUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/clients/oauth/deleted \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"accessToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"accessToken\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"customId\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/clients/oauth/deleted\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"accessToken\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\",\n  \"customId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/clients/oauth/deleted\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/clients/oauth/deleted\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  accessToken: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string',\n  customId: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/clients/oauth/deleted');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"accessToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/clients/oauth/deleted\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"accessToken\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"customId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/clients/apple/deleted":{"post":{"deprecated":true,"tags":["Profile account management"],"summary":"Delete Profile account (Sign in with Apple)","description":"\nThis endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).\n\nA Profile can delete its own account.\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"deleteAppleClientUsingPOST","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-DeleteAppleClientRequestBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{}},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-forbidden"},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/deleteAppleClientUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/clients/apple/deleted \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"accessToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"accessToken\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"customId\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/clients/apple/deleted\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"accessToken\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\",\n  \"customId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/clients/apple/deleted\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/clients/apple/deleted\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  accessToken: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string',\n  customId: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/clients/apple/deleted');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"accessToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/clients/apple/deleted\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"accessToken\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\",\\\"customId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/clients/facebook/deleted":{"post":{"deprecated":true,"tags":["Profile account management"],"summary":"Delete Facebook Profile Account","description":"\nThis endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).\n\nA Profile can delete its own account.\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"DeleteAFacebookClientAccount","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-DeleteAFacebookClientAccountRequestBody"}}},"required":true},"responses":{"200":{"description":"Request accepted","headers":{}},"400":{"$ref":"#/components/responses/sauth-400-malformed"},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-invalid-credentials-in-body"},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/DeleteAFacebookClientAccount"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/clients/facebook/deleted \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"facebookToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"facebookToken\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/clients/facebook/deleted\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"facebookToken\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/clients/facebook/deleted\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/clients/facebook/deleted\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  facebookToken: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/clients/facebook/deleted');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"facebookToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/clients/facebook/deleted\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"facebookToken\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/my-account/delete":{"post":{"deprecated":true,"tags":["Profile account management"],"summary":"Delete account","description":"\nThis endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).\n\nA Profile can delete its own account.\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"deleteAccountUsingPOST-v1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-DeleteAccountV1RequestBody"}}}},"responses":{"200":{"description":"OK","content":{}},"400":{"$ref":"#/components/responses/sauth-400-malformed"},"401":{"$ref":"#/components/responses/sauth-401-unauthorized"},"403":{"$ref":"#/components/responses/sauth-403-invalid-credentials-in-body"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/deleteAccountUsingPOST-v1"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/my-account/delete \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/my-account/delete\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"password\": \"string\",\n  \"uuid\": \"string\",\n  \"deviceId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/my-account/delete\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/my-account/delete\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({password: 'string', uuid: 'string', deviceId: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/my-account/delete');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/my-account/delete\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/sauth/my-account/email-change/request":{"post":{"deprecated":true,"tags":["Profile account management"],"summary":"Request Profile email change","description":"\nThis endpoint is deprecated. Use [this one](#operation/changeEmailRequestUsingPOST).\n\nA Profile can request an email change for its account. A confirmation token is sent by and must be applied using the [Confirm Profile email change](#operation/confirmClientEmailChange) endpoint.\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n","operationId":"requestClientEmailChange","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-RequestClientEmailChangeRequestBody"},"example":"{\"email\":\"newEmail\",\"password\":\"my_password\",\"uuid\":\"my_uuid\",\"deviceId\":\"optional\"}"}},"required":true},"responses":{"202":{"description":"Request accepted"},"400":{"description":"Clients not recognizable by email"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/profile-management#tag/Profile-account-management/operation/requestClientEmailChange"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/sauth/my-account/email-change/request \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/sauth/my-account/email-change/request\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\",\n  \"password\": \"string\",\n  \"uuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"deviceId\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/sauth/my-account/email-change/request\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/sauth/my-account/email-change/request\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  email: 'string',\n  password: 'string',\n  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  deviceId: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/sauth/my-account/email-change/request');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/sauth/my-account/email-change/request\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"uuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"deviceId\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/schema-service/v3/screen-views/{feedSlug}/generate":{"post":{"tags":["Screen views"],"summary":"Generate screen view from feed","description":"When this method is called, the Synerise backend finds all screen view campaigns applicable to the JWT context and returns the screen view with the highest priority (1). Inserts are processed. If an insert can't be processed, the returned `data` is empty.\n\n**IMPORTANT**: When the request's context is a Workspace or Synerise User JWT, only screen views with the audience set to `ALL` (\"Everyone\" in the Synerise Web Application) can be generated.\n\nIf the feed doesn't contain any screen views whose audience matches the JWT context of the request, the response is error 404.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <span title=\"Available only on mobile SDKs\">Incognito Profile</span>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"generateScreenViewByFeedPostV2","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathFeedSlug"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/schema-service-additionalPropertiesForGenerate"}}}}},"responses":{"200":{"description":"Processed JSON content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-GenerateResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/generateScreenViewByFeedPostV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"property1\":\"string\",\"property2\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v3/screen-views/%7BfeedSlug%7D/generate\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"property1\": \"string\",\n  \"property2\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v3/screen-views/%7BfeedSlug%7D/generate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({property1: 'string', property2: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"property1\":\"string\",\"property2\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}\")\n  .asString();"}]},"get":{"tags":["Screen views"],"summary":"Generate screen view from feed","description":"When this method is called, the Synerise backend finds all screen view campaigns applicable to the JWT context and returns the screen view with the highest priority (1). Inserts are processed. If an insert can't be processed, the returned `data` is empty.\n\n**IMPORTANT**: When the request's context is a Workspace or Synerise User JWT, only screen views with the audience set to `ALL` (\"Everyone\" in the Synerise Web Application) can be generated.\n\nIf the feed doesn't contain any screen views whose audience matches the JWT context of the request, the response is error 404.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <span title=\"Available only on mobile SDKs\">Incognito Profile</span>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"generateScreenViewByFeedGetV2","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathFeedSlug"}],"responses":{"200":{"description":"Processed JSON content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-GenerateResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/generateScreenViewByFeedGetV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v3/screen-views/%7BfeedSlug%7D/generate\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v3/screen-views/%7BfeedSlug%7D/generate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/screen-views/create":{"post":{"tags":["Screen views"],"summary":"Create screen view","description":"Create a screen view.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: create`\n","operationId":"create-screen-view","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-CreateScreenViewRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-screenView"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-screen-view"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/screen-views/create \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"priority\":99,\"name\":\"string\",\"directoryId\":\"786c2ec1-fb9a-4593-b705-005b34c18c18\",\"content\":{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"},\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"},\"feedId\":\"30c3a808-1315-453b-94cf-0ccb129b558b\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"priority\\\":99,\\\"name\\\":\\\"string\\\",\\\"directoryId\\\":\\\"786c2ec1-fb9a-4593-b705-005b34c18c18\\\",\\\"content\\\":{\\\"json\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"documents\\\":[\\\"string\\\"],\\\"data\\\":[{\\\"slug\\\":\\\"basket\\\"}],\\\"groups\\\":[\\\"43c97b25-4a10-45d0-99b7-d472eea2bb24\\\"],\\\"groupsOrder\\\":false},\\\"audience\\\":{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"string\\\"],\\\"query\\\":\\\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed segmentation\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"unique\\\\\\\":true,\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"Segmentation A\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"type\\\\\\\":\\\\\\\"FUNNEL\\\\\\\",\\\\\\\"matching\\\\\\\":true,\\\\\\\"funnel\\\\\\\":{\\\\\\\"_id\\\\\\\":\\\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed\\\\\\\",\\\\\\\"completedWithin\\\\\\\":null,\\\\\\\"dateFilter\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"RELATIVE\\\\\\\",\\\\\\\"offset\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":0},\\\\\\\"duration\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":30}},\\\\\\\"steps\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"action\\\\\\\":{\\\\\\\"id\\\\\\\":944,\\\\\\\"name\\\\\\\":\\\\\\\"page.visit\\\\\\\"},\\\\\\\"eventName\\\\\\\":\\\\\\\"page.visit\\\\\\\",\\\\\\\"expressions\\\\\\\":[]}],\\\\\\\"exact\\\\\\\":false}}]}}]}}\\\"},\\\"schedule\\\":{\\\"enabled\\\":true,\\\"endDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"endType\\\":\\\"NEVER\\\",\\\"parts\\\":[{\\\"startDay\\\":1,\\\"startTime\\\":\\\"08:18:03\\\",\\\"endDay\\\":1,\\\"endTime\\\":44283}],\\\"periodType\\\":\\\"ENTIRE\\\",\\\"startDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"startType\\\":\\\"NOW\\\",\\\"timezone\\\":\\\"Europe/Warsaw\\\"},\\\"feedId\\\":\\\"30c3a808-1315-453b-94cf-0ccb129b558b\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/screen-views/create\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"priority\": 99,\n  \"name\": \"string\",\n  \"directoryId\": \"786c2ec1-fb9a-4593-b705-005b34c18c18\",\n  \"content\": {\n    \"json\": {\n      \"property1\": null,\n      \"property2\": null\n    },\n    \"documents\": [\n      \"string\"\n    ],\n    \"data\": [\n      {\n        \"slug\": \"basket\"\n      }\n    ],\n    \"groups\": [\n      \"43c97b25-4a10-45d0-99b7-d472eea2bb24\"\n    ],\n    \"groupsOrder\": false\n  },\n  \"audience\": {\n    \"targetType\": \"SEGMENT\",\n    \"segments\": [\n      \"string\"\n    ],\n    \"query\": \"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"\n  },\n  \"schedule\": {\n    \"enabled\": true,\n    \"endDate\": \"2019-08-24T14:15:22Z\",\n    \"endType\": \"NEVER\",\n    \"parts\": [\n      {\n        \"startDay\": 1,\n        \"startTime\": \"08:18:03\",\n        \"endDay\": 1,\n        \"endTime\": 44283\n      }\n    ],\n    \"periodType\": \"ENTIRE\",\n    \"startDate\": \"2019-08-24T14:15:22Z\",\n    \"startType\": \"NOW\",\n    \"timezone\": \"Europe/Warsaw\"\n  },\n  \"feedId\": \"30c3a808-1315-453b-94cf-0ccb129b558b\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/screen-views/create\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screen-views/create\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  priority: 99,\n  name: 'string',\n  directoryId: '786c2ec1-fb9a-4593-b705-005b34c18c18',\n  content: {\n    json: {property1: null, property2: null},\n    documents: ['string'],\n    data: [{slug: 'basket'}],\n    groups: ['43c97b25-4a10-45d0-99b7-d472eea2bb24'],\n    groupsOrder: false\n  },\n  audience: {\n    targetType: 'SEGMENT',\n    segments: ['string'],\n    query: '{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}'\n  },\n  schedule: {\n    enabled: true,\n    endDate: '2019-08-24T14:15:22Z',\n    endType: 'NEVER',\n    parts: [{startDay: 1, startTime: '08:18:03', endDay: 1, endTime: 44283}],\n    periodType: 'ENTIRE',\n    startDate: '2019-08-24T14:15:22Z',\n    startType: 'NOW',\n    timezone: 'Europe/Warsaw'\n  },\n  feedId: '30c3a808-1315-453b-94cf-0ccb129b558b'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screen-views/create');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"priority\":99,\"name\":\"string\",\"directoryId\":\"786c2ec1-fb9a-4593-b705-005b34c18c18\",\"content\":{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false},\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\\\"analysis\\\\\":{\\\\\"title\\\\\":\\\\\"Unnamed segmentation\\\\\",\\\\\"description\\\\\":\\\\\"\\\\\",\\\\\"unique\\\\\":true,\\\\\"segments\\\\\":[{\\\\\"title\\\\\":\\\\\"Segmentation A\\\\\",\\\\\"description\\\\\":\\\\\"\\\\\",\\\\\"filter\\\\\":{\\\\\"matching\\\\\":true,\\\\\"expressions\\\\\":[{\\\\\"_id\\\\\":\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\",\\\\\"name\\\\\":\\\\\"\\\\\",\\\\\"type\\\\\":\\\\\"FUNNEL\\\\\",\\\\\"matching\\\\\":true,\\\\\"funnel\\\\\":{\\\\\"_id\\\\\":\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\",\\\\\"title\\\\\":\\\\\"Unnamed\\\\\",\\\\\"completedWithin\\\\\":null,\\\\\"dateFilter\\\\\":{\\\\\"type\\\\\":\\\\\"RELATIVE\\\\\",\\\\\"offset\\\\\":{\\\\\"type\\\\\":\\\\\"DAYS\\\\\",\\\\\"value\\\\\":0},\\\\\"duration\\\\\":{\\\\\"type\\\\\":\\\\\"DAYS\\\\\",\\\\\"value\\\\\":30}},\\\\\"steps\\\\\":[{\\\\\"_id\\\\\":\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\",\\\\\"title\\\\\":\\\\\"\\\\\",\\\\\"action\\\\\":{\\\\\"id\\\\\":944,\\\\\"name\\\\\":\\\\\"page.visit\\\\\"},\\\\\"eventName\\\\\":\\\\\"page.visit\\\\\",\\\\\"expressions\\\\\":[]}],\\\\\"exact\\\\\":false}}]}}]}}\"},\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"},\"feedId\":\"30c3a808-1315-453b-94cf-0ccb129b558b\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/screen-views/create\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"priority\\\":99,\\\"name\\\":\\\"string\\\",\\\"directoryId\\\":\\\"786c2ec1-fb9a-4593-b705-005b34c18c18\\\",\\\"content\\\":{\\\"json\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"documents\\\":[\\\"string\\\"],\\\"data\\\":[{\\\"slug\\\":\\\"basket\\\"}],\\\"groups\\\":[\\\"43c97b25-4a10-45d0-99b7-d472eea2bb24\\\"],\\\"groupsOrder\\\":false},\\\"audience\\\":{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"string\\\"],\\\"query\\\":\\\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed segmentation\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"unique\\\\\\\":true,\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"Segmentation A\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"type\\\\\\\":\\\\\\\"FUNNEL\\\\\\\",\\\\\\\"matching\\\\\\\":true,\\\\\\\"funnel\\\\\\\":{\\\\\\\"_id\\\\\\\":\\\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed\\\\\\\",\\\\\\\"completedWithin\\\\\\\":null,\\\\\\\"dateFilter\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"RELATIVE\\\\\\\",\\\\\\\"offset\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":0},\\\\\\\"duration\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":30}},\\\\\\\"steps\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"action\\\\\\\":{\\\\\\\"id\\\\\\\":944,\\\\\\\"name\\\\\\\":\\\\\\\"page.visit\\\\\\\"},\\\\\\\"eventName\\\\\\\":\\\\\\\"page.visit\\\\\\\",\\\\\\\"expressions\\\\\\\":[]}],\\\\\\\"exact\\\\\\\":false}}]}}]}}\\\"},\\\"schedule\\\":{\\\"enabled\\\":true,\\\"endDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"endType\\\":\\\"NEVER\\\",\\\"parts\\\":[{\\\"startDay\\\":1,\\\"startTime\\\":\\\"08:18:03\\\",\\\"endDay\\\":1,\\\"endTime\\\":44283}],\\\"periodType\\\":\\\"ENTIRE\\\",\\\"startDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"startType\\\":\\\"NOW\\\",\\\"timezone\\\":\\\"Europe/Warsaw\\\"},\\\"feedId\\\":\\\"30c3a808-1315-453b-94cf-0ccb129b558b\\\"}\")\n  .asString();"}]}},"/schema-service/v2/screen-views/createNew":{"post":{"tags":["Screen views"],"summary":"Initialize screen view","description":"Create a screen view. It is created as a blank, without any conditions.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"create-new-screen-view","security":[{"JWT":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-CreateRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-screenView"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-new-screen-view"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/createNew \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"directory\":\"5277859d-f92c-478c-acab-7680a97fea68\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"directory\\\":\\\"5277859d-f92c-478c-acab-7680a97fea68\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/createNew\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"directory\": \"5277859d-f92c-478c-acab-7680a97fea68\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/createNew\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/createNew\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string', directory: '5277859d-f92c-478c-acab-7680a97fea68'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/createNew');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"directory\":\"5277859d-f92c-478c-acab-7680a97fea68\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/createNew\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"directory\\\":\\\"5277859d-f92c-478c-acab-7680a97fea68\\\"}\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}/content":{"post":{"tags":["Screen views"],"summary":"Add content to screen view","description":"Add content to a screen view. This overwrites any existing content.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"create-screen-view-content","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-ScreenViewContent"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-screen-view-content"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/content \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"json\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"documents\\\":[\\\"string\\\"],\\\"data\\\":[{\\\"slug\\\":\\\"basket\\\"}],\\\"groups\\\":[\\\"43c97b25-4a10-45d0-99b7-d472eea2bb24\\\"],\\\"groupsOrder\\\":false}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D/content\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"json\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"documents\": [\n    \"string\"\n  ],\n  \"data\": [\n    {\n      \"slug\": \"basket\"\n    }\n  ],\n  \"groups\": [\n    \"43c97b25-4a10-45d0-99b7-d472eea2bb24\"\n  ],\n  \"groupsOrder\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/content\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D/content\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  json: {property1: null, property2: null},\n  documents: ['string'],\n  data: [{slug: 'basket'}],\n  groups: ['43c97b25-4a10-45d0-99b7-d472eea2bb24'],\n  groupsOrder: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/content');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/content\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"json\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"documents\\\":[\\\"string\\\"],\\\"data\\\":[{\\\"slug\\\":\\\"basket\\\"}],\\\"groups\\\":[\\\"43c97b25-4a10-45d0-99b7-d472eea2bb24\\\"],\\\"groupsOrder\\\":false}\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}/audience":{"post":{"tags":["Screen views"],"summary":"Add audience to screen view","description":"Define the audience for a screen view.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"create-screen-view-audience","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Audience"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-screen-view-audience"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/audience \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"string\\\"],\\\"query\\\":\\\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed segmentation\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"unique\\\\\\\":true,\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"Segmentation A\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"type\\\\\\\":\\\\\\\"FUNNEL\\\\\\\",\\\\\\\"matching\\\\\\\":true,\\\\\\\"funnel\\\\\\\":{\\\\\\\"_id\\\\\\\":\\\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed\\\\\\\",\\\\\\\"completedWithin\\\\\\\":null,\\\\\\\"dateFilter\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"RELATIVE\\\\\\\",\\\\\\\"offset\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":0},\\\\\\\"duration\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":30}},\\\\\\\"steps\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"action\\\\\\\":{\\\\\\\"id\\\\\\\":944,\\\\\\\"name\\\\\\\":\\\\\\\"page.visit\\\\\\\"},\\\\\\\"eventName\\\\\\\":\\\\\\\"page.visit\\\\\\\",\\\\\\\"expressions\\\\\\\":[]}],\\\\\\\"exact\\\\\\\":false}}]}}]}}\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D/audience\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"targetType\": \"SEGMENT\",\n  \"segments\": [\n    \"string\"\n  ],\n  \"query\": \"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/audience\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D/audience\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  targetType: 'SEGMENT',\n  segments: ['string'],\n  query: '{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/audience');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\\\"analysis\\\\\":{\\\\\"title\\\\\":\\\\\"Unnamed segmentation\\\\\",\\\\\"description\\\\\":\\\\\"\\\\\",\\\\\"unique\\\\\":true,\\\\\"segments\\\\\":[{\\\\\"title\\\\\":\\\\\"Segmentation A\\\\\",\\\\\"description\\\\\":\\\\\"\\\\\",\\\\\"filter\\\\\":{\\\\\"matching\\\\\":true,\\\\\"expressions\\\\\":[{\\\\\"_id\\\\\":\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\",\\\\\"name\\\\\":\\\\\"\\\\\",\\\\\"type\\\\\":\\\\\"FUNNEL\\\\\",\\\\\"matching\\\\\":true,\\\\\"funnel\\\\\":{\\\\\"_id\\\\\":\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\",\\\\\"title\\\\\":\\\\\"Unnamed\\\\\",\\\\\"completedWithin\\\\\":null,\\\\\"dateFilter\\\\\":{\\\\\"type\\\\\":\\\\\"RELATIVE\\\\\",\\\\\"offset\\\\\":{\\\\\"type\\\\\":\\\\\"DAYS\\\\\",\\\\\"value\\\\\":0},\\\\\"duration\\\\\":{\\\\\"type\\\\\":\\\\\"DAYS\\\\\",\\\\\"value\\\\\":30}},\\\\\"steps\\\\\":[{\\\\\"_id\\\\\":\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\",\\\\\"title\\\\\":\\\\\"\\\\\",\\\\\"action\\\\\":{\\\\\"id\\\\\":944,\\\\\"name\\\\\":\\\\\"page.visit\\\\\"},\\\\\"eventName\\\\\":\\\\\"page.visit\\\\\",\\\\\"expressions\\\\\":[]}],\\\\\"exact\\\\\":false}}]}}]}}\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/audience\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"string\\\"],\\\"query\\\":\\\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed segmentation\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"unique\\\\\\\":true,\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"Segmentation A\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"type\\\\\\\":\\\\\\\"FUNNEL\\\\\\\",\\\\\\\"matching\\\\\\\":true,\\\\\\\"funnel\\\\\\\":{\\\\\\\"_id\\\\\\\":\\\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed\\\\\\\",\\\\\\\"completedWithin\\\\\\\":null,\\\\\\\"dateFilter\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"RELATIVE\\\\\\\",\\\\\\\"offset\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":0},\\\\\\\"duration\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":30}},\\\\\\\"steps\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"action\\\\\\\":{\\\\\\\"id\\\\\\\":944,\\\\\\\"name\\\\\\\":\\\\\\\"page.visit\\\\\\\"},\\\\\\\"eventName\\\\\\\":\\\\\\\"page.visit\\\\\\\",\\\\\\\"expressions\\\\\\\":[]}],\\\\\\\"exact\\\\\\\":false}}]}}]}}\\\"}\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}/priority":{"put":{"tags":["Screen views"],"summary":"Update screen view priority","description":"Update priority in a screen view.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"updateScreenViewPriority","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-screenViewPriority"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/updateScreenViewPriority"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/priority \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data 99"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"99\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D/priority\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify(99);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/priority\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D/priority\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify(99));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/priority');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('99');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/priority\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"99\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}/name":{"put":{"tags":["Screen views"],"summary":"Rename screen view","description":"Update the name of a screen view. You can update the names of active screen views.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"updateNameOfScreenView","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"update screenview name","type":"string","description":"New name for the screen view"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/updateNameOfScreenView"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/name \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '\"string\"'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"\\\"string\\\"\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D/name\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify(\"string\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/name\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D/name\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify('string'));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/name');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('\"string\"');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/name\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"\\\"string\\\"\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{feedSlug}/generate/by/{identifierType}":{"post":{"tags":["Screen views"],"summary":"Preview screen view with a profile context","description":"This endpoint can be used to preview a generated document as a Workspace or Synerise User. To generate the output as a profile (client), use one of the following methods:\n- [POST `/v3/screen-views/{feedSlug}/generate`](#operation/generateScreenViewByFeedPostV2)\n- [GET `/v3/screen-views/{feedSlug}/generate`](#operation/generateScreenViewByFeedGetV2)\n\n\nWhen this method is called, the Synerise backend finds all screen view campaigns in the requested feed which are applicable to the profile and returns the screen view with the highest priority (1). Inserts are processed. If an insert can't be processed, the returned `data` is empty.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"generateScreenViewByIdentifierPostV2","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathFeedSlug"},{"$ref":"#/components/parameters/schema-service-pathIdentifierType"}],"requestBody":{"content":{"application/json":{"schema":{"title":"Generate Screen View Request Data","type":"object","required":["identifierValue"],"properties":{"identifierValue":{"$ref":"#/components/schemas/schema-service-identifierValue"},"params":{"type":"object","description":"Additional parameters","additionalProperties":{"$ref":"#/components/schemas/schema-service-additionalPropertiesForGenerate"}}}}}}},"responses":{"200":{"description":"Processed JSON content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-GenerateResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/generateScreenViewByIdentifierPostV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\",\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\",\n  \"params\": {\n    \"property1\": \"string\",\n    \"property2\": \"string\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({identifierValue: 'string', params: {property1: 'string', property2: 'string'}}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\",\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}}\")\n  .asString();"}]}},"/schema-service/v2/screen-views/feeds":{"post":{"tags":["Screen views"],"summary":"Create screen view feed","description":"Create a new screen view feed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"add-feed","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-ScreenViewFeed"}}}},"responses":{"200":{"description":"Feed created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Feed"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/add-feed"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/feeds \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"slug\":\"string\",\"name\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"slug\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/feeds\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"slug\": \"string\",\n  \"name\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/feeds\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/feeds\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({slug: 'string', name: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/feeds');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"slug\":\"string\",\"name\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/feeds\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"slug\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\")\n  .asString();"}]},"get":{"tags":["Screen views"],"summary":"List screen view feeds","description":"Returns a list of screen view feeds.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"feed-list","security":[{"JWT":[]}],"responses":{"200":{"description":"List of feeds","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-Feed"}}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/feed-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/feeds \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/screen-views/feeds\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/screen-views/feeds\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/feeds\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/feeds');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/screen-views/feeds\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screen-views":{"get":{"tags":["Screen views"],"summary":"List screen views","description":"Returns a paginated list of screen views.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-queryPage"},{"$ref":"#/components/parameters/schema-service-queryLimit"},{"$ref":"#/components/parameters/schema-service-querySearch"},{"$ref":"#/components/parameters/schema-service-queryDirectoryId"},{"$ref":"#/components/parameters/schema-service-queryStatus"},{"$ref":"#/components/parameters/schema-service-queryFeedId"}],"responses":{"200":{"description":"List of screen views","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-ScreenViewsListResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"operationId":"screen-views-list","x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/screen-views-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_NUMBER_VALUE',\n  'limit' => 'SOME_NUMBER_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'status' => 'SOME_STRING_VALUE',\n  'feedId' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}":{"get":{"tags":["Screen views"],"summary":"Get screen view","description":"Retrieve the details of a screen view.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"get-screen-view","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"responses":{"200":{"description":"Details of the screen view","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-screenView"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/get-screen-view"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"delete":{"tags":["Screen views"],"summary":"Delete screen view","description":"Delete a screen view.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"delete-screen-view","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"responses":{"200":{"description":"Screen view deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/delete-screen-view"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}/copy":{"post":{"tags":["Screen views"],"summary":"Copy screen view","description":"Copy a screen view. The copy receives the DRAFT status, regardless of the status of the original screen view.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"copy-screen-view","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"responses":{"200":{"description":"Data of the created copy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-screenViewMetadata"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/copy-screen-view"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/copy \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D/copy\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/copy\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D/copy\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/copy');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/copy\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}/predecessors":{"get":{"tags":["Screen views"],"summary":"Get predecessors for screen view","description":"Retrieve information about documents or screen views that refer **to** the requested screen view.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"responses":{"200":{"description":"Entities which refer to the requested screen view","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-GraphObject"}}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"operationId":"screenview-predecessors-get","x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/screenview-predecessors-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}/successors":{"get":{"tags":["Screen views"],"summary":"Get successors for screen view","description":"Retrieve information about documents referenced **from** the requested screen view.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"responses":{"200":{"description":"Documents referenced from the requested screen view","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-GraphObject"}}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"operationId":"screenview-successors-get","x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/screenview-successors-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/successors \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D/successors\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/successors\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D/successors\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/successors');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/successors\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screen-views/directory":{"post":{"tags":["Screen views"],"summary":"Add screen view directory","description":"Create a directory for screen views.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"add-directory","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-NewDirectory"}}}},"responses":{"200":{"description":"Directory created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Directory"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/add-directory"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/directory \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/directory\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/directory\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/directory\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/directory');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/directory\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\"}\")\n  .asString();"}]},"get":{"tags":["Screen views"],"summary":"List screen view directories","description":"Returns a list of screen view directories.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","security":[{"JWT":[]}],"responses":{"200":{"description":"List of directories","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-Directory"}}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"operationId":"directory-list","x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/directory-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/directory \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/screen-views/directory\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/screen-views/directory\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/directory\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/directory');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/screen-views/directory\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screen-views/directory/{directoryId}":{"post":{"tags":["Screen views"],"summary":"Rename screen view directory","description":"Update the name of a screen view directory.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"update-name-directory","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDirectoryId"}],"requestBody":{"content":{"application/json":{"schema":{"title":"update screenview directory name","type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Directory"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/update-name-directory"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/directory/%7BdirectoryId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/directory/%7BdirectoryId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\"}\")\n  .asString();"}]},"delete":{"tags":["Screen views"],"summary":"Delete screen view directory","description":"Delete a screen view directory. The contents are moved into the default directory.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"deleteDirectory","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDirectoryId"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Directory"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/deleteDirectory"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/schema-service/v2/screen-views/directory/%7BdirectoryId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/directory/%7BdirectoryId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}/directory/{directoryId}/attach":{"post":{"tags":["Screen views"],"summary":"Assign screen view to directory","description":"Assign a screen view to a directory. A screen view can only belong to one directory and using this endpoint overwrites the current assignment.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"attach-screen-views-to-directory","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"},{"$ref":"#/components/parameters/schema-service-pathDirectoryId"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-DocumentMetadata"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/attach-screen-views-to-directory"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}/feed":{"post":{"tags":["Screen views"],"summary":"Assign screen view to feed","description":"Assign a screen view to a feed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"create-screen-view-feed","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"string","format":"uuid","description":"UUID of the feed to which you want to assign the screen view"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-screen-view-feed"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/feed \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D/feed\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify(\"497f6eca-6276-4993-bfeb-53cbbbba6f08\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/feed\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D/feed\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify('497f6eca-6276-4993-bfeb-53cbbbba6f08'));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/feed');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/feed\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"\")\n  .asString();"}]}},"/schema-service/v2/screen-views/feeds/{feedId}":{"post":{"tags":["Screen views"],"summary":"Rename screen view feed","description":"Update the name of a screen view feed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"update-name-feed","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathFeedId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"New name of the feed"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Directory"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/update-name-feed"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/feeds/%7BfeedId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/feeds/%7BfeedId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\"}\")\n  .asString();"}]},"delete":{"tags":["Screen views"],"summary":"Delete screen view feed","description":"Delete a screen view feed. The screen views currently in this feed are moved to the default feed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"deleteFeed","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathFeedId"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Feed"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/deleteFeed"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/schema-service/v2/screen-views/feeds/%7BfeedId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/feeds/%7BfeedId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/{slug}/generate":{"get":{"tags":["Documents"],"summary":"Generate document (slug)","description":"Generate a document. Inserts are processed. If an insert can't be processed, the returned `content` is empty.\n\nIf the document includes inserts with a context (for example, `{% customer param %}`), you must authenticate the request with a JWT that provides the context.\n\nIf you want to authenticate with a JWT that doesn't provide the required context, you can use the [`POST /v2/documents/{slug}/generate` endpoint](operation/generateDocumentBySlug) to provide the parameter values in the request body.\n\n**IMPORTANT**: When the request's context is a Workspace or Synerise User JWT, only documents with the audience set to `ALL` (\"Everyone\" in the Synerise Web Application) can be generated.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <span title=\"Available only on mobile SDKs\">Incognito Profile</span>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"generateDocumentBySlugGet","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentSlug"}],"responses":{"200":{"description":"Processed JSON content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-DocumentGenerateResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/generateDocumentBySlugGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D/generate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/documents/%7Bslug%7D/generate\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D/generate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7Bslug%7D/generate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D/generate');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D/generate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Documents"],"summary":"Generate document (slug)","description":"Generate a document. Inserts are processed. If an insert can't be processed, the returned `content` is empty.\n\n**IMPORTANT**: When the request's context is a Workspace or Synerise User JWT, only documents with the audience set to `ALL` (\"Everyone\" in the Synerise Web Application) can be generated.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <span title=\"Available only on mobile SDKs\">Incognito Profile</span>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"generateDocumentBySlug","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentSlug"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"customer.firstName":"Joe"},"additionalProperties":{"$ref":"#/components/schemas/schema-service-additionalPropertiesForGenerate"}}}}},"responses":{"200":{"description":"Processed JSON content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-DocumentGenerateResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/generateDocumentBySlug"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D/generate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"customer.firstName\":\"Joe\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"customer.firstName\\\":\\\"Joe\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/%7Bslug%7D/generate\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"customer.firstName\": \"Joe\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D/generate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7Bslug%7D/generate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({'customer.firstName': 'Joe'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D/generate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"customer.firstName\":\"Joe\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D/generate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"customer.firstName\\\":\\\"Joe\\\"}\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}/generate":{"post":{"tags":["Documents"],"summary":"Generate document (document UUID)","description":"Generate a document. Inserts are processed. If an insert can't be processed, the returned `content` is empty.\n\n**IMPORTANT**: When the request's context is a Workspace or Synerise User JWT, only documents with the audience set to `ALL` (\"Everyone\" in the Synerise Web Application) can be generated.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"generateDocumentByIdPost","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"customer.firstName":"Joe"},"additionalProperties":{"$ref":"#/components/schemas/schema-service-additionalPropertiesForGenerate"}}}}},"responses":{"200":{"$ref":"#/components/responses/schema-service-processedDocumentJsonResponse"},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/generateDocumentByIdPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/generate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"customer.firstName\":\"Joe\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"customer.firstName\\\":\\\"Joe\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/%7BdocumentId%7D/generate\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"customer.firstName\": \"Joe\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/generate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D/generate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({'customer.firstName': 'Joe'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/generate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"customer.firstName\":\"Joe\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/generate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"customer.firstName\\\":\\\"Joe\\\"}\")\n  .asString();"}]}},"/schema-service/v2/documents/create":{"post":{"tags":["Documents"],"summary":"Create document","description":"Create a new document.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"createDocumentPost","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-CreateDocumentRequest"}}}},"responses":{"200":{"description":"Document created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Document"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/createDocumentPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/create \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"priority\":100,\"content\":{\"someBoolean\":true,\"someString\":\"Lorem ipsum\",\"aNestedDocument\":\"{% document exampleslug %}\"},\"slug\":\"basket\",\"schema\":\"containers\",\"groupId\":\"eb54e96e-21b8-4f54-9cd4-80fccbd06f55\",\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"},\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"},\"directoryId\":\"786c2ec1-fb9a-4593-b705-005b34c18c18\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"priority\\\":100,\\\"content\\\":{\\\"someBoolean\\\":true,\\\"someString\\\":\\\"Lorem ipsum\\\",\\\"aNestedDocument\\\":\\\"{% document exampleslug %}\\\"},\\\"slug\\\":\\\"basket\\\",\\\"schema\\\":\\\"containers\\\",\\\"groupId\\\":\\\"eb54e96e-21b8-4f54-9cd4-80fccbd06f55\\\",\\\"audience\\\":{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"string\\\"],\\\"query\\\":\\\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed segmentation\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"unique\\\\\\\":true,\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"Segmentation A\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"type\\\\\\\":\\\\\\\"FUNNEL\\\\\\\",\\\\\\\"matching\\\\\\\":true,\\\\\\\"funnel\\\\\\\":{\\\\\\\"_id\\\\\\\":\\\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed\\\\\\\",\\\\\\\"completedWithin\\\\\\\":null,\\\\\\\"dateFilter\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"RELATIVE\\\\\\\",\\\\\\\"offset\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":0},\\\\\\\"duration\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":30}},\\\\\\\"steps\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"action\\\\\\\":{\\\\\\\"id\\\\\\\":944,\\\\\\\"name\\\\\\\":\\\\\\\"page.visit\\\\\\\"},\\\\\\\"eventName\\\\\\\":\\\\\\\"page.visit\\\\\\\",\\\\\\\"expressions\\\\\\\":[]}],\\\\\\\"exact\\\\\\\":false}}]}}]}}\\\"},\\\"schedule\\\":{\\\"enabled\\\":true,\\\"endDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"endType\\\":\\\"NEVER\\\",\\\"parts\\\":[{\\\"startDay\\\":1,\\\"startTime\\\":\\\"08:18:03\\\",\\\"endDay\\\":1,\\\"endTime\\\":44283}],\\\"periodType\\\":\\\"ENTIRE\\\",\\\"startDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"startType\\\":\\\"NOW\\\",\\\"timezone\\\":\\\"Europe/Warsaw\\\"},\\\"directoryId\\\":\\\"786c2ec1-fb9a-4593-b705-005b34c18c18\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/create\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"priority\": 100,\n  \"content\": {\n    \"someBoolean\": true,\n    \"someString\": \"Lorem ipsum\",\n    \"aNestedDocument\": \"{% document exampleslug %}\"\n  },\n  \"slug\": \"basket\",\n  \"schema\": \"containers\",\n  \"groupId\": \"eb54e96e-21b8-4f54-9cd4-80fccbd06f55\",\n  \"audience\": {\n    \"targetType\": \"SEGMENT\",\n    \"segments\": [\n      \"string\"\n    ],\n    \"query\": \"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"\n  },\n  \"schedule\": {\n    \"enabled\": true,\n    \"endDate\": \"2019-08-24T14:15:22Z\",\n    \"endType\": \"NEVER\",\n    \"parts\": [\n      {\n        \"startDay\": 1,\n        \"startTime\": \"08:18:03\",\n        \"endDay\": 1,\n        \"endTime\": 44283\n      }\n    ],\n    \"periodType\": \"ENTIRE\",\n    \"startDate\": \"2019-08-24T14:15:22Z\",\n    \"startType\": \"NOW\",\n    \"timezone\": \"Europe/Warsaw\"\n  },\n  \"directoryId\": \"786c2ec1-fb9a-4593-b705-005b34c18c18\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/create\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/create\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  name: 'string',\n  priority: 100,\n  content: {\n    someBoolean: true,\n    someString: 'Lorem ipsum',\n    aNestedDocument: '{% document exampleslug %}'\n  },\n  slug: 'basket',\n  schema: 'containers',\n  groupId: 'eb54e96e-21b8-4f54-9cd4-80fccbd06f55',\n  audience: {\n    targetType: 'SEGMENT',\n    segments: ['string'],\n    query: '{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}'\n  },\n  schedule: {\n    enabled: true,\n    endDate: '2019-08-24T14:15:22Z',\n    endType: 'NEVER',\n    parts: [{startDay: 1, startTime: '08:18:03', endDay: 1, endTime: 44283}],\n    periodType: 'ENTIRE',\n    startDate: '2019-08-24T14:15:22Z',\n    startType: 'NOW',\n    timezone: 'Europe/Warsaw'\n  },\n  directoryId: '786c2ec1-fb9a-4593-b705-005b34c18c18'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/create');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"priority\":100,\"content\":{\"someBoolean\":true,\"someString\":\"Lorem ipsum\",\"aNestedDocument\":\"{% document exampleslug %}\"},\"slug\":\"basket\",\"schema\":\"containers\",\"groupId\":\"eb54e96e-21b8-4f54-9cd4-80fccbd06f55\",\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\\\"analysis\\\\\":{\\\\\"title\\\\\":\\\\\"Unnamed segmentation\\\\\",\\\\\"description\\\\\":\\\\\"\\\\\",\\\\\"unique\\\\\":true,\\\\\"segments\\\\\":[{\\\\\"title\\\\\":\\\\\"Segmentation A\\\\\",\\\\\"description\\\\\":\\\\\"\\\\\",\\\\\"filter\\\\\":{\\\\\"matching\\\\\":true,\\\\\"expressions\\\\\":[{\\\\\"_id\\\\\":\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\",\\\\\"name\\\\\":\\\\\"\\\\\",\\\\\"type\\\\\":\\\\\"FUNNEL\\\\\",\\\\\"matching\\\\\":true,\\\\\"funnel\\\\\":{\\\\\"_id\\\\\":\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\",\\\\\"title\\\\\":\\\\\"Unnamed\\\\\",\\\\\"completedWithin\\\\\":null,\\\\\"dateFilter\\\\\":{\\\\\"type\\\\\":\\\\\"RELATIVE\\\\\",\\\\\"offset\\\\\":{\\\\\"type\\\\\":\\\\\"DAYS\\\\\",\\\\\"value\\\\\":0},\\\\\"duration\\\\\":{\\\\\"type\\\\\":\\\\\"DAYS\\\\\",\\\\\"value\\\\\":30}},\\\\\"steps\\\\\":[{\\\\\"_id\\\\\":\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\",\\\\\"title\\\\\":\\\\\"\\\\\",\\\\\"action\\\\\":{\\\\\"id\\\\\":944,\\\\\"name\\\\\":\\\\\"page.visit\\\\\"},\\\\\"eventName\\\\\":\\\\\"page.visit\\\\\",\\\\\"expressions\\\\\":[]}],\\\\\"exact\\\\\":false}}]}}]}}\"},\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"},\"directoryId\":\"786c2ec1-fb9a-4593-b705-005b34c18c18\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/create\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"priority\\\":100,\\\"content\\\":{\\\"someBoolean\\\":true,\\\"someString\\\":\\\"Lorem ipsum\\\",\\\"aNestedDocument\\\":\\\"{% document exampleslug %}\\\"},\\\"slug\\\":\\\"basket\\\",\\\"schema\\\":\\\"containers\\\",\\\"groupId\\\":\\\"eb54e96e-21b8-4f54-9cd4-80fccbd06f55\\\",\\\"audience\\\":{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"string\\\"],\\\"query\\\":\\\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed segmentation\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"unique\\\\\\\":true,\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"Segmentation A\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"type\\\\\\\":\\\\\\\"FUNNEL\\\\\\\",\\\\\\\"matching\\\\\\\":true,\\\\\\\"funnel\\\\\\\":{\\\\\\\"_id\\\\\\\":\\\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed\\\\\\\",\\\\\\\"completedWithin\\\\\\\":null,\\\\\\\"dateFilter\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"RELATIVE\\\\\\\",\\\\\\\"offset\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":0},\\\\\\\"duration\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":30}},\\\\\\\"steps\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"action\\\\\\\":{\\\\\\\"id\\\\\\\":944,\\\\\\\"name\\\\\\\":\\\\\\\"page.visit\\\\\\\"},\\\\\\\"eventName\\\\\\\":\\\\\\\"page.visit\\\\\\\",\\\\\\\"expressions\\\\\\\":[]}],\\\\\\\"exact\\\\\\\":false}}]}}]}}\\\"},\\\"schedule\\\":{\\\"enabled\\\":true,\\\"endDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"endType\\\":\\\"NEVER\\\",\\\"parts\\\":[{\\\"startDay\\\":1,\\\"startTime\\\":\\\"08:18:03\\\",\\\"endDay\\\":1,\\\"endTime\\\":44283}],\\\"periodType\\\":\\\"ENTIRE\\\",\\\"startDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"startType\\\":\\\"NOW\\\",\\\"timezone\\\":\\\"Europe/Warsaw\\\"},\\\"directoryId\\\":\\\"786c2ec1-fb9a-4593-b705-005b34c18c18\\\"}\")\n  .asString();"}]}},"/schema-service/v2/documents/createNew":{"post":{"tags":["Documents"],"summary":"Initialize document","description":"Create a new document. It is created as a blank, without any conditions.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"initializeDocumentPost","security":[{"JWT":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-CreateRequest"}}}},"responses":{"200":{"description":"Document initialized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-DocumentMetadata"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/initializeDocumentPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/createNew \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"directory\":\"5277859d-f92c-478c-acab-7680a97fea68\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"directory\\\":\\\"5277859d-f92c-478c-acab-7680a97fea68\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/createNew\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"directory\": \"5277859d-f92c-478c-acab-7680a97fea68\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/createNew\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/createNew\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string', directory: '5277859d-f92c-478c-acab-7680a97fea68'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/createNew');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"directory\":\"5277859d-f92c-478c-acab-7680a97fea68\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/createNew\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"directory\\\":\\\"5277859d-f92c-478c-acab-7680a97fea68\\\"}\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}/audience":{"post":{"tags":["Documents"],"summary":"Add audience to document","description":"Define the audience for a document.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"createDocumentAudience","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Audience"}}}},"responses":{"200":{"description":"Audience defined","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/createDocumentAudience"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/audience \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"string\\\"],\\\"query\\\":\\\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed segmentation\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"unique\\\\\\\":true,\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"Segmentation A\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"type\\\\\\\":\\\\\\\"FUNNEL\\\\\\\",\\\\\\\"matching\\\\\\\":true,\\\\\\\"funnel\\\\\\\":{\\\\\\\"_id\\\\\\\":\\\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed\\\\\\\",\\\\\\\"completedWithin\\\\\\\":null,\\\\\\\"dateFilter\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"RELATIVE\\\\\\\",\\\\\\\"offset\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":0},\\\\\\\"duration\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":30}},\\\\\\\"steps\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"action\\\\\\\":{\\\\\\\"id\\\\\\\":944,\\\\\\\"name\\\\\\\":\\\\\\\"page.visit\\\\\\\"},\\\\\\\"eventName\\\\\\\":\\\\\\\"page.visit\\\\\\\",\\\\\\\"expressions\\\\\\\":[]}],\\\\\\\"exact\\\\\\\":false}}]}}]}}\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/%7BdocumentId%7D/audience\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"targetType\": \"SEGMENT\",\n  \"segments\": [\n    \"string\"\n  ],\n  \"query\": \"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/audience\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D/audience\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  targetType: 'SEGMENT',\n  segments: ['string'],\n  query: '{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/audience');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\\\"analysis\\\\\":{\\\\\"title\\\\\":\\\\\"Unnamed segmentation\\\\\",\\\\\"description\\\\\":\\\\\"\\\\\",\\\\\"unique\\\\\":true,\\\\\"segments\\\\\":[{\\\\\"title\\\\\":\\\\\"Segmentation A\\\\\",\\\\\"description\\\\\":\\\\\"\\\\\",\\\\\"filter\\\\\":{\\\\\"matching\\\\\":true,\\\\\"expressions\\\\\":[{\\\\\"_id\\\\\":\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\",\\\\\"name\\\\\":\\\\\"\\\\\",\\\\\"type\\\\\":\\\\\"FUNNEL\\\\\",\\\\\"matching\\\\\":true,\\\\\"funnel\\\\\":{\\\\\"_id\\\\\":\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\",\\\\\"title\\\\\":\\\\\"Unnamed\\\\\",\\\\\"completedWithin\\\\\":null,\\\\\"dateFilter\\\\\":{\\\\\"type\\\\\":\\\\\"RELATIVE\\\\\",\\\\\"offset\\\\\":{\\\\\"type\\\\\":\\\\\"DAYS\\\\\",\\\\\"value\\\\\":0},\\\\\"duration\\\\\":{\\\\\"type\\\\\":\\\\\"DAYS\\\\\",\\\\\"value\\\\\":30}},\\\\\"steps\\\\\":[{\\\\\"_id\\\\\":\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\",\\\\\"title\\\\\":\\\\\"\\\\\",\\\\\"action\\\\\":{\\\\\"id\\\\\":944,\\\\\"name\\\\\":\\\\\"page.visit\\\\\"},\\\\\"eventName\\\\\":\\\\\"page.visit\\\\\",\\\\\"expressions\\\\\":[]}],\\\\\"exact\\\\\":false}}]}}]}}\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/audience\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"string\\\"],\\\"query\\\":\\\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed segmentation\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"unique\\\\\\\":true,\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"Segmentation A\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"type\\\\\\\":\\\\\\\"FUNNEL\\\\\\\",\\\\\\\"matching\\\\\\\":true,\\\\\\\"funnel\\\\\\\":{\\\\\\\"_id\\\\\\\":\\\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed\\\\\\\",\\\\\\\"completedWithin\\\\\\\":null,\\\\\\\"dateFilter\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"RELATIVE\\\\\\\",\\\\\\\"offset\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":0},\\\\\\\"duration\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":30}},\\\\\\\"steps\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"action\\\\\\\":{\\\\\\\"id\\\\\\\":944,\\\\\\\"name\\\\\\\":\\\\\\\"page.visit\\\\\\\"},\\\\\\\"eventName\\\\\\\":\\\\\\\"page.visit\\\\\\\",\\\\\\\"expressions\\\\\\\":[]}],\\\\\\\"exact\\\\\\\":false}}]}}]}}\\\"}\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}/content":{"post":{"tags":["Documents"],"summary":"Add content to document","description":"Add content and configuration (priority, schema, and so on) to a document.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"createDocumentContent","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-DocumentContent"}}}},"responses":{"200":{"description":"Content added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/createDocumentContent"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/content \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"priority\":100,\"content\":{\"property1\":null,\"property2\":null},\"slug\":\"basket\",\"schema\":\"containers\",\"groupId\":\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"priority\\\":100,\\\"content\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"slug\\\":\\\"basket\\\",\\\"schema\\\":\\\"containers\\\",\\\"groupId\\\":\\\"43c97b25-4a10-45d0-99b7-d472eea2bb24\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/%7BdocumentId%7D/content\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"priority\": 100,\n  \"content\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"slug\": \"basket\",\n  \"schema\": \"containers\",\n  \"groupId\": \"43c97b25-4a10-45d0-99b7-d472eea2bb24\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/content\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D/content\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  priority: 100,\n  content: {property1: null, property2: null},\n  slug: 'basket',\n  schema: 'containers',\n  groupId: '43c97b25-4a10-45d0-99b7-d472eea2bb24'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/content');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"priority\":100,\"content\":{\"property1\":null,\"property2\":null},\"slug\":\"basket\",\"schema\":\"containers\",\"groupId\":\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/content\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"priority\\\":100,\\\"content\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"slug\\\":\\\"basket\\\",\\\"schema\\\":\\\"containers\\\",\\\"groupId\\\":\\\"43c97b25-4a10-45d0-99b7-d472eea2bb24\\\"}\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}/name":{"put":{"tags":["Documents"],"summary":"Rename document","description":"Rename a document.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"updateDocumentName","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"requestBody":{"content":{"application/json":{"schema":{"type":"string","description":"New name for the document"}}}},"responses":{"200":{"description":"Document renamed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/updateDocumentName"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/name \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '\"string\"'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"\\\"string\\\"\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/schema-service/v2/documents/%7BdocumentId%7D/name\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify(\"string\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/name\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D/name\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify('string'));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/name');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('\"string\"');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/name\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"\\\"string\\\"\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}/priority":{"put":{"tags":["Documents"],"summary":"Update priority in document","description":"Update priority in a document.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"updateDocumentPriority","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"requestBody":{"content":{"application/json":{"schema":{"type":"integer","format":"int32"}}}},"responses":{"200":{"description":"Priority changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/updateDocumentPriority"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/priority \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data 0"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"0\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/schema-service/v2/documents/%7BdocumentId%7D/priority\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify(0);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/priority\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D/priority\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/priority');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('0');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/priority\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"0\")\n  .asString();"}]}},"/schema-service/v2/documents/preview/by/{identifierType}":{"post":{"tags":["Documents"],"summary":"Preview document content for a profile","description":"Preview document content in context of a profile. Inserts are processed. If an insert can't be processed, the returned `content` is empty.\n\nThis method should not be used in production implementations, its purpose is to test the content. Use the \"generate document\" endpoints for implementation.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"previewDocumentByIdentifierPost","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathIdentifierType"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-PreviewDocumentByProfile"}}}},"responses":{"200":{"$ref":"#/components/responses/schema-service-processedDocumentJsonResponse"},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/previewDocumentByIdentifierPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/preview/by/%7BidentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\",\"content\":{\"someBoolean\":true,\"someString\":\"Lorem ipsum\",\"aNestedDocument\":\"{% document exampleslug %}\"},\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\",\\\"content\\\":{\\\"someBoolean\\\":true,\\\"someString\\\":\\\"Lorem ipsum\\\",\\\"aNestedDocument\\\":\\\"{% document exampleslug %}\\\"},\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/preview/by/%7BidentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\",\n  \"content\": {\n    \"someBoolean\": true,\n    \"someString\": \"Lorem ipsum\",\n    \"aNestedDocument\": \"{% document exampleslug %}\"\n  },\n  \"params\": {\n    \"property1\": \"string\",\n    \"property2\": \"string\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/preview/by/%7BidentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/preview/by/%7BidentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  identifierValue: 'string',\n  content: {\n    someBoolean: true,\n    someString: 'Lorem ipsum',\n    aNestedDocument: '{% document exampleslug %}'\n  },\n  params: {property1: 'string', property2: 'string'}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/preview/by/%7BidentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\",\"content\":{\"someBoolean\":true,\"someString\":\"Lorem ipsum\",\"aNestedDocument\":\"{% document exampleslug %}\"},\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/preview/by/%7BidentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\",\\\"content\\\":{\\\"someBoolean\\\":true,\\\"someString\\\":\\\"Lorem ipsum\\\",\\\"aNestedDocument\\\":\\\"{% document exampleslug %}\\\"},\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}}\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentIdentifier}/generate/by/{identifierType}":{"post":{"tags":["Documents"],"summary":"Generate document for a profile","description":"Generate a document in context of a profile. Inserts are processed. If an insert can't be processed, the returned `content` is empty.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"generateDocumentWithProfileContextPost","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentIdentifier"},{"$ref":"#/components/parameters/schema-service-pathIdentifierType"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-generateDocumentWithIdReq"}}}},"responses":{"200":{"$ref":"#/components/responses/schema-service-processedDocumentJsonResponse"},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/generateDocumentWithProfileContextPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentIdentifier%7D/generate/by/%7BidentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"identifierValue\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"identifierValue\\\":\\\"string\\\",\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/%7BdocumentIdentifier%7D/generate/by/%7BidentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"identifierValue\": \"string\",\n  \"params\": {\n    \"property1\": \"string\",\n    \"property2\": \"string\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentIdentifier%7D/generate/by/%7BidentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentIdentifier%7D/generate/by/%7BidentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({identifierValue: 'string', params: {property1: 'string', property2: 'string'}}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentIdentifier%7D/generate/by/%7BidentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"identifierValue\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentIdentifier%7D/generate/by/%7BidentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"identifierValue\\\":\\\"string\\\",\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}}\")\n  .asString();"}]}},"/schema-service/v2/documents/preview/grouped-by/groups/list":{"post":{"tags":["Documents"],"summary":"List grouped documents","description":"Retrieve a group or groups of documents with information about the documents in those groups and relations between them. The response is an array of arrays (groups) of objects (documents).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"previewListOfDocumentsGroupedByGroup","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-groupUuid"}}}}},"responses":{"200":{"description":"List of document groups","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-PreviewGroup"}}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/previewListOfDocumentsGroupedByGroup"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/preview/grouped-by/groups/list \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/preview/grouped-by/groups/list\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/preview/grouped-by/groups/list\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/preview/grouped-by/groups/list\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify(['497f6eca-6276-4993-bfeb-53cbbbba6f08']));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/preview/grouped-by/groups/list');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/preview/grouped-by/groups/list\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"]\")\n  .asString();"}]}},"/schema-service/v2/documents":{"get":{"tags":["Documents"],"summary":"List documents","description":"Returns a paginated list of documents.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-queryPage"},{"$ref":"#/components/parameters/schema-service-queryLimit"},{"$ref":"#/components/parameters/schema-service-querySearch"},{"$ref":"#/components/parameters/schema-service-queryDirectoryId"},{"$ref":"#/components/parameters/schema-service-queryGroupId"},{"$ref":"#/components/parameters/schema-service-queryStatus"},{"$ref":"#/components/parameters/schema-service-querySchema"}],"responses":{"200":{"description":"List of documents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-DocumentsListResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"operationId":"documents-list","x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/documents-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/schema-service/v2/documents?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&groupId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&schema=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/documents?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&groupId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&schema=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/documents?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&groupId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&schema=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&groupId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&schema=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_NUMBER_VALUE',\n  'limit' => 'SOME_NUMBER_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'directoryId' => 'SOME_STRING_VALUE',\n  'groupId' => 'SOME_STRING_VALUE',\n  'status' => 'SOME_STRING_VALUE',\n  'schema' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/documents?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&groupId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&schema=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/preview/list":{"post":{"tags":["Documents"],"summary":"List documents from groups","description":"Retrieve a list of documents from a group or groups. The response includes information about relations between documents. The response is an array of objects (documents) without sorting them by group.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"previewListOfDocumentsByGroup","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-groupUuid"}}}}},"responses":{"200":{"description":"List of documents from the requested groups, without sorting into groups","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-DocumentPreviewGroup"}}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/previewListOfDocumentsByGroup"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/preview/list \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/preview/list\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  \"497f6eca-6276-4993-bfeb-53cbbbba6f08\"\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/preview/list\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/preview/list\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify(['497f6eca-6276-4993-bfeb-53cbbbba6f08']));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/preview/list');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/preview/list\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[\\\"497f6eca-6276-4993-bfeb-53cbbbba6f08\\\"]\")\n  .asString();"}]}},"/schema-service/v2/documents/{slug}":{"get":{"tags":["Documents"],"summary":"Get document by slug","description":"Retrieve a document and its metadata. The content isn't processed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"get-document-by-slug","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentSlug"}],"responses":{"200":{"$ref":"#/components/responses/schema-service-rawDocumentJsonResponse"},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/get-document-by-slug"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/documents/%7Bslug%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7Bslug%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/documents/%7Bslug%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/by/slug/{slug}/predecessors":{"get":{"tags":["Documents"],"summary":"Get predecessors for document","description":"Retrieve information about documents or screen views that refer **to** the requested document.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentSlug"}],"responses":{"200":{"description":"Documents which refer to the requested document","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-GraphObject"}}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"operationId":"document-predecessors-by-slug-get","x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/document-predecessors-by-slug-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/documents/by/slug/%7Bslug%7D/predecessors \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/documents/by/slug/%7Bslug%7D/predecessors\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/documents/by/slug/%7Bslug%7D/predecessors\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/by/slug/%7Bslug%7D/predecessors\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/by/slug/%7Bslug%7D/predecessors');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/documents/by/slug/%7Bslug%7D/predecessors\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}/predecessors":{"get":{"tags":["Documents"],"summary":"Get predecessors for document","description":"Retrieve information about documents or screen views that refer **to** the requested document.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"responses":{"200":{"description":"Documents which refer to the requested document","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-GraphObject"}}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"operationId":"document-predecessors-get","x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/document-predecessors-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/predecessors \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/documents/%7BdocumentId%7D/predecessors\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/predecessors\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D/predecessors\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/predecessors');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/predecessors\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/by/slug/{slug}/successors":{"get":{"tags":["Documents"],"summary":"Get successors for document","description":"Retrieve information about documents referenced **from** the requested document.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentSlug"}],"responses":{"200":{"description":"Documents referenced from the requested document","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-GraphObject"}}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"operationId":"document-successors-by-slug-get","x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/document-successors-by-slug-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/documents/by/slug/%7Bslug%7D/successors \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/documents/by/slug/%7Bslug%7D/successors\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/documents/by/slug/%7Bslug%7D/successors\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/by/slug/%7Bslug%7D/successors\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/by/slug/%7Bslug%7D/successors');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/documents/by/slug/%7Bslug%7D/successors\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}/successors":{"get":{"tags":["Documents"],"summary":"Get successors for document","description":"Retrieve information about documents referenced **from** the requested document.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"responses":{"200":{"description":"Documents referenced from the requested document","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-GraphObject"}}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"operationId":"document-successors-get","x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/document-successors-get"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/successors \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/documents/%7BdocumentId%7D/successors\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/successors\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D/successors\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/successors');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/successors\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}":{"post":{"tags":["Documents"],"summary":"Update document","description":"Update a document.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"updateDocumentPost","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-UpdateDocumentRequest"}}}},"responses":{"200":{"description":"Updated document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Document"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/updateDocumentPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"priority\":100,\"content\":{\"someBoolean\":true,\"someString\":\"Lorem ipsum\",\"aNestedDocument\":\"{% document exampleslug %}\"},\"schema\":\"containers\",\"groupId\":\"43c97b25-4a10-45d0-99b7-d472eea2bb24\",\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"},\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"},\"directoryId\":\"786c2ec1-fb9a-4593-b705-005b34c18c18\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"priority\\\":100,\\\"content\\\":{\\\"someBoolean\\\":true,\\\"someString\\\":\\\"Lorem ipsum\\\",\\\"aNestedDocument\\\":\\\"{% document exampleslug %}\\\"},\\\"schema\\\":\\\"containers\\\",\\\"groupId\\\":\\\"43c97b25-4a10-45d0-99b7-d472eea2bb24\\\",\\\"audience\\\":{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"string\\\"],\\\"query\\\":\\\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed segmentation\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"unique\\\\\\\":true,\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"Segmentation A\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"type\\\\\\\":\\\\\\\"FUNNEL\\\\\\\",\\\\\\\"matching\\\\\\\":true,\\\\\\\"funnel\\\\\\\":{\\\\\\\"_id\\\\\\\":\\\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed\\\\\\\",\\\\\\\"completedWithin\\\\\\\":null,\\\\\\\"dateFilter\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"RELATIVE\\\\\\\",\\\\\\\"offset\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":0},\\\\\\\"duration\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":30}},\\\\\\\"steps\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"action\\\\\\\":{\\\\\\\"id\\\\\\\":944,\\\\\\\"name\\\\\\\":\\\\\\\"page.visit\\\\\\\"},\\\\\\\"eventName\\\\\\\":\\\\\\\"page.visit\\\\\\\",\\\\\\\"expressions\\\\\\\":[]}],\\\\\\\"exact\\\\\\\":false}}]}}]}}\\\"},\\\"schedule\\\":{\\\"enabled\\\":true,\\\"endDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"endType\\\":\\\"NEVER\\\",\\\"parts\\\":[{\\\"startDay\\\":1,\\\"startTime\\\":\\\"08:18:03\\\",\\\"endDay\\\":1,\\\"endTime\\\":44283}],\\\"periodType\\\":\\\"ENTIRE\\\",\\\"startDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"startType\\\":\\\"NOW\\\",\\\"timezone\\\":\\\"Europe/Warsaw\\\"},\\\"directoryId\\\":\\\"786c2ec1-fb9a-4593-b705-005b34c18c18\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/%7BdocumentId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"priority\": 100,\n  \"content\": {\n    \"someBoolean\": true,\n    \"someString\": \"Lorem ipsum\",\n    \"aNestedDocument\": \"{% document exampleslug %}\"\n  },\n  \"schema\": \"containers\",\n  \"groupId\": \"43c97b25-4a10-45d0-99b7-d472eea2bb24\",\n  \"audience\": {\n    \"targetType\": \"SEGMENT\",\n    \"segments\": [\n      \"string\"\n    ],\n    \"query\": \"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"\n  },\n  \"schedule\": {\n    \"enabled\": true,\n    \"endDate\": \"2019-08-24T14:15:22Z\",\n    \"endType\": \"NEVER\",\n    \"parts\": [\n      {\n        \"startDay\": 1,\n        \"startTime\": \"08:18:03\",\n        \"endDay\": 1,\n        \"endTime\": 44283\n      }\n    ],\n    \"periodType\": \"ENTIRE\",\n    \"startDate\": \"2019-08-24T14:15:22Z\",\n    \"startType\": \"NOW\",\n    \"timezone\": \"Europe/Warsaw\"\n  },\n  \"directoryId\": \"786c2ec1-fb9a-4593-b705-005b34c18c18\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  name: 'string',\n  priority: 100,\n  content: {\n    someBoolean: true,\n    someString: 'Lorem ipsum',\n    aNestedDocument: '{% document exampleslug %}'\n  },\n  schema: 'containers',\n  groupId: '43c97b25-4a10-45d0-99b7-d472eea2bb24',\n  audience: {\n    targetType: 'SEGMENT',\n    segments: ['string'],\n    query: '{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}'\n  },\n  schedule: {\n    enabled: true,\n    endDate: '2019-08-24T14:15:22Z',\n    endType: 'NEVER',\n    parts: [{startDay: 1, startTime: '08:18:03', endDay: 1, endTime: 44283}],\n    periodType: 'ENTIRE',\n    startDate: '2019-08-24T14:15:22Z',\n    startType: 'NOW',\n    timezone: 'Europe/Warsaw'\n  },\n  directoryId: '786c2ec1-fb9a-4593-b705-005b34c18c18'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"priority\":100,\"content\":{\"someBoolean\":true,\"someString\":\"Lorem ipsum\",\"aNestedDocument\":\"{% document exampleslug %}\"},\"schema\":\"containers\",\"groupId\":\"43c97b25-4a10-45d0-99b7-d472eea2bb24\",\"audience\":{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\\\"analysis\\\\\":{\\\\\"title\\\\\":\\\\\"Unnamed segmentation\\\\\",\\\\\"description\\\\\":\\\\\"\\\\\",\\\\\"unique\\\\\":true,\\\\\"segments\\\\\":[{\\\\\"title\\\\\":\\\\\"Segmentation A\\\\\",\\\\\"description\\\\\":\\\\\"\\\\\",\\\\\"filter\\\\\":{\\\\\"matching\\\\\":true,\\\\\"expressions\\\\\":[{\\\\\"_id\\\\\":\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\",\\\\\"name\\\\\":\\\\\"\\\\\",\\\\\"type\\\\\":\\\\\"FUNNEL\\\\\",\\\\\"matching\\\\\":true,\\\\\"funnel\\\\\":{\\\\\"_id\\\\\":\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\",\\\\\"title\\\\\":\\\\\"Unnamed\\\\\",\\\\\"completedWithin\\\\\":null,\\\\\"dateFilter\\\\\":{\\\\\"type\\\\\":\\\\\"RELATIVE\\\\\",\\\\\"offset\\\\\":{\\\\\"type\\\\\":\\\\\"DAYS\\\\\",\\\\\"value\\\\\":0},\\\\\"duration\\\\\":{\\\\\"type\\\\\":\\\\\"DAYS\\\\\",\\\\\"value\\\\\":30}},\\\\\"steps\\\\\":[{\\\\\"_id\\\\\":\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\",\\\\\"title\\\\\":\\\\\"\\\\\",\\\\\"action\\\\\":{\\\\\"id\\\\\":944,\\\\\"name\\\\\":\\\\\"page.visit\\\\\"},\\\\\"eventName\\\\\":\\\\\"page.visit\\\\\",\\\\\"expressions\\\\\":[]}],\\\\\"exact\\\\\":false}}]}}]}}\"},\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"},\"directoryId\":\"786c2ec1-fb9a-4593-b705-005b34c18c18\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"priority\\\":100,\\\"content\\\":{\\\"someBoolean\\\":true,\\\"someString\\\":\\\"Lorem ipsum\\\",\\\"aNestedDocument\\\":\\\"{% document exampleslug %}\\\"},\\\"schema\\\":\\\"containers\\\",\\\"groupId\\\":\\\"43c97b25-4a10-45d0-99b7-d472eea2bb24\\\",\\\"audience\\\":{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"string\\\"],\\\"query\\\":\\\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed segmentation\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"unique\\\\\\\":true,\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"Segmentation A\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"type\\\\\\\":\\\\\\\"FUNNEL\\\\\\\",\\\\\\\"matching\\\\\\\":true,\\\\\\\"funnel\\\\\\\":{\\\\\\\"_id\\\\\\\":\\\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed\\\\\\\",\\\\\\\"completedWithin\\\\\\\":null,\\\\\\\"dateFilter\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"RELATIVE\\\\\\\",\\\\\\\"offset\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":0},\\\\\\\"duration\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":30}},\\\\\\\"steps\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"action\\\\\\\":{\\\\\\\"id\\\\\\\":944,\\\\\\\"name\\\\\\\":\\\\\\\"page.visit\\\\\\\"},\\\\\\\"eventName\\\\\\\":\\\\\\\"page.visit\\\\\\\",\\\\\\\"expressions\\\\\\\":[]}],\\\\\\\"exact\\\\\\\":false}}]}}]}}\\\"},\\\"schedule\\\":{\\\"enabled\\\":true,\\\"endDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"endType\\\":\\\"NEVER\\\",\\\"parts\\\":[{\\\"startDay\\\":1,\\\"startTime\\\":\\\"08:18:03\\\",\\\"endDay\\\":1,\\\"endTime\\\":44283}],\\\"periodType\\\":\\\"ENTIRE\\\",\\\"startDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"startType\\\":\\\"NOW\\\",\\\"timezone\\\":\\\"Europe/Warsaw\\\"},\\\"directoryId\\\":\\\"786c2ec1-fb9a-4593-b705-005b34c18c18\\\"}\")\n  .asString();"}]},"get":{"tags":["Documents"],"summary":"Get document by UUID","description":"Retrieve a document and its metadata. The content isn't processed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"get-document","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"responses":{"200":{"$ref":"#/components/responses/schema-service-rawDocumentJsonResponse"},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/get-document"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/documents/%7BdocumentId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"delete":{"tags":["Documents"],"summary":"Delete document","description":"Delete a document. This operation is irreversible.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"delete-document","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/delete-document"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/schema-service/v2/documents/%7BdocumentId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}/copy":{"post":{"tags":["Documents"],"summary":"Copy document","description":"Copy a document.The copy receives the DRAFT status, regardless of the status of the original document.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"copy-document","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"responses":{"200":{"description":"Data of the created copy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-DocumentMetadata"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/copy-document"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/copy \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/%7BdocumentId%7D/copy\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/copy\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D/copy\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/copy');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/copy\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/scheduler/entry":{"post":{"tags":["Screen views"],"summary":"Schedule object","description":"Add a schedule to a document or screen view.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"schedule-object","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-SchedulerRequest"}}}},"responses":{"200":{"description":"Schedule added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-SchedulerResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/schedule-object"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/scheduler/entry \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"externalId\":\"3200d382-adfe-4314-ab30-798cdd0fcdb5\",\"type\":\"SCREENVIEW\",\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"externalId\\\":\\\"3200d382-adfe-4314-ab30-798cdd0fcdb5\\\",\\\"type\\\":\\\"SCREENVIEW\\\",\\\"schedule\\\":{\\\"enabled\\\":true,\\\"endDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"endType\\\":\\\"NEVER\\\",\\\"parts\\\":[{\\\"startDay\\\":1,\\\"startTime\\\":\\\"08:18:03\\\",\\\"endDay\\\":1,\\\"endTime\\\":44283}],\\\"periodType\\\":\\\"ENTIRE\\\",\\\"startDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"startType\\\":\\\"NOW\\\",\\\"timezone\\\":\\\"Europe/Warsaw\\\"}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/scheduler/entry\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"externalId\": \"3200d382-adfe-4314-ab30-798cdd0fcdb5\",\n  \"type\": \"SCREENVIEW\",\n  \"schedule\": {\n    \"enabled\": true,\n    \"endDate\": \"2019-08-24T14:15:22Z\",\n    \"endType\": \"NEVER\",\n    \"parts\": [\n      {\n        \"startDay\": 1,\n        \"startTime\": \"08:18:03\",\n        \"endDay\": 1,\n        \"endTime\": 44283\n      }\n    ],\n    \"periodType\": \"ENTIRE\",\n    \"startDate\": \"2019-08-24T14:15:22Z\",\n    \"startType\": \"NOW\",\n    \"timezone\": \"Europe/Warsaw\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/scheduler/entry\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/scheduler/entry\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  externalId: '3200d382-adfe-4314-ab30-798cdd0fcdb5',\n  type: 'SCREENVIEW',\n  schedule: {\n    enabled: true,\n    endDate: '2019-08-24T14:15:22Z',\n    endType: 'NEVER',\n    parts: [{startDay: 1, startTime: '08:18:03', endDay: 1, endTime: 44283}],\n    periodType: 'ENTIRE',\n    startDate: '2019-08-24T14:15:22Z',\n    startType: 'NOW',\n    timezone: 'Europe/Warsaw'\n  }\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/scheduler/entry');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"externalId\":\"3200d382-adfe-4314-ab30-798cdd0fcdb5\",\"type\":\"SCREENVIEW\",\"schedule\":{\"enabled\":true,\"endDate\":\"2019-08-24T14:15:22Z\",\"endType\":\"NEVER\",\"parts\":[{\"startDay\":1,\"startTime\":\"08:18:03\",\"endDay\":1,\"endTime\":44283}],\"periodType\":\"ENTIRE\",\"startDate\":\"2019-08-24T14:15:22Z\",\"startType\":\"NOW\",\"timezone\":\"Europe/Warsaw\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/scheduler/entry\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"externalId\\\":\\\"3200d382-adfe-4314-ab30-798cdd0fcdb5\\\",\\\"type\\\":\\\"SCREENVIEW\\\",\\\"schedule\\\":{\\\"enabled\\\":true,\\\"endDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"endType\\\":\\\"NEVER\\\",\\\"parts\\\":[{\\\"startDay\\\":1,\\\"startTime\\\":\\\"08:18:03\\\",\\\"endDay\\\":1,\\\"endTime\\\":44283}],\\\"periodType\\\":\\\"ENTIRE\\\",\\\"startDate\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"startType\\\":\\\"NOW\\\",\\\"timezone\\\":\\\"Europe/Warsaw\\\"}}\")\n  .asString();"}]}},"/schema-service/scheduler/entry/{objectType}/{objectId}":{"get":{"tags":["Screen views"],"summary":"Get schedule the schedule of an object","description":"Get schedule object.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"getschedule-object","security":[{"JWT":[]}],"parameters":[{"name":"objectId","in":"path","required":true,"description":"Screen view or document ID","schema":{"type":"string","format":"uuid"}},{"name":"objectType","in":"path","required":true,"description":"Object type","schema":{"type":"string","description":"Type of the scheduled object","enum":["SCREENVIEW","DOCUMENT"]}}],"responses":{"200":{"description":"Schedule details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-SchedulerResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"description":"Object has no schedule; or an exception occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-ErrorSchemaService"}}}}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/getschedule-object"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}/status/finish":{"post":{"tags":["Screen views"],"summary":"Finish screen view","description":"Finish a screen view. A finished document is no longer displayed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"finish-screen-view","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/finish-screen-view"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}/status/resume":{"post":{"tags":["Screen views"],"summary":"Resume screen view","description":"Resume a screen view that was paused.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"resume-screen-view","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/resume-screen-view"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}/status/activate":{"post":{"tags":["Screen views"],"summary":"Activate screen view","description":"Activate a screen view. It can be displayed to customers.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"activate-screen-view","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/activate-screen-view"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screen-views/{screenViewId}/status/pause":{"post":{"tags":["Screen views"],"summary":"Pause screen view","description":"Pause a screen view. Until resumed, it can't be displayed to customers.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"pause-screen-view","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views/operation/pause-screen-view"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}/directory/{directoryId}/attach":{"post":{"tags":["Documents"],"summary":"Assign document to directory","description":"Assign a document to a directory. A document can only belong to one directory and using this endpoint overwrites the current assignment.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"attach-document-to-directory","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"},{"$ref":"#/components/parameters/schema-service-pathDirectoryId"}],"responses":{"200":{"description":"Document assigned to directory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-DocumentMetadata"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/attach-document-to-directory"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/directory/%7BdirectoryId%7D/attach \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/%7BdocumentId%7D/directory/%7BdirectoryId%7D/attach\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/directory/%7BdirectoryId%7D/attach\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D/directory/%7BdirectoryId%7D/attach\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/directory/%7BdirectoryId%7D/attach');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/directory/%7BdirectoryId%7D/attach\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/directory/{directoryId}":{"post":{"tags":["Documents"],"summary":"Rename document directory","description":"Update a document directory name.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"documents-update-name-directory","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDirectoryId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-RenameDirectory"}}}},"responses":{"200":{"description":"Directory renamed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Directory"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/documents-update-name-directory"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/directory/%7BdirectoryId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/directory/%7BdirectoryId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/directory/%7BdirectoryId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/directory/%7BdirectoryId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/directory/%7BdirectoryId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/directory/%7BdirectoryId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\"}\")\n  .asString();"}]},"delete":{"tags":["Documents"],"summary":"Delete document directory","description":"Delete a directory. The contents are moved into the default directory.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"documents-delete-directory","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDirectoryId"}],"responses":{"200":{"description":"Directory deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Directory"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/documents-delete-directory"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/schema-service/v2/documents/directory/%7BdirectoryId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/schema-service/v2/documents/directory/%7BdirectoryId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/schema-service/v2/documents/directory/%7BdirectoryId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/directory/%7BdirectoryId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/directory/%7BdirectoryId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/schema-service/v2/documents/directory/%7BdirectoryId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/directory":{"get":{"tags":["Documents"],"summary":"List document directories","description":"Returns a list of directories.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","security":[{"JWT":[]}],"responses":{"200":{"description":"List of directories","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-Directory"}}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"operationId":"documents-directory-list","x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/documents-directory-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/documents/directory \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/documents/directory\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/documents/directory\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/directory\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/directory');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/documents/directory\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Documents"],"summary":"Add document directory","operationId":"documents-add-directory","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-NewDirectory"}}}},"responses":{"200":{"description":"Directory created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Directory"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/documents-add-directory"],"description":"\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/directory \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/directory\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/directory\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/directory\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/directory');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/directory\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/schema-service/v2/groups/{groupId}":{"delete":{"tags":["Documents"],"summary":"Delete document group","description":"Delete a document group. The documents that were in this group are no longer assigned to any group.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_DELETE`\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"deleteGroup","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathGroupId"}],"responses":{"200":{"description":"Success, details of the deleted group are returned in the response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Group"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/deleteGroup"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/schema-service/v2/groups/%7BgroupId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/schema-service/v2/groups/%7BgroupId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/schema-service/v2/groups/%7BgroupId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/groups/%7BgroupId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/groups/%7BgroupId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/schema-service/v2/groups/%7BgroupId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/groups":{"post":{"tags":["Documents"],"summary":"Add group","description":"Create a new document group.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"addGroup","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"title":"add group","type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the group"}}}}}},"responses":{"200":{"description":"Created group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Group"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/addGroup"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/groups \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/v2/groups\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/groups\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/groups\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/groups');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/groups\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\"}\")\n  .asString();"}]},"get":{"tags":["Documents"],"summary":"List groups","description":"Returns a list of groups.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","security":[{"JWT":[]}],"responses":{"200":{"description":"List of groups","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-Group"}}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"operationId":"groups-list","x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/groups-list"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/groups \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/groups\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/groups\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/groups\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/groups');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/groups\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}/status/finish":{"post":{"tags":["Documents"],"summary":"Finish document","description":"Finish a document.\n\nFinished documents are no longer displayed to recipients.\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"finishDocument","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/finishDocument"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/finish \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/%7BdocumentId%7D/status/finish\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/finish\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D/status/finish\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/finish');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/finish\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}/status/activate":{"post":{"tags":["Documents"],"summary":"Activate document","description":"Activate a document. It can now be displayed to recipients.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"activateDocument","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/activateDocument"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/activate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/%7BdocumentId%7D/status/activate\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/activate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D/status/activate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/activate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/activate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}/status/resume":{"post":{"tags":["Documents"],"summary":"Resume document","description":"Resume a document that was paused.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"resumeDocument","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/resumeDocument"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/resume \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/%7BdocumentId%7D/status/resume\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/resume\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D/status/resume\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/resume');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/resume\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/documents/{documentId}/status/pause":{"post":{"tags":["Documents"],"summary":"Pause document","description":"Pause a document to temporarily stop displaying it to recipients\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"pauseDocument","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentUuid"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/pauseDocument"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/pause \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/v2/documents/%7BdocumentId%7D/status/pause\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/pause\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/documents/%7BdocumentId%7D/status/pause\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/pause');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/v2/documents/%7BdocumentId%7D/status/pause\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/screenViews":{"get":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Get all screen views","description":"Retrieve a paginated list of all screen view campaigns in the workspace.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"listOfScreenViews","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-QueryLimitRequired"},{"$ref":"#/components/parameters/schema-service-QueryPageRequired"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["DRAFT","ACTIVE","SCHEDULED","PAUSED","FINISHED"]},"description":"Filter the results by screen view status"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-paginatedScreenViews"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/listOfScreenViews"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'limit' => 'SOME_STRING_VALUE',\n  'page' => 'SOME_INTEGER_VALUE',\n  'status' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/screenViews/byKeys":{"post":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Get screen views by keys","description":"Retrieve list of screen view campaigns by keys in the workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: read`\n","operationId":"listOfScreenViewsByKeys","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"title":"get screenviews by keys","type":"array","items":{"type":"string"}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-paginatedScreenViews"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/listOfScreenViewsByKeys"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/screenViews/byKeys \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[\"string\"]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[\\\"string\\\"]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/screenViews/byKeys\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  \"string\"\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/screenViews/byKeys\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/byKeys\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify(['string']));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/byKeys');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[\"string\"]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/screenViews/byKeys\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[\\\"string\\\"]\")\n  .asString();"}]}},"/schema-service/screenViews/single/{screenViewId}/{screenViewVersion}":{"get":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Get screen view","description":"Retrieve the details of a single screen view campaign.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"getScreenViewByVersion","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"},{"$ref":"#/components/parameters/schema-service-pathScreenViewVersion"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-screenViewLegacy"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/getScreenViewByVersion"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/screenViews/versions/{screenViewId}":{"get":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Get screen view versions","description":"Retrieve all versions of a screen view campaign.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"listOfScreenViewVersions","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"},{"$ref":"#/components/parameters/schema-service-QueryLimitRequired"},{"$ref":"#/components/parameters/schema-service-QueryPageRequired"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-versionsOfScreenView"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/listOfScreenViewVersions"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'limit' => 'SOME_STRING_VALUE',\n  'page' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/screenViews/generate":{"get":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Generate screen view","description":"When this method is called, the Synerise backend finds all screen view campaigns applicable to the profile and returns the screen view with the highest priority (1).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"generateScreenViewGet","security":[{"JWT":[]}],"responses":{"200":{"description":"Processed JSON content","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/generateScreenViewGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/screenViews/generate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/screenViews/generate\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/screenViews/generate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/generate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/generate');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/screenViews/generate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/v2/screenViews/generate":{"get":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Generate screen view","description":"When this method is called, the Synerise backend finds all screen view campaigns applicable to the profile and returns the screen view with the highest priority (1).\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**API key permission required:** `SCHEMA_SERVICE_SCHEMA_CREATE`\n\n**User role permission required:** `assets_docs: create`\n","operationId":"generateScreenViewWithAdditionalDataGet","security":[{"JWT":[]}],"responses":{"200":{"description":"Processed JSON content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-GenerateScreenViewResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/generateScreenViewWithAdditionalDataGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/screenViews/generate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/screenViews/generate\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/screenViews/generate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/screenViews/generate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/screenViews/generate');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/screenViews/generate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/screenViews/createNew":{"post":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Initialize screen view","description":"Create a new screen view campaign. It is created as a blank, without any conditions.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: create`\n","operationId":"initializeScreenViewPost","security":[{"JWT":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-screenViewMetadata"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/initializeScreenViewPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/screenViews/createNew \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/screenViews/createNew\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/screenViews/createNew\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/createNew\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/createNew');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/screenViews/createNew\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/screenViews/content/{screenViewId}/{screenViewVersion}/copyFromExistingScreenView":{"post":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Copy content","description":"Copy content to a screen view draft from another screen view.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: create`\n","operationId":"copyContent","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"},{"$ref":"#/components/parameters/schema-service-pathScreenViewVersion"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-versionedScreenViewKey"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/copyContent"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"screenViewId\\\":\\\"481855c5-f86e-453f-a0fa-d34b5a2be745\\\",\\\"screenViewVersion\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"screenViewId\": \"481855c5-f86e-453f-a0fa-d34b5a2be745\",\n  \"screenViewVersion\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  screenViewId: '481855c5-f86e-453f-a0fa-d34b5a2be745',\n  screenViewVersion: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"screenViewId\\\":\\\"481855c5-f86e-453f-a0fa-d34b5a2be745\\\",\\\"screenViewVersion\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/schema-service/screenViews/content/{screenViewId}/{screenViewVersion}":{"post":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Add content","description":"Add content to a screen view draft.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: create`\n","operationId":"createContent","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"},{"$ref":"#/components/parameters/schema-service-pathScreenViewVersion"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-ScreenViewContent"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/createContent"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"json\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"documents\\\":[\\\"string\\\"],\\\"data\\\":[{\\\"slug\\\":\\\"basket\\\"}],\\\"groups\\\":[\\\"43c97b25-4a10-45d0-99b7-d472eea2bb24\\\"],\\\"groupsOrder\\\":false}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"json\": {\n    \"property1\": null,\n    \"property2\": null\n  },\n  \"documents\": [\n    \"string\"\n  ],\n  \"data\": [\n    {\n      \"slug\": \"basket\"\n    }\n  ],\n  \"groups\": [\n    \"43c97b25-4a10-45d0-99b7-d472eea2bb24\"\n  ],\n  \"groupsOrder\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  json: {property1: null, property2: null},\n  documents: ['string'],\n  data: [{slug: 'basket'}],\n  groups: ['43c97b25-4a10-45d0-99b7-d472eea2bb24'],\n  groupsOrder: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"json\":{\"property1\":null,\"property2\":null},\"documents\":[\"string\"],\"data\":[{\"slug\":\"basket\"}],\"groups\":[\"43c97b25-4a10-45d0-99b7-d472eea2bb24\"],\"groupsOrder\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"json\\\":{\\\"property1\\\":null,\\\"property2\\\":null},\\\"documents\\\":[\\\"string\\\"],\\\"data\\\":[{\\\"slug\\\":\\\"basket\\\"}],\\\"groups\\\":[\\\"43c97b25-4a10-45d0-99b7-d472eea2bb24\\\"],\\\"groupsOrder\\\":false}\")\n  .asString();"}]}},"/schema-service/screenViews/audience/{screenViewId}/{screenViewVersion}":{"post":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Add audience","description":"Define the audience for a screen view draft.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: create`\n","operationId":"createAudience","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"},{"$ref":"#/components/parameters/schema-service-pathScreenViewVersion"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Audience"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/createAudience"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"string\\\"],\\\"query\\\":\\\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed segmentation\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"unique\\\\\\\":true,\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"Segmentation A\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"type\\\\\\\":\\\\\\\"FUNNEL\\\\\\\",\\\\\\\"matching\\\\\\\":true,\\\\\\\"funnel\\\\\\\":{\\\\\\\"_id\\\\\\\":\\\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed\\\\\\\",\\\\\\\"completedWithin\\\\\\\":null,\\\\\\\"dateFilter\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"RELATIVE\\\\\\\",\\\\\\\"offset\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":0},\\\\\\\"duration\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":30}},\\\\\\\"steps\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"action\\\\\\\":{\\\\\\\"id\\\\\\\":944,\\\\\\\"name\\\\\\\":\\\\\\\"page.visit\\\\\\\"},\\\\\\\"eventName\\\\\\\":\\\\\\\"page.visit\\\\\\\",\\\\\\\"expressions\\\\\\\":[]}],\\\\\\\"exact\\\\\\\":false}}]}}]}}\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"targetType\": \"SEGMENT\",\n  \"segments\": [\n    \"string\"\n  ],\n  \"query\": \"{\\\"analysis\\\":{\\\"title\\\":\\\"Unnamed segmentation\\\",\\\"description\\\":\\\"\\\",\\\"unique\\\":true,\\\"segments\\\":[{\\\"title\\\":\\\"Segmentation A\\\",\\\"description\\\":\\\"\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"_id\\\":\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"FUNNEL\\\",\\\"matching\\\":true,\\\"funnel\\\":{\\\"_id\\\":\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\",\\\"title\\\":\\\"Unnamed\\\",\\\"completedWithin\\\":null,\\\"dateFilter\\\":{\\\"type\\\":\\\"RELATIVE\\\",\\\"offset\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":0},\\\"duration\\\":{\\\"type\\\":\\\"DAYS\\\",\\\"value\\\":30}},\\\"steps\\\":[{\\\"_id\\\":\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\",\\\"title\\\":\\\"\\\",\\\"action\\\":{\\\"id\\\":944,\\\"name\\\":\\\"page.visit\\\"},\\\"eventName\\\":\\\"page.visit\\\",\\\"expressions\\\":[]}],\\\"exact\\\":false}}]}}]}}\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  targetType: 'SEGMENT',\n  segments: ['string'],\n  query: '{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"targetType\":\"SEGMENT\",\"segments\":[\"string\"],\"query\":\"{\\\\\"analysis\\\\\":{\\\\\"title\\\\\":\\\\\"Unnamed segmentation\\\\\",\\\\\"description\\\\\":\\\\\"\\\\\",\\\\\"unique\\\\\":true,\\\\\"segments\\\\\":[{\\\\\"title\\\\\":\\\\\"Segmentation A\\\\\",\\\\\"description\\\\\":\\\\\"\\\\\",\\\\\"filter\\\\\":{\\\\\"matching\\\\\":true,\\\\\"expressions\\\\\":[{\\\\\"_id\\\\\":\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\",\\\\\"name\\\\\":\\\\\"\\\\\",\\\\\"type\\\\\":\\\\\"FUNNEL\\\\\",\\\\\"matching\\\\\":true,\\\\\"funnel\\\\\":{\\\\\"_id\\\\\":\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\",\\\\\"title\\\\\":\\\\\"Unnamed\\\\\",\\\\\"completedWithin\\\\\":null,\\\\\"dateFilter\\\\\":{\\\\\"type\\\\\":\\\\\"RELATIVE\\\\\",\\\\\"offset\\\\\":{\\\\\"type\\\\\":\\\\\"DAYS\\\\\",\\\\\"value\\\\\":0},\\\\\"duration\\\\\":{\\\\\"type\\\\\":\\\\\"DAYS\\\\\",\\\\\"value\\\\\":30}},\\\\\"steps\\\\\":[{\\\\\"_id\\\\\":\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\",\\\\\"title\\\\\":\\\\\"\\\\\",\\\\\"action\\\\\":{\\\\\"id\\\\\":944,\\\\\"name\\\\\":\\\\\"page.visit\\\\\"},\\\\\"eventName\\\\\":\\\\\"page.visit\\\\\",\\\\\"expressions\\\\\":[]}],\\\\\"exact\\\\\":false}}]}}]}}\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"targetType\\\":\\\"SEGMENT\\\",\\\"segments\\\":[\\\"string\\\"],\\\"query\\\":\\\"{\\\\\\\"analysis\\\\\\\":{\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed segmentation\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"unique\\\\\\\":true,\\\\\\\"segments\\\\\\\":[{\\\\\\\"title\\\\\\\":\\\\\\\"Segmentation A\\\\\\\",\\\\\\\"description\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"filter\\\\\\\":{\\\\\\\"matching\\\\\\\":true,\\\\\\\"expressions\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\\\\\\\",\\\\\\\"name\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"type\\\\\\\":\\\\\\\"FUNNEL\\\\\\\",\\\\\\\"matching\\\\\\\":true,\\\\\\\"funnel\\\\\\\":{\\\\\\\"_id\\\\\\\":\\\\\\\"5c759d73-49c6-409f-96a3-b569dff8f8ff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"Unnamed\\\\\\\",\\\\\\\"completedWithin\\\\\\\":null,\\\\\\\"dateFilter\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"RELATIVE\\\\\\\",\\\\\\\"offset\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":0},\\\\\\\"duration\\\\\\\":{\\\\\\\"type\\\\\\\":\\\\\\\"DAYS\\\\\\\",\\\\\\\"value\\\\\\\":30}},\\\\\\\"steps\\\\\\\":[{\\\\\\\"_id\\\\\\\":\\\\\\\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\\\\\\\",\\\\\\\"title\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"action\\\\\\\":{\\\\\\\"id\\\\\\\":944,\\\\\\\"name\\\\\\\":\\\\\\\"page.visit\\\\\\\"},\\\\\\\"eventName\\\\\\\":\\\\\\\"page.visit\\\\\\\",\\\\\\\"expressions\\\\\\\":[]}],\\\\\\\"exact\\\\\\\":false}}]}}]}}\\\"}\")\n  .asString();"}]}},"/schema-service/screenViews/publish/{screenViewId}/{screenViewVersion}":{"post":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Publish screen view","description":"Make the screen view accessible to customers.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: create`\n","operationId":"publishScreenView","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"},{"$ref":"#/components/parameters/schema-service-pathScreenViewVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-publishRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/publishScreenView"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"overwrite\":true}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"overwrite\\\":true}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"overwrite\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({overwrite: true}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"overwrite\":true}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"overwrite\\\":true}\")\n  .asString();"}]}},"/schema-service/screenViews/copyDraftFromExistingScreenView":{"post":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Copy draft from existing screen view","description":"Copy a duplicate of an active screen view. The duplicate is in draft status.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: create`\n","operationId":"copyDraftFromExistingScreenView","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-versionedScreenViewKey"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-screenViewMetadata"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/copyDraftFromExistingScreenView"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/screenViews/copyDraftFromExistingScreenView \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"screenViewId\\\":\\\"481855c5-f86e-453f-a0fa-d34b5a2be745\\\",\\\"screenViewVersion\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/screenViews/copyDraftFromExistingScreenView\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"screenViewId\": \"481855c5-f86e-453f-a0fa-d34b5a2be745\",\n  \"screenViewVersion\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/screenViews/copyDraftFromExistingScreenView\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/copyDraftFromExistingScreenView\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  screenViewId: '481855c5-f86e-453f-a0fa-d34b5a2be745',\n  screenViewVersion: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/copyDraftFromExistingScreenView');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/screenViews/copyDraftFromExistingScreenView\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"screenViewId\\\":\\\"481855c5-f86e-453f-a0fa-d34b5a2be745\\\",\\\"screenViewVersion\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/schema-service/screenViews/createDraftFromExistingScreenView":{"post":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Create draft from existing screen view","description":"Create a duplicate of an active screen view. The duplicate is in draft status.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: create`\n","operationId":"createDraftFromExistingScreenView","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-versionedScreenViewKey"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-screenViewMetadata"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/createDraftFromExistingScreenView"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/screenViews/createDraftFromExistingScreenView \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"screenViewId\\\":\\\"481855c5-f86e-453f-a0fa-d34b5a2be745\\\",\\\"screenViewVersion\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/screenViews/createDraftFromExistingScreenView\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"screenViewId\": \"481855c5-f86e-453f-a0fa-d34b5a2be745\",\n  \"screenViewVersion\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/screenViews/createDraftFromExistingScreenView\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/createDraftFromExistingScreenView\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  screenViewId: '481855c5-f86e-453f-a0fa-d34b5a2be745',\n  screenViewVersion: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/createDraftFromExistingScreenView');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"screenViewId\":\"481855c5-f86e-453f-a0fa-d34b5a2be745\",\"screenViewVersion\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/screenViews/createDraftFromExistingScreenView\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"screenViewId\\\":\\\"481855c5-f86e-453f-a0fa-d34b5a2be745\\\",\\\"screenViewVersion\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/schema-service/screenViews/single/{screenViewId}/{screenViewVersion}/description":{"put":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Update screen view description","description":"Update the description of a screen view. You can update the descriptions of active screen views.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: create`\n","operationId":"updateDescriptionOfScreenView","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"},{"$ref":"#/components/parameters/schema-service-pathScreenViewVersion"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"title":"update screenview description","type":"string","description":"New description of the screen view"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/updateDescriptionOfScreenView"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '\"string\"'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"\\\"string\\\"\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify(\"string\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify('string'));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('\"string\"');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"\\\"string\\\"\")\n  .asString();"}]}},"/schema-service/screenViews/single/{screenViewId}/{screenViewVersion}/priority":{"put":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Update screen view priority","description":"Update the priority of a screen view. You can update the priorities of active screen views.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: create`\n","operationId":"updatePriorityOfScreenView","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"},{"$ref":"#/components/parameters/schema-service-pathScreenViewVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"update screenview priority","type":"integer","description":"New priority of the screen view"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/updatePriorityOfScreenView"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data 0"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"0\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify(0);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('0');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"0\")\n  .asString();"}]}},"/schema-service/screenViews/discardChanges/{screenViewId}/{screenViewVersion}":{"post":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Discard changes","description":"Discard the changes made in a version of a screen view.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: create`\n","operationId":"discardChanges","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"},{"$ref":"#/components/parameters/schema-service-pathScreenViewVersion"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-screenViewLegacy"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/discardChanges"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/screenViews/delete/{screenViewId}":{"delete":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Delete screen view","description":"Delete a screen view and all its versions. This operation is irreversible.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"deleteScreenView","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/deleteScreenView"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/schema-service/screenViews/delete/%7BscreenViewId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/schema-service/screenViews/delete/%7BscreenViewId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/schema-service/screenViews/delete/%7BscreenViewId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/delete/%7BscreenViewId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/delete/%7BscreenViewId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/schema-service/screenViews/delete/%7BscreenViewId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/screenViews/single/delete/{screenViewId}/{screenViewVersion}":{"delete":{"deprecated":true,"tags":["Screen views (legacy)"],"summary":"Delete screen view version","description":"Delete a version of a screen view.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"deleteSingleScreenView","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathScreenViewId"},{"$ref":"#/components/parameters/schema-service-pathScreenViewVersion"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-standardApiResponse"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/deleteSingleScreenView"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/schemaTypes":{"get":{"tags":["Documents"],"summary":"Get schema types","description":"Retrieve a list of all schema types in the workspace.\nSchema types can be used to inform your application about the type of\ncontent included in the document's body.  \nIn the Synerise Web Application, they are called \"Type\".\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: read`\n","operationId":"getSchemaTypes","security":[{"JWT":[]}],"responses":{"200":{"description":"List of schema types","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","description":"Schema type ID"}}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/getSchemaTypes"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/schemaTypes \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/schemaTypes\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/schemaTypes\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/schemaTypes\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/schemaTypes');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/schemaTypes\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"delete":{"tags":["Documents"],"summary":"Delete schema types","description":"Delete one or more schema types. This operation is irreversible.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"deleteSchemaTypes","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"title":"delete schema types","type":"array","items":{"type":"string","description":"Schema ID. Ensure that the IDs are exactly the same as in the database, including escape characters."}}}},"required":true},"responses":{"200":{"description":"Deletion status","content":{"application/json":{"schema":{"type":"boolean","description":"`true` if successful"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/deleteSchemaTypes"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/schema-service/schemaTypes \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[\"string\"]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[\\\"string\\\"]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"DELETE\", \"/schema-service/schemaTypes\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  \"string\"\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/schema-service/schemaTypes\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/schemaTypes\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify(['string']));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/schemaTypes');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[\"string\"]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/schema-service/schemaTypes\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[\\\"string\\\"]\")\n  .asString();"}]},"post":{"tags":["Documents"],"summary":"Add schema type","description":"Create a new schema type.  \nSchema types can be used to inform your application about the type of\ncontent included in the document's body.  \nIn the Synerise Web Application, they are called \"Type\".\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: create`\n","operationId":"addSchemaType","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"title":"add schema type","type":"string","description":"Schema type name."}}},"required":true},"responses":{"200":{"description":"Schema created","content":{"application/json":{"schema":{"type":"string","description":"Schema name"}}}},"400":{"$ref":"#/components/responses/schema-service-genericError"},"401":{"$ref":"#/components/responses/schema-service-401"},"403":{"$ref":"#/components/responses/schema-service-403"},"404":{"$ref":"#/components/responses/schema-service-404"},"500":{"$ref":"#/components/responses/schema-service-genericError"}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents/operation/addSchemaType"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/schemaTypes \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '\"string\"'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"\\\"string\\\"\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/schemaTypes\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify(\"string\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/schemaTypes\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/schemaTypes\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify('string'));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/schemaTypes');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('\"string\"');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/schemaTypes\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"\\\"string\\\"\")\n  .asString();"}]}},"/schema-service/document/preview":{"post":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Preview document","description":"Preview a document.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: update`\n","operationId":"documentPreview","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-previewReq"}}},"required":true},"responses":{"200":{"description":"JSON content of the document","content":{"application/json":{"schema":{"type":"object"}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/documentPreview"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/document/preview \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"content\":{},\"schema\":\"containers\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"content\\\":{},\\\"schema\\\":\\\"containers\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/document/preview\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"content\": {},\n  \"schema\": \"containers\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/document/preview\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document/preview\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({content: {}, schema: 'containers'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document/preview');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"content\":{},\"schema\":\"containers\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/document/preview\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"content\\\":{},\\\"schema\\\":\\\"containers\\\"}\")\n  .asString();"}]}},"/schema-service/document/{uuid}":{"post":{"deprecated":true,"tags":["Documents (legacy)"],"operationId":"documentVersionPost","summary":"Create document version","description":"Create a new version of a document. To modify an existing version of a document, see [Update document](#operation/documentUpdatePost).\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: update`\n","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDocumentUuidLegacy"}],"requestBody":{"content":{"application/json":{"schema":{"title":"create document version","type":"object","properties":{"content":{"$ref":"#/components/schemas/schema-service-documentContent"},"description":{"$ref":"#/components/schemas/schema-service-documentDescription"},"name":{"$ref":"#/components/schemas/schema-service-documentName"},"version":{"$ref":"#/components/schemas/schema-service-documentVersion"}}}}}},"responses":{"200":{"description":"Document","content":{"*/*":{"schema":{"$ref":"#/components/schemas/schema-service-documentView"}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/documentVersionPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/document/%7Buuid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"content\":{},\"description\":\"string\",\"name\":\"string\",\"version\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"content\\\":{},\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"version\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/document/%7Buuid%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"content\": {},\n  \"description\": \"string\",\n  \"name\": \"string\",\n  \"version\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/document/%7Buuid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document/%7Buuid%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({content: {}, description: 'string', name: 'string', version: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document/%7Buuid%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"content\":{},\"description\":\"string\",\"name\":\"string\",\"version\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/document/%7Buuid%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"content\\\":{},\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"version\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/schema-service/document/{id}":{"get":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Get raw document","description":"Retrieve a single document in raw form (inserts are not processed).\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: read`\n","operationId":"rawDocumentGet","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDocumentIdLegacy"}],"responses":{"200":{"description":"Raw document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-documentView"}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/rawDocumentGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/document/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/document/%7Bid%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/document/%7Bid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document/%7Bid%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document/%7Bid%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/document/%7Bid%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/document/{uuid}/{id}":{"post":{"deprecated":true,"tags":["Documents (legacy)"],"operationId":"documentUpdatePost","summary":"Update document","description":"Update an existing version of a document. This endpoint does not create a new version. To create a new version, see [Create document version](#operation/documentVersionPost).\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: update`\n","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDocumentUuidLegacy"},{"$ref":"#/components/parameters/schema-service-pathDocumentIdLegacy"}],"requestBody":{"content":{"application/json":{"schema":{"title":"update document","type":"object","properties":{"content":{"$ref":"#/components/schemas/schema-service-documentContent"},"description":{"$ref":"#/components/schemas/schema-service-documentDescription"},"name":{"$ref":"#/components/schemas/schema-service-documentName"}}}}}},"responses":{"200":{"description":"Updated document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-documentView"}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/documentUpdatePost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/document/%7Buuid%7D/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"content\":{},\"description\":\"string\",\"name\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"content\\\":{},\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/document/%7Buuid%7D/%7Bid%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"content\": {},\n  \"description\": \"string\",\n  \"name\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/document/%7Buuid%7D/%7Bid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document/%7Buuid%7D/%7Bid%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({content: {}, description: 'string', name: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document/%7Buuid%7D/%7Bid%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"content\":{},\"description\":\"string\",\"name\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/document/%7Buuid%7D/%7Bid%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"content\\\":{},\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/schema-service/v2/document/slug/{slug}/content":{"get":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Generate processed document (only content)","description":"Retrieve a generated document, without any metadata in the response. Inserts are processed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SCHEMA_SERVICE_DOCUMENT_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"generateContentDocumentGetV2","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-PathDocumentSlug"}],"responses":{"200":{"description":"Generated document","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"$ref":"#/components/schemas/schema-service-documentContent"}}}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/generateContentDocumentGetV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/v2/document/slug/%7Bslug%7D/content \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/v2/document/slug/%7Bslug%7D/content\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/v2/document/slug/%7Bslug%7D/content\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/v2/document/slug/%7Bslug%7D/content\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/v2/document/slug/%7Bslug%7D/content');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/v2/document/slug/%7Bslug%7D/content\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/document/slug/{slug}/content":{"post":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Generate processed document (only content)","description":"Retrieve a generated document, without any metadata in the response. Inserts are processed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SCHEMA_SERVICE_DOCUMENT_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"generateContentDocumentPost","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDocumentSlugLegacy"},{"in":"query","name":"version","description":"Document version. If not provided, defaults to the latest version.","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","description":"Page of items in the document","required":false,"schema":{"type":"integer"}},{"in":"query","name":"limit","description":"Limit of items per page","required":false,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"title":"generate processed document","type":"object","additionalProperties":{"type":"string"}}}}},"responses":{"200":{"description":"Generated document","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"$ref":"#/components/schemas/schema-service-documentContent"}}}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/generateContentDocumentPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"property1\":\"string\",\"property2\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"property1\": \"string\",\n  \"property2\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({property1: 'string', property2: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/content');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setQueryData([\n  'version' => 'SOME_STRING_VALUE',\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"property1\":\"string\",\"property2\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}\")\n  .asString();"}]},"get":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Generate processed document (only content)","description":"Retrieve a generated document, without any metadata in the response. Inserts are processed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `SCHEMA_SERVICE_DOCUMENT_READ`\n\n**User role permission required:** `assets_docs: read`\n","operationId":"generateContentDocumentGet","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDocumentSlugLegacy"},{"in":"query","name":"version","description":"Document version. If not provided, defaults to the latest version.","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","description":"Page of items in the document","required":false,"schema":{"type":"integer"}},{"in":"query","name":"limit","description":"Limit of items per page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Generated document","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"$ref":"#/components/schemas/schema-service-documentContent"}}}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/generateContentDocumentGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/content');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'version' => 'SOME_STRING_VALUE',\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/content?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/document/certification/{slug}":{"get":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Generate certification document with specific slug.","description":"Retrieve a certification document. Inserts are processed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>\n\n**User role permission required:** `assets_docs: read`\n","operationId":"generateCertificationDocumentBySlugGet","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDocumentSlugLegacy"},{"in":"query","name":"version","description":"Document version. If not provided, defaults to the latest version.","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","description":"Page of items in the document","required":false,"schema":{"type":"integer"}},{"in":"query","name":"limit","description":"Limit of items per page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Generated document","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"$ref":"#/components/schemas/schema-service-documentContent"},"schema":{"$ref":"#/components/schemas/schema-service-DocumentSchema"},"slug":{"$ref":"#/components/schemas/schema-service-DocumentSlug"},"uuid":{"type":"string","format":"uuid","description":"Document UUID. The UUID is the same for all versions of a document."}}}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/generateCertificationDocumentBySlugGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/schema-service/document/certification/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/document/certification/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/document/certification/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document/certification/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document/certification/%7Bslug%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'version' => 'SOME_STRING_VALUE',\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/document/certification/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/document/slug/{slug}":{"post":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Generate processed document","description":"Retrieve a generated document. Inserts are processed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**User role permission required:** `assets_docs: read`\n","operationId":"generateDocumentPost","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDocumentSlugLegacy"},{"in":"query","name":"version","description":"Document version. If not provided, defaults to the latest version.","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","description":"Page of items in the document","required":false,"schema":{"type":"integer"}},{"in":"query","name":"limit","description":"Limit of items per page","required":false,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}},"responses":{"200":{"description":"Generated document","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"$ref":"#/components/schemas/schema-service-documentContent"},"schema":{"$ref":"#/components/schemas/schema-service-DocumentSchema"},"slug":{"$ref":"#/components/schemas/schema-service-DocumentSlug"},"uuid":{"type":"string","format":"uuid","description":"Document UUID. The UUID is the same for all versions of a document."}}}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/generateDocumentPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/schema-service/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"property1\":\"string\",\"property2\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"property1\": \"string\",\n  \"property2\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({property1: 'string', property2: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document/slug/%7Bslug%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setQueryData([\n  'version' => 'SOME_STRING_VALUE',\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"property1\":\"string\",\"property2\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}\")\n  .asString();"}]},"get":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Generate processed document","description":"Retrieve a generated document. Inserts are processed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**User role permission required:** `assets_docs: read`\n","operationId":"generateDocumentGet","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDocumentSlugLegacy"},{"in":"query","name":"version","description":"Document version. If not provided, defaults to the latest version.","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","description":"Page of items in the document","required":false,"schema":{"type":"integer"}},{"in":"query","name":"limit","description":"Limit of items per page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Generated document","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"$ref":"#/components/schemas/schema-service-documentContent"},"schema":{"$ref":"#/components/schemas/schema-service-DocumentSchema"},"slug":{"$ref":"#/components/schemas/schema-service-DocumentSlug"},"uuid":{"type":"string","format":"uuid","description":"Document UUID. The UUID is the same for all versions of a document."}}}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/generateDocumentGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/schema-service/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document/slug/%7Bslug%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'version' => 'SOME_STRING_VALUE',\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/document/slug/%7Bslug%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/document/by-schema/{schema}":{"get":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Generate documents by schema","description":"Generate all documents assigned to a schema. The content is processed.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>\n\n**User role permission required:** `assets_docs: read`\n","operationId":"documentsBySchemaGet","security":[{"JWT":[]}],"parameters":[{"in":"path","name":"schema","description":"Schema name","required":true,"schema":{"type":"string"}},{"in":"query","name":"version","description":"Document version. If not defined, all document versions are generated.","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","description":"Page of items in the document","required":false,"schema":{"type":"integer"}},{"in":"query","name":"limit","description":"Limit of items per page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Generated documents","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"content":{"$ref":"#/components/schemas/schema-service-documentContent"},"schema":{"$ref":"#/components/schemas/schema-service-DocumentSchema"},"slug":{"$ref":"#/components/schemas/schema-service-DocumentSlug"},"uuid":{"type":"string","format":"uuid","description":"Document UUID. The UUID is the same for all versions of a document."}}}}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/documentsBySchemaGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/schema-service/document/by-schema/%7Bschema%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/document/by-schema/%7Bschema%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/document/by-schema/%7Bschema%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document/by-schema/%7Bschema%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document/by-schema/%7Bschema%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'version' => 'SOME_STRING_VALUE',\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/document/by-schema/%7Bschema%7D?version=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/document":{"post":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Create document","description":"Create a new document.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: create`\n","operationId":"createDocumentPostOld","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-createDocumentReq"}}}},"responses":{"200":{"description":"Document data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-documentView"}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/createDocumentPostOld"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/document \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"slug\":\"basket\",\"schema\":\"containers\",\"name\":\"string\",\"description\":\"string\",\"content\":{},\"version\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"slug\\\":\\\"basket\\\",\\\"schema\\\":\\\"containers\\\",\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"content\\\":{},\\\"version\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/document\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"slug\": \"basket\",\n  \"schema\": \"containers\",\n  \"name\": \"string\",\n  \"description\": \"string\",\n  \"content\": {},\n  \"version\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/document\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  slug: 'basket',\n  schema: 'containers',\n  name: 'string',\n  description: 'string',\n  content: {},\n  version: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"slug\":\"basket\",\"schema\":\"containers\",\"name\":\"string\",\"description\":\"string\",\"content\":{},\"version\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/document\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"slug\\\":\\\"basket\\\",\\\"schema\\\":\\\"containers\\\",\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"content\\\":{},\\\"version\\\":\\\"string\\\"}\")\n  .asString();"}]},"get":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"List documents","description":"List all documents in the workspace. You can sort and filter the results. The content is raw.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: read`\n","operationId":"listDocumentsGet","security":[{"JWT":[]}],"parameters":[{"in":"query","name":"search","description":"Search term. The following fields are searched: `name`, `description`, `version`, `slug`.","required":false,"schema":{"type":"string"}},{"in":"query","name":"sortBy","description":"Parameter to sort by","required":false,"schema":{"type":"string","enum":["slug:asc","slug:desc","name:asc","name:desc","version:asc","version:desc","id:asc","id:desc"]}},{"in":"query","name":"limit","description":"The maximum number of items to retrieve for pagination","required":false,"schema":{"type":"string"}},{"in":"query","name":"offset","description":"Offset for pagination. The first item of the first page has the offset of `0`.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of documents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-documentsResponse"}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/listDocumentsGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/schema-service/document?search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/document?search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/document?search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document?search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'search' => 'SOME_STRING_VALUE',\n  'sortBy' => 'SOME_STRING_VALUE',\n  'limit' => 'SOME_STRING_VALUE',\n  'offset' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/document?search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&offset=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"delete":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Delete documents","description":"You can delete one or more documents. This operation is irreversible.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: delete`\n","operationId":"documentsDelete","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"title":"delete documents","type":"array","items":{"type":"string","description":"Document UUID"}}}},"required":true},"responses":{"200":{"description":"Deletion status","content":{"application/json":{"schema":{"type":"boolean","description":"`true` when successful"}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/documentsDelete"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/schema-service/document \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[\"string\"]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[\\\"string\\\"]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"DELETE\", \"/schema-service/document\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  \"string\"\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/schema-service/document\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify(['string']));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[\"string\"]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/schema-service/document\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[\\\"string\\\"]\")\n  .asString();"}]}},"/schema-service/document/{uuid}/versions":{"get":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Get document versions","description":"Retrieve all versions of a document. The content is raw.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: read`\n","operationId":"documentVersionsGet","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDocumentUuidLegacy"}],"responses":{"200":{"description":"List of document versions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/schema-service-documentView"}}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/documentVersionsGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/document/%7Buuid%7D/versions \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/document/%7Buuid%7D/versions\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/document/%7Buuid%7D/versions\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document/%7Buuid%7D/versions\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document/%7Buuid%7D/versions');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/document/%7Buuid%7D/versions\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/schema-service/document/{uuid}/publish":{"post":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Publish document","description":"Publish a document. You must provide a version in the request body.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: update`\n","operationId":"documentPublishPost","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDocumentUuidLegacy"}],"requestBody":{"content":{"application/json":{"schema":{"title":"publish document","type":"string","description":"Version of the document","example":"1.0.5"}}},"required":true},"responses":{"200":{"description":"Publishing status","content":{"application/json":{"schema":{"type":"boolean","description":"`true` when the document is published"}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/documentPublishPost"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/schema-service/document/%7Buuid%7D/publish \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '\"1.0.5\"'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"\\\"1.0.5\\\"\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/schema-service/document/%7Buuid%7D/publish\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify(\"1.0.5\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/schema-service/document/%7Buuid%7D/publish\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document/%7Buuid%7D/publish\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify('1.0.5'));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document/%7Buuid%7D/publish');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('\"1.0.5\"');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/schema-service/document/%7Buuid%7D/publish\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"\\\"1.0.5\\\"\")\n  .asString();"}]}},"/schema-service/document/slug/{slug}/check":{"get":{"deprecated":true,"tags":["Documents (legacy)"],"summary":"Check if slug is correct","description":"Check if the provided slug exists.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_docs: read`\n","operationId":"slugCheckGet","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/schema-service-pathDocumentSlugLegacy"}],"responses":{"200":{"description":"True or False","content":{"application/json":{"schema":{"type":"boolean","description":"`true` if the slug is correct"}}}}},"x-snr-doc-urls":["/api-reference/asset-management#tag/Documents-(legacy)/operation/slugCheckGet"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/check \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/schema-service/document/slug/%7Bslug%7D/check\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/check\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/schema-service/document/slug/%7Bslug%7D/check\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/check');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/schema-service/document/slug/%7Bslug%7D/check\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/synonyms":{"get":{"summary":"Get synonyms","description":"Retrieve a list of synonyms.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SYNONYMS_SEARCH_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"GetSynonymsV2","tags":["Synonyms"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/synonyms-crud-inPathIndexId"},{"$ref":"#/components/parameters/synonyms-crud-paginationPage"},{"$ref":"#/components/parameters/synonyms-crud-paginationLimit"},{"$ref":"#/components/parameters/synonyms-crud-paginationSortBy"},{"$ref":"#/components/parameters/synonyms-crud-paginationOrdering"},{"$ref":"#/components/parameters/synonyms-crud-paginationIncludeMeta"},{"$ref":"#/components/parameters/synonyms-crud-source"},{"$ref":"#/components/parameters/synonyms-crud-state"},{"$ref":"#/components/parameters/synonyms-crud-synonymType"},{"$ref":"#/components/parameters/synonyms-crud-search"},{"$ref":"#/components/parameters/synonyms-crud-confidence"}],"responses":{"200":{"description":"List of synonyms returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/synonyms-crud-PaginatedSynonyms"}}}},"500":{"description":"Some error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/synonyms-crud-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Synonyms/operation/GetSynonymsV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => '4',\n  'limit' => '100',\n  'sortBy' => 'confidence:asc',\n  'ordering' => 'SOME_STRING_VALUE',\n  'includeMeta' => 'SOME_BOOLEAN_VALUE',\n  'source' => 'SOME_STRING_VALUE',\n  'state' => 'SOME_STRING_VALUE',\n  'type' => 'SOME_STRING_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'confidence' => 'SOME_NUMBER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms?page=4&limit=100&sortBy=confidence%3Aasc&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&source=SOME_STRING_VALUE&state=SOME_STRING_VALUE&type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&confidence=SOME_NUMBER_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Create synonym","description":"Creates a new synonym.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SYNONYMS_SEARCH_CREATE`\n\n**User role permission required:** `assets_search: create`\n","operationId":"PostSynonymV2","tags":["Synonyms"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/synonyms-crud-inPathIndexId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/synonyms-crud-Type"},"word":{"$ref":"#/components/schemas/synonyms-crud-Word"},"synonyms":{"$ref":"#/components/schemas/synonyms-crud-Synonyms"},"confidence":{"$ref":"#/components/schemas/synonyms-crud-Confidence"},"reason":{"$ref":"#/components/schemas/synonyms-crud-Reason"},"source":{"$ref":"#/components/schemas/synonyms-crud-SynonymSource"},"state":{"$ref":"#/components/schemas/synonyms-crud-SynonymState"}},"required":["synonyms"]}}},"description":"Request for creating new synonym","required":true},"responses":{"200":{"description":"Id of created synonym returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/synonyms-crud-SingleSynonym"}}}},"500":{"description":"Some error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/synonyms-crud-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Synonyms/operation/PostSynonymV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"type\":\"oneway\",\"word\":\"string\",\"synonyms\":[\"string\"],\"confidence\":1,\"reason\":\"string\",\"source\":\"User\",\"state\":\"New\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"type\\\":\\\"oneway\\\",\\\"word\\\":\\\"string\\\",\\\"synonyms\\\":[\\\"string\\\"],\\\"confidence\\\":1,\\\"reason\\\":\\\"string\\\",\\\"source\\\":\\\"User\\\",\\\"state\\\":\\\"New\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/search/v2/indices/%7BindexId%7D/synonyms\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"type\": \"oneway\",\n  \"word\": \"string\",\n  \"synonyms\": [\n    \"string\"\n  ],\n  \"confidence\": 1,\n  \"reason\": \"string\",\n  \"source\": \"User\",\n  \"state\": \"New\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/synonyms\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  type: 'oneway',\n  word: 'string',\n  synonyms: ['string'],\n  confidence: 1,\n  reason: 'string',\n  source: 'User',\n  state: 'New'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"type\":\"oneway\",\"word\":\"string\",\"synonyms\":[\"string\"],\"confidence\":1,\"reason\":\"string\",\"source\":\"User\",\"state\":\"New\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"type\\\":\\\"oneway\\\",\\\"word\\\":\\\"string\\\",\\\"synonyms\\\":[\\\"string\\\"],\\\"confidence\\\":1,\\\"reason\\\":\\\"string\\\",\\\"source\\\":\\\"User\\\",\\\"state\\\":\\\"New\\\"}\")\n  .asString();"}]}},"/search/v2/indices/{indexId}/synonyms/batch":{"post":{"summary":"Batch insert synonyms","description":"Insert multiple synonyms into an index at once.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SYNONYMS_SEARCH_CREATE`\n\n**User role permission required:** `assets_search: create`\n","operationId":"BatchSynonyms","tags":["Synonyms"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/synonyms-crud-sourceForImport"},{"$ref":"#/components/parameters/synonyms-crud-inPathIndexId"}],"requestBody":{"$ref":"#/components/requestBodies/synonyms-crud-CsvBody"},"responses":{"200":{"description":"Summary of batch insertion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/synonyms-crud-BatchResponse"}}}},"500":{"description":"Some error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/synonyms-crud-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Synonyms/operation/BatchSynonyms"]}},"/search/v2/indices/{indexId}/synonyms/replace-all":{"post":{"summary":"Replace all synonyms","description":"<span style=\"color:red\"><strong>Deletes all existing synonyms</strong></span> from an index and then inserts multiple new synonyms at once.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SYNONYMS_SEARCH_UPDATE`\n\n**User role permission required:** `assets_search: update`\n","operationId":"ReplaceAllSynonyms","tags":["Synonyms"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/synonyms-crud-inPathIndexId"},{"$ref":"#/components/parameters/synonyms-crud-sourceForImport"}],"requestBody":{"$ref":"#/components/requestBodies/synonyms-crud-CsvBody"},"responses":{"204":{"description":"All synonyms replaced"},"500":{"description":"Some error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/synonyms-crud-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Synonyms/operation/ReplaceAllSynonyms"]}},"/search/v2/indices/{indexId}/synonyms/{synonymId}":{"get":{"summary":"Get synonym","description":"Retrieves a synonym.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SYNONYMS_SEARCH_READ`\n\n**User role permission required:** `assets_search: read`\n","operationId":"GetSynonymV2","tags":["Synonyms"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/synonyms-crud-inPathSynonymId"},{"$ref":"#/components/parameters/synonyms-crud-inPathIndexId"}],"responses":{"200":{"description":"Synonym returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/synonyms-crud-SingleSynonym"}}}},"500":{"description":"Some error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/synonyms-crud-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Synonyms/operation/GetSynonymV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"summary":"Update synonym","description":"Updates a synonym identified by `id`.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SYNONYMS_SEARCH_UPDATE`\n\n**User role permission required:** `assets_search: update`\n","operationId":"PutSynonym","tags":["Synonyms"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/synonyms-crud-inPathSynonymId"},{"$ref":"#/components/parameters/synonyms-crud-inPathIndexId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/synonyms-crud-Type"},"word":{"$ref":"#/components/schemas/synonyms-crud-Word"},"synonyms":{"$ref":"#/components/schemas/synonyms-crud-Synonyms"},"confidence":{"$ref":"#/components/schemas/synonyms-crud-Confidence"},"reason":{"$ref":"#/components/schemas/synonyms-crud-Reason"},"source":{"$ref":"#/components/schemas/synonyms-crud-SynonymSource"},"state":{"$ref":"#/components/schemas/synonyms-crud-SynonymState"}},"required":["synonyms"]}}},"description":"Request for creating new synonym","required":true},"responses":{"200":{"description":"Updated synonym returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/synonyms-crud-SingleSynonym"}}}},"500":{"description":"Some error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/synonyms-crud-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Synonyms/operation/PutSynonym"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"type\":\"oneway\",\"word\":\"string\",\"synonyms\":[\"string\"],\"confidence\":1,\"reason\":\"string\",\"source\":\"User\",\"state\":\"New\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"type\\\":\\\"oneway\\\",\\\"word\\\":\\\"string\\\",\\\"synonyms\\\":[\\\"string\\\"],\\\"confidence\\\":1,\\\"reason\\\":\\\"string\\\",\\\"source\\\":\\\"User\\\",\\\"state\\\":\\\"New\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"type\": \"oneway\",\n  \"word\": \"string\",\n  \"synonyms\": [\n    \"string\"\n  ],\n  \"confidence\": 1,\n  \"reason\": \"string\",\n  \"source\": \"User\",\n  \"state\": \"New\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  type: 'oneway',\n  word: 'string',\n  synonyms: ['string'],\n  confidence: 1,\n  reason: 'string',\n  source: 'User',\n  state: 'New'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"type\":\"oneway\",\"word\":\"string\",\"synonyms\":[\"string\"],\"confidence\":1,\"reason\":\"string\",\"source\":\"User\",\"state\":\"New\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"type\\\":\\\"oneway\\\",\\\"word\\\":\\\"string\\\",\\\"synonyms\\\":[\\\"string\\\"],\\\"confidence\\\":1,\\\"reason\\\":\\\"string\\\",\\\"source\\\":\\\"User\\\",\\\"state\\\":\\\"New\\\"}\")\n  .asString();"}]},"delete":{"summary":"Delete synonym","description":"Deletes a synonym with given id.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `SYNONYMS_SEARCH_DELETE`\n\n**User role permission required:** `assets_search: delete`\n","operationId":"DeleteSynonymV2","tags":["Synonyms"],"security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/synonyms-crud-inPathSynonymId"},{"$ref":"#/components/parameters/synonyms-crud-inPathIndexId"}],"responses":{"204":{"description":"Synonym deleted"},"500":{"description":"Some error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/synonyms-crud-Error"}}}}},"x-snr-doc-urls":["/api-reference/ai-search#tag/Synonyms/operation/DeleteSynonymV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/search/v2/indices/%7BindexId%7D/synonyms/%7BsynonymId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/tags-collector/directories":{"get":{"tags":["Asset tags"],"summary":"Get all directories","description":"Gets all tag directories from the Workspace.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `TAGS_COLLECTOR_DIRECTORY_READ`\n\n**User role permission required:** `assets_tags: read`\n","operationId":"getTagDirectories","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/tags-collector-DirectoryDto-collector"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Asset-tags/operation/getTagDirectories"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/tags-collector/directories"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/tags-collector/directories\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/tags-collector/directories\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/tags-collector/directories\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/tags-collector/directories');\n$request->setMethod(HTTP_METH_GET);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/tags-collector/directories\")\n  .asString();"}]},"post":{"tags":["Asset tags"],"summary":"Create directory","description":"Creates a directory.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `TAGS_COLLECTOR_DIRECTORY_CREATE`\n\n**User role permission required:** `assets_tags: create`\n","operationId":"createDirectory","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tags-collector-DirectoryCreateRequest-collector"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tags-collector-DirectoryDto-collector"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Asset-tags/operation/createDirectory"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/tags-collector/directories \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"},\"type\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"},\\\"type\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/tags-collector/directories\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"params\": {\n    \"property1\": \"string\",\n    \"property2\": \"string\"\n  },\n  \"type\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/tags-collector/directories\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/tags-collector/directories\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  name: 'string',\n  params: {property1: 'string', property2: 'string'},\n  type: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/tags-collector/directories');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"},\"type\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/tags-collector/directories\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"},\\\"type\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/tags-collector/directories/types":{"get":{"tags":["Asset tags"],"summary":"Get directory types","description":"Gets all directory types.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `TAGS_COLLECTOR_DIRECTORY_READ`\n\n**User role permission required:** `assets_tags: read`\n","operationId":"getDirectoryTypes","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/tags-collector-DirectoryTypeDto-collector"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Asset-tags/operation/getDirectoryTypes"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/tags-collector/directories/types"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/tags-collector/directories/types\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/tags-collector/directories/types\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/tags-collector/directories/types\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/tags-collector/directories/types');\n$request->setMethod(HTTP_METH_GET);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/tags-collector/directories/types\")\n  .asString();"}]},"post":{"tags":["Asset tags"],"summary":"Create directory type","description":"Creates a directory type.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `TAGS_COLLECTOR_DIRECTORY_UPDATE`\n\n**User role permission required:** `assets_tags: update`\n","operationId":"createDirectoryType","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tags-collector-DirectoryTypeCreateRequest-collector"}}},"description":"","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tags-collector-DirectoryTypeDto-collector"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Asset-tags/operation/createDirectoryType"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/tags-collector/directories/types \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/tags-collector/directories/types\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/tags-collector/directories/types\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/tags-collector/directories/types\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/tags-collector/directories/types');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/tags-collector/directories/types\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/tags-collector/directories/{directoryHash}":{"delete":{"tags":["Asset tags"],"summary":"Delete directory","description":"Deletes a directory.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `TAGS_COLLECTOR_DIRECTORY_DELETE`\n\n**User role permission required:** `assets_tags: delete`\n","operationId":"deleteDirectory","parameters":[{"$ref":"#/components/parameters/tags-collector-DirectoryHash-collector"}],"responses":{"200":{"description":"OK"},"204":{"description":"No Content"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Asset-tags/operation/deleteDirectory"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"DELETE\", \"/tags-collector/directories/%7BdirectoryHash%7D\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/tags-collector/directories/%7BdirectoryHash%7D\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D\")\n  .asString();"}]},"patch":{"tags":["Asset tags"],"summary":"Update directory","description":"Updates a directory.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `TAGS_COLLECTOR_DIRECTORY_UPDATE`\n\n**User role permission required:** `assets_tags: update`\n","operationId":"updateDirectory","parameters":[{"$ref":"#/components/parameters/tags-collector-DirectoryHash-collector"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tags-collector-DirectoryUpdateRequest-collector"}}},"description":"","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tags-collector-DirectoryDto-collector"}}}},"204":{"description":"No Content"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Asset-tags/operation/updateDirectory"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PATCH \\\n  --url https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"PATCH\", \"/tags-collector/directories/%7BdirectoryHash%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"params\": {\n    \"property1\": \"string\",\n    \"property2\": \"string\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PATCH\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/tags-collector/directories/%7BdirectoryHash%7D\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string', params: {property1: 'string', property2: 'string'}}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\nHttpRequest::methodRegister('PATCH');\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D');\n$request->setMethod(HttpRequest::HTTP_METH_PATCH);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"params\":{\"property1\":\"string\",\"property2\":\"string\"}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.patch(\"https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"params\\\":{\\\"property1\\\":\\\"string\\\",\\\"property2\\\":\\\"string\\\"}}\")\n  .asString();"}]}},"/tags-collector/directories/{directoryHash}/tags":{"get":{"tags":["Asset tags"],"summary":"Get tags from directory","description":"Retrieve tags from a directory.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `TAGS_COLLECTOR_DIRECTORY_READ`\n\n**User role permission required:** `assets_tags: read`\n","operationId":"getTagsUsingGET","parameters":[{"$ref":"#/components/parameters/tags-collector-DirectoryHash-collector"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/tags-collector-TagDto-collector"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Asset-tags/operation/getTagsUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/tags-collector/directories/%7BdirectoryHash%7D/tags\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/tags-collector/directories/%7BdirectoryHash%7D/tags\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags');\n$request->setMethod(HTTP_METH_GET);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags\")\n  .asString();"}]},"post":{"tags":["Asset tags"],"summary":"Assign tags to directory","description":"Assign tags to a directory.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `TAGS_COLLECTOR_DIRECTORY_UPDATE`\n\n**User role permission required:** `assets_tags: update`\n","operationId":"assignTagsUsingPOST","parameters":[{"$ref":"#/components/parameters/tags-collector-DirectoryHash-collector"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string","description":"Hash ID of a tag"}}}},"required":true},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Asset-tags/operation/assignTagsUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags \\\n  --header 'content-type: application/json' \\\n  --data '[\"string\"]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[\\\"string\\\"]\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/tags-collector/directories/%7BdirectoryHash%7D/tags\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  \"string\"\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/tags-collector/directories/%7BdirectoryHash%7D/tags\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify(['string']));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[\"string\"]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[\\\"string\\\"]\")\n  .asString();"}]},"delete":{"tags":["Asset tags"],"summary":"Unassign tags from directory","description":"Unassign tags from a directory. This does not delete the tags or the directory.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `TAGS_COLLECTOR_DIRECTORY_DELETE`\n\n**User role permission required:** `assets_tags: delete`\n","operationId":"unassignTagUsingDELETE","parameters":[{"$ref":"#/components/parameters/tags-collector-DirectoryHash-collector"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string","description":"Hash ID of a tag"}}}},"required":true},"responses":{"200":{"description":"OK"},"204":{"description":"No Content"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Asset-tags/operation/unassignTagUsingDELETE"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags \\\n  --header 'content-type: application/json' \\\n  --data '[\"string\"]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[\\\"string\\\"]\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"DELETE\", \"/tags-collector/directories/%7BdirectoryHash%7D/tags\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  \"string\"\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/tags-collector/directories/%7BdirectoryHash%7D/tags\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify(['string']));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[\"string\"]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/tags\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[\\\"string\\\"]\")\n  .asString();"}]}},"/tags-collector/directories/{directoryHash}/types":{"put":{"tags":["Asset tags"],"summary":"Update directory type","description":"Update the type of a directory.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `TAGS_COLLECTOR_DIRECTORY_UPDATE`\n\n**User role permission required:** `assets_tags: update`\n","operationId":"updateTypeUsingPUT","parameters":[{"$ref":"#/components/parameters/tags-collector-DirectoryHash-collector"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tags-collector-DirectoryTypeUpdateRequest-collector"}}},"description":"","required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tags-collector-DirectoryDto-collector"}}}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Asset-tags/operation/updateTypeUsingPUT"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/types \\\n  --header 'content-type: application/json' \\\n  --data '{\"directoryTypeHash\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"directoryTypeHash\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"PUT\", \"/tags-collector/directories/%7BdirectoryHash%7D/types\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"directoryTypeHash\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/types\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/tags-collector/directories/%7BdirectoryHash%7D/types\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({directoryTypeHash: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/types');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"directoryTypeHash\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/tags-collector/directories/%7BdirectoryHash%7D/types\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"directoryTypeHash\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/tags-collector/tags":{"get":{"tags":["Asset tags"],"summary":"Get tag list","description":"Gets a paginated list of tags that can be assigned to assets, for example promotions.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `TAGS_COLLECTOR_TAG_READ`\n\n**User role permission required:** `assets_tags: read`\n","operationId":"getTagList","parameters":[{"in":"query","name":"page","description":"Page to retrieve","required":false,"schema":{"type":"integer","default":0}},{"in":"query","name":"size","description":"Limit of items per page","required":false,"schema":{"type":"integer","default":10}},{"in":"query","name":"directoryType","description":"Directory type","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tags-collector-PaginationResponse_PaginatedTagDto_"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Asset-tags/operation/getTagList"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/tags-collector/tags?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&directoryType=SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/tags-collector/tags?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&directoryType=SOME_STRING_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/tags-collector/tags?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&directoryType=SOME_STRING_VALUE\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/tags-collector/tags?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&directoryType=SOME_STRING_VALUE\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/tags-collector/tags');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'size' => 'SOME_INTEGER_VALUE',\n  'directoryType' => 'SOME_STRING_VALUE'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/tags-collector/tags?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&directoryType=SOME_STRING_VALUE\")\n  .asString();"}]},"post":{"tags":["Asset tags"],"summary":"Create tag","description":"Creates a tag that can be assigned to assets, for example promotions.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `TAGS_COLLECTOR_TAG_CREATE`\n\n**User role permission required:** `assets_tags: create`\n","operationId":"createTag","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tags-collector-TagCreateRequest-collector"}}},"description":"","required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tags-collector-TagDto-collector"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Asset-tags/operation/createTag"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/tags-collector/tags \\\n  --header 'content-type: application/json' \\\n  --data '{\"color\":\"string\",\"description\":\"string\",\"directory\":\"string\",\"icon\":\"string\",\"priority\":0,\"value\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"color\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"directory\\\":\\\"string\\\",\\\"icon\\\":\\\"string\\\",\\\"priority\\\":0,\\\"value\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/tags-collector/tags\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"color\": \"string\",\n  \"description\": \"string\",\n  \"directory\": \"string\",\n  \"icon\": \"string\",\n  \"priority\": 0,\n  \"value\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/tags-collector/tags\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/tags-collector/tags\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  color: 'string',\n  description: 'string',\n  directory: 'string',\n  icon: 'string',\n  priority: 0,\n  value: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/tags-collector/tags');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"color\":\"string\",\"description\":\"string\",\"directory\":\"string\",\"icon\":\"string\",\"priority\":0,\"value\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/tags-collector/tags\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"color\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"directory\\\":\\\"string\\\",\\\"icon\\\":\\\"string\\\",\\\"priority\\\":0,\\\"value\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/tags-collector/tags/{tagHash}":{"patch":{"tags":["Asset tags"],"summary":"Update tag","description":"Updates a tag definition.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `TAGS_COLLECTOR_TAG_UPDATE`\n\n**User role permission required:** `assets_tags: update`\n","operationId":"updateTag","parameters":[{"$ref":"#/components/parameters/tags-collector-TagHash-collector"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tags-collector-TagUpdateRequest-collector"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tags-collector-TagDto-collector"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"x-snr-doc-urls":["/api-reference/data-management#tag/Asset-tags/operation/updateTag"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PATCH \\\n  --url https://api.synerise.com/tags-collector/tags/%7BtagHash%7D \\\n  --header 'content-type: application/json' \\\n  --data '{\"color\":\"string\",\"description\":\"string\",\"directory\":\"string\",\"icon\":\"string\",\"priority\":0,\"value\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"color\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"directory\\\":\\\"string\\\",\\\"icon\\\":\\\"string\\\",\\\"priority\\\":0,\\\"value\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"PATCH\", \"/tags-collector/tags/%7BtagHash%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"color\": \"string\",\n  \"description\": \"string\",\n  \"directory\": \"string\",\n  \"icon\": \"string\",\n  \"priority\": 0,\n  \"value\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://api.synerise.com/tags-collector/tags/%7BtagHash%7D\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PATCH\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/tags-collector/tags/%7BtagHash%7D\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  color: 'string',\n  description: 'string',\n  directory: 'string',\n  icon: 'string',\n  priority: 0,\n  value: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\nHttpRequest::methodRegister('PATCH');\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/tags-collector/tags/%7BtagHash%7D');\n$request->setMethod(HttpRequest::HTTP_METH_PATCH);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"color\":\"string\",\"description\":\"string\",\"directory\":\"string\",\"icon\":\"string\",\"priority\":0,\"value\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.patch(\"https://api.synerise.com/tags-collector/tags/%7BtagHash%7D\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"color\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\",\\\"directory\\\":\\\"string\\\",\\\"icon\\\":\\\"string\\\",\\\"priority\\\":0,\\\"value\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/template-backend/template":{"get":{"summary":"List templates","operationId":"list-templates","tags":["Templates"],"description":"Returns all templates from a Workspace, with an option to filter by type.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: read`\n","parameters":[{"in":"query","name":"type","schema":{"type":"string","enum":["SMS","MOBILE_PUSH","WEB_PUSH","DYNAMIC_CONTENT","LANDING_PAGE","EMAIL","SOCIAL_MEDIA","IN_APP"]},"description":"The type of templates to return","required":false},{"in":"query","name":"search","schema":{"type":"string"},"description":"Searched phrase","required":false},{"in":"query","name":"limit","schema":{"type":"number"},"required":false},{"in":"query","name":"offset","schema":{"type":"number"},"required":false},{"in":"query","name":"approved","required":false,"schema":{"type":"boolean","default":false},"description":"When approval-service enabled it filters for approved templates"}],"responses":{"200":{"description":"An array of templates","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/template-backend-TemplateOverviewResponse"}}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Templates/operation/list-templates"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/template-backend/template?type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&limit=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE&approved=SOME_BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/template-backend/template?type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&limit=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE&approved=SOME_BOOLEAN_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/template-backend/template?type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&limit=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE&approved=SOME_BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/template?type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&limit=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE&approved=SOME_BOOLEAN_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/template');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'type' => 'SOME_STRING_VALUE',\n  'search' => 'SOME_STRING_VALUE',\n  'limit' => 'SOME_NUMBER_VALUE',\n  'offset' => 'SOME_NUMBER_VALUE',\n  'approved' => 'SOME_BOOLEAN_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/template-backend/template?type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&limit=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE&approved=SOME_BOOLEAN_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"summary":"Create template","operationId":"create-template","tags":["Templates"],"description":"Create a new template.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: create`\n","requestBody":{"description":"Template to create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/template-backend-TemplateCreateRequest"}}}},"responses":{"200":{"description":"Created template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/template-backend-TemplateDetailsResponse"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Templates/operation/create-template"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/template-backend/template \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":null,\"type\":\"EMAIL\",\"subtype\":\"BANNER\",\"contentType\":\"TEMPLATE\",\"directory\":\"e0326a2d-7697-4ae9-b490-31f97041adcb\",\"content\":\"{\\\"json\\\":\\\"\\\",\\\"html\\\":\\\"<p>some text</p>\\\",\\\"css\\\":\\\"p {\\\\n    font-weight: bold\\\\n}\\\",\\\"js\\\":\\\"console.log(\\\\\\\"test\\\\\\\")\\\",\\\"raw\\\":\\\"<html><head><style type=\\\\\\\"text/css\\\\\\\">p {\\\\n    font-weight: bold\\\\n}</style></head><body><p>some text</p></body></html>\\\",\\\"source\\\":2}\",\"source\":0,\"includeSafeArea\":false,\"hidden\":false,\"temporal\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":null,\\\"type\\\":\\\"EMAIL\\\",\\\"subtype\\\":\\\"BANNER\\\",\\\"contentType\\\":\\\"TEMPLATE\\\",\\\"directory\\\":\\\"e0326a2d-7697-4ae9-b490-31f97041adcb\\\",\\\"content\\\":\\\"{\\\\\\\"json\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"html\\\\\\\":\\\\\\\"<p>some text</p>\\\\\\\",\\\\\\\"css\\\\\\\":\\\\\\\"p {\\\\\\\\n    font-weight: bold\\\\\\\\n}\\\\\\\",\\\\\\\"js\\\\\\\":\\\\\\\"console.log(\\\\\\\\\\\\\\\"test\\\\\\\\\\\\\\\")\\\\\\\",\\\\\\\"raw\\\\\\\":\\\\\\\"<html><head><style type=\\\\\\\\\\\\\\\"text/css\\\\\\\\\\\\\\\">p {\\\\\\\\n    font-weight: bold\\\\\\\\n}</style></head><body><p>some text</p></body></html>\\\\\\\",\\\\\\\"source\\\\\\\":2}\\\",\\\"source\\\":0,\\\"includeSafeArea\\\":false,\\\"hidden\\\":false,\\\"temporal\\\":false}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/template-backend/template\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": null,\n  \"type\": \"EMAIL\",\n  \"subtype\": \"BANNER\",\n  \"contentType\": \"TEMPLATE\",\n  \"directory\": \"e0326a2d-7697-4ae9-b490-31f97041adcb\",\n  \"content\": \"{\\\"json\\\":\\\"\\\",\\\"html\\\":\\\"<p>some text</p>\\\",\\\"css\\\":\\\"p {\\\\n    font-weight: bold\\\\n}\\\",\\\"js\\\":\\\"console.log(\\\\\\\"test\\\\\\\")\\\",\\\"raw\\\":\\\"<html><head><style type=\\\\\\\"text/css\\\\\\\">p {\\\\n    font-weight: bold\\\\n}</style></head><body><p>some text</p></body></html>\\\",\\\"source\\\":2}\",\n  \"source\": 0,\n  \"includeSafeArea\": false,\n  \"hidden\": false,\n  \"temporal\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/template-backend/template\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/template\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  name: null,\n  type: 'EMAIL',\n  subtype: 'BANNER',\n  contentType: 'TEMPLATE',\n  directory: 'e0326a2d-7697-4ae9-b490-31f97041adcb',\n  content: '{\"json\":\"\",\"html\":\"<p>some text</p>\",\"css\":\"p {\\n    font-weight: bold\\n}\",\"js\":\"console.log(\\\"test\\\")\",\"raw\":\"<html><head><style type=\\\"text/css\\\">p {\\n    font-weight: bold\\n}</style></head><body><p>some text</p></body></html>\",\"source\":2}',\n  source: 0,\n  includeSafeArea: false,\n  hidden: false,\n  temporal: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/template');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":null,\"type\":\"EMAIL\",\"subtype\":\"BANNER\",\"contentType\":\"TEMPLATE\",\"directory\":\"e0326a2d-7697-4ae9-b490-31f97041adcb\",\"content\":\"{\\\\\"json\\\\\":\\\\\"\\\\\",\\\\\"html\\\\\":\\\\\"<p>some text</p>\\\\\",\\\\\"css\\\\\":\\\\\"p {\\\\\\\\n    font-weight: bold\\\\\\\\n}\\\\\",\\\\\"js\\\\\":\\\\\"console.log(\\\\\\\\\\\\\"test\\\\\\\\\\\\\")\\\\\",\\\\\"raw\\\\\":\\\\\"<html><head><style type=\\\\\\\\\\\\\"text/css\\\\\\\\\\\\\">p {\\\\\\\\n    font-weight: bold\\\\\\\\n}</style></head><body><p>some text</p></body></html>\\\\\",\\\\\"source\\\\\":2}\",\"source\":0,\"includeSafeArea\":false,\"hidden\":false,\"temporal\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/template-backend/template\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":null,\\\"type\\\":\\\"EMAIL\\\",\\\"subtype\\\":\\\"BANNER\\\",\\\"contentType\\\":\\\"TEMPLATE\\\",\\\"directory\\\":\\\"e0326a2d-7697-4ae9-b490-31f97041adcb\\\",\\\"content\\\":\\\"{\\\\\\\"json\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"html\\\\\\\":\\\\\\\"<p>some text</p>\\\\\\\",\\\\\\\"css\\\\\\\":\\\\\\\"p {\\\\\\\\n    font-weight: bold\\\\\\\\n}\\\\\\\",\\\\\\\"js\\\\\\\":\\\\\\\"console.log(\\\\\\\\\\\\\\\"test\\\\\\\\\\\\\\\")\\\\\\\",\\\\\\\"raw\\\\\\\":\\\\\\\"<html><head><style type=\\\\\\\\\\\\\\\"text/css\\\\\\\\\\\\\\\">p {\\\\\\\\n    font-weight: bold\\\\\\\\n}</style></head><body><p>some text</p></body></html>\\\\\\\",\\\\\\\"source\\\\\\\":2}\\\",\\\"source\\\":0,\\\"includeSafeArea\\\":false,\\\"hidden\\\":false,\\\"temporal\\\":false}\")\n  .asString();"}]}},"/template-backend/template/{templateUuid}":{"get":{"summary":"Get template by UUID","operationId":"get-template","tags":["Templates"],"description":"Return the details of a template identified by its UUID.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: read`\n","parameters":[{"$ref":"#/components/parameters/template-backend-templateUuid"}],"responses":{"200":{"description":"Template details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/template-backend-TemplateDetailsResponse"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Templates/operation/get-template"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"patch":{"summary":"Patch a template","operationId":"patch-template","tags":["Templates"],"description":"Change template content.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: update`\n","parameters":[{"$ref":"#/components/parameters/template-backend-templateUuid"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/template-backend-TemplateUpdateRequest"}}}},"responses":{"200":{"description":"Template details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/template-backend-TemplateDetailsResponse"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Templates/operation/patch-template"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PATCH \\\n  --url https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":null,\"content\":\"{\\\"json\\\":\\\"\\\",\\\"html\\\":\\\"<p>some text</p>\\\",\\\"css\\\":\\\"p {\\\\n    font-weight: bold\\\\n}\\\",\\\"js\\\":\\\"console.log(\\\\\\\"test\\\\\\\")\\\",\\\"raw\\\":\\\"<html><head><style type=\\\\\\\"text/css\\\\\\\">p {\\\\n    font-weight: bold\\\\n}</style></head><body><p>some text</p></body></html>\\\",\\\"source\\\":2}\",\"includeSafeArea\":false}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":null,\\\"content\\\":\\\"{\\\\\\\"json\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"html\\\\\\\":\\\\\\\"<p>some text</p>\\\\\\\",\\\\\\\"css\\\\\\\":\\\\\\\"p {\\\\\\\\n    font-weight: bold\\\\\\\\n}\\\\\\\",\\\\\\\"js\\\\\\\":\\\\\\\"console.log(\\\\\\\\\\\\\\\"test\\\\\\\\\\\\\\\")\\\\\\\",\\\\\\\"raw\\\\\\\":\\\\\\\"<html><head><style type=\\\\\\\\\\\\\\\"text/css\\\\\\\\\\\\\\\">p {\\\\\\\\n    font-weight: bold\\\\\\\\n}</style></head><body><p>some text</p></body></html>\\\\\\\",\\\\\\\"source\\\\\\\":2}\\\",\\\"includeSafeArea\\\":false}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PATCH\", \"/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": null,\n  \"content\": \"{\\\"json\\\":\\\"\\\",\\\"html\\\":\\\"<p>some text</p>\\\",\\\"css\\\":\\\"p {\\\\n    font-weight: bold\\\\n}\\\",\\\"js\\\":\\\"console.log(\\\\\\\"test\\\\\\\")\\\",\\\"raw\\\":\\\"<html><head><style type=\\\\\\\"text/css\\\\\\\">p {\\\\n    font-weight: bold\\\\n}</style></head><body><p>some text</p></body></html>\\\",\\\"source\\\":2}\",\n  \"includeSafeArea\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PATCH\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  name: null,\n  content: '{\"json\":\"\",\"html\":\"<p>some text</p>\",\"css\":\"p {\\n    font-weight: bold\\n}\",\"js\":\"console.log(\\\"test\\\")\",\"raw\":\"<html><head><style type=\\\"text/css\\\">p {\\n    font-weight: bold\\n}</style></head><body><p>some text</p></body></html>\",\"source\":2}',\n  includeSafeArea: false\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\nHttpRequest::methodRegister('PATCH');\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb');\n$request->setMethod(HttpRequest::HTTP_METH_PATCH);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":null,\"content\":\"{\\\\\"json\\\\\":\\\\\"\\\\\",\\\\\"html\\\\\":\\\\\"<p>some text</p>\\\\\",\\\\\"css\\\\\":\\\\\"p {\\\\\\\\n    font-weight: bold\\\\\\\\n}\\\\\",\\\\\"js\\\\\":\\\\\"console.log(\\\\\\\\\\\\\"test\\\\\\\\\\\\\")\\\\\",\\\\\"raw\\\\\":\\\\\"<html><head><style type=\\\\\\\\\\\\\"text/css\\\\\\\\\\\\\">p {\\\\\\\\n    font-weight: bold\\\\\\\\n}</style></head><body><p>some text</p></body></html>\\\\\",\\\\\"source\\\\\":2}\",\"includeSafeArea\":false}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.patch(\"https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":null,\\\"content\\\":\\\"{\\\\\\\"json\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"html\\\\\\\":\\\\\\\"<p>some text</p>\\\\\\\",\\\\\\\"css\\\\\\\":\\\\\\\"p {\\\\\\\\n    font-weight: bold\\\\\\\\n}\\\\\\\",\\\\\\\"js\\\\\\\":\\\\\\\"console.log(\\\\\\\\\\\\\\\"test\\\\\\\\\\\\\\\")\\\\\\\",\\\\\\\"raw\\\\\\\":\\\\\\\"<html><head><style type=\\\\\\\\\\\\\\\"text/css\\\\\\\\\\\\\\\">p {\\\\\\\\n    font-weight: bold\\\\\\\\n}</style></head><body><p>some text</p></body></html>\\\\\\\",\\\\\\\"source\\\\\\\":2}\\\",\\\"includeSafeArea\\\":false}\")\n  .asString();"}]}},"/template-backend/template/functional":{"post":{"summary":"Create functional template","operationId":"create-functional-template","tags":["Templates"],"description":"Create a new functional template. Functional templates are used for cases not covered by the [Create template endpoint](#operation/create-template), such as a password change page.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: create`\n","requestBody":{"description":"Functional template to create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/template-backend-FunctionTemplateCreateRequest"}}}},"responses":{"200":{"description":"Created template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/template-backend-DefaultTemplateDetailsResponse"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Templates/operation/create-functional-template"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/template-backend/template/functional \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"name\",\"content\":\"<html><h1>Content</h1></html>\",\"functionType\":\"Password Change\",\"directory\":\"e0326a2d-7697-4ae9-b490-31f97041adcb\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"name\\\",\\\"content\\\":\\\"<html><h1>Content</h1></html>\\\",\\\"functionType\\\":\\\"Password Change\\\",\\\"directory\\\":\\\"e0326a2d-7697-4ae9-b490-31f97041adcb\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/template-backend/template/functional\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"name\",\n  \"content\": \"<html><h1>Content</h1></html>\",\n  \"functionType\": \"Password Change\",\n  \"directory\": \"e0326a2d-7697-4ae9-b490-31f97041adcb\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/template-backend/template/functional\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/template/functional\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  name: 'name',\n  content: '<html><h1>Content</h1></html>',\n  functionType: 'Password Change',\n  directory: 'e0326a2d-7697-4ae9-b490-31f97041adcb'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/template/functional');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"name\",\"content\":\"<html><h1>Content</h1></html>\",\"functionType\":\"Password Change\",\"directory\":\"e0326a2d-7697-4ae9-b490-31f97041adcb\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/template-backend/template/functional\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"name\\\",\\\"content\\\":\\\"<html><h1>Content</h1></html>\\\",\\\"functionType\\\":\\\"Password Change\\\",\\\"directory\\\":\\\"e0326a2d-7697-4ae9-b490-31f97041adcb\\\"}\")\n  .asString();"}]}},"/template-backend/template/move":{"post":{"summary":"Move templates to another directory","operationId":"move-templates","tags":["Templates"],"description":"Move templates to another directory.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: update`\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/template-backend-MoveTemplatesRequest"}}}},"responses":{"200":{"description":"Number of moved templates","content":{"application/json":{"schema":{"type":"integer","description":"Number of moved templates","example":12}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Templates/operation/move-templates"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/template-backend/template/move \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"templateHashIds\":[\"2ede34f8-1c27-4131-bfb1-5c88856882e1\"],\"directoryHash\":\"2ede34f8-1c27-4131-bfb1-5c88856882e1\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"templateHashIds\\\":[\\\"2ede34f8-1c27-4131-bfb1-5c88856882e1\\\"],\\\"directoryHash\\\":\\\"2ede34f8-1c27-4131-bfb1-5c88856882e1\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/template-backend/template/move\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"templateHashIds\": [\n    \"2ede34f8-1c27-4131-bfb1-5c88856882e1\"\n  ],\n  \"directoryHash\": \"2ede34f8-1c27-4131-bfb1-5c88856882e1\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/template-backend/template/move\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/template/move\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  templateHashIds: ['2ede34f8-1c27-4131-bfb1-5c88856882e1'],\n  directoryHash: '2ede34f8-1c27-4131-bfb1-5c88856882e1'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/template/move');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"templateHashIds\":[\"2ede34f8-1c27-4131-bfb1-5c88856882e1\"],\"directoryHash\":\"2ede34f8-1c27-4131-bfb1-5c88856882e1\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/template-backend/template/move\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"templateHashIds\\\":[\\\"2ede34f8-1c27-4131-bfb1-5c88856882e1\\\"],\\\"directoryHash\\\":\\\"2ede34f8-1c27-4131-bfb1-5c88856882e1\\\"}\")\n  .asString();"}]}},"/template-backend/template/remove":{"post":{"summary":"Remove templates","operationId":"remove-templates","tags":["Templates"],"description":"Delete templates. This operation is irreversible.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: delete`\n","requestBody":{"description":"List of template UUIDs to remove","required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/template-backend-TemplateHashId"}}}}},"responses":{"200":{"description":"Number of removed templates","content":{"application/json":{"schema":{"type":"integer","description":"Number of removed templates","example":12}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Templates/operation/remove-templates"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/template-backend/template/remove \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[\"e0326a2d-7697-4ae9-b490-31f97041adcb\"]'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"[\\\"e0326a2d-7697-4ae9-b490-31f97041adcb\\\"]\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/template-backend/template/remove\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify([\n  \"e0326a2d-7697-4ae9-b490-31f97041adcb\"\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/template-backend/template/remove\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/template/remove\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify(['e0326a2d-7697-4ae9-b490-31f97041adcb']));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/template/remove');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('[\"e0326a2d-7697-4ae9-b490-31f97041adcb\"]');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/template-backend/template/remove\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"[\\\"e0326a2d-7697-4ae9-b490-31f97041adcb\\\"]\")\n  .asString();"}]}},"/template-backend/template/getById/{id}":{"get":{"summary":"Get template by ID","operationId":"get-id-template","description":"Retrieve a template identified by ID.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: read`\n","tags":["Templates"],"parameters":[{"in":"path","name":"id","schema":{"type":"integer","format":"int64","example":12},"description":"Template ID","required":true}],"responses":{"200":{"description":"Template details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/template-backend-TemplateDetailsResponse"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Templates/operation/get-id-template"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/template-backend/template/getById/12 \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/template-backend/template/getById/12\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/template-backend/template/getById/12\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/template/getById/12\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/template/getById/12');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/template-backend/template/getById/12\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/template-backend/directory":{"get":{"tags":["Template directories"],"summary":"Get directories","operationId":"get-directories","description":"Retrieve a list of all directories in the Workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: read`\n","responses":{"200":{"description":"Directory list","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/template-backend-DirectoryResponse"}}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Template-directories/operation/get-directories"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/template-backend/directory \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/template-backend/directory\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/template-backend/directory\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/directory\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/directory');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/template-backend/directory\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Template directories"],"summary":"Create directory","operationId":"create-directory","description":"Create a new directory for templates. A directory can store only one type of templates.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: create`\n","requestBody":{"description":"Directory to create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/template-backend-DirectoryCreateRequest"}}}},"responses":{"200":{"description":"Created directory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/template-backend-DirectoryResponse"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Template-directories/operation/create-directory"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/template-backend/directory \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"type\":\"EMAIL\",\"readOnly\":false,\"contentType\":\"TEMPLATE\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"type\\\":\\\"EMAIL\\\",\\\"readOnly\\\":false,\\\"contentType\\\":\\\"TEMPLATE\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/template-backend/directory\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"type\": \"EMAIL\",\n  \"readOnly\": false,\n  \"contentType\": \"TEMPLATE\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/template-backend/directory\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/directory\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string', type: 'EMAIL', readOnly: false, contentType: 'TEMPLATE'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/directory');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"type\":\"EMAIL\",\"readOnly\":false,\"contentType\":\"TEMPLATE\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/template-backend/directory\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"type\\\":\\\"EMAIL\\\",\\\"readOnly\\\":false,\\\"contentType\\\":\\\"TEMPLATE\\\"}\")\n  .asString();"}]}},"/template-backend/directory/byType":{"get":{"tags":["Template directories"],"summary":"Get directories by type","operationId":"get-type-directories","description":"Retrieve a list of directories of a single type.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: read`\n","parameters":[{"in":"query","name":"type","schema":{"type":"string","enum":["SMS","MOBILE_PUSH","WEB_PUSH","DYNAMIC_CONTENT","LANDING_PAGE","EMAIL","SOCIAL_MEDIA","IN_APP"]},"description":"\nThe type of directories to return (directory types match the template types stored in them).\n\nDirectories with null type are always returned.\n","required":true}],"responses":{"200":{"description":"Directory list","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/template-backend-DirectoryResponse"}}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Template-directories/operation/get-type-directories"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/template-backend/directory/byType?type=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/template-backend/directory/byType?type=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/template-backend/directory/byType?type=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/directory/byType?type=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/directory/byType');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'type' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/template-backend/directory/byType?type=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/template-backend/directory/{directoryUUID}":{"patch":{"summary":"Rename directory","operationId":"update_directory","description":"Rename a directory.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: update`\n","tags":["Template directories"],"parameters":[{"$ref":"#/components/parameters/template-backend-directoryUuid"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New name of the directory. If not sent, the name of the directory is set to null.","default":null}}}}}},"responses":{"200":{"description":"Directory details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/template-backend-DirectoryResponse"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Template-directories/operation/update_directory"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PATCH \\\n  --url https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":null}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":null}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PATCH\", \"/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PATCH\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: null}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\nHttpRequest::methodRegister('PATCH');\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb');\n$request->setMethod(HttpRequest::HTTP_METH_PATCH);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":null}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.patch(\"https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":null}\")\n  .asString();"}]},"delete":{"summary":"Remove directory","operationId":"remove_directory","description":"Remove a directory. Only empty directories can be removed.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: delete`\n","tags":["Template directories"],"parameters":[{"$ref":"#/components/parameters/template-backend-directoryUuid"}],"responses":{"200":{"description":"Directory removed"},"400":{"description":"Directory is not empty"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Template-directories/operation/remove_directory"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/template-backend/upload/zip":{"post":{"summary":"Create template from ZIP","operationId":"create-zip-template","tags":["Templates"],"description":"Create new template from ZIP file.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: create`\n","requestBody":{"description":"ZIP file with template","required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["filename"],"properties":{"filename":{"type":"string","format":"binary","description":"ZIP file"}}}}}},"responses":{"200":{"description":"Created template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/template-backend-TemplateResponse"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Templates/operation/create-zip-template"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/template-backend/upload/zip \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: multipart/form-data' \\\n  --form filename=string"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"filename\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"multipart/form-data\"\n    }\n\nconn.request(\"POST\", \"/template-backend/upload/zip\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = new FormData();\ndata.append(\"filename\", \"string\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/template-backend/upload/zip\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/upload/zip\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"filename\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\");\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/upload/zip');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'multipart/form-data'\n]);\n\n$request->setBody('-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"filename\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/template-backend/upload/zip\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .body(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"filename\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\")\n  .asString();"}]}},"/template-backend/upload/url":{"post":{"summary":"Create template from URL","operationId":"create-url-template","tags":["Templates"],"description":"Create new template from URL.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `templates: create`\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"","required":["url"],"properties":{"url":{"type":"string","description":"URL of the template"}}}}}},"responses":{"200":{"description":"Created template","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/template-backend-TemplateResponse"}}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/campaigns#tag/Templates/operation/create-url-template"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/template-backend/upload/url \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"url\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"url\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/template-backend/upload/url\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"url\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/template-backend/upload/url\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/template-backend/upload/url\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({url: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/template-backend/upload/url');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"url\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/template-backend/upload/url\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"url\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/uauth/auth/login/user":{"post":{"tags":["Authorization"],"summary":"Log in as User","description":"Authenticate as a User.\n\n**Note:** To perform operations within a Workspace, you must [select a Workspace](#operation/userProfileLoginUsingPOST).\n\n---\n\n**Authentication:** Not required\n","operationId":"userLogin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-UserAuthenticationRequest"}}},"required":true},"responses":{"200":{"description":"Login details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-AuthenticationResponse"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization/operation/userLogin"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/auth/login/user \\\n  --header 'content-type: application/json' \\\n  --data '{\"username\":\"string\",\"password\":\"string\",\"deviceId\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\",\"organizationName\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"username\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"externalProviderToken\\\":\\\"string\\\",\\\"externalProviderType\\\":\\\"GOOGLE\\\",\\\"organizationName\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/uauth/auth/login/user\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"username\": \"string\",\n  \"password\": \"string\",\n  \"deviceId\": \"string\",\n  \"externalProviderToken\": \"string\",\n  \"externalProviderType\": \"GOOGLE\",\n  \"organizationName\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/auth/login/user\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/auth/login/user\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  username: 'string',\n  password: 'string',\n  deviceId: 'string',\n  externalProviderToken: 'string',\n  externalProviderType: 'GOOGLE',\n  organizationName: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/auth/login/user');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"username\":\"string\",\"password\":\"string\",\"deviceId\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\",\"organizationName\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/auth/login/user\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"username\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"externalProviderToken\\\":\\\"string\\\",\\\"externalProviderType\\\":\\\"GOOGLE\\\",\\\"organizationName\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/uauth/auth/login/user/mfa/verification":{"post":{"tags":["Authorization"],"summary":"Verify User multi-factor authentication","description":"Authenticate as a User with multi-factor authentication.\n\n**Note:** To perform operations within a Workspace, you must [select a Workspace](#operation/userProfileLoginUsingPOST).\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"userMfaLogin","parameters":[{"$ref":"#/components/parameters/uauth-mfaType"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-MultiFactorAuthVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Login details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-AuthenticationResponse"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization/operation/userMfaLogin"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/uauth/auth/login/user/mfa/verification?mfaType=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"verificationCode\":\"string\",\"deviceId\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\",\"organizationName\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"verificationCode\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"externalProviderToken\\\":\\\"string\\\",\\\"externalProviderType\\\":\\\"GOOGLE\\\",\\\"organizationName\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/auth/login/user/mfa/verification?mfaType=SOME_STRING_VALUE\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"verificationCode\": \"string\",\n  \"deviceId\": \"string\",\n  \"externalProviderToken\": \"string\",\n  \"externalProviderType\": \"GOOGLE\",\n  \"organizationName\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/auth/login/user/mfa/verification?mfaType=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/auth/login/user/mfa/verification?mfaType=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  verificationCode: 'string',\n  deviceId: 'string',\n  externalProviderToken: 'string',\n  externalProviderType: 'GOOGLE',\n  organizationName: 'string'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/auth/login/user/mfa/verification');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setQueryData([\n  'mfaType' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"verificationCode\":\"string\",\"deviceId\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\",\"organizationName\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/auth/login/user/mfa/verification?mfaType=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"verificationCode\\\":\\\"string\\\",\\\"deviceId\\\":\\\"string\\\",\\\"externalProviderToken\\\":\\\"string\\\",\\\"externalProviderType\\\":\\\"GOOGLE\\\",\\\"organizationName\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/uauth/auth/login/user/profile/{businessProfileUUID}":{"post":{"tags":["Authorization"],"summary":"Select Workspace","description":"After logging in as a User, select a Workspace where you want to perform operations.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"userProfileLoginUsingPOST","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/uauth-businessProfileId"}],"responses":{"200":{"description":"Login details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-AuthenticationResponse"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}},"423":{"$ref":"#/components/responses/uauth-423"}},"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization/operation/userProfileLoginUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/auth/login/user/profile/%7BbusinessProfileUUID%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/uauth/auth/login/user/profile/%7BbusinessProfileUUID%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/auth/login/user/profile/%7BbusinessProfileUUID%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/auth/login/user/profile/%7BbusinessProfileUUID%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/auth/login/user/profile/%7BbusinessProfileUUID%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/auth/login/user/profile/%7BbusinessProfileUUID%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/business-profile/":{"get":{"tags":["Authorization"],"summary":"Get Workspaces","description":"Retrieve a list of Workspaces available to the user.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"getBusinessProfilesUsingGET","parameters":[{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","description":"Page size","required":false,"schema":{"type":"integer","format":"int32","default":5000}},{"name":"query","in":"query","description":"Search query","required":false,"schema":{"type":"string","default":""}},{"name":"sort","in":"query","description":"Sort field","required":false,"schema":{"type":"string","default":""}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/uauth-BusinessProfileResponse"}}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization/operation/getBusinessProfilesUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/uauth/business-profile/?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&query=SOME_STRING_VALUE&sort=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uauth/business-profile/?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&query=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/business-profile/?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&query=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/business-profile/?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&query=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/business-profile/');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'size' => 'SOME_INTEGER_VALUE',\n  'query' => 'SOME_STRING_VALUE',\n  'sort' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/business-profile/?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&query=SOME_STRING_VALUE&sort=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/business-profile/ids":{"get":{"tags":["Authorization"],"summary":"Get Workspaces ids with user-specific data","description":"Retrieve a list of workspace ids available to the user, with added user-specific data\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"getBusinessProfilesIdsUsingGET","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/uauth-BusinessProfileUserSpecific"}}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization/operation/getBusinessProfilesIdsUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/business-profile/ids \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uauth/business-profile/ids\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/business-profile/ids\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/business-profile/ids\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/business-profile/ids');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/business-profile/ids\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/business-profile/mark-favorite":{"post":{"tags":["Settings"],"summary":"Add or remove business profile to favorites","description":"Business profile can be added or removed from favorites using this endpoint\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"postBPFavorite","security":[{"JWT":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-MarkUserFavoriteBusinessProfile"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Settings/operation/postBPFavorite"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/business-profile/mark-favorite \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"businessProfileGuid\":\"string\",\"favorite\":true}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"businessProfileGuid\\\":\\\"string\\\",\\\"favorite\\\":true}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/business-profile/mark-favorite\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"businessProfileGuid\": \"string\",\n  \"favorite\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/business-profile/mark-favorite\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/business-profile/mark-favorite\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({businessProfileGuid: 'string', favorite: true}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/business-profile/mark-favorite');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"businessProfileGuid\":\"string\",\"favorite\":true}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/business-profile/mark-favorite\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"businessProfileGuid\\\":\\\"string\\\",\\\"favorite\\\":true}\")\n  .asString();"}]}},"/uauth/business-profile/current":{"get":{"tags":["Authorization"],"summary":"Get current Workspace","description":"Retrieve information about the currently selected workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"getCurrentBusinessProfileUsingGET","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-CurrentBusinessProfileResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization/operation/getCurrentBusinessProfileUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/business-profile/current \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uauth/business-profile/current\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/business-profile/current\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/business-profile/current\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/business-profile/current');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/business-profile/current\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/business-profile/mfa/requirements":{"post":{"tags":["Access control"],"summary":"Enable MFA requirement for workspace","description":"This request enables multi-factor authentication requirement for the currently selected workspace. After enabling this setting, only users with MFA can access the workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"setMfaRequirementForBusinessProfileUsingPOST","responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-control/operation/setMfaRequirementForBusinessProfileUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/business-profile/mfa/requirements \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/uauth/business-profile/mfa/requirements\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/business-profile/mfa/requirements\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/business-profile/mfa/requirements\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/business-profile/mfa/requirements');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/business-profile/mfa/requirements\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"delete":{"tags":["Access control"],"summary":"Disable MFA requirement for workspace","description":"This request disables multi-factor authentication requirement for the currently selected workspace. After disabling this setting, users without MFA can access the workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"removeMfaRequirementFromBusinessProfileUsingDELETE","responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-control/operation/removeMfaRequirementFromBusinessProfileUsingDELETE"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/uauth/business-profile/mfa/requirements \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/uauth/business-profile/mfa/requirements\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/uauth/business-profile/mfa/requirements\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/business-profile/mfa/requirements\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/business-profile/mfa/requirements');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/uauth/business-profile/mfa/requirements\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/change-password":{"post":{"tags":["User account management"],"summary":"Change user password","description":"Change a user's password.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"changePasswordUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ChangePasswordRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ChangePasswordResponse"}}}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-account-management/operation/changePasswordUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/change-password \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"currentPassword\":\"string\",\"newPassword\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"currentPassword\\\":\\\"string\\\",\\\"newPassword\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/change-password\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"currentPassword\": \"string\",\n  \"newPassword\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/change-password\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/change-password\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({currentPassword: 'string', newPassword: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/change-password');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"currentPassword\":\"string\",\"newPassword\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/change-password\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"currentPassword\\\":\\\"string\\\",\\\"newPassword\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/uauth/permissions/group/role/{roleId}":{"get":{"tags":["Access groups"],"summary":"List grouped permissions","description":"List all permissions for a role, including information about permission grouping.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: read`\n","operationId":"listPermissionGroupUsingGET","parameters":[{"$ref":"#/components/parameters/uauth-roleId"}],"responses":{"200":{"description":"This schema is **recursive**: the `children` array can include more groups, which include more groups, etc.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/uauth-PermissionGroupDetailsDTO"}}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-groups/operation/listPermissionGroupUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/permissions/group/role/%7BroleId%7D"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/uauth/permissions/group/role/%7BroleId%7D\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/permissions/group/role/%7BroleId%7D\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/permissions/group/role/%7BroleId%7D\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/permissions/group/role/%7BroleId%7D');\n$request->setMethod(HTTP_METH_GET);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/permissions/group/role/%7BroleId%7D\")\n  .asString();"}]}},"/uauth/password-reset/request":{"post":{"tags":["User account management"],"summary":"Request user password reset","description":"The user can request a password reset token sent by email.\n\n---\n\n**Authentication:** Not required\n","operationId":"requestPasswordResetUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-PasswordResetRequest"}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-account-management/operation/requestPasswordResetUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/password-reset/request \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/uauth/password-reset/request\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/password-reset/request\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/password-reset/request\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({email: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/password-reset/request');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/password-reset/request\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/uauth/password-reset/confirmation":{"post":{"tags":["User account management"],"summary":"Confirm user password reset","description":"Confirm user password reset using the token received by email.\n\n---\n\n**Authentication:** Not required\n","operationId":"confirmPasswordResetUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-PasswordResetConfirmation"}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-account-management/operation/confirmPasswordResetUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/password-reset/confirmation \\\n  --header 'content-type: application/json' \\\n  --data '{\"token\":\"string\",\"password\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"token\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/uauth/password-reset/confirmation\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"token\": \"string\",\n  \"password\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/password-reset/confirmation\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/password-reset/confirmation\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({token: 'string', password: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/password-reset/confirmation');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"token\":\"string\",\"password\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/password-reset/confirmation\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"token\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/uauth/roles/listing":{"get":{"tags":["Access groups"],"summary":"Get role groups","description":"Retrieve a list of user role groups.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: read`\n","operationId":"getRoleGroupsUsingGET","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/uauth-RoleGroupResponse"}}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-groups/operation/getRoleGroupsUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/roles/listing \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uauth/roles/listing\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/roles/listing\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/roles/listing\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/roles/listing');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/roles/listing\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/roles/role-group":{"post":{"tags":["Access groups"],"summary":"Create role group","description":"Create a new role group. A new group does not include any roles. To add a role to a group, [update the role](#operation/updateRoleUsingPOST).\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: create`\n","operationId":"createRoleGroupUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-RoleGroupDataRequest"}}},"required":true},"responses":{"200":{"description":"New group created; response includes all existing groups","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/uauth-RoleGroupResponse"}}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-groups/operation/createRoleGroupUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/roles/role-group \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"description\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/roles/role-group\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"description\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/roles/role-group\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/roles/role-group\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string', description: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/roles/role-group');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"description\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/roles/role-group\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/uauth/roles/role-group/{groupId}":{"post":{"tags":["Access groups"],"summary":"Update role group","description":"Update a group. To add a role to a group, [update the role](#operation/updateRoleUsingPOST).\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: update`\n","operationId":"updateRoleGroupUsingPOST","parameters":[{"$ref":"#/components/parameters/uauth-roleGroupId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-RoleGroupDataRequest"}}},"required":true},"responses":{"200":{"description":"Group updated; response includes all existing groups","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/uauth-RoleGroupResponse"}}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-groups/operation/updateRoleGroupUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/roles/role-group/%7BgroupId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"description\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/roles/role-group/%7BgroupId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"description\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/roles/role-group/%7BgroupId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/roles/role-group/%7BgroupId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({name: 'string', description: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/roles/role-group/%7BgroupId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"description\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/roles/role-group/%7BgroupId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\"}\")\n  .asString();"}]},"delete":{"tags":["Access groups"],"summary":"Delete role group","description":"Delete a role group permanently.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: delete`\n","operationId":"deleteRoleGroupUsingDELETE","parameters":[{"$ref":"#/components/parameters/uauth-roleGroupId"}],"responses":{"200":{"description":"Group deleted; response includes all existing groups","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/uauth-RoleGroupResponse"}}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-groups/operation/deleteRoleGroupUsingDELETE"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/uauth/roles/role-group/%7BgroupId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/uauth/roles/role-group/%7BgroupId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/uauth/roles/role-group/%7BgroupId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/roles/role-group/%7BgroupId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/roles/role-group/%7BgroupId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/uauth/roles/role-group/%7BgroupId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/roles/role":{"post":{"tags":["Access groups"],"summary":"Create role","description":"Create a new user role.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: update`\n","operationId":"createRoleUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-RoleDataRequest"}}},"required":true},"responses":{"200":{"description":"Role created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-RoleFullResponse"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-groups/operation/createRoleUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/roles/role \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"group\":0,\"name\":\"string\",\"description\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"group\\\":0,\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/roles/role\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"group\": 0,\n  \"name\": \"string\",\n  \"description\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/roles/role\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/roles/role\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({group: 0, name: 'string', description: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/roles/role');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"group\":0,\"name\":\"string\",\"description\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/roles/role\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"group\\\":0,\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/uauth/roles/{roleId}":{"get":{"tags":["Access groups"],"summary":"Get role","description":"Retrieve the details of a user role\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: read`\n","operationId":"getRoleUsingGET","parameters":[{"$ref":"#/components/parameters/uauth-roleId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-RoleFullResponse"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-groups/operation/getRoleUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/roles/%7BroleId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uauth/roles/%7BroleId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/roles/%7BroleId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/roles/%7BroleId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/roles/%7BroleId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/roles/%7BroleId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/roles/role/{roleId}":{"post":{"tags":["Access groups"],"summary":"Update role","description":"Update a user role.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: update`\n","operationId":"updateRoleUsingPOST","parameters":[{"$ref":"#/components/parameters/uauth-roleId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-RoleDataRequest"}}},"required":true},"responses":{"200":{"description":"Role updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-RoleFullResponse"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-groups/operation/updateRoleUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/roles/role/%7BroleId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"group\":0,\"name\":\"string\",\"description\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"group\\\":0,\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/roles/role/%7BroleId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"group\": 0,\n  \"name\": \"string\",\n  \"description\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/roles/role/%7BroleId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/roles/role/%7BroleId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({group: 0, name: 'string', description: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/roles/role/%7BroleId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"group\":0,\"name\":\"string\",\"description\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/roles/role/%7BroleId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"group\\\":0,\\\"name\\\":\\\"string\\\",\\\"description\\\":\\\"string\\\"}\")\n  .asString();"}]},"delete":{"tags":["Access groups"],"summary":"Delete role","description":"Delete a user role permanently.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: delete`\n","operationId":"deleteRoleUsingDELETE_1","parameters":[{"$ref":"#/components/parameters/uauth-roleId"}],"responses":{"200":{"description":"Role deleted, response includes all existing groups","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/uauth-RoleGroupResponse"}}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-groups/operation/deleteRoleUsingDELETE_1"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/uauth/roles/role/%7BroleId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/uauth/roles/role/%7BroleId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/uauth/roles/role/%7BroleId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/roles/role/%7BroleId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/roles/role/%7BroleId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/uauth/roles/role/%7BroleId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/user/confirmation/{confirmationToken}":{"get":{"tags":["User account management"],"summary":"Confirm user registration","description":"Confirm user registration. The token is sent by email.\n\n---\n\n**Authentication:** Not required\n","operationId":"confirmUserUsingGET","parameters":[{"name":"confirmationToken","in":"path","required":true,"description":"Confirmation token","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-account-management/operation/confirmUserUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/user/confirmation/%7BconfirmationToken%7D"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/uauth/user/confirmation/%7BconfirmationToken%7D\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/user/confirmation/%7BconfirmationToken%7D\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/user/confirmation/%7BconfirmationToken%7D\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/user/confirmation/%7BconfirmationToken%7D');\n$request->setMethod(HTTP_METH_GET);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/user/confirmation/%7BconfirmationToken%7D\")\n  .asString();"}]}},"/uauth/user/register":{"post":{"tags":["User account management"],"summary":"Register user","description":"Register a new user. Before the new account can be used, it must be [confirmed](#operation/confirmUserUsingGET).\n\n---\n\n**Authentication:** Not required\n","operationId":"registerUserUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-UserRegistrationRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}},"409":{"description":"User already registered"}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-account-management/operation/registerUserUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/user/register \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\",\"password\":\"string\",\"invitationToken\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"invitationToken\\\":\\\"string\\\",\\\"externalProviderToken\\\":\\\"string\\\",\\\"externalProviderType\\\":\\\"GOOGLE\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/uauth/user/register\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\",\n  \"password\": \"string\",\n  \"invitationToken\": \"string\",\n  \"externalProviderToken\": \"string\",\n  \"externalProviderType\": \"GOOGLE\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/user/register\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/user/register\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  email: 'string',\n  password: 'string',\n  invitationToken: 'string',\n  externalProviderToken: 'string',\n  externalProviderType: 'GOOGLE'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/user/register');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\",\"password\":\"string\",\"invitationToken\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/user/register\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"invitationToken\\\":\\\"string\\\",\\\"externalProviderToken\\\":\\\"string\\\",\\\"externalProviderType\\\":\\\"GOOGLE\\\"}\")\n  .asString();"}]}},"/uauth/user/register/invitation/{invitationToken}":{"get":{"tags":["User management"],"summary":"Find user by invitation token","description":"You can retrieve the details of an account by providing the invitation token generated for that account.\n\n---\n\n**Authentication:** Not required\n","operationId":"findByInvitationTokenGET","parameters":[{"name":"invitationToken","in":"path","required":true,"description":"Invitation token","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-InvitationResponse"}}}},"201":{"description":"Created","content":{}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/findByInvitationTokenGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/user/register/invitation/%7BinvitationToken%7D"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/uauth/user/register/invitation/%7BinvitationToken%7D\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/user/register/invitation/%7BinvitationToken%7D\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/user/register/invitation/%7BinvitationToken%7D\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/user/register/invitation/%7BinvitationToken%7D');\n$request->setMethod(HTTP_METH_GET);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/user/register/invitation/%7BinvitationToken%7D\")\n  .asString();"}]}},"/uauth/user/register/resend-confirmation":{"post":{"tags":["User account management"],"summary":"Re-send user confirmation token","description":"If the confirmation token does not reach the user's inbox, you can send a new one.\n\n---\n\n**Authentication:** Not required\n","operationId":"resendConfirmationUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ResendConfirmationPayload"}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-account-management/operation/resendConfirmationUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/user/register/resend-confirmation \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/uauth/user/register/resend-confirmation\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/user/register/resend-confirmation\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/user/register/resend-confirmation\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({email: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/user/register/resend-confirmation');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/user/register/resend-confirmation\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/uauth/users/available-roles":{"get":{"tags":["Access groups"],"summary":"Get available roles","description":"Retrieve a list of user roles available in the business profile.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**Authentication:** Not required\n","operationId":"getAvailableRolesUsingGET","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/uauth-RoleResponse"}}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-groups/operation/getAvailableRolesUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/users/available-roles"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/uauth/users/available-roles\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/users/available-roles\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/available-roles\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/available-roles');\n$request->setMethod(HTTP_METH_GET);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/users/available-roles\")\n  .asString();"}]}},"/uauth/users/invitations/invite":{"post":{"tags":["User management"],"summary":"Invite user","description":"Invite a user to join a workspace. The user receives an email with an invitation token.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: create`\n","operationId":"inviteUserUsingPOST","requestBody":{"description":"All the data sent in this request applies to the user being invited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-BusinessProfileInvitationRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-BusinessProfileInvitationResponse"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/inviteUserUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/users/invitations/invite \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"roles\":[0]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"email\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"roles\\\":[0]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/users/invitations/invite\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"email\": \"string\",\n  \"firstName\": \"string\",\n  \"lastName\": \"string\",\n  \"roles\": [\n    0\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/users/invitations/invite\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/invitations/invite\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({email: 'string', firstName: 'string', lastName: 'string', roles: [0]}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/invitations/invite');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"roles\":[0]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/users/invitations/invite\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"email\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"roles\\\":[0]}\")\n  .asString();"}]}},"/uauth/users/invitations/invite-bulk":{"post":{"tags":["User management"],"summary":"Invite many users","description":"Invite a number of users to the workspace at once. The users receive emails with invitation tokens.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: create`\n","operationId":"bulkInviteUsersUsingPOST","requestBody":{"description":"All the data sent in this request refers to the users being invited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-BusinessProfileBulkInvitationRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-BusinessProfileInvitationResponse"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/bulkInviteUsersUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/users/invitations/invite-bulk \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"invitations\":[{\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"roles\":[0]}]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"invitations\\\":[{\\\"email\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"roles\\\":[0]}]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/users/invitations/invite-bulk\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"invitations\": [\n    {\n      \"email\": \"string\",\n      \"firstName\": \"string\",\n      \"lastName\": \"string\",\n      \"roles\": [\n        0\n      ]\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/users/invitations/invite-bulk\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/invitations/invite-bulk\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  invitations: [{email: 'string', firstName: 'string', lastName: 'string', roles: [0]}]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/invitations/invite-bulk');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"invitations\":[{\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"roles\":[0]}]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/users/invitations/invite-bulk\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"invitations\\\":[{\\\"email\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"roles\\\":[0]}]}\")\n  .asString();"}]}},"/uauth/users/invitations/{invitationIds}":{"delete":{"tags":["User management"],"summary":"Delete invitations","description":"Delete invitations that were not yet accepted.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: delete`\n","operationId":"deleteInvitationUsingDELETE","parameters":[{"$ref":"#/components/parameters/uauth-InvitationIds"}],"responses":{"200":{"description":"OK","content":{}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/deleteInvitationUsingDELETE"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/uauth/users/invitations/%7BinvitationIds%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/uauth/users/invitations/%7BinvitationIds%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/uauth/users/invitations/%7BinvitationIds%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/invitations/%7BinvitationIds%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/invitations/%7BinvitationIds%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/uauth/users/invitations/%7BinvitationIds%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/users/invitations/{invitationId}":{"post":{"tags":["User management"],"summary":"Update invitation","description":"Update the details of an invitation.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: update`\n","operationId":"updateInvitationUsingPOST","parameters":[{"name":"invitationId","in":"path","description":"To obtain the invitation ID, check the [list of users with PENDING status](#/operation/UsersListingUsingGET). The invitation ID for a user is the same as the ID of that user.","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"description":"All the data sent in this request refers to the user being invited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-InvitationUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/updateInvitationUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/users/invitations/%7BinvitationId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"firstName\":\"string\",\"lastName\":\"string\",\"roles\":[0]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"roles\\\":[0]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/users/invitations/%7BinvitationId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"firstName\": \"string\",\n  \"lastName\": \"string\",\n  \"roles\": [\n    0\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/users/invitations/%7BinvitationId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/invitations/%7BinvitationId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({firstName: 'string', lastName: 'string', roles: [0]}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/invitations/%7BinvitationId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"firstName\":\"string\",\"lastName\":\"string\",\"roles\":[0]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/users/invitations/%7BinvitationId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"roles\\\":[0]}\")\n  .asString();"}]}},"/uauth/users/my-account/strongest-password-settings":{"get":{"tags":["Access control"],"operationId":"getStrongestPasswordSettings","summary":"Get own strongest password policy","description":"If a user has access to more than one workspace, you can use this endpoint to find the strictest password policy of all the policies in these workspaces. The user's password must meet the requirements of that strictest policy.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/uauth-BusinessProfilePasswordSettingsData"}}}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-control/operation/getStrongestPasswordSettings"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/users/my-account/strongest-password-settings"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/uauth/users/my-account/strongest-password-settings\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/users/my-account/strongest-password-settings\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/my-account/strongest-password-settings\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/my-account/strongest-password-settings');\n$request->setMethod(HTTP_METH_GET);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/users/my-account/strongest-password-settings\")\n  .asString();"}]}},"/uauth/users/listing":{"get":{"tags":["User management"],"summary":"List users","description":"List users from the current workspace\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: read`\n","operationId":"listUsersUsingGET","parameters":[{"$ref":"#/components/parameters/uauth-PaginationPage"},{"$ref":"#/components/parameters/uauth-PaginationSize"},{"name":"status","in":"query","description":"Filters the results by status of the users","required":true,"schema":{"type":"string","enum":["ALL","ACTIVE","PENDING","EXPIRED","GUEST","MANAGED"]}},{"name":"search","in":"query","required":true,"description":"String to search for in the first names, surnames, and email addresses","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ReactUsersListing"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/listUsersUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&search=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&search=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&search=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&search=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/listing');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'size' => 'SOME_INTEGER_VALUE',\n  'status' => 'SOME_STRING_VALUE',\n  'search' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&search=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/users/listing/autocomplete":{"get":{"tags":["User management"],"summary":"Autocomplete user search result","description":"You can use this endpoint to obtain data for search autocomplete.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required (at least one):** `settings_users: read`, `analytics: read`\n","operationId":"getListingAutocomplete","parameters":[{"name":"email","in":"query","description":"User's email address","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/uauth-UserAutoCompleteResponse"}}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/getListingAutocomplete"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/uauth/users/listing/autocomplete?email=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uauth/users/listing/autocomplete?email=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/users/listing/autocomplete?email=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/listing/autocomplete?email=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/listing/autocomplete');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'email' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/users/listing/autocomplete?email=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/users/profile-association/{ids}":{"delete":{"tags":["User management"],"summary":"Remove users from workspace","description":"Delete user associations from a workspace. This does not delete the user accounts.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: delete`\n","operationId":"deleteUsersUsingDELETE","parameters":[{"$ref":"#/components/parameters/uauth-UserIds"}],"responses":{"200":{"description":"OK","content":{}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/deleteUsersUsingDELETE"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url 'https://api.synerise.com/uauth/users/profile-association/11405,11406,11407' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/uauth/users/profile-association/11405,11406,11407\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/uauth/users/profile-association/11405,11406,11407\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/profile-association/11405,11406,11407\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/profile-association/11405,11406,11407');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/uauth/users/profile-association/11405,11406,11407\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/users/my-account":{"get":{"tags":["User account management"],"summary":"Get user's own data","description":"A user can retrieve their account data.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"getUserOwnDataUsingGET","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-MyAccountUserResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-account-management/operation/getUserOwnDataUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/users/my-account \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uauth/users/my-account\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/users/my-account\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/my-account\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/my-account');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/users/my-account\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["User account management"],"summary":"Update user's own data","description":"A user can update their own details.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"updateUsersOwnDataUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ReactUserEditRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-MyAccountUserResponse"}}}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-account-management/operation/updateUsersOwnDataUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/users/my-account \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"firstName\":\"string\",\"lastName\":\"string\",\"avatar\":\"string\",\"phone\":\"string\",\"language\":\"pl\",\"organizationRole\":\"string\",\"introduction\":\"string\",\"confirmed\":true,\"mailAccountId\":0,\"description\":\"string\",\"dateFormatNotation\":\"US\",\"timeFormatNotation\":\"US\",\"numberFormatNotation\":\"US\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"avatar\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"language\\\":\\\"pl\\\",\\\"organizationRole\\\":\\\"string\\\",\\\"introduction\\\":\\\"string\\\",\\\"confirmed\\\":true,\\\"mailAccountId\\\":0,\\\"description\\\":\\\"string\\\",\\\"dateFormatNotation\\\":\\\"US\\\",\\\"timeFormatNotation\\\":\\\"US\\\",\\\"numberFormatNotation\\\":\\\"US\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/users/my-account\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"firstName\": \"string\",\n  \"lastName\": \"string\",\n  \"avatar\": \"string\",\n  \"phone\": \"string\",\n  \"language\": \"pl\",\n  \"organizationRole\": \"string\",\n  \"introduction\": \"string\",\n  \"confirmed\": true,\n  \"mailAccountId\": 0,\n  \"description\": \"string\",\n  \"dateFormatNotation\": \"US\",\n  \"timeFormatNotation\": \"US\",\n  \"numberFormatNotation\": \"US\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/users/my-account\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/my-account\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  firstName: 'string',\n  lastName: 'string',\n  avatar: 'string',\n  phone: 'string',\n  language: 'pl',\n  organizationRole: 'string',\n  introduction: 'string',\n  confirmed: true,\n  mailAccountId: 0,\n  description: 'string',\n  dateFormatNotation: 'US',\n  timeFormatNotation: 'US',\n  numberFormatNotation: 'US'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/my-account');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"firstName\":\"string\",\"lastName\":\"string\",\"avatar\":\"string\",\"phone\":\"string\",\"language\":\"pl\",\"organizationRole\":\"string\",\"introduction\":\"string\",\"confirmed\":true,\"mailAccountId\":0,\"description\":\"string\",\"dateFormatNotation\":\"US\",\"timeFormatNotation\":\"US\",\"numberFormatNotation\":\"US\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/users/my-account\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"avatar\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"language\\\":\\\"pl\\\",\\\"organizationRole\\\":\\\"string\\\",\\\"introduction\\\":\\\"string\\\",\\\"confirmed\\\":true,\\\"mailAccountId\\\":0,\\\"description\\\":\\\"string\\\",\\\"dateFormatNotation\\\":\\\"US\\\",\\\"timeFormatNotation\\\":\\\"US\\\",\\\"numberFormatNotation\\\":\\\"US\\\"}\")\n  .asString();"}]},"delete":{"tags":["User account management"],"summary":"Delete user's own account","description":"A user can delete their own account.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"deleteUserUsingDELETE","responses":{"200":{"description":"OK","content":{}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-account-management/operation/deleteUserUsingDELETE"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/uauth/users/my-account \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/uauth/users/my-account\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/uauth/users/my-account\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/my-account\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/my-account');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/uauth/users/my-account\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/v2/auth/login/profile":{"post":{"summary":"Log in as Workspace","description":"Obtain a new Workspace JWT Token.\n\n---\n\n**Authentication:** Not required\n","tags":["Authorization"],"operationId":"profileLogin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-BusinessProfileAuthenticationRequest"}}},"required":true},"responses":{"200":{"description":"New JWT token for Workspace authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-TokenResponse"}}}},"400":{"description":"Request malformed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-Error"}}}},"401":{"description":"Unauthorized, API key does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-Error"}}}}},"x-snr-doc-urls":["/api-reference/authorization#tag/Authorization/operation/profileLogin"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/v2/auth/login/profile \\\n  --header 'content-type: application/json' \\\n  --data '{\"apiKey\":\"64c09614-1b2a-42f7-804d-f647243eb1ab\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"apiKey\\\":\\\"64c09614-1b2a-42f7-804d-f647243eb1ab\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/uauth/v2/auth/login/profile\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"apiKey\": \"64c09614-1b2a-42f7-804d-f647243eb1ab\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/v2/auth/login/profile\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/v2/auth/login/profile\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({apiKey: '64c09614-1b2a-42f7-804d-f647243eb1ab'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/v2/auth/login/profile');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"apiKey\":\"64c09614-1b2a-42f7-804d-f647243eb1ab\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/v2/auth/login/profile\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"apiKey\\\":\\\"64c09614-1b2a-42f7-804d-f647243eb1ab\\\"}\")\n  .asString();"}]}},"/uauth/users/{userId}":{"get":{"tags":["User management"],"summary":"Get user data","operationId":"getUserDataUsingGET","parameters":[{"$ref":"#/components/parameters/uauth-UserId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ReactUserResponse"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/getUserDataUsingGET"],"description":"\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/users/%7BuserId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uauth/users/%7BuserId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/users/%7BuserId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/%7BuserId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/%7BuserId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/users/%7BuserId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["User management"],"summary":"Update user data","operationId":"updateUserDataUsingPOST","parameters":[{"$ref":"#/components/parameters/uauth-UserId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ReactOtherUserEditRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ReactUserResponse"}}}},"201":{"description":"Created","content":{}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/updateUserDataUsingPOST"],"description":"\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/users/%7BuserId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"firstName\":\"string\",\"lastName\":\"string\",\"avatar\":\"string\",\"phone\":\"string\",\"language\":\"pl\",\"organizationRole\":\"string\",\"introduction\":\"string\",\"confirmed\":true,\"mailAccountId\":0,\"description\":\"string\",\"dateFormatNotation\":\"US\",\"timeFormatNotation\":\"US\",\"numberFormatNotation\":\"US\",\"roles\":[0]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"avatar\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"language\\\":\\\"pl\\\",\\\"organizationRole\\\":\\\"string\\\",\\\"introduction\\\":\\\"string\\\",\\\"confirmed\\\":true,\\\"mailAccountId\\\":0,\\\"description\\\":\\\"string\\\",\\\"dateFormatNotation\\\":\\\"US\\\",\\\"timeFormatNotation\\\":\\\"US\\\",\\\"numberFormatNotation\\\":\\\"US\\\",\\\"roles\\\":[0]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/users/%7BuserId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"firstName\": \"string\",\n  \"lastName\": \"string\",\n  \"avatar\": \"string\",\n  \"phone\": \"string\",\n  \"language\": \"pl\",\n  \"organizationRole\": \"string\",\n  \"introduction\": \"string\",\n  \"confirmed\": true,\n  \"mailAccountId\": 0,\n  \"description\": \"string\",\n  \"dateFormatNotation\": \"US\",\n  \"timeFormatNotation\": \"US\",\n  \"numberFormatNotation\": \"US\",\n  \"roles\": [\n    0\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/users/%7BuserId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/%7BuserId%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  firstName: 'string',\n  lastName: 'string',\n  avatar: 'string',\n  phone: 'string',\n  language: 'pl',\n  organizationRole: 'string',\n  introduction: 'string',\n  confirmed: true,\n  mailAccountId: 0,\n  description: 'string',\n  dateFormatNotation: 'US',\n  timeFormatNotation: 'US',\n  numberFormatNotation: 'US',\n  roles: [0]\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/%7BuserId%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"firstName\":\"string\",\"lastName\":\"string\",\"avatar\":\"string\",\"phone\":\"string\",\"language\":\"pl\",\"organizationRole\":\"string\",\"introduction\":\"string\",\"confirmed\":true,\"mailAccountId\":0,\"description\":\"string\",\"dateFormatNotation\":\"US\",\"timeFormatNotation\":\"US\",\"numberFormatNotation\":\"US\",\"roles\":[0]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/users/%7BuserId%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"avatar\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"language\\\":\\\"pl\\\",\\\"organizationRole\\\":\\\"string\\\",\\\"introduction\\\":\\\"string\\\",\\\"confirmed\\\":true,\\\"mailAccountId\\\":0,\\\"description\\\":\\\"string\\\",\\\"dateFormatNotation\\\":\\\"US\\\",\\\"timeFormatNotation\\\":\\\"US\\\",\\\"numberFormatNotation\\\":\\\"US\\\",\\\"roles\\\":[0]}\")\n  .asString();"}]}},"/uauth/users/activate":{"post":{"tags":["User management"],"summary":"Activate users","description":"Activate access to the workspace for a number of users\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: delete`\n","operationId":"activateUsersUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ActivationRequest"}}}},"responses":{"200":{"description":"OK","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/activateUsersUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/users/activate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"ids\":[0]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"ids\\\":[0]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/users/activate\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"ids\": [\n    0\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/users/activate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/activate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({ids: [0]}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/activate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"ids\":[0]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/users/activate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"ids\\\":[0]}\")\n  .asString();"}]}},"/uauth/users/deactivate":{"post":{"tags":["User management"],"summary":"De-activate users","description":"De-activate access to the workspace for a number of users\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: update`\n","operationId":"deactivateUsersUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ActivationRequest"}}}},"responses":{"200":{"description":"OK","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/deactivateUsersUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/users/deactivate \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"ids\":[0]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"ids\\\":[0]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/users/deactivate\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"ids\": [\n    0\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/users/deactivate\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/deactivate\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({ids: [0]}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/deactivate');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"ids\":[0]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/users/deactivate\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"ids\\\":[0]}\")\n  .asString();"}]}},"/uauth/users/{userId}/access-time":{"put":{"tags":["User management"],"summary":"Change access expiration time","description":"Change the date when a user's access to the workspace is cancelled.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: update`\n","operationId":"changeUserAccessExpirationDateUsingPut","parameters":[{"$ref":"#/components/parameters/uauth-UserId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ReactUserProlongAccessRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/changeUserAccessExpirationDateUsingPut"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/uauth/users/%7BuserId%7D/access-time \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"expirationDate\":\"2019-08-24T14:15:22Z\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"expirationDate\\\":\\\"2019-08-24T14:15:22Z\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/uauth/users/%7BuserId%7D/access-time\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"expirationDate\": \"2019-08-24T14:15:22Z\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/uauth/users/%7BuserId%7D/access-time\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/%7BuserId%7D/access-time\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({expirationDate: '2019-08-24T14:15:22Z'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/%7BuserId%7D/access-time');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"expirationDate\":\"2019-08-24T14:15:22Z\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/uauth/users/%7BuserId%7D/access-time\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"expirationDate\\\":\\\"2019-08-24T14:15:22Z\\\"}\")\n  .asString();"}]}},"/uauth/users/{userId}/password-reset":{"post":{"tags":["User management"],"summary":"Reset another user's password","description":"Request a password reset for another user. That user receives an email with a password reset token. Their account is locked until the new password is set.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: update`\n","operationId":"resetPasswordUsingPOST","parameters":[{"$ref":"#/components/parameters/uauth-UserId"}],"responses":{"200":{"description":"OK","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/resetPasswordUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/users/%7BuserId%7D/password-reset"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"POST\", \"/uauth/users/%7BuserId%7D/password-reset\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/users/%7BuserId%7D/password-reset\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/%7BuserId%7D/password-reset\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/%7BuserId%7D/password-reset');\n$request->setMethod(HTTP_METH_POST);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/users/%7BuserId%7D/password-reset\")\n  .asString();"}]}},"/uauth/users/{userId}/mfa-reset":{"put":{"tags":["User management"],"summary":"Reset another user's multi-factor authentication","description":"You can reset the settings of another user's multi-factor authentication. This can be used, for example, if the user has lost both their device with the MFA application and the recovery code.\nThe user will need to re-enable MFA in the same way as when setting it up for the first time.\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: update`\n","operationId":"resetMFAUsingPUT","parameters":[{"$ref":"#/components/parameters/uauth-UserId"}],"responses":{"200":{"description":"OK","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/resetMFAUsingPUT"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/uauth/users/%7BuserId%7D/mfa-reset"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"PUT\", \"/uauth/users/%7BuserId%7D/mfa-reset\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/uauth/users/%7BuserId%7D/mfa-reset\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/%7BuserId%7D/mfa-reset\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/%7BuserId%7D/mfa-reset');\n$request->setMethod(HTTP_METH_PUT);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/uauth/users/%7BuserId%7D/mfa-reset\")\n  .asString();"}]}},"/uauth/users/{ids}":{"delete":{"tags":["User management"],"summary":"Delete user account","description":"Permanently deletes a user account.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users: delete`\n","operationId":"deleteManagedUserUsingDELETE","parameters":[{"$ref":"#/components/parameters/uauth-UserIds"}],"responses":{"200":{"description":"OK","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/User-management/operation/deleteManagedUserUsingDELETE"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url 'https://api.synerise.com/uauth/users/11405,11406,11407' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/uauth/users/11405,11406,11407\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/uauth/users/11405,11406,11407\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/11405,11406,11407\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/11405,11406,11407');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/uauth/users/11405,11406,11407\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/settings/user-bp-ip-policy":{"get":{"tags":["Access control"],"summary":"Get IP allowlist policy","operationId":"getUserBpIpPolicyUsingGET","description":"Retrieve the details of IP allowlisting policy of the workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users_am_ip_access_restriction: read`\n","responses":{"200":{"description":"IP policy details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-IpPolicySettings"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-control/operation/getUserBpIpPolicyUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/settings/user-bp-ip-policy \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uauth/settings/user-bp-ip-policy\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/settings/user-bp-ip-policy\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/settings/user-bp-ip-policy\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/settings/user-bp-ip-policy');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/settings/user-bp-ip-policy\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Access control"],"summary":"Update IP allowlist policy","operationId":"updateUserBpIpPolicyUsingPOST","description":"Update the details of IP allowlisting policy of the workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users_am_ip_access_restriction: update`\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-IpPolicySettings"}}},"required":true},"responses":{"200":{"description":"Updated IP policy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-IpPolicySettings"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-control/operation/updateUserBpIpPolicyUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/settings/user-bp-ip-policy \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"enabled\":true,\"enableSupportSubnets\":true,\"ipPolicy\":[\"string\"]}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"enabled\\\":true,\\\"enableSupportSubnets\\\":true,\\\"ipPolicy\\\":[\\\"string\\\"]}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/settings/user-bp-ip-policy\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"enabled\": true,\n  \"enableSupportSubnets\": true,\n  \"ipPolicy\": [\n    \"string\"\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/settings/user-bp-ip-policy\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/settings/user-bp-ip-policy\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({enabled: true, enableSupportSubnets: true, ipPolicy: ['string']}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/settings/user-bp-ip-policy');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"enabled\":true,\"enableSupportSubnets\":true,\"ipPolicy\":[\"string\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/settings/user-bp-ip-policy\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"enabled\\\":true,\\\"enableSupportSubnets\\\":true,\\\"ipPolicy\\\":[\\\"string\\\"]}\")\n  .asString();"}]}},"/uauth/strongest-password-settings-by-email/{email}":{"get":{"tags":["Access control"],"summary":"Get strongest password policy of a User","description":"If a user has access to more than one workspace, you can use this endpoint to find the strictest password policy of all the policies in these workspaces. The user's password must meet the requirements of that strictest policy.\n\n---\n\n**Authentication:** Not required\n","operationId":"getStrongestPasswordSettingsUsingGET","parameters":[{"name":"email","in":"path","description":"User's email address","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-BusinessProfilePasswordSettingsData"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-control/operation/getStrongestPasswordSettingsUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/strongest-password-settings-by-email/%7Bemail%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uauth/strongest-password-settings-by-email/%7Bemail%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/strongest-password-settings-by-email/%7Bemail%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/strongest-password-settings-by-email/%7Bemail%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/strongest-password-settings-by-email/%7Bemail%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/strongest-password-settings-by-email/%7Bemail%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/users/mfa/initialization":{"post":{"tags":["Access control"],"summary":"Initiate multi-factor authentication for user","description":"Begins the process of enabling multi-factor authentication for a user by initiating it.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"initiateUserMfaUsingPOST","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/uauth-mfaType"}],"responses":{"200":{"description":"Secret and QR code URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-MultiFactorAuthInitResponse"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-control/operation/initiateUserMfaUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/uauth/users/mfa/initialization?mfaType=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"POST\", \"/uauth/users/mfa/initialization?mfaType=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/users/mfa/initialization?mfaType=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/mfa/initialization?mfaType=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/mfa/initialization');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setQueryData([\n  'mfaType' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/users/mfa/initialization?mfaType=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/users/mfa/confirmation":{"post":{"tags":["Access control"],"summary":"Confirm multi-factor authentication for user","description":"Continues the process of enabling multi-factor authentication for a user by confirming it.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"confirmUserMfaUsingPOST","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/uauth-mfaType"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-MultiFactorAuthConfirmRequest"}}},"required":true},"responses":{"200":{"description":"User's backup code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-MultiFactorAuthConfirmResponse"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-control/operation/confirmUserMfaUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/uauth/users/mfa/confirmation?mfaType=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"verificationCode\":\"string\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"verificationCode\\\":\\\"string\\\"}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/users/mfa/confirmation?mfaType=SOME_STRING_VALUE\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"verificationCode\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/users/mfa/confirmation?mfaType=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/mfa/confirmation?mfaType=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({verificationCode: 'string'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/mfa/confirmation');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setQueryData([\n  'mfaType' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"verificationCode\":\"string\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/users/mfa/confirmation?mfaType=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"verificationCode\\\":\\\"string\\\"}\")\n  .asString();"}]}},"/uauth/users/mfa":{"delete":{"tags":["Access control"],"summary":"Remove multi-factor authentication for user","description":"Removes user multi-factor authentication.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n","operationId":"removesUserMfaUsingPOST","security":[{"JWT":[]}],"parameters":[{"$ref":"#/components/parameters/uauth-mfaType"},{"name":"backupCode","in":"query","description":"User's backup code","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-control/operation/removesUserMfaUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url 'https://api.synerise.com/uauth/users/mfa?mfaType=SOME_STRING_VALUE&backupCode=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"DELETE\", \"/uauth/users/mfa?mfaType=SOME_STRING_VALUE&backupCode=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/uauth/users/mfa?mfaType=SOME_STRING_VALUE&backupCode=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/users/mfa?mfaType=SOME_STRING_VALUE&backupCode=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/users/mfa');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setQueryData([\n  'mfaType' => 'SOME_STRING_VALUE',\n  'backupCode' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/uauth/users/mfa?mfaType=SOME_STRING_VALUE&backupCode=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uauth/settings/password-policy":{"get":{"tags":["Access control"],"summary":"Get user password policy","description":"Retrieve the user password policy of the workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users_am_password_policy: read`\n","operationId":"getPasswordSettingsUsingGET","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-PasswordSettingsData"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-control/operation/getPasswordSettingsUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/settings/password-policy \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uauth/settings/password-policy\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/settings/password-policy\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/settings/password-policy\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/settings/password-policy');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/settings/password-policy\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"post":{"tags":["Access control"],"summary":"Update user password policy","description":"Update the user password policy. Entering `0` as the value disables a requirement.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `settings_users_am_password_policy: update`\n","operationId":"updateSettingsUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-PasswordSettingsData"}}}},"responses":{"200":{"description":"New password policy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-PasswordSettingsData"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Access-control/operation/updateSettingsUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/settings/password-policy \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"attempts\":0,\"block\":0,\"different\":0,\"digits\":0,\"expiration\":0,\"lowerLetters\":0,\"maxIdleTime\":0,\"maxLength\":0,\"minLength\":0,\"nextChange\":0,\"specialChars\":0,\"upperLetters\":0}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"attempts\\\":0,\\\"block\\\":0,\\\"different\\\":0,\\\"digits\\\":0,\\\"expiration\\\":0,\\\"lowerLetters\\\":0,\\\"maxIdleTime\\\":0,\\\"maxLength\\\":0,\\\"minLength\\\":0,\\\"nextChange\\\":0,\\\"specialChars\\\":0,\\\"upperLetters\\\":0}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uauth/settings/password-policy\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"attempts\": 0,\n  \"block\": 0,\n  \"different\": 0,\n  \"digits\": 0,\n  \"expiration\": 0,\n  \"lowerLetters\": 0,\n  \"maxIdleTime\": 0,\n  \"maxLength\": 0,\n  \"minLength\": 0,\n  \"nextChange\": 0,\n  \"specialChars\": 0,\n  \"upperLetters\": 0\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/settings/password-policy\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/settings/password-policy\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  attempts: 0,\n  block: 0,\n  different: 0,\n  digits: 0,\n  expiration: 0,\n  lowerLetters: 0,\n  maxIdleTime: 0,\n  maxLength: 0,\n  minLength: 0,\n  nextChange: 0,\n  specialChars: 0,\n  upperLetters: 0\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/settings/password-policy');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"attempts\":0,\"block\":0,\"different\":0,\"digits\":0,\"expiration\":0,\"lowerLetters\":0,\"maxIdleTime\":0,\"maxLength\":0,\"minLength\":0,\"nextChange\":0,\"specialChars\":0,\"upperLetters\":0}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/settings/password-policy\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"attempts\\\":0,\\\"block\\\":0,\\\"different\\\":0,\\\"digits\\\":0,\\\"expiration\\\":0,\\\"lowerLetters\\\":0,\\\"maxIdleTime\\\":0,\\\"maxLength\\\":0,\\\"minLength\\\":0,\\\"nextChange\\\":0,\\\"specialChars\\\":0,\\\"upperLetters\\\":0}\")\n  .asString();"}]}},"/uauth/managed-domains":{"get":{"tags":["Directory"],"summary":"List managed domains","description":"Retrieve a list of all domains managed by the workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `managed_domains: read`\n","operationId":"getManagedDomainListUsingGET","parameters":[{"name":"page","in":"query","description":"Page number (first page is 1)","required":false,"schema":{"type":"integer","format":"int32","default":1}},{"name":"size","in":"query","description":"The number of entries on a page","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ManagedDomainListing"}}}},"201":{"description":"Created","content":{}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Directory/operation/getManagedDomainListUsingGET"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/uauth/managed-domains?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/uauth/managed-domains?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/managed-domains?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/managed-domains?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/managed-domains');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'size' => 'SOME_INTEGER_VALUE'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/managed-domains?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE\")\n  .asString();"}]},"delete":{"tags":["Directory"],"summary":"Delete managed domain","description":"Remove management settings for a domain.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `managed_domains: delete`\n","operationId":"deleteManagedDomainUsingDELETE","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ManagedDomainRequest"}}}},"responses":{"201":{"description":"Created","content":{}},"204":{"description":"No Content","content":{}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Directory/operation/deleteManagedDomainUsingDELETE"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/uauth/managed-domains \\\n  --header 'content-type: application/json' \\\n  --data '{\"domain\":\"synerise.com\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"domain\\\":\\\"synerise.com\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"DELETE\", \"/uauth/managed-domains\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"domain\": \"synerise.com\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/uauth/managed-domains\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/managed-domains\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({domain: 'synerise.com'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/managed-domains');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"domain\":\"synerise.com\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/uauth/managed-domains\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"domain\\\":\\\"synerise.com\\\"}\")\n  .asString();"}]}},"/uauth/managed-domains/initialize-code":{"get":{"tags":["Directory"],"summary":"Initialize managed domain","description":"Generate a verification string for a domain. This string is then used in [this endpoint](#operation/verifyManagedDomainUsingPOST). The verification string for a particular workspace is always the same.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `managed_domains: create`\n","operationId":"initializeManagedDomainUsingPOST","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ManagedDomainCodeResponse"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Directory/operation/initializeManagedDomainUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uauth/managed-domains/initialize-code"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nconn.request(\"GET\", \"/uauth/managed-domains/initialize-code\")\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uauth/managed-domains/initialize-code\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/managed-domains/initialize-code\",\n  \"headers\": {}\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/managed-domains/initialize-code');\n$request->setMethod(HTTP_METH_GET);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uauth/managed-domains/initialize-code\")\n  .asString();"}]}},"/uauth/managed-domains/verification":{"post":{"tags":["Directory"],"summary":"Verify managed domain","description":"Verify a managed domain to assign it to a workspace. All users who belong to the domain are managed by that workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `managed_domains: create`\n","operationId":"verifyManagedDomainUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ManagedDomainVerificationRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-ManagedDomainResponse"}}}},"201":{"description":"Created","content":{}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{}}},"x-snr-doc-urls":["/api-reference/identity-and-access-management#tag/Directory/operation/verifyManagedDomainUsingPOST"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uauth/managed-domains/verification \\\n  --header 'content-type: application/json' \\\n  --data '{\"domain\":\"synerise.com\",\"verificationMethod\":\"TXT_RECORD\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"domain\\\":\\\"synerise.com\\\",\\\"verificationMethod\\\":\\\"TXT_RECORD\\\"}\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/uauth/managed-domains/verification\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"domain\": \"synerise.com\",\n  \"verificationMethod\": \"TXT_RECORD\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uauth/managed-domains/verification\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uauth/managed-domains/verification\",\n  \"headers\": {\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({domain: 'synerise.com', verificationMethod: 'TXT_RECORD'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uauth/managed-domains/verification');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"domain\":\"synerise.com\",\"verificationMethod\":\"TXT_RECORD\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uauth/managed-domains/verification\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"domain\\\":\\\"synerise.com\\\",\\\"verificationMethod\\\":\\\"TXT_RECORD\\\"}\")\n  .asString();"}]}},"/uploader-service/clients/files/by/{identifierType}":{"post":{"tags":["Uploader"],"summary":"Add files for dynamic attachments","description":"Add base64 encoded files to the storage for use in [dynamic attachments](https://help.synerise.com/docs/automation/actions/send-email/#dynamic-attachments). You can send up to 5 files in one request. An `attachment.upload` event is generated when you use the endpoint.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `UPLOADER_SERVICE_STORAGE_CREATE`\n\n**User role permission required:** `assets_explorer: create`\n","operationId":"addClientFiles","parameters":[{"$ref":"#/components/parameters/uploader-service-pathIdentifierType"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uploader-service-AddFile"}}}},"responses":{"200":{"description":"File or files uploaded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uploader-service-FileRequest"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/asset-management#tag/Uploader/operation/addClientFiles"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uploader-service/clients/files/by/%7BidentifierType%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"files\":[{\"content\":\"77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==\",\"mimetype\":\"text/csv\",\"filename\":\"myexamplefile\",\"extension\":\"csv\"}],\"ttlInMinutes\":0,\"identifierValue\":\"1234\",\"parameters\":{}}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"files\\\":[{\\\"content\\\":\\\"77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==\\\",\\\"mimetype\\\":\\\"text/csv\\\",\\\"filename\\\":\\\"myexamplefile\\\",\\\"extension\\\":\\\"csv\\\"}],\\\"ttlInMinutes\\\":0,\\\"identifierValue\\\":\\\"1234\\\",\\\"parameters\\\":{}}\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/uploader-service/clients/files/by/%7BidentifierType%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"files\": [\n    {\n      \"content\": \"77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==\",\n      \"mimetype\": \"text/csv\",\n      \"filename\": \"myexamplefile\",\n      \"extension\": \"csv\"\n    }\n  ],\n  \"ttlInMinutes\": 0,\n  \"identifierValue\": \"1234\",\n  \"parameters\": {}\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uploader-service/clients/files/by/%7BidentifierType%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uploader-service/clients/files/by/%7BidentifierType%7D\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  files: [\n    {\n      content: '77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==',\n      mimetype: 'text/csv',\n      filename: 'myexamplefile',\n      extension: 'csv'\n    }\n  ],\n  ttlInMinutes: 0,\n  identifierValue: '1234',\n  parameters: {}\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uploader-service/clients/files/by/%7BidentifierType%7D');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"files\":[{\"content\":\"77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==\",\"mimetype\":\"text/csv\",\"filename\":\"myexamplefile\",\"extension\":\"csv\"}],\"ttlInMinutes\":0,\"identifierValue\":\"1234\",\"parameters\":{}}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uploader-service/clients/files/by/%7BidentifierType%7D\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"files\\\":[{\\\"content\\\":\\\"77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ==\\\",\\\"mimetype\\\":\\\"text/csv\\\",\\\"filename\\\":\\\"myexamplefile\\\",\\\"extension\\\":\\\"csv\\\"}],\\\"ttlInMinutes\\\":0,\\\"identifierValue\\\":\\\"1234\\\",\\\"parameters\\\":{}}\")\n  .asString();"}]}},"/uploader-service/storages/{container}/upload":{"post":{"tags":["Uploader"],"summary":"Upload file","description":"\nUpload a new file to Synerise.\n\n<strong><span style=\"color:red\">IMPORTANT:</span></strong> Due to technical limitations, the code examples on the right don't include the form data. If you use the examples, remember to add it.\n\nExample correct cURL request:\n<pre>\ncurl --location 'https://api.synerise.com/uploader-service/storages/default/upload' \\\n--header 'Authorization: Bearer YOUR_TOKEN' \\\n--form 'uploads=@\"/Users/currentuser/Downloads/image.png\"'\n</pre>\n\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>\n\n**API key permission required:** `UPLOADER_SERVICE_STORAGE_CREATE`\n\n**User role permission required:** `assets_explorer: create`\n","operationId":"uploadFile","parameters":[{"in":"path","name":"container","description":"Name of the container in which the file will be stored","required":true,"schema":{"type":"string","example":"default"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["uploads"],"properties":{"uploads":{"description":"File to upload, binary","type":"string","format":"binary"}}},"example":"form"}}},"responses":{"200":{"description":"File description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uploader-service-UploadResult"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/asset-management#tag/Uploader/operation/uploadFile"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uploader-service/storages/default/upload \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: multipart/form-data' \\\n  --form uploads=string"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"uploads\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"multipart/form-data\"\n    }\n\nconn.request(\"POST\", \"/uploader-service/storages/default/upload\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = new FormData();\ndata.append(\"uploads\", \"string\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uploader-service/storages/default/upload\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uploader-service/storages/default/upload\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"uploads\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\");\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uploader-service/storages/default/upload');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'multipart/form-data'\n]);\n\n$request->setBody('-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uploads\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uploader-service/storages/default/upload\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .body(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"uploads\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\")\n  .asString();"}]}},"/uploader-service/storage-files/list":{"get":{"tags":["Uploader"],"summary":"List files from workspace","description":"Retrieve a list of all files in the Workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_explorer: read`\n","operationId":"getFiles","responses":{"200":{"description":"Files","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/uploader-service-FileInfo"}}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/asset-management#tag/Uploader/operation/getFiles"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/uploader-service/storage-files/list \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uploader-service/storage-files/list\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uploader-service/storage-files/list\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uploader-service/storage-files/list\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uploader-service/storage-files/list');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uploader-service/storage-files/list\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uploader-service/v2/list":{"get":{"tags":["Uploader"],"summary":"List files from workspace","description":"Retrieve a list of all files in the Workspace.\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_explorer: read`\n","operationId":"getFilesV2","parameters":[{"name":"page","in":"query","required":false,"description":"page number","schema":{"type":"integer","minimum":0,"default":0}},{"name":"limit","in":"query","required":false,"description":"number of elements in a page","schema":{"type":"integer","minimum":0,"default":50}},{"name":"sortBy","in":"query","required":false,"description":"field to sort by and order","schema":{"type":"string","pattern":"^(updatedYear|createdAt):(asc|desc)$","example":"createdAt:asc","default":"updatedYear:desc"}},{"name":"mediatype","in":"query","required":false,"description":"filter by media type","schema":{"type":"string","example":"image/jpeg"}},{"name":"extensions","in":"query","required":false,"description":"filter by extension files","schema":{"type":"string","example":"pdf,jpeg"}},{"name":"search","in":"query","required":false,"description":"file id or substring of file name","schema":{"type":"string"}}],"responses":{"200":{"description":"Files","content":{"application/json":{"schema":{"type":"object","required":["meta","data"],"properties":{"meta":{"type":"object","description":"Pagination metadata","properties":{"links":{"type":"array","description":"Links to the neighboring pages and the first page","items":{"type":"object","required":["url","rel"],"properties":{"url":{"type":"string","description":"URL of the page, used for navigation"},"rel":{"type":"string","description":"The type of relation to the current page. `first` is always the first page.","enum":["first","prev","next"]}}}},"limit":{"type":"integer","format":"int32","description":"Limit of items per page"},"count":{"type":"integer","nullable":true,"description":"Currently unused"}}},"data":{"type":"array","description":"Array of external sources","items":{"$ref":"#/components/schemas/uploader-service-FileDataV2"}}}}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/asset-management#tag/Uploader/operation/getFilesV2"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/uploader-service/v2/list?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=createdAt%3Aasc&mediatype=image%2Fjpeg&extensions=pdf%2Cjpeg&search=SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = { 'Authorization': \"Bearer REPLACE_BEARER_TOKEN\" }\n\nconn.request(\"GET\", \"/uploader-service/v2/list?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=createdAt%3Aasc&mediatype=image%2Fjpeg&extensions=pdf%2Cjpeg&search=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/uploader-service/v2/list?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=createdAt%3Aasc&mediatype=image%2Fjpeg&extensions=pdf%2Cjpeg&search=SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uploader-service/v2/list?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=createdAt%3Aasc&mediatype=image%2Fjpeg&extensions=pdf%2Cjpeg&search=SOME_STRING_VALUE\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uploader-service/v2/list');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'page' => 'SOME_INTEGER_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'sortBy' => 'createdAt:asc',\n  'mediatype' => 'image/jpeg',\n  'extensions' => 'pdf,jpeg',\n  'search' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/uploader-service/v2/list?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=createdAt%3Aasc&mediatype=image%2Fjpeg&extensions=pdf%2Cjpeg&search=SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/uploader-service/storage-files/delete-by-uuid":{"post":{"tags":["Uploader"],"summary":"Remove files","description":"Delete one or more files.\n\n<strong><span style=\"color:red\">IMPORTANT:</span></strong> Due to technical limitations, the code examples on the right don't include the form data. If you use the examples, remember to add it.\n\nExample correct cURL request:\n<pre>\ncurl --location 'https://api.synerise.com/uploader-service/storage-files/delete-by-uuid' \\\n--header 'Authorization: Bearer YOUR_TOKEN' \\\n--form 'uuids=\"[\\\"0ac106beb55c401bac8bc8244e367512\\\",\\\"03dc506041e24c3cae284fd3f6611082\\\"]\"'\n</pre>\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_explorer: delete`\n","operationId":"removeFiles","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"uuids":{"$ref":"#/components/schemas/uploader-service-FileUuids"}},"required":["uuids"]}}}},"responses":{"200":{"description":"Results of the operation","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean","description":"Each key in this object is the UUID of a file. If the file was deleted successfully, the value is `true`."},"example":{"0ac106beb55c401bac8bc8244e367512":true,"03dc506041e24c3cae284fd3f6611082":true}}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/asset-management#tag/Uploader/operation/removeFiles"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uploader-service/storage-files/delete-by-uuid \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: multipart/form-data' \\\n  --form uuids=string"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"uuids\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"multipart/form-data\"\n    }\n\nconn.request(\"POST\", \"/uploader-service/storage-files/delete-by-uuid\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = new FormData();\ndata.append(\"uuids\", \"string\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uploader-service/storage-files/delete-by-uuid\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uploader-service/storage-files/delete-by-uuid\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"uuids\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\");\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uploader-service/storage-files/delete-by-uuid');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'multipart/form-data'\n]);\n\n$request->setBody('-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uuids\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uploader-service/storage-files/delete-by-uuid\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .body(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"uuids\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\")\n  .asString();"}]}},"/uploader-service/storage-files/add-star-by-uuid":{"post":{"tags":["Uploader"],"summary":"Add stars","description":"Add a star to one or more files. Stars are used to mark files as favorite and make them easier to find.\n\n<strong><span style=\"color:red\">IMPORTANT:</span></strong> Due to technical limitations, the code examples on the right don't include the form data. If you use the examples, remember to add it.\n\nExample correct cURL request:\n<pre>\ncurl --location 'https://api.synerise.com/uploader-service/storage-files/add-star-by-uuid' \\\n--header 'Authorization: Bearer YOUR_TOKEN' \\\n--form 'uuids=\"[\\\"0ac106beb55c401bac8bc8244e367512\\\",\\\"03dc506041e24c3cae284fd3f6611082\\\"]\"'\n</pre>\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_explorer: update`\n","operationId":"addStarByUUID","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"uuids":{"$ref":"#/components/schemas/uploader-service-FileUuids"}},"required":["uuids"]}}}},"responses":{"200":{"description":"Results of the operation","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean","description":"Each key in this object is the UUID of a file. If the file was starred successfully or was already starred before, the value is `true`. If a file doesn't exist, the result is `false`."},"example":{"0ac106beb55c401bac8bc8244e367512":false,"03dc506041e24c3cae284fd3f6611082":true}}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/asset-management#tag/Uploader/operation/addStarByUUID"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uploader-service/storage-files/add-star-by-uuid \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: multipart/form-data' \\\n  --form uuids=string"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"uuids\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"multipart/form-data\"\n    }\n\nconn.request(\"POST\", \"/uploader-service/storage-files/add-star-by-uuid\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = new FormData();\ndata.append(\"uuids\", \"string\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uploader-service/storage-files/add-star-by-uuid\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uploader-service/storage-files/add-star-by-uuid\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"uuids\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\");\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uploader-service/storage-files/add-star-by-uuid');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'multipart/form-data'\n]);\n\n$request->setBody('-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uuids\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uploader-service/storage-files/add-star-by-uuid\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .body(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"uuids\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\")\n  .asString();"}]}},"/uploader-service/storage-files/remove-star-by-uuid":{"post":{"tags":["Uploader"],"summary":"Remove stars","description":"Remove stars from one or more files.\n\n<strong><span style=\"color:red\">IMPORTANT:</span></strong> Due to technical limitations, the code examples on the right don't include the form data. If you use the examples, remember to add it.\n\nExample correct cURL request:\n<pre>\ncurl --location 'https://api.synerise.com/uploader-service/storage-files/remove-star-by-uuid' \\\n--header 'Authorization: Bearer YOUR_TOKEN' \\\n--form 'uuids=\"[\\\"0ac106beb55c401bac8bc8244e367512\\\",\\\"03dc506041e24c3cae284fd3f6611082\\\"]\"'\n</pre>\n\n\n---\n\n**API consumer:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**User role permission required:** `assets_explorer: update`\n","operationId":"removeStarByUUID","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"uuids":{"$ref":"#/components/schemas/uploader-service-FileUuids"}},"required":["uuids"]}}}},"responses":{"200":{"description":"Results of the operation","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean","description":"Each key in this object is the UUID of a file. If the file was unstarred successfully or was already unstarred before, the value is `true`. If a file doesn't exist, the result is `false`."},"example":{"0ac106beb55c401bac8bc8244e367512":false,"03dc506041e24c3cae284fd3f6611082":true}}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/asset-management#tag/Uploader/operation/removeStarByUUID"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/uploader-service/storage-files/remove-star-by-uuid \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: multipart/form-data' \\\n  --form uuids=string"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"uuids\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\"\n\nheaders = {\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"multipart/form-data\"\n    }\n\nconn.request(\"POST\", \"/uploader-service/storage-files/remove-star-by-uuid\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = new FormData();\ndata.append(\"uuids\", \"string\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/uploader-service/storage-files/remove-star-by-uuid\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/uploader-service/storage-files/remove-star-by-uuid\",\n  \"headers\": {\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"uuids\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\");\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/uploader-service/storage-files/remove-star-by-uuid');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'multipart/form-data'\n]);\n\n$request->setBody('-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uuids\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/uploader-service/storage-files/remove-star-by-uuid\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .body(\"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"uuids\\\"\\r\\n\\r\\nstring\\r\\n-----011000010111000001101001--\\r\\n\")\n  .asString();"}]}},"/v4/vouchers/item/assign":{"post":{"tags":["Vouchers"],"summary":"Assign a voucher from a pool to Profile","description":"Assign a voucher code from an existing pool to a Profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <span title=\"Available only on mobile SDKs\">Incognito Profile</span>\n\n**User role permission required:** `assets_code_pool: create`\n","operationId":"AssignAVoucherFromAPoolToAClient","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucherActionRequestAsClientReq"}}},"required":true},"responses":{"201":{"description":"Code assigned","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","default":"Code assigned with success"},"data":{"$ref":"#/components/schemas/vouchers-data"}}}}}},"416":{"description":"Range Not Satisfiable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucherResponseMessage"},"example":{"message":"Out of scope. Pool is empty."}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/AssignAVoucherFromAPoolToAClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/vouchers/item/assign \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"17243772-008a-42e1-ba37-c3807cebde8f\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientUuid\\\":\\\"17243772-008a-42e1-ba37-c3807cebde8f\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/vouchers/item/assign\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"poolUuid\": \"faec32b0-c343-4362-ba32-c6148c649da4\",\n  \"clientUuid\": \"17243772-008a-42e1-ba37-c3807cebde8f\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/vouchers/item/assign\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/assign\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',\n  clientUuid: '17243772-008a-42e1-ba37-c3807cebde8f'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/assign');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"17243772-008a-42e1-ba37-c3807cebde8f\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/vouchers/item/assign\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientUuid\\\":\\\"17243772-008a-42e1-ba37-c3807cebde8f\\\"}\")\n  .asString();"}]}},"/v4/vouchers/item/get-assigned":{"get":{"tags":["Vouchers"],"summary":"Get assigned vouchers","description":"Retrieve all vouchers assigned to a Profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <span title=\"Available only on mobile SDKs\">Incognito Profile</span>\n\n**User role permission required:** `assets_code_pool: read`\n","operationId":"GetAssignedVouchers","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"responses":{"200":{"description":"An array of vouchers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-vouchersDataList"}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetAssignedVouchers"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/vouchers/item/get-assigned \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/vouchers/item/get-assigned\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/vouchers/item/get-assigned\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/get-assigned\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/get-assigned');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/vouchers/item/get-assigned\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/vouchers/item/get-or-assign":{"post":{"tags":["Vouchers"],"summary":"Get or assign and get voucher as Profile","description":"Retrieve the code assigned to a Profile. If no code was assigned earlier, the method assigns one.\n\n\nFor each Profile, the same code is retrieved every time. This can be used, for example, to retrieve unique codes used to identify a Profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3\" target=\"_blank\" rel=\"noopener\">Profile (Client)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3\" target=\"_blank\" rel=\"noopener\">Anonymous Profile</a>, <span title=\"Available only on mobile SDKs\">Incognito Profile</span>\n\n**User role permission required:** `assets_code_pool: read`\n","operationId":"GetOrAssignAndGetVoucherAsClient","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucherActionRequestAsClientReq"}}},"required":true},"responses":{"200":{"description":"Details of the code","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","default":"Code found with success"},"data":{"$ref":"#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"}}}}}},"416":{"description":"Range Not Satisfiable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucherResponseMessage"},"example":{"message":"Out of scope. Pool is empty."}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetOrAssignAndGetVoucherAsClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/vouchers/item/get-or-assign \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"17243772-008a-42e1-ba37-c3807cebde8f\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientUuid\\\":\\\"17243772-008a-42e1-ba37-c3807cebde8f\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/vouchers/item/get-or-assign\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"poolUuid\": \"faec32b0-c343-4362-ba32-c6148c649da4\",\n  \"clientUuid\": \"17243772-008a-42e1-ba37-c3807cebde8f\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/vouchers/item/get-or-assign\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/get-or-assign\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',\n  clientUuid: '17243772-008a-42e1-ba37-c3807cebde8f'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/get-or-assign');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"17243772-008a-42e1-ba37-c3807cebde8f\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/vouchers/item/get-or-assign\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientUuid\\\":\\\"17243772-008a-42e1-ba37-c3807cebde8f\\\"}\")\n  .asString();"}]}},"/v4/vouchers/item":{"post":{"tags":["Vouchers"],"summary":"Create a voucher","description":"Create a single code and store it in a pool.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_CREATE`\n\n**User role permission required:** `assets_code_pool: create`\n","operationId":"CreateAVoucher","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucherData"}}},"required":true},"responses":{"201":{"description":"Voucher created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","default":"Create object with success"},"data":{"$ref":"#/components/schemas/vouchers-data"}}}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/CreateAVoucher"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/vouchers/item \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"clientId\":0,\"code\":\"code123\",\"expireIn\":\"2019-08-24T14:15:22Z\",\"redeemAt\":\"2019-08-24T14:15:22Z\",\"assignedAt\":\"2019-08-24T14:15:22Z\",\"status\":\"ASSIGNED\",\"createdAt\":\"2019-08-24T14:15:22Z\",\"updatedAt\":\"2019-08-24T14:15:22Z\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientUuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"clientId\\\":0,\\\"code\\\":\\\"code123\\\",\\\"expireIn\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"redeemAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"assignedAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"status\\\":\\\"ASSIGNED\\\",\\\"createdAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"updatedAt\\\":\\\"2019-08-24T14:15:22Z\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/vouchers/item\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"poolUuid\": \"faec32b0-c343-4362-ba32-c6148c649da4\",\n  \"clientUuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"clientId\": 0,\n  \"code\": \"code123\",\n  \"expireIn\": \"2019-08-24T14:15:22Z\",\n  \"redeemAt\": \"2019-08-24T14:15:22Z\",\n  \"assignedAt\": \"2019-08-24T14:15:22Z\",\n  \"status\": \"ASSIGNED\",\n  \"createdAt\": \"2019-08-24T14:15:22Z\",\n  \"updatedAt\": \"2019-08-24T14:15:22Z\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/vouchers/item\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',\n  clientUuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  clientId: 0,\n  code: 'code123',\n  expireIn: '2019-08-24T14:15:22Z',\n  redeemAt: '2019-08-24T14:15:22Z',\n  assignedAt: '2019-08-24T14:15:22Z',\n  status: 'ASSIGNED',\n  createdAt: '2019-08-24T14:15:22Z',\n  updatedAt: '2019-08-24T14:15:22Z'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"clientId\":0,\"code\":\"code123\",\"expireIn\":\"2019-08-24T14:15:22Z\",\"redeemAt\":\"2019-08-24T14:15:22Z\",\"assignedAt\":\"2019-08-24T14:15:22Z\",\"status\":\"ASSIGNED\",\"createdAt\":\"2019-08-24T14:15:22Z\",\"updatedAt\":\"2019-08-24T14:15:22Z\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/vouchers/item\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientUuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"clientId\\\":0,\\\"code\\\":\\\"code123\\\",\\\"expireIn\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"redeemAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"assignedAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"status\\\":\\\"ASSIGNED\\\",\\\"createdAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"updatedAt\\\":\\\"2019-08-24T14:15:22Z\\\"}\")\n  .asString();"}]}},"/v4/vouchers/item/bulk-create":{"post":{"tags":["Vouchers"],"summary":"Bulk create vouchers","description":"Create a number of codes and add them to a pool.\n\n<span style=\"color:red\"><strong>WARNING:</strong></span> The request body cannot contain more than 10 000 items or exceed 10 MB in size.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_BULK_CREATE`\n\n**User role permission required:** `assets_code_pool: create`\n","operationId":"BulkCreateVouchers","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-bulkCreateVouchersReq"}}}},"responses":{"201":{"description":"Vouchers created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/vouchers-bulkCreateResponse"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucher-HTTP400Res"},"example":{"message":"Data format is not valid","error":[{"field":"code","message":"code must be unique","validatorKey":"not_unique"}]}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/BulkCreateVouchers"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/vouchers/item/bulk-create \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"codeList\":\"3845734682364756454534;384574634564545456;567868678345234346748\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"codeList\\\":\\\"3845734682364756454534;384574634564545456;567868678345234346748\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/vouchers/item/bulk-create\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"poolUuid\": \"faec32b0-c343-4362-ba32-c6148c649da4\",\n  \"codeList\": \"3845734682364756454534;384574634564545456;567868678345234346748\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/vouchers/item/bulk-create\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/bulk-create\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',\n  codeList: '3845734682364756454534;384574634564545456;567868678345234346748'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/bulk-create');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"codeList\":\"3845734682364756454534;384574634564545456;567868678345234346748\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/vouchers/item/bulk-create\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"codeList\\\":\\\"3845734682364756454534;384574634564545456;567868678345234346748\\\"}\")\n  .asString();"}]}},"/v4/vouchers/item/list":{"get":{"tags":["Vouchers"],"summary":"List all vouchers","description":"Retrieve all vouchers for a Workspace. You can customize the search.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_LIST_READ`\n\n**User role permission required:** `assets_code_pool: read`\n","operationId":"ListVouchers","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"},{"$ref":"#/components/parameters/vouchers-queryLimit"},{"$ref":"#/components/parameters/vouchers-queryPage"},{"$ref":"#/components/parameters/vouchers-queryIncludeMeta"}],"responses":{"200":{"description":"An array of vouchers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-listVouchersSuccessRes"}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/ListVouchers"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/vouchers/item/list?limit=100&page=4&includeMeta=false' \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/vouchers/item/list?limit=100&page=4&includeMeta=false\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/vouchers/item/list?limit=100&page=4&includeMeta=false\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/list?limit=100&page=4&includeMeta=false\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/list');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'limit' => '100',\n  'page' => '4',\n  'includeMeta' => 'false'\n]);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/vouchers/item/list?limit=100&page=4&includeMeta=false\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/vouchers/item/{voucherUuid}":{"get":{"tags":["Vouchers"],"summary":"View voucher details","description":"Retrieve all details of a single code.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_READ`\n\n**User role permission required:** `assets_code_pool: read`\n","operationId":"ViewVoucherDetails","parameters":[{"$ref":"#/components/parameters/vouchers-pathVoucherUuid"},{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"responses":{"200":{"description":"Details of a voucher","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/vouchers-voucherData"}}}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/ViewVoucherDetails"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173 \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Vouchers"],"summary":"Update a voucher","description":"Update an existing code.\n\n\nIf you don't want to change a field, omit it entirely. Sending a null-value field replaces an existing value.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_UPDATE`\n\n**User role permission required:** `assets_code_pool: update`\n","operationId":"UpdateAVoucher","parameters":[{"$ref":"#/components/parameters/vouchers-pathVoucherUuid"},{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucherData"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","default":"Update object with success"},"data":{"$ref":"#/components/schemas/vouchers-data"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucher-HTTP400Res"},"example":{"message":"Data format is not valid","error":[{"field":"status","message":"Validation isIn on status failed","validatorKey":"isIn"}]}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/UpdateAVoucher"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173 \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"clientId\":0,\"code\":\"code123\",\"expireIn\":\"2019-08-24T14:15:22Z\",\"redeemAt\":\"2019-08-24T14:15:22Z\",\"assignedAt\":\"2019-08-24T14:15:22Z\",\"status\":\"ASSIGNED\",\"createdAt\":\"2019-08-24T14:15:22Z\",\"updatedAt\":\"2019-08-24T14:15:22Z\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientUuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"clientId\\\":0,\\\"code\\\":\\\"code123\\\",\\\"expireIn\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"redeemAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"assignedAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"status\\\":\\\"ASSIGNED\\\",\\\"createdAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"updatedAt\\\":\\\"2019-08-24T14:15:22Z\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"poolUuid\": \"faec32b0-c343-4362-ba32-c6148c649da4\",\n  \"clientUuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\",\n  \"clientId\": 0,\n  \"code\": \"code123\",\n  \"expireIn\": \"2019-08-24T14:15:22Z\",\n  \"redeemAt\": \"2019-08-24T14:15:22Z\",\n  \"assignedAt\": \"2019-08-24T14:15:22Z\",\n  \"status\": \"ASSIGNED\",\n  \"createdAt\": \"2019-08-24T14:15:22Z\",\n  \"updatedAt\": \"2019-08-24T14:15:22Z\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',\n  clientUuid: '07243772-008a-42e1-ba37-c3807cebde8f',\n  clientId: 0,\n  code: 'code123',\n  expireIn: '2019-08-24T14:15:22Z',\n  redeemAt: '2019-08-24T14:15:22Z',\n  assignedAt: '2019-08-24T14:15:22Z',\n  status: 'ASSIGNED',\n  createdAt: '2019-08-24T14:15:22Z',\n  updatedAt: '2019-08-24T14:15:22Z'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"clientId\":0,\"code\":\"code123\",\"expireIn\":\"2019-08-24T14:15:22Z\",\"redeemAt\":\"2019-08-24T14:15:22Z\",\"assignedAt\":\"2019-08-24T14:15:22Z\",\"status\":\"ASSIGNED\",\"createdAt\":\"2019-08-24T14:15:22Z\",\"updatedAt\":\"2019-08-24T14:15:22Z\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientUuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\",\\\"clientId\\\":0,\\\"code\\\":\\\"code123\\\",\\\"expireIn\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"redeemAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"assignedAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"status\\\":\\\"ASSIGNED\\\",\\\"createdAt\\\":\\\"2019-08-24T14:15:22Z\\\",\\\"updatedAt\\\":\\\"2019-08-24T14:15:22Z\\\"}\")\n  .asString();"}]},"delete":{"tags":["Vouchers"],"summary":"Delete a voucher","description":"Delete an existing code.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_DELETE`\n\n**User role permission required:** `assets_code_pool: delete`\n","operationId":"DeleteAVoucher","parameters":[{"$ref":"#/components/parameters/vouchers-pathVoucherUuid"},{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"responses":{"200":{"description":"Voucher deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","default":"Delete object with success"}}}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/DeleteAVoucher"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173 \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"DELETE\", \"/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/v4/vouchers/item/29392878-d43f-402e-8297-f63d465cf173\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/vouchers/item/{searchKey}/{searchValue}":{"get":{"tags":["Vouchers"],"summary":"View voucher details by search key","description":"Retrieve all details of a single voucher. As the key (identifier), you can use the promotion's code or UUID.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_BY_SEARCH_KEY_READ`\n\n**User role permission required:** `assets_code_pool: read`\n","operationId":"ViewVoucherDetailsBySearchKey","parameters":[{"$ref":"#/components/parameters/vouchers-pathVoucherSearchKey"},{"$ref":"#/components/parameters/vouchers-pathVoucherSearchValue"},{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"responses":{"200":{"description":"Details of a voucher","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/vouchers-voucherData"}}}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/ViewVoucherDetailsBySearchKey"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173 \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/vouchers/item/code/29392878-d43f-402e-8297-f63d465cf173\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/vouchers/item/assign-for-client":{"post":{"tags":["Vouchers"],"summary":"Assign a voucher to a Profile","description":"Assign a code to a Profile and retrieve it. Every time this method is used, a different code is assigned.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE`\n\n**User role permission required:** `assets_code_pool: create`\n","operationId":"AssignAVoucherToAClient","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucherActionRequestAsProfileReq"}}},"required":true},"responses":{"201":{"description":"Voucher assigned","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","default":"Code assigned with success"},"data":{"$ref":"#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"}}}}}},"416":{"description":"Pool empty, expired, not found, or Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucher-HTTP400Res"},"example":{"message":"Pool does not exist or expired","error":{"message":"Pool does not exist or expired"}}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/AssignAVoucherToAClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/vouchers/item/assign-for-client \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientUuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/vouchers/item/assign-for-client\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"poolUuid\": \"faec32b0-c343-4362-ba32-c6148c649da4\",\n  \"clientUuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/vouchers/item/assign-for-client\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/assign-for-client\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',\n  clientUuid: '07243772-008a-42e1-ba37-c3807cebde8f'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/assign-for-client');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/vouchers/item/assign-for-client\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientUuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\"}\")\n  .asString();"}]}},"/v4/vouchers/item/get-assigned-for-client/{clientUuid}":{"get":{"deprecated":true,"tags":["Vouchers"],"summary":"Get vouchers assigned to a Profile","description":"Get all codes assigned to a Profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_READ`\n\n**User role permission required:** `assets_code_pool: read`\n","operationId":"GetVouchersAssignedToAClient","parameters":[{"$ref":"#/components/parameters/vouchers-pathClientUuid"},{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"responses":{"200":{"description":"An array of vouchers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-vouchersDataList"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetVouchersAssignedToAClient"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76 \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/e9e6840b-b9d4-4c7b-8191-9c4f9e751c76\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/vouchers/item/get-or-assign-for-client":{"post":{"deprecated":true,"tags":["Vouchers"],"summary":"Get or assign and get voucher as Workspace","description":"Retrieve the code assigned to a profile. If no code was assigned earlier, the method assigns one.\n\n\nFor each profile, the same code is retrieved every time. This can be used, for example, to retrieve unique codes used to identify a profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE`\n\n**User role permission required:** `assets_code_pool: create`\n","operationId":"GetOrAssignAndGetVoucherAsBusinessProfile","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucherActionRequestAsProfileReq"}}},"required":true},"responses":{"200":{"description":"Details of a voucher","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"}}}}}},"416":{"description":"Pool empty, expired, not found, or Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucher-HTTP400Res"},"example":{"message":"Pool does not exist or expired","error":{"message":"Pool does not exist or expired"}}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetOrAssignAndGetVoucherAsBusinessProfile"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientUuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/vouchers/item/get-or-assign-for-client\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"poolUuid\": \"faec32b0-c343-4362-ba32-c6148c649da4\",\n  \"clientUuid\": \"07243772-008a-42e1-ba37-c3807cebde8f\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/get-or-assign-for-client\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',\n  clientUuid: '07243772-008a-42e1-ba37-c3807cebde8f'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientUuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientUuid\\\":\\\"07243772-008a-42e1-ba37-c3807cebde8f\\\"}\")\n  .asString();"}]}},"/v4/vouchers/item/get-assigned-for-client/by-identifier":{"get":{"tags":["Vouchers"],"summary":"Get vouchers assigned to a Profile by identifier","description":"Get all codes assigned to a Profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_READ`\n\n**User role permission required:** `assets_code_pool: read`\n","operationId":"GetVouchersAssignedToAClientByIdentifier","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"},{"$ref":"#/components/parameters/vouchers-queryClientIdentifierName"},{"$ref":"#/components/parameters/vouchers-queryClientIdentifierValue"}],"responses":{"200":{"description":"An array of vouchers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-vouchersDataList"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucher-HTTP400Res"},"example":{"message":"Query params are not valid"}}}},"416":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucher-HTTP400Res"},"example":{"message":"Invalid parameter","error":{"message":"Invalid parameter"}}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetVouchersAssignedToAClientByIdentifier"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456' \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/by-identifier');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'clientIdentifierName' => 'custom_identify',\n  'clientIdentifierValue' => 'custom_identify_123456'\n]);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/vouchers/item/get-assigned-for-client/by-identifier?clientIdentifierName=custom_identify&clientIdentifierValue=custom_identify_123456\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/vouchers/item/get-or-assign-for-client/by-identifier":{"post":{"tags":["Vouchers"],"summary":"Get or assign and get voucher as Workspace","description":"Retrieve the code assigned to a profile. If no code was assigned earlier, the method assigns one (it uses the provided profile identifier).\n\nFor each profile, the same code is retrieved every time. This can be used, for example, to retrieve unique codes used to identify a profile.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE`\n\n**User role permission required:** `assets_code_pool: create`\n","operationId":"GetOrAssignAndGetVoucherByIdentifierAsBusinessProfile","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"},{"$ref":"#/components/parameters/vouchers-queryClientIdentifierName"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucherActionRequestByClientIdentifierAsProfileReq"}}},"required":true},"responses":{"200":{"description":"Details of a voucher","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"}}}}}},"416":{"description":"Pool empty, expired, not found, or Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucher-HTTP400Res"},"example":{"message":"Pool does not exist or expired","error":{"message":"Pool does not exist or expired"}}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetOrAssignAndGetVoucherByIdentifierAsBusinessProfile"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify' \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientIdentifierValue\":\"custom_identify_1234\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientIdentifierValue\\\":\\\"custom_identify_1234\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"poolUuid\": \"faec32b0-c343-4362-ba32-c6148c649da4\",\n  \"clientIdentifierValue\": \"custom_identify_1234\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',\n  clientIdentifierValue: 'custom_identify_1234'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client/by-identifier');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setQueryData([\n  'clientIdentifierName' => 'custom_identify'\n]);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientIdentifierValue\":\"custom_identify_1234\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/vouchers/item/get-or-assign-for-client/by-identifier?clientIdentifierName=custom_identify\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientIdentifierValue\\\":\\\"custom_identify_1234\\\"}\")\n  .asString();"}]}},"/v4/vouchers/item/assign-for-client/by-identifier":{"post":{"tags":["Vouchers"],"summary":"Assign and get voucher as Workspace","description":"Assign a code to a profile and retrieve it. Every time this method is used, a different code is assigned.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_ASSIGN_FOR_CLIENT_CREATE`\n\n**User role permission required:** `assets_code_pool: create`\n","operationId":"AssignAndGetVoucherByIdentifierAsBusinessProfile","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"},{"$ref":"#/components/parameters/vouchers-queryClientIdentifierName"}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucherActionRequestByClientIdentifierAsProfileReq"}}},"required":true},"responses":{"201":{"description":"Voucher assigned","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/vouchers-getOrAssignAndGetVoucherDataRes"}}}}}},"416":{"description":"Pool empty, expired, not found, or Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucher-HTTP400Res"},"example":{"message":"Pool does not exist or expired","error":{"message":"Pool does not exist or expired"}}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/AssignAndGetVoucherByIdentifierAsBusinessProfile"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url 'https://api.synerise.com/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify' \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientIdentifierValue\":\"custom_identify_1234\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientIdentifierValue\\\":\\\"custom_identify_1234\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"poolUuid\": \"faec32b0-c343-4362-ba32-c6148c649da4\",\n  \"clientIdentifierValue\": \"custom_identify_1234\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  poolUuid: 'faec32b0-c343-4362-ba32-c6148c649da4',\n  clientIdentifierValue: 'custom_identify_1234'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/assign-for-client/by-identifier');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setQueryData([\n  'clientIdentifierName' => 'custom_identify'\n]);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"poolUuid\":\"faec32b0-c343-4362-ba32-c6148c649da4\",\"clientIdentifierValue\":\"custom_identify_1234\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/vouchers/item/assign-for-client/by-identifier?clientIdentifierName=custom_identify\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"poolUuid\\\":\\\"faec32b0-c343-4362-ba32-c6148c649da4\\\",\\\"clientIdentifierValue\\\":\\\"custom_identify_1234\\\"}\")\n  .asString();"}]}},"/v4/vouchers/item/redeem":{"post":{"tags":["Vouchers"],"summary":"Redeem a voucher","description":"Redeem a code.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_REDEEM_CREATE`\n\n**User role permission required:** `assets_code_pool: create`\n","operationId":"RedeemAVoucher","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucherRedeemReq"}}},"required":true},"responses":{"200":{"description":"Voucher redeemed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","default":"Code redeemed with success"},"data":{"$ref":"#/components/schemas/vouchers-voucherDataRedeemed"}}}}}},"400":{"description":"Data format is not valid.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Param code is required"}}}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/RedeemAVoucher"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/vouchers/item/redeem \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"code\":\"code123\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"code\\\":\\\"code123\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/vouchers/item/redeem\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"code\": \"code123\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/vouchers/item/redeem\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/redeem\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({code: 'code123'}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/redeem');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"code\":\"code123\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/vouchers/item/redeem\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"code\\\":\\\"code123\\\"}\")\n  .asString();"}]}},"/v4/vouchers/pool/list":{"get":{"tags":["Vouchers"],"summary":"List pools","description":"Retrieve a list of voucher pools.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_POOL_LIST_READ`\n\n**User role permission required:** `assets_code_pool: read`\n","operationId":"ListPools","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"},{"$ref":"#/components/parameters/vouchers-queryIncludeMeta"},{"$ref":"#/components/parameters/vouchers-querySortFieldName"},{"$ref":"#/components/parameters/vouchers-querySortingOrder"},{"$ref":"#/components/parameters/vouchers-queryFilter"},{"$ref":"#/components/parameters/vouchers-queryLimit"},{"$ref":"#/components/parameters/vouchers-queryPage"}],"responses":{"200":{"description":"An array of voucher pools","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/vouchers-poolData"},"description":"An array of voucher pools"},"meta":{"$ref":"#/components/schemas/vouchers-paginationMeta"}}}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/ListPools"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4' \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/pool/list');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'includeMeta' => 'false',\n  'orderFieldName' => 'SOME_STRING_VALUE',\n  'order' => 'SOME_STRING_VALUE',\n  'query' => 'SOME_STRING_VALUE',\n  'limit' => '100',\n  'page' => '4'\n]);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/vouchers/pool/list?includeMeta=false&orderFieldName=SOME_STRING_VALUE&order=SOME_STRING_VALUE&query=SOME_STRING_VALUE&limit=100&page=4\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/vouchers/pool":{"post":{"tags":["Vouchers"],"summary":"Create a voucher pool","description":"Create a pool for voucher storage.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_POOL_CREATE`\n\n**User role permission required:** `assets_code_pool: create`\n","operationId":"CreateAVoucherPool","parameters":[{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-createAVoucherPoolReq"}}},"required":true},"responses":{"201":{"description":"Pool created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","default":"Create object with success"},"data":{"$ref":"#/components/schemas/vouchers-poolData"}}}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/CreateAVoucherPool"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/vouchers/pool \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"barcodeType\":\"NONE\",\"description\":\"string\",\"voucherPrefix\":\"0\",\"poolLimit\":0,\"redeemedLimitPerClient\":0,\"startAt\":\"2019-08-24T14:15:22Z\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"barcodeType\\\":\\\"NONE\\\",\\\"description\\\":\\\"string\\\",\\\"voucherPrefix\\\":\\\"0\\\",\\\"poolLimit\\\":0,\\\"redeemedLimitPerClient\\\":0,\\\"startAt\\\":\\\"2019-08-24T14:15:22Z\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/v4/vouchers/pool\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"barcodeType\": \"NONE\",\n  \"description\": \"string\",\n  \"voucherPrefix\": \"0\",\n  \"poolLimit\": 0,\n  \"redeemedLimitPerClient\": 0,\n  \"startAt\": \"2019-08-24T14:15:22Z\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/vouchers/pool\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/pool\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  name: 'string',\n  barcodeType: 'NONE',\n  description: 'string',\n  voucherPrefix: '0',\n  poolLimit: 0,\n  redeemedLimitPerClient: 0,\n  startAt: '2019-08-24T14:15:22Z'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/pool');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"barcodeType\":\"NONE\",\"description\":\"string\",\"voucherPrefix\":\"0\",\"poolLimit\":0,\"redeemedLimitPerClient\":0,\"startAt\":\"2019-08-24T14:15:22Z\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/vouchers/pool\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"barcodeType\\\":\\\"NONE\\\",\\\"description\\\":\\\"string\\\",\\\"voucherPrefix\\\":\\\"0\\\",\\\"poolLimit\\\":0,\\\"redeemedLimitPerClient\\\":0,\\\"startAt\\\":\\\"2019-08-24T14:15:22Z\\\"}\")\n  .asString();"}]}},"/v4/vouchers/pool/{poolUuid}":{"get":{"tags":["Vouchers"],"summary":"Get pool details","description":"Retrieve the details of a single voucher pool.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_POOL_READ`\n\n**User role permission required:** `assets_code_pool: read`\n","operationId":"GetPoolDetails","parameters":[{"$ref":"#/components/parameters/vouchers-pathPoolUuid"},{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"responses":{"200":{"description":"Details of a voucher pool","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/vouchers-poolDataRes"}}}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/GetPoolDetails"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115 \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"put":{"tags":["Vouchers"],"summary":"Update a voucher pool","description":"Update an existing pool of vouchers. If you don't want to change a parameter, omit it entirely.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_POOL_UPDATE`\n\n**User role permission required:** `assets_code_pool: update`\n","operationId":"UpdateAVoucherPool","parameters":[{"$ref":"#/components/parameters/vouchers-pathPoolUuid"},{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-createAVoucherPoolReq"}}},"required":true},"responses":{"200":{"description":"Voucher pool","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","default":"Update object with success"},"data":{"$ref":"#/components/schemas/vouchers-poolDataRes"}}}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/UpdateAVoucherPool"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request PUT \\\n  --url https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115 \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"barcodeType\":\"NONE\",\"description\":\"string\",\"voucherPrefix\":\"0\",\"poolLimit\":0,\"redeemedLimitPerClient\":0,\"startAt\":\"2019-08-24T14:15:22Z\"}'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\npayload = \"{\\\"name\\\":\\\"string\\\",\\\"barcodeType\\\":\\\"NONE\\\",\\\"description\\\":\\\"string\\\",\\\"voucherPrefix\\\":\\\"0\\\",\\\"poolLimit\\\":0,\\\"redeemedLimitPerClient\\\":0,\\\"startAt\\\":\\\"2019-08-24T14:15:22Z\\\"}\"\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\",\n    'content-type': \"application/json\"\n    }\n\nconn.request(\"PUT\", \"/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = JSON.stringify({\n  \"name\": \"string\",\n  \"barcodeType\": \"NONE\",\n  \"description\": \"string\",\n  \"voucherPrefix\": \"0\",\n  \"poolLimit\": 0,\n  \"redeemedLimitPerClient\": 0,\n  \"startAt\": \"2019-08-24T14:15:22Z\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"PUT\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\",\n    \"content-type\": \"application/json\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.write(JSON.stringify({\n  name: 'string',\n  barcodeType: 'NONE',\n  description: 'string',\n  voucherPrefix: '0',\n  poolLimit: 0,\n  redeemedLimitPerClient: 0,\n  startAt: '2019-08-24T14:15:22Z'\n}));\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$request->setBody('{\"name\":\"string\",\"barcodeType\":\"NONE\",\"description\":\"string\",\"voucherPrefix\":\"0\",\"poolLimit\":0,\"redeemedLimitPerClient\":0,\"startAt\":\"2019-08-24T14:15:22Z\"}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.put(\"https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .header(\"content-type\", \"application/json\")\n  .body(\"{\\\"name\\\":\\\"string\\\",\\\"barcodeType\\\":\\\"NONE\\\",\\\"description\\\":\\\"string\\\",\\\"voucherPrefix\\\":\\\"0\\\",\\\"poolLimit\\\":0,\\\"redeemedLimitPerClient\\\":0,\\\"startAt\\\":\\\"2019-08-24T14:15:22Z\\\"}\")\n  .asString();"}]},"delete":{"tags":["Vouchers"],"summary":"Delete a voucher pool","description":"Delete an existing pool of vouchers.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_POOL_DELETE`\n\n**User role permission required:** `assets_code_pool: delete`\n","operationId":"DeleteAVoucherPool","parameters":[{"$ref":"#/components/parameters/vouchers-pathPoolUuid"},{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"responses":{"200":{"description":"Voucher pool deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","default":"Delete object with success"}}}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/DeleteAVoucherPool"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115 \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"DELETE\", \"/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/v4/vouchers/pool/8465c240-d38e-42f8-af29-b9fa1ed05115\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/vouchers/item/list/{poolUuid}":{"get":{"tags":["Vouchers"],"summary":"List vouchers from a pool","description":"Retrieve vouchers from a single pool.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_LIST_BY_POOL_READ`\n\n**User role permission required:** `assets_code_pool: read`\n","operationId":"ListVouchersFromPool","parameters":[{"$ref":"#/components/parameters/vouchers-pathPoolUuid"},{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"},{"$ref":"#/components/parameters/vouchers-queryLimit"},{"$ref":"#/components/parameters/vouchers-queryPage"},{"$ref":"#/components/parameters/vouchers-queryIncludeMeta"}],"responses":{"200":{"description":"An array of vouchers in the pool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-listVouchersSuccessRes"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/ListVouchersFromPool"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request GET \\\n  --url 'https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false' \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"GET\", \"/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"GET\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'limit' => '100',\n  'page' => '4',\n  'includeMeta' => 'false'\n]);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.get(\"https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115?limit=100&page=4&includeMeta=false\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]},"delete":{"tags":["Vouchers"],"summary":"Delete vouchers by poolUuid","description":"Delete vouchers assigned to pool.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_BY_POOL_DELETE`\n\n**User role permission required:** `assets_code_pool: delete`\n","operationId":"DeleteVouchersByPoolUuid","parameters":[{"$ref":"#/components/parameters/vouchers-pathPoolUuid"},{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"responses":{"200":{"description":"Vouchers deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-voucherResponseMessage"},"example":{"message":"Delete object with success"}}}}},"deprecated":false,"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/DeleteVouchersByPoolUuid"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request DELETE \\\n  --url https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115 \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"DELETE\", \"/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"DELETE\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.delete(\"https://api.synerise.com/v4/vouchers/item/list/8465c240-d38e-42f8-af29-b9fa1ed05115\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}},"/v4/vouchers/item/count/{poolUuid}":{"post":{"tags":["Vouchers"],"summary":"Count vouchers","description":"Count (re-calculate) vouchers in a pool, group the results by status.\n\n---\n\n**API consumers:** <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin\" target=\"_blank\" rel=\"noopener\">Workspace (Business Profile)</a>, <a href=\"/api-reference/authorization?tag=Authorization&amp;operationId=userLogin\" target=\"_blank\" rel=\"noopener\">Synerise User</a>\n\n**API key permission required:** `VOUCHERS_ITEM_LIST_BY_POOL_READ`\n\n**User role permission required:** `assets_code_pool: read`\n","operationId":"getVouchersCount","parameters":[{"$ref":"#/components/parameters/vouchers-pathPoolUuid"},{"$ref":"#/components/parameters/vouchers-acceptHeader"},{"$ref":"#/components/parameters/vouchers-contentTypeHeader"},{"$ref":"#/components/parameters/vouchers-apiVersionHeader"}],"responses":{"200":{"description":"Set of counters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/vouchers-getVouchersCountRes"}}}}},"security":[{"JWT":[]}],"x-snr-doc-urls":["/api-reference/loyalty-and-engagement#tag/Vouchers/operation/getVouchersCount"],"x-codeSamples":[{"lang":"cURL","label":"cURL","source":"curl --request POST \\\n  --url https://api.synerise.com/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115 \\\n  --header 'Accept: SOME_STRING_VALUE' \\\n  --header 'Api-Version: SOME_STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'Content-Type: SOME_STRING_VALUE'"},{"lang":"Python","label":"Python","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.synerise.com\")\n\nheaders = {\n    'Accept': \"SOME_STRING_VALUE\",\n    'Content-Type': \"SOME_STRING_VALUE\",\n    'Api-Version': \"SOME_STRING_VALUE\",\n    'Authorization': \"Bearer REPLACE_BEARER_TOKEN\"\n    }\n\nconn.request(\"POST\", \"/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"JavaScript","label":"JavaScript","source":"const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://api.synerise.com/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115\");\nxhr.setRequestHeader(\"Accept\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Content-Type\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Api-Version\", \"SOME_STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"},{"lang":"Node.js","label":"Node.js","source":"const http = require(\"https\");\n\nconst options = {\n  \"method\": \"POST\",\n  \"hostname\": \"api.synerise.com\",\n  \"port\": null,\n  \"path\": \"/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115\",\n  \"headers\": {\n    \"Accept\": \"SOME_STRING_VALUE\",\n    \"Content-Type\": \"SOME_STRING_VALUE\",\n    \"Api-Version\": \"SOME_STRING_VALUE\",\n    \"Authorization\": \"Bearer REPLACE_BEARER_TOKEN\"\n  }\n};\n\nconst req = http.request(options, function (res) {\n  const chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function () {\n    const body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n});\n\nreq.end();"},{"lang":"PHP","label":"PHP","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.synerise.com/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Accept' => 'SOME_STRING_VALUE',\n  'Content-Type' => 'SOME_STRING_VALUE',\n  'Api-Version' => 'SOME_STRING_VALUE',\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Java","label":"Java","source":"HttpResponse<String> response = Unirest.post(\"https://api.synerise.com/v4/vouchers/item/count/8465c240-d38e-42f8-af29-b9fa1ed05115\")\n  .header(\"Accept\", \"SOME_STRING_VALUE\")\n  .header(\"Content-Type\", \"SOME_STRING_VALUE\")\n  .header(\"Api-Version\", \"SOME_STRING_VALUE\")\n  .header(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n  .asString();"}]}}},"components":{"securitySchemes":{"JWT":{"type":"http","scheme":"bearer","description":"JWT Bearer token. The header looks like this: `Bearer {JWT}`\n\nRemember to include the space between 'Bearer' and the token.\n\nGenerate a token via the **Authorization** endpoints."},"TrackerKey":{"type":"apiKey","name":"token","in":"query","description":"Authorization by tracker key sent as a query parameter. This is the same key as used in the website tracking code."}},"parameters":{"activities-api-pathIdentifierType":{"in":"path","name":"identifierType","description":"Profile identifier type","required":true,"schema":{"type":"string","enum":["id","uuid","email","custom_identify"]}},"activities-api-queryToken":{"in":"query","name":"pageToken","description":"The token of the page to retrieve. You can check the tokens of the next/previous page in the response to this endpoint. If not provided, the first page is retrieved.","required":false,"schema":{"type":"string"}},"activities-api-queryActions":{"in":"query","name":"actions","required":false,"description":"A comma-separated list of actions (or a single action) that will be included in the response","schema":{"type":"string"},"example":"page.visit"},"activities-api-queryDateFrom":{"in":"query","name":"dateFrom","description":"Lower value of the time range, as a Unix timestamp in milliseconds. Defaults to current time minus 2 hours.","required":false,"schema":{"type":"number"}},"activities-api-queryDateTo":{"in":"query","name":"dateTo","description":"Upper limit of the time range to fetch, as a Unix timestamp in milliseconds. Defaults to current time.","required":false,"schema":{"type":"number"}},"activities-api-queryDateFromV2":{"in":"query","name":"dateFrom","description":"Lower value of the time range, as a Unix timestamp in milliseconds.","required":false,"schema":{"type":"number"}},"activities-api-queryDateToV2":{"in":"query","name":"dateTo","description":"Upper limit of the time range to fetch, as a Unix timestamp in milliseconds.","required":false,"schema":{"type":"number"}},"activities-api-queryFormat":{"in":"query","name":"format","description":"The format of the retrieved data","required":false,"schema":{"enum":["json","csv"],"type":"string","default":"json"}},"activities-api-queryLimit":{"in":"query","name":"limit","description":"The maximum number of events to retrieve","required":false,"schema":{"type":"number","minimum":1,"maximum":1000}},"activities-api-queryRaw":{"in":"query","name":"raw","description":"When `true`, the response returns raw data. If raw data is not available, processed data from event storage (like from `\"raw\": false`) is returned instead.","required":false,"schema":{"type":"boolean","default":false}},"activities-api-querySortBy":{"in":"query","name":"sortBy","required":false,"description":"Sorting order. `time:desc` (default) returns newest events first.","schema":{"type":"string","default":"time:desc","enum":["time:desc","time:asc"]}},"ai-stats-indexId":{"name":"indexId","in":"path","required":true,"description":"ID of the index for which the stats are requested","schema":{"type":"string","example":"4add1a1fa877c1651906bb22c9dfd37a1618852272"}},"ai-stats-query":{"name":"query","in":"query","required":false,"description":"Query for which stats will be returned. If not provided, the results are returned for the most popular queries.","schema":{"type":"string"}},"ai-stats-dateFrom":{"name":"dateFrom","in":"query","required":false,"description":"Upper bound of the interval for which the statistics will be retrieved.  \nMust be provided with `to`, otherwise the filter is treated as unspecified.  \nIf not specified, the interval is last 7 days.\n","schema":{"type":"string","format":"date"}},"ai-stats-from":{"name":"from","in":"query","required":false,"description":"Upper bound of the interval for which the statistics will be retrieved.  \nMust be provided with `from`, otherwise the filter is treated as unspecified.  \nIf not specified, the interval is last 7 days.\n","schema":{"type":"string","format":"date"}},"ai-stats-dateTo":{"name":"dateTo","in":"query","required":false,"description":"Lower bound of the interval for which the statistics will be retrieved.\nIf not specified, the interval is last 7 days.\n","schema":{"type":"string","format":"date"}},"ai-stats-to":{"name":"to","in":"query","required":false,"description":"Lower bound of the interval for which the statistics will be retrieved.\nIf not specified, the interval is last 7 days.\n","schema":{"type":"string","format":"date"}},"ai-stats-productMetricName":{"name":"metric","in":"query","required":false,"description":"The response will include statistics for up to 10 top-performing items according to the selected metric, sorted from best to worst.\nIf not specified, the default metric is `views`.\n- views - the number of displayed recommendation frames.\n- generations - the number of generated recommendation frames.\n- clicks - the number of times an item in a recommendation frame was clicked.\n- charges - the number of transactions caused by the recommendation.\n- revenue - the revenue generated by the recommendation.\n","schema":{"type":"string","default":"views","enum":["views","clicks","revenue","generations","charges"]}},"ai-stats-searchType":{"name":"searchType","in":"query","required":false,"description":"Search type for which stats will be retrieved.","schema":{"type":"string","default":"all","enum":["fullTextSearch","autocomplete","listing","visual","all"]}},"ai-stats-queryFilter":{"name":"queryFilter","in":"query","required":false,"description":"Queries for which stats will be retrieved.","schema":{"type":"string","default":"queries","enum":["queries","queriesWithNoResults","queriesWithUsedSuggestions"]}},"ai-stats-searchGroupBy":{"name":"groupBy","in":"query","required":false,"description":"Attribute for which retrieved stats will be grouped.","schema":{"type":"string","enum":["date"]}},"ai-stats-searchSortBy":{"name":"SortBy","in":"query","required":false,"description":"Field by which results should be sorted.","schema":{"type":"string","default":"count","enum":["count","clicks","conversions","clickThroughRate","revenue","conversionRate"]}},"ai-stats-searchOrdering":{"name":"ordering","in":"query","required":false,"description":"Sort order direction.","schema":{"type":"string","default":"desc","enum":["asc","desc"]}},"ai-stats-filterName":{"name":"filterName","in":"query","required":false,"description":"Name of the filterable attribute. If present top values of this filter are returned.","schema":{"type":"string","example":"brand"}},"ai-stats-withFilters":{"name":"withFilters","in":"query","required":false,"description":"Switch to display search statistics with enabled filters or without filters.","schema":{"type":"string","enum":[true,false]}},"ai-stats-indexIdArray":{"name":"indexId","in":"query","required":true,"description":"List of indices ids for which the stats are requested.","schema":{"type":"array","items":{"type":"string"}}},"ai-stats-campaignIdPath":{"name":"campaignId","in":"path","required":true,"description":"ID of the recommendation campaign","schema":{"type":"string","example":"50NCGoRK0VRb"}},"ai-stats-timeZone":{"name":"timeZone","in":"query","required":false,"description":"Time zone identifier.","schema":{"type":"string","default":"UTC"},"example":"Europe/Warsaw"},"analytics-isMultiMetric":{"name":"isMultiMetric","in":"query","description":"Filter reports by whether they have more than one metric.","required":false,"style":"form","explode":true,"schema":{"type":"boolean"}},"analytics-isHistogramMetric":{"name":"isHistogramMetric","in":"query","description":"Filter metrics by whether they are histogram metrics.","required":false,"style":"form","explode":true,"schema":{"type":"boolean"}},"analytics-isReportMetric":{"name":"isReportMetric","in":"query","description":"Filter metrics by whether they are report metrics.","required":false,"style":"form","explode":true,"schema":{"type":"boolean"}},"analytics-AnalyticIdPathParam":{"name":"AnalysisId","in":"path","description":"UUID of the analysis","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"}},"analytics-DirectoryIdPathParam":{"name":"DirectoryId","in":"path","description":"ID of a directory","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"uuid"}},"analytics-ids":{"name":"ids","in":"query","description":"Comma-separated list of IDs (in UUID format) to filter results through","required":false,"style":"form","explode":false,"schema":{"type":"string"}},"analytics-page":{"name":"page","description":"The number of the page to retrieve","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"integer","format":"int32","default":1,"minimum":1}},"analytics-limit":{"name":"limit","in":"query","description":"Limit of items per page","required":false,"style":"form","explode":true,"schema":{"type":"integer","format":"int32","default":50}},"analytics-sortBy":{"name":"sortBy","description":"You can sort the results. The sorting direction is selected by adding `asc` or `desc`, for example `sortBy=name:desc`.\n","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"string","example":"name:asc","default":"updatedAt:desc","enum":["name:asc","name:desc","author:asc","author:desc","updatedAt:asc","updatedAt:desc","createdAt:asc","createdAt:desc","id:asc","id:desc","directoryId:asc","directoryId:desc"]}},"analytics-search":{"name":"search","description":"A string to search for in analyses' titles","in":"query","required":false,"schema":{"type":"string"}},"analytics-shareType":{"name":"shareType","description":"Type of sharing process","in":"query","required":false,"schema":{"type":"string","enum":["CROSSWORKSPACE","INTERNAL"]}},"analytics-expressionType":{"name":"type","description":"Filter by expression type. When omitted, expressions of all types are returned.","in":"query","required":false,"schema":{"type":"string","enum":["CLIENT","EVENT"]}},"analytics-actionName":{"name":"actionName","description":"Filter event expressions by their action's event name. When omitted, expressions for all actions are returned.","in":"query","required":false,"schema":{"type":"string"}},"analytics-clientIdAsPathParameter":{"name":"ProfileId","in":"path","description":"Unique identifier of a profile","required":true,"style":"simple","explode":false,"schema":{"type":"integer","format":"int64"}},"analytics-AggregateType":{"name":"aggregateType","in":"query","description":"Filter by aggregate type","required":false,"schema":{"type":"string","enum":["AGGREGATE","RUNNING_AGGREGATE"]}},"analytics-directoryId":{"name":"directoryId","description":"Unique ID of the directory to retrieve analyses from","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},"analytics-pathNamespace":{"name":"Namespace","in":"path","description":"Namespace. Currently, only `profiles` is available.","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["profiles"]}},"analytics-pathIdentifierType":{"name":"IdentifierType","in":"path","description":"Profile identifier type","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["id","uuid","email","custom_identify"]}},"analytics-aggregateIdentifierAsPathParam":{"name":"AggregateIdentifier","in":"path","description":"Aggregate identifier (UUID or numeric ID)","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},"api-service-pathIdentifierValue-apiv4":{"name":"identifierValue","in":"path","description":"The value of the selected identifier. It must be URL-encoded.\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n","required":true,"schema":{"type":"string"}},"api-service-pathTagId-apiv4":{"name":"tagID","in":"path","description":"ID of the tag","required":true,"schema":{"type":"integer","example":645}},"api-service-pathClientId-apiv4":{"name":"clientId","in":"path","description":"The ID of the profile\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n","required":true,"schema":{"type":"integer","format":"int64","example":434428563}},"api-service-pathClientCustomId-apiv4":{"name":"customId","in":"path","description":"The custom ID of the profile\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n","required":true,"schema":{"type":"string","example":"customIdExample"}},"api-service-pathTargetCustomId-apiv4":{"name":"targetCustomID","in":"path","description":"The custom ID of the profile to merge the `sourceCustomIDs` into","required":true,"schema":{"type":"string","example":"customIdExample"}},"api-service-pathClientCustomIds-apiv4":{"name":"sourceCustomIDs","in":"path","description":"Comma-delimited string with custom IDs of the profiles to merge","required":true,"schema":{"type":"string","example":"customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5"}},"api-service-pathToClientId-apiv4":{"name":"toClientId","in":"path","description":"The ID of the profile to merge the `fromClientIds` into","required":true,"schema":{"type":"integer","format":"int64","example":434428563}},"api-service-pathFromClientIds-apiv4":{"name":"fromClientIds","in":"path","description":"Comma-delimited string with client IDs of the profiles to merge","required":true,"schema":{"type":"string","example":"434428563,33322211,232212342"}},"api-service-pathClientEmail-apiv4":{"name":"clientEmail","in":"path","description":"The profile's email address\n\n- Must match the pattern (ECMA flavor): `/^(([^<>()[\\]\\\\.,;:\\s@\\\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\\\"]+)*)|(\\\\\".+\\\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/`\n- The value can't include any characters that match the patternn (ECMA flavor): `/([\\uD800-\\uDBFF][\\uDC00-\\uDFFF])|([\\r\\n\\u2028\\u2029\\u00AD]|[\\uFE00-\\uFE0F]|[\\u0000])/`\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n","required":true,"schema":{"type":"string","example":"clientemail@synerise.com"}},"api-service-acceptHeader-apiv4":{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},"api-service-contentTypeHeader-apiv4":{"name":"Content-Type","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},"api-service-apiVersionHeader-apiv4":{"name":"Api-Version","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["4.4"]}},"api-service-queryEventsLimit-apiv4":{"in":"query","name":"limit","description":"The number of events to retrieve","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},"api-service-queryAction-apiv4":{"in":"query","name":"action","description":"Filter events by action type. For example, to retrieve completed transactions, enter `transaction.charge`","required":false,"schema":{"type":"string","example":"transaction.charge"}},"api-service-queryDateTo-apiv4":{"in":"query","name":"time[to]","description":"End of the time range to query. UTC time in ISO 8601 (for example, `2020-10-19T13:47:53Z`). If no value is provided, the current time applies.","required":false,"schema":{"type":"string","format":"date-time"}},"api-service-queryDateFrom-apiv4":{"in":"query","name":"time[from]","description":"Start of the time range to query. UTC time in ISO 8601 (for example, `2020-10-19T13:47:53Z`). If no value is provided, the results are returned starting with the oldest entry in the database.","required":false,"schema":{"type":"string","format":"date-time"}},"automation-brain-diagramId":{"name":"diagramId","in":"path","description":"UUID of the workflow/diagram","required":true,"schema":{"type":"string"}},"automation-brain-limit":{"name":"limit","in":"query","description":"Number of items per page","schema":{"type":"number","default":10}},"automation-brain-limit50":{"name":"limit","in":"query","description":"Number of items per page","schema":{"type":"number","default":50}},"automation-brain-page":{"name":"page","in":"query","description":"The selected page","schema":{"type":"number","default":1,"minimum":1}},"automation-brain-timePeriod":{"name":"timePeriod","in":"query","description":"Time period for statistics","schema":{"type":"string","enum":["24h","7d"]}},"automation-brain-ScheduleEventFilterStart":{"name":"start","in":"query","description":"Start date","schema":{"type":"string","format":"date-time"}},"automation-brain-ScheduleEventFilterEnd":{"name":"end","in":"query","description":"End date","schema":{"type":"string","format":"date-time"}},"automation-brain-filterByStatus":{"name":"status","in":"query","description":"Filter workflows by status","schema":{"type":"string","enum":["All","Recent","Draft","Pending","Active","Paused","Stopped","Inactive","Scheduled","NoSchedule","ScheduleOn","ScheduleOff"],"default":"All"}},"automation-brain-sortDiagrams":{"name":"sort","in":"query","description":"Sort workflows by a property value","schema":{"type":"string","enum":["Author","Name","CreatedTime","UpdatedTime","Status"],"default":"UpdatedTime"}},"automation-brain-sortByDiagrams":{"name":"sortBy","in":"query","description":"Sort workflows clause","example":"createdTime:desc","schema":{"type":"string"}},"automation-brain-sortingOrder":{"name":"order","in":"query","description":"Sorting order","schema":{"type":"string","enum":["Asc","Desc"],"default":"Desc"}},"automation-brain-search":{"name":"search","in":"query","description":"A string to search for in workflow names and email addresses of authors. Workflows that don't match the search aren't returned at all.","schema":{"type":"string"}},"automation-brain-directoryId":{"name":"directoryId","in":"query","description":"UUID of the directory/catalogue/folder.","schema":{"type":"string","format":"uuid"}},"automation-brain-tagIds":{"name":"tags","in":"query","required":false,"schema":{"type":"string","description":"List of comma separated tags"}},"automation-brain-blockTypes":{"name":"blockTypes","in":"query","required":false,"description":"Comma-separated list of block type names (e.g. \"Email,EventTrigger\").\nIf provided, only workflows that contain a block of EVERY listed type\nare returned. The parameter may also be repeated.\n","schema":{"type":"string"}},"automation-brain-triggersOnEvent":{"name":"triggersOnEvent","in":"query","required":false,"description":"Event name that triggers or filters the workflow. If provided, only\nworkflows containing an EventTrigger or EventFilter block configured\nfor this event are returned. Matched case-insensitively.\n","schema":{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9.\\-_]+$"}},"automation-brain-generatesEvent":{"name":"generatesEvent","in":"query","required":false,"description":"Event name generated by the workflow. If provided, only workflows\ncontaining a SendEvent block, or a Webhook block whose responseAction\nis set to this event, are returned. Matched case-insensitively.\n","schema":{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9.\\-_]+$"}},"boxes-v2-NameFilter":{"name":"name","in":"query","description":"Searches for a given string in schema names. The search is **not** case-sensitive.","required":false,"schema":{"type":"string"}},"boxes-v2-PaginationLimit":{"name":"limit","in":"query","description":"Number of entries per page","required":true,"schema":{"type":"number"}},"boxes-v2-PaginationPage":{"name":"page","in":"query","description":"Selected page. The first page has the index `1`.","required":true,"schema":{"type":"number"}},"boxes-v2-SchemaId":{"name":"schemaId","in":"path","description":"UUID of the schema","required":true,"schema":{"type":"string"}},"boxes-v2-RecordId":{"name":"recordId","in":"path","description":"UUID of the record","required":true,"schema":{"type":"string","format":"uuid"}},"brickworks-service-queryLimit":{"name":"limit","in":"query","required":false,"description":"Limit of items per page","schema":{"type":"integer","format":"int32","default":50}},"brickworks-service-queryPage":{"name":"page","in":"query","required":false,"description":"The number of the page to retrieve","schema":{"type":"integer","format":"int32","minimum":1,"default":1}},"brickworks-service-queryFields":{"name":"fields","in":"query","required":false,"description":"A comma-separated list of fields to retrieve. If not defined, all fields are included in the response.","schema":{"type":"array","items":{"type":"string"}}},"brickworks-service-pathIdentifierType":{"name":"IdentifierType","in":"path","required":true,"description":"Profile identifier type","schema":{"type":"string","enum":["id","uuid","email","custom_identify"]}},"brickworks-service-pathExternalDataSourceId":{"name":"ExternalDataSourceId","in":"path","required":true,"description":"External source ID","schema":{"type":"string","format":"uuid"}},"brickworks-service-queryRecordFilters":{"name":"filters","in":"query","required":false,"schema":{"type":"string","description":"An RSQL query to filter the results.  \nYou can use these fields:\n- fields configured as searchable\n- `__id`\n- `__schemaId`\n- `__name`\n- `__slug`\n- `__status`\n- `__updatedAt`\n- `__createdAt`\n- `__publishedAt`\n- `__recordVersion`\n"}},"brickworks-service-querySearch":{"name":"search","in":"query","required":false,"description":"A string to search for in:\n- `id`\n- `appId`\n- `displayName`\n- `description`\n","schema":{"type":"string"}},"brickworks-service-querySearchRecords":{"name":"search","in":"query","required":false,"description":"A string to search for in the values of searchable fields.  \nIf `filter` is used, this parameter is ignored.\n","schema":{"type":"string"}},"brickworks-service-querySortBy":{"name":"sortBy","description":"You can change the default sorting. The sorting direction is selected by adding `asc` or `desc`, for example `sortBy=createdAt:desc`.\n\nYou can sort by:\n  - `appId` \n  - `displayName`\n  - `createdAt`\n  - `updatedAt`\n","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"string","example":"updatedAt:asc","default":"updatedAt:desc"}},"brickworks-service-querySortByRecords":{"name":"sortBy","description":"You can change the default sorting. The sorting direction is selected by adding `asc` or `desc`, for example `sortBy=__createdAt:desc`.\n\nSystem parameters are prefixed with `__` to avoid name collisions with fields you add to the schema.  \n\nYou can sort by:\n  - `__id`\n  - `__createdAt`\n  - `__updatedAt`\n","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"string","example":"__updatedAt:asc","default":"__updatedAt:desc"}},"brickworks-service-methodQueryParam":{"name":"method","description":"You can filter the results by source http method.\n","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"string","enum":["get","post"]}},"brickworks-service-queryIds":{"name":"ids","in":"query","description":"Comma-separated list of IDs (in UUID format) to filter results through","required":false,"style":"form","explode":false,"schema":{"type":"string"}},"brickworks-service-pathRecordVersionIdentifier":{"name":"RecordVersionIdentifier","in":"path","required":true,"description":"Record version identifier - can be a UUID (RecordVersionId) or a version number (integer)","schema":{"oneOf":[{"type":"string","format":"uuid","title":"Record version UUID"},{"type":"integer","format":"int32","minimum":1,"title":"Record version Number"}]},"examples":{"uuid":{"value":"6da06fc3-046b-4546-8247-2ad7be652e78","summary":"Record Version UUID"},"versionNumber":{"value":1,"summary":"Record version number"}}},"brickworks-service-queryStatuses":{"name":"statuses","in":"query","description":"Comma-separated list of record statuses to filter the results.","required":false,"style":"form","explode":false,"schema":{"type":"string","enum":["PUBLISHED","DRAFT","UNPUBLISHED","SCHEDULED"]}},"brickworks-service-querySchemaTypes":{"name":"schemaTypes","in":"query","description":"Comma-separated list of schema types to filter the results. By default, all types are retrieved.","required":false,"style":"form","explode":false,"schema":{"type":"string","enum":["SIMPLE","VERSIONED"]}},"brickworks-service-pathRecordIdentifier":{"name":"RecordIdentifier","in":"path","required":true,"description":"Record identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters)","schema":{"oneOf":[{"type":"string","format":"uuid","title":"Record UUID"},{"type":"string","minLength":6,"maxLength":40,"pattern":"^(?!__)(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)[\\w\\-]+$","title":"Record slug"}]},"examples":{"uuid":{"value":"f6ce33ee-bdf2-4a23-87be-07de936ceeab","summary":"Record UUID"},"slug":{"value":"my-record-slug","summary":"Record slug"}}},"brickworks-service-pathSchemaIdentifier":{"name":"SchemaIdentifier","in":"path","required":true,"description":"Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)","schema":{"oneOf":[{"type":"string","format":"uuid","title":"Schema UUID"},{"type":"string","minLength":3,"maxLength":25,"pattern":"^(?!__)(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)[\\w\\-]+$","title":"Schema AppId"}]},"examples":{"uuid":{"value":"550e8400-e29b-41d4-a716-446655440000","summary":"Schema UUID"},"appId":{"value":"my-schema-app-id","summary":"Schema AppId (API name)"}}},"brickworks-service-querySlugs":{"name":"slugs","in":"query","description":"Comma-separated list of slugs to filter results through","required":false,"style":"form","explode":false,"schema":{"type":"string"}},"business-profile-service-listPage":{"name":"page","description":"Page to retrieve","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":1}},"business-profile-service-listLimit":{"name":"limit","description":"Limit of items per page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}},"business-profile-service-listSearch":{"name":"search","description":"String to search for","in":"query","required":false,"schema":{"type":"string","default":""}},"catalogs-itemDatabaseId":{"in":"path","name":"itemId","description":"ID of the item. This is the ID of the entry in the Synerise\ndatabase, not the unique identifier that you're using in your\ncatalog. The itemId is available in the `id` field of the catalog item when you [retrieve items from a catalog](#operation/getItemsByBag):\n\n```\n{\n    \"creationDate\": \"2020-09-30T11:31:16.314Z\",\n    \"id\": 73753, // this is the itemId\n    \"itemKey\": \"uniqueValue\",\n    \"lastModified\": null,\n    \"value\": \"{\\\"exampleKey\\\":\\\"uniqueValue\\\",\\\"exampleKey2\\\":\\\"exampleValue\\\"}\",\n    \"bag\": {\n        \"author\": \"authorName\",\n        \"creationDate\": \"2020-09-30T10:52:31.264Z\",\n        \"id\": 1053, // this is the ID of the catalog\n        \"lastModified\": \"2020-09-30T11:41:11.808Z\",\n        \"name\": \"sampleCatalog\"\n    }\n},\n```\n","required":true,"schema":{"type":"integer"}},"catalogs-queryLimit":{"in":"query","name":"limit","description":"The maximum number of items to include in the response. `offset` must be defined. Default: 100","required":false,"schema":{"type":"integer"}},"catalogs-queryOffset":{"in":"query","name":"offset","description":"The offset for the search. For example, if your `limit` is 10 and you want to retrieve the third page of items, set the offset to 20. Items with indexes 20 to 29 are returned (the first item on the first page has the index 0).","required":false,"schema":{"type":"integer"}},"catalogs-queryCatalogSearchBy":{"in":"query","name":"searchBy","description":"A search string. You can search the catalogs by their name or the first or last name of the author.","required":false,"schema":{"type":"string"}},"catalogs-queryCatalogOrderBy":{"in":"query","name":"orderBy","description":"The parameter to order the results by. Order is always ascending.","required":false,"schema":{"type":"string","enum":["id","author","lastModified","creationDate"]}},"catalogs-pathCatalogId":{"in":"path","name":"catalogId","description":"ID of the catalog","required":true,"schema":{"type":"integer"}},"catalogs-queryItemKey":{"in":"query","name":"itemKey","description":"Filter by the value of the unique identifier of the item (exact match)","required":false,"schema":{"type":"string"}},"catalogs-queryDelimiter":{"in":"query","name":"delimiter","description":"The delimiter to use in csv. You can use `;` or `,`. Default: `,`","required":false,"schema":{"type":"string"}},"crm-pathClientId":{"name":"clientId","in":"path","description":"Profile ID\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n","required":true,"schema":{"type":"integer"}},"items-filter-all-itemsCatalogId":{"name":"itemsCatalogId","in":"query","required":false,"description":"ID of the item catalog that contains the items tested in the request. If not provided, \"default\" is assumed - however, the \"default\" catalog may not exist in your workspace.\n\n**NOTE:** This ID is available in the details the search index or recommendation campaign you want to make test requests for.\n","schema":{"type":"string","default":"default"}},"items-filter-all-exampleItems":{"name":"exampleItems","in":"query","required":false,"description":"Controls how many example items will be returned","schema":{"type":"integer","default":10}},"items-search-paginationSortBy":{"name":"sortBy","in":"query","required":false,"description":"<span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.\n\nName of the attribute by which the data will be sorted.      \n","schema":{"type":"string"}},"items-search-paginationOrdering":{"name":"ordering","in":"query","required":false,"description":"Sorting order","schema":{"type":"string","default":"asc","enum":["desc","asc"]}},"items-search-paginationPage":{"name":"page","in":"query","description":"Page number to return for pagination. The first page has the index `1`.","required":false,"schema":{"type":"integer","format":"int32","example":4,"default":1}},"items-search-filterableAttributes":{"name":"attribute","in":"query","description":"List of attributes for which values will be fetched","required":true,"explode":true,"schema":{"type":"array","items":{"type":"string"}}},"items-search-paginationLimit":{"name":"limit","in":"query","description":"The number of items to return per page","required":false,"schema":{"type":"integer","format":"int32","example":10,"default":20,"minimum":0,"maximum":500}},"items-search-paginationIncludeMeta":{"name":"includeMeta","in":"query","required":false,"description":"\nWhen `true`, pagination metadata is included in the response body.\n\nWhen `false`, the data is included in the response headers:\n\n- Link: links to neighbors, first, and last pages in pagination.\n\n- X-Pagination-Total-Count: total number of items on all pages\n\n- X-Pagination-Total-Pages: total number of pages\n\n- X-Pagination-Page: current page\n\n- X-Pagination-Limit: maximum number of items on a page\n\n- X-Pagination-Sorted-By: parameter that the items were sorted by\n\n- X-Pagination-Ordering: sorting direction\n","schema":{"type":"boolean","default":false}},"items-search-searchQuery":{"name":"query","in":"query","required":true,"description":"Query text to use in the search","schema":{"type":"string"}},"items-search-imageUrl":{"name":"url","in":"query","required":true,"description":"URL of the image to be used in the visual search","schema":{"type":"string"}},"items-search-inPathIndexId":{"name":"indexId","in":"path","required":true,"description":"ID of the index to be used in the search operation","schema":{"type":"string"}},"items-search-clientUUID":{"name":"clientUUID","in":"query","required":false,"description":"UUID of the profile for which the search is performed","schema":{"type":"string"}},"items-search-itemId":{"name":"itemId","in":"query","required":true,"description":"Item ID","schema":{"type":"string"}},"items-search-correlationId":{"name":"correlationId","in":"query","required":false,"description":"Correlation ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.\n\nDo not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.\n","schema":{"type":"string"}},"items-search-searchId":{"name":"searchId","in":"query","required":false,"deprecated":true,"description":"**DEPRECATED - use correlationId instead**\n\nSearch ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.\n\nDo not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.\n","schema":{"type":"string"}},"items-search-sortByMetric":{"name":"sortByMetric","in":"query","required":false,"description":"<span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.\n\nName of the metric by which the data will be sorted.\n","schema":{"type":"string","enum":["TransactionsPopularity","PageVisitsPopularity"]}},"items-search-sortByGeoPoint":{"name":"sortByGeoPoint","in":"query","required":false,"description":"<span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.\n\nGeo-point (`{latitude},{longitude}`) for data sorting. Results are sorted by distance from this point. `ordering: asc` means \"closest first\".'\n","schema":{"type":"string","example":"34.052235,-118.243685"}},"items-search-filterGeoPoints":{"name":"filterGeoPoints","in":"query","required":false,"description":"The definition of a geographical area to filter by.\n\nGiven one geo-point, the results will be limited to a radius around a point. To override the default radius (1000 meters), provide the `filterAroundRadius` parameter.\n**Example input:** `[\"34.052235,-118.243685\"]`\n\nGiven two geo-points, the results will be limited to a rectangular area.\n**Example input:** `[\"50,-100\", \"25,150\"]`\n\nGiven three or more geo-points, the results will be limited to a polygonal area.\n**Example input:** `[\"50,0\", \"40,20\", \"-20,10\"]`\n","schema":{"type":"array","example":["34.052235,-118.243685","15.0,65.0"],"items":{"type":"string"}}},"items-search-filterAroundRadius":{"name":"filterAroundRadius","in":"query","required":false,"description":"Radius in meters to be used when filtering using geo-location. Can only be used when filtering by a single geo-point.","schema":{"type":"integer","format":"int32","example":5000,"default":1000}},"items-search-filterAnchor":{"name":"filterAnchor","in":"query","required":false,"description":"Anchor (`{width},{height}`) by which the visual results data will be filtered.\n`{width},{height}` correspond to normalized image coordinates, i.e. they are in range [0,1].\nAnchor (0,0) corresponds to the top-left pixel of an image.\n","schema":{"type":"string","example":"0.2,0.8"}},"items-search-filters":{"name":"filters","in":"query","required":false,"description":"IQL query string. For details, see the [Help Center](https://help.synerise.com/developers/iql/).","schema":{"type":"string"}},"items-search-facets":{"name":"facets","in":"query","required":false,"description":"A list of attributes for which facets will be returned. A single `*` value matches all facetable attributes.\nA single `auto` value enables automatic facet selection based on the result set — the system picks the most relevant facets using the index's `dynamicFacets` configuration.\n\nTo determine which groups of facets should be returned, use the `includeFacets` parameter.\n","schema":{"type":"array","items":{"type":"string"}}},"items-search-context":{"name":"context","in":"query","required":false,"description":"List of context strings for a search query","example":["mobile","listing"],"schema":{"type":"array","items":{"type":"string"}}},"items-search-displayAttributes":{"name":"displayAttributes","in":"query","required":false,"description":"List of ad hoc attributes that will be returned for each found item","example":["title","price"],"schema":{"type":"array","items":{"type":"string"}}},"items-search-includeFacets":{"name":"includeFacets","in":"query","required":false,"description":"Determines which groups of facets will be returned: both filtered and unfiltered; just filtered; just unfiltered; or no group at at all.\n\nTo determine which attributes should be returned as facets in each group, use the `facets` parameter.\n","schema":{"type":"string","default":"filtered","enum":["all","filtered","unfiltered","none"]}},"items-search-facetsSize":{"name":"facetsSize","in":"query","required":false,"description":"Determines how many items will be used for facets aggregation.\n","schema":{"type":"integer","default":2000,"minimum":1,"maximum":10000}},"items-search-maxValuesPerFacet":{"name":"maxValuesPerFacet","in":"query","required":false,"description":"Determines how many values will be retrieved per facet.\n","schema":{"type":"integer","default":50,"minimum":1,"maximum":1000}},"items-search-facetsOrderBy":{"name":"facetsOrderBy","in":"query","required":false,"description":"Controls the ordering of facets in the response.  \nWhen `facets=auto`, the default ordering is by coverage (most relevant facets first).  \nWhen facets are specified explicitly, the default ordering is by name.  \nWhen two facets have equal coverage, ties are resolved by name.\n","schema":{"type":"string","enum":["coverage","name"]}},"items-search-caseSensitiveFacetValues":{"name":"caseSensitiveFacetValues","in":"query","required":false,"description":"Specifies whether facets aggregation should be case sensitive.\n","schema":{"type":"boolean","default":false}},"items-search-distinctFilter":{"name":"distinctFilter","in":"query","required":false,"schema":{"type":"string","example":"{\"attribute\": \"color\", \"maxNumItems\": 3}"},"description":"DistinctFilter JSON as an URL-encoded string\n"},"items-search-personalize":{"name":"personalize","in":"query","required":false,"description":"If set to `false`, the search result is not personalized.\n","schema":{"type":"boolean","default":true}},"items-search-ignoreQueryRules":{"name":"ignoreQueryRules","in":"query","required":false,"description":"If set to `true`, query rules are not applied.\n","schema":{"type":"boolean","default":false}},"items-search-excludeQueryRules":{"name":"excludeQueryRules","in":"query","required":false,"description":"List of query rules that will not be applied.\n","example":[2,5],"schema":{"type":"array","items":{"type":"integer"}}},"items-search-disableQueryClassification":{"name":"disableQueryClassification","in":"query","required":false,"description":"If set to `true`, query classification is not applied.\n","schema":{"type":"boolean","default":false}},"items-search-disableDynamicReranker":{"name":"disableDynamicReranker","in":"query","required":false,"description":"If set to `true`, dynamic reranker is not applied.\n","schema":{"type":"boolean","default":false}},"items-search-crossWorkspaceModeEnabled":{"name":"crossWorkspaceModeEnabled","in":"query","required":false,"description":"If set, overrides the cross-workspace mode from the index configuration. When `true`, cross-workspace personalization is enabled. When `false`, it is disabled.\n","schema":{"type":"boolean"}},"items-search-params":{"name":"params","in":"query","required":false,"description":"List of extra params that will be added to the `item.search` event. They must be in the `name:value` format. The total size must not exceed 500 bytes when written as a JSON object.\n","example":["source:mobile"],"schema":{"type":"array","items":{"type":"string"}}},"items-search-config-paginationSortBy":{"name":"sortBy","in":"query","required":false,"description":"Name of the attribute by which the data will be sorted","schema":{"type":"string"}},"items-search-config-paginationOrdering":{"name":"ordering","in":"query","required":false,"description":"Sorting order","schema":{"type":"string","default":"desc","enum":["desc","asc"]}},"items-search-config-paginationPage":{"name":"page","in":"query","description":"Page number to return for pagination. The first page has the index `1`.","required":false,"schema":{"type":"integer","format":"int32","example":4,"default":1}},"items-search-config-paginationLimit":{"name":"limit","in":"query","description":"The number of items to return per page","required":false,"schema":{"type":"integer","format":"int32","example":100,"default":1000,"maximum":1000}},"items-search-config-paginationIncludeMeta":{"name":"includeMeta","in":"query","required":false,"description":"\nWhen `true`, pagination metadata is included in the response body.\n\nWhen `false`, the data is included in the response headers:\n\n- Link: links to neighbors, first, and last pages in pagination.\n\n- X-Pagination-Total-Count: total number of items on all pages\n\n- X-Pagination-Total-Pages: total number of pages\n\n- X-Pagination-Page: current page\n\n- X-Pagination-Limit: maximum number of items on a page\n\n- X-Pagination-Sorted-By: parameter that the items were sorted by\n\n- X-Pagination-Ordering: sorting direction\n","schema":{"type":"boolean","default":false}},"items-search-config-inQueryDirectoryId":{"in":"query","name":"directoryId","required":false,"description":"Requested directoryId of the rule.","schema":{"type":"string","format":"uuid"}},"items-search-config-inQueryType":{"in":"query","name":"type","required":false,"description":"Requested type of the rule.","schema":{"type":"string","enum":["Keyword","Hybrid","Semantic"]}},"items-search-config-InPathIndexId":{"in":"path","name":"indexId","required":true,"description":"ID of the index","schema":{"type":"string"}},"items-search-config-nameFilter":{"name":"name","in":"query","required":false,"deprecated":true,"description":"Deprecated parameter. If `query` is provided, this parameter is ignored.\nIf an index has an `id` equal to the value of this parameter, only that index will be retrieved. Otherwise, all indices containing this value in their `name` will be retrieved.\n","schema":{"type":"string"}},"items-search-config-queryFilter":{"name":"query","in":"query","required":false,"description":"If an index has an `id` equal to the value of this parameter, only that index will be retrieved. Otherwise, all indices containing this value in their `name` will be retrieved. This parameter replaces the deprecated `name` parameter.","schema":{"type":"string"}},"items-search-config-excludeAbTests":{"name":"excludeAbTests","in":"query","required":false,"description":"Only indices not involved in currently running AB tests will be retrieved.","schema":{"type":"boolean"}},"items-search-recent-indexId":{"name":"indexId","in":"path","required":true,"description":"ID of the index that the query relates to","schema":{"type":"string","example":"4add1a1fa877c1651906bb22c9dfd37a1618852272"}},"items-search-recent-clientUUID":{"name":"clientUUID","in":"query","required":true,"description":"UUID of the profile for which the query is performed","schema":{"type":"string","example":"e0097757-d1e2-44ac-ba3c-d97979a354c1"}},"items-search-recent-windowSize":{"name":"windowSize","in":"query","required":false,"description":"Maximum number of recent searches to be returned. <br><strong>NOTE:</strong><br> The provided query parameter has priority over the configuration provided in [this endpoint](#operation/postIndexConfigV2). If the parameter is not provided, the default value does **not** override the configuration.","schema":{"type":"integer","minimum":1,"default":15}},"items-search-recent-timeUnit":{"name":"timeUnit","in":"query","required":false,"description":"The time unit. Used in conjunction with `timeValue`.<br><strong>NOTE:</strong><br> The provided query parameter has priority over the configuration provided in [this endpoint](#operation/postIndexConfigV2). If the parameter is not provided, the default value does **not** override the configuration.","schema":{"type":"string","default":"DAYS","enum":["YEARS","MONTHS","WEEKS","DAYS","HOURS","MINUTES","SECONDS"]}},"items-search-recent-timeValue":{"name":"timeValue","in":"query","required":false,"description":"The amount of time units. Used in conjunction with `timeUnit`.<br><strong>NOTE:</strong><br> The provided query parameter has priority over the configuration provided in [this endpoint](#operation/postIndexConfigV2). If the parameter is not provided, the default value does **not** override the configuration.","schema":{"type":"integer","minimum":1,"default":30}},"morph-LogsLimitInQuery":{"name":"limit","in":"query","required":false,"schema":{"type":"number","default":500,"maximum":5000},"description":"The maximum number of log lines in each stage"},"notes-service-profileId":{"in":"path","name":"clientId","required":true,"description":"Profile ID","schema":{"type":"integer","format":"int64"}},"optimizer-manager-InQuerySearch":{"in":"query","name":"search","required":false,"description":"ID of the experiment or a part of its name.","schema":{"type":"string"}},"optimizer-manager-InQueryStatus":{"in":"query","name":"status","required":false,"description":"Requested status of the experiment. One of: NotStarted, Running, Paused, Finished, Draft. May pass more than one status.","schema":{"type":"array","items":{"type":"string","enum":["NotStarted","Running","Paused","Finished","Draft"]}}},"optimizer-manager-InQueryCampaignType":{"in":"query","name":"campaignType","required":false,"description":"CampaignType of the experiment","schema":{"type":"string","enum":["ITEMS_SEARCH","RECOMMENDATION_CAMPAIGN"]}},"optimizer-manager-InPathExperimentId":{"in":"path","required":true,"name":"id","description":"ID of the experiment","schema":{"type":"integer"}},"promotions-pathHandbillUuid":{"name":"handbillUuid","in":"path","required":true,"description":"UUID of the handbill configuration","schema":{"type":"string","format":"uuid"}},"promotions-pathIdentifierValue":{"name":"identifierValue","in":"path","description":"The value of the selected identifier","required":true,"schema":{"type":"string"}},"promotions-pathPromoIdentifierType":{"name":"identifierType","in":"path","required":true,"description":"The promotion identifier to use for the request","schema":{"type":"string","enum":["uuid","code"]}},"promotions-pathClientIdentifierType":{"name":"identifierType","in":"path","description":"The Profile identifier to use for the request.\n\n`externalId` is known as `customId` or `custom_identify` in other Synerise services.\n","required":true,"schema":{"type":"string","example":"email","enum":["email","phone","externalId","uuid","clientId"]}},"promotions-pathLockIdentifier":{"name":"lockIdentifier","in":"path","description":"Lock identifier","required":true,"schema":{"type":"string","example":"2f01c1b4-4266-41cb-b8d9-fd00457eedef.1640081408119"}},"promotions-queryLockTtlSec":{"in":"query","name":"lockTtlSec","description":"Lock duration in seconds","schema":{"type":"number","default":900}},"promotions-queryOrderFieldName":{"in":"query","name":"orderFieldName","description":"Name of the parameter used for sorting","schema":{"type":"string","enum":["createdAt","headerName","code","startAt","expireAt","name","type"],"default":"createdAt"}},"promotions-queryOrder":{"in":"query","name":"order","description":"Sorting order","schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},"promotions-queryQuery":{"in":"query","name":"query","description":"A string to search for in the `headerName` parameter or fragment of UUID.","schema":{"type":"string"}},"promotions-queryPromotionUuids":{"in":"query","name":"promotionUuids","description":"Filters the response data by a list of promotion UUIDs.","required":false,"schema":{"type":"string","example":"fc1ee5bf-ad97-47a8-a474-e1b6e755ff38,aabaed4e-4ee7-44d5-b079-445a017ec6fe"},"style":"form","explode":true},"promotions-queryHandbillSort":{"name":"sort","in":"query","required":false,"description":"The sorting order of the response.\n\n\nYou can sort by any combination of the following attributes:\n\n* `createdAt`: time when the configuration was created\n\n* `updatedAt`: time when the configuration was last updated\n\n\nYou can sort ascending (default) or descending by adding `asc` or `desc` after the parameter, separated by a comma.\"\n","style":"form","explode":true,"allowReserved":true,"schema":{"type":"string","example":"createdAt,desc"}},"promotions-queryPromotionSort":{"name":"sort","in":"query","required":false,"description":"The sorting order of the response.\n\n\n  You can sort by any combination of the following attributes:\n  * `headerName`: promotion header name\n  * `name`: promotion name\n  * `code`: promotion code\n  * `startAt`: time when the promotion starts\n  * `createdAt`: time when the promotion was created\n  * `updatedAt`: time when the promotion was last updated\n  * `expireAt`: time when the promotion expires\n  * `requireRedeemedPoints`: how many loyalty points are needed to redeem the promotion\n  * `type`: type of the promotion\n  * `priority`: priority of the promotion\n  * `status` : status of the promotion for the Profile\n\n  You can sort ascending (default) or descending by adding `asc` or `desc` after the parameter, separated by a comma.\n\n  **Example**: `sort=requireRedeemedPoints&sort=expireAt,asc&sort=status,desc`\n","style":"form","explode":true,"allowReserved":true,"schema":{"type":"string","example":"requireRedeemedPoints,desc"}},"promotions-queryTarget":{"name":"target","in":"query","required":false,"description":"The target of the promotion","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["ALL","SEGMENT"],"default":"ALL"}}},"promotions-queryLimit":{"name":"limit","in":"query","description":"The number of items to return per page","required":false,"schema":{"type":"integer","example":100,"default":100,"maximum":1000}},"promotions-queryLockIdentifier":{"name":"lockIdentifier","in":"query","schema":{"type":"string","example":"6561d87b-2697-46ad-8f9a-0550736b86e3"},"description":"Identifier of the lock which will be created with this request. The lock disables the profile's possibility to fetch promotion lists.\n\nThis lock will be active until one of those conditions is met:\n\n- the TTL (configured with the [settings](#operation/endpointSettingsUpdateSettingsPUT) endpoint) expires.\n- it is removed using the [Release \"promotion requested\" lock](#operation/endpointLockReleasePromotionRequestedLockForClientPOST) endpoint.\n- a promotion is redeemed and this lock's identifier is provided with the redemption request."},"promotions-queryPage":{"name":"page","in":"query","description":"Page number to return for pagination. The first page has the index `1`.","required":false,"schema":{"type":"integer","format":"int32","example":4,"default":1}},"promotions-queryStoreCatalog":{"name":"storeCatalog","in":"query","description":"Limits the response to data from stores included in a catalog.","required":false,"schema":{"type":"string"}},"promotions-queryStoreIds":{"name":"storeIds","in":"query","description":"Limits the response to data from particular stores, identified by IDs.","required":false,"schema":{"type":"string"},"style":"form","explode":false},"promotions-queryIncludeMeta":{"name":"includeMeta","in":"query","description":"\nWhen `true`, pagination metadata is included in the response body.\n\nWhen `false`, the data is included in the response headers:\n\n- Link: links to neighbors, first, and last pages in pagination.\n\n- X-Pagination-Total-Count: total number of items on all pages\n\n- X-Pagination-Total-Pages: total number of pages\n\n- X-Pagination-Page: current page\n\n- X-Pagination-Limit: maximum number of items on a page\n","required":false,"schema":{"type":"boolean","example":false,"default":false}},"promotions-queryIncludeVouchers":{"name":"includeVouchers","in":"query","schema":{"type":"boolean","example":false,"default":false},"description":"\nWhen `true`, promotion with defined vouchers will also have list of assigned vouchers.\n\nWhen `false`, vouchers will not be fetched.\n"},"promotions-queryStatusByType":{"name":"statusByType","in":"query","description":"A combination of status and type, for example `[CUSTOM]=ACTIVE`","required":false,"style":"form","explode":true,"schema":{"type":"string","example":"[CUSTOM]=ACTIVE"}},"promotions-queryTargetByType":{"name":"targetByType","in":"query","description":"A combination of target and type, for example `[SEGMENT]=ACTIVE`","required":false,"style":"form","explode":true,"schema":{"type":"string","example":"[SEGMENT]=ACTIVE"}},"promotions-queryVisibilityStatus":{"name":"visibilityStatus","in":"query","description":"Visibility status","required":false,"style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["DRAFT","PUBLISH","HIDDEN"]}}},"promotions-queryPromotionType":{"name":"type","in":"query","description":"Promotion type","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["GENERAL","CUSTOM","MEMBERS_ONLY","HANDBILL"]}}},"promotions-queryReturnCodes":{"name":"returnCodes","in":"query","description":"Return deactivated codes","required":false,"style":"form","explode":false,"schema":{"type":"boolean","example":true,"default":false}},"promotions-queryLockPoints":{"name":"lockPoints","in":"query","description":"Lock profile points during the deactivation process","required":false,"style":"form","explode":false,"schema":{"type":"boolean","example":true,"default":true}},"promotions-queryPromotionStatus":{"name":"status","in":"query","description":"Filter by promotion status","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["ACTIVE","ASSIGNED","REDEEMED"]}}},"promotions-queryLastingOnly":{"name":"lastingOnly","in":"query","description":"When set to `true`, shows promotions/vouchers that are currently active and those that are still inactivated. (lastingAt set to null or lastingAt in future)","required":false,"style":"form","explode":false,"schema":{"type":"boolean","example":true,"default":true}},"promotions-queryHandbillUuid":{"name":"handbillUuid","in":"query","required":true,"style":"form","schema":{"type":"array","description":"An array of handbill configuration UUIDs","items":{"type":"string"}}},"promotions-queryPromotionPresentOnly":{"name":"presentOnly","in":"query","description":"When set to:\n- `true`, the response includes only promotions that are currently active (startAt later than now or null, expireAt later than now or null)\n- `false`, the response includes the above and also promotions that are expired or will become active in the future.\n","required":false,"style":"form","explode":false,"schema":{"type":"boolean","example":true,"default":true}},"promotions-queryPromotionDisplayableOnly":{"name":"displayableOnly","in":"query","description":"When set to `true`, promotions which are not currently active are included in response, according to date range defined in promotion fields `displayFrom` and `displayTo`.","required":false,"style":"form","explode":false,"schema":{"type":"boolean","example":true,"default":false}},"promotions-queryTagNames":{"name":"tagNames","in":"query","description":"Filter the response to promotions with a certain tag or tags","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string"}}},"promotions-queryExcludeTag":{"name":"excludeTags","in":"query","description":"Promotions with the tags included in this list will not be deactivated","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string"}}},"promotions-queryCheckGlobalActivationLimits":{"name":"checkGlobalActivationLimits","in":"query","description":"Flag to indicate if global limits should be checked","required":false,"style":"form","explode":false,"schema":{"type":"boolean","example":true,"default":true}},"promotions-queryPromotionFields":{"name":"fields","in":"query","description":"Return only specified promotion fields. If `fields` is not specified, all fields are returned.","required":false,"style":"form","explode":false,"schema":{"example":"uuid,requireRedeemedPoints,requireRedeemedPoints,possibleRedeems,status,currentRedeemedQuantity,lastingAt","type":"array","items":{"type":"string","enum":["uuid","code","status","type","redeemLimitPerClient","redeemQuantityPerActivation","currentRedeemedQuantity","currentRedeemLimit","activationCounter","possibleRedeems","details","discountType","discountValue","discountMode","discountModeDetails","requireRedeemedPoints","name","headline","description","images","startAt","expireAt","displayFrom","displayTo","assignedAt","lastingTime","lastingAt","catalogIndexItems","params","price","priority","maxBasketValue","minBasketValue","itemScope","tags","handbillUuid"]}}},"push-devices-service-pathIdentifierValue":{"name":"identifierValue","in":"path","description":"The value of the selected identifier","required":true,"schema":{"type":"string"}},"push-devices-service-acceptHeader":{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},"push-devices-service-pathClientId":{"name":"clientId","description":"Unique identifier of a profile","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},"query-rules-v2-paginationSortBy":{"name":"sortBy","in":"query","required":false,"description":"Name of the attribute by which the data will be sorted","schema":{"type":"string"}},"query-rules-v2-paginationOrdering":{"name":"ordering","in":"query","required":false,"description":"Sorting order","schema":{"type":"string","default":"desc","enum":["desc","asc"]}},"query-rules-v2-paginationPage":{"name":"page","in":"query","description":"Page number to return for pagination. The first page has the index `1`.","required":false,"schema":{"type":"integer","format":"int32","example":4,"default":1}},"query-rules-v2-paginationLimit":{"name":"limit","in":"query","description":"The number of items to return per page","required":false,"schema":{"type":"integer","format":"int32","example":100,"default":1000,"maximum":1000}},"query-rules-v2-paginationIncludeMeta":{"name":"includeMeta","in":"query","required":false,"description":"\nWhen `true`, pagination metadata is included in the response body.\n\nWhen `false`, the data is included in the response headers:\n\n- Link: links to neighbors, first, and last pages in pagination.\n\n- X-Pagination-Total-Count: total number of items on all pages\n\n- X-Pagination-Total-Pages: total number of pages\n\n- X-Pagination-Page: current page\n\n- X-Pagination-Limit: maximum number of items on a page\n\n- X-Pagination-Sorted-By: parameter that the items were sorted by\n\n- X-Pagination-Ordering: sorting direction\n","schema":{"type":"boolean","default":false}},"query-rules-v2-inQueryDirectoryId":{"in":"query","name":"directoryId","required":false,"description":"Requested directoryId of the rule.","schema":{"type":"string","format":"uuid"}},"query-rules-v2-InQuerySearch":{"in":"query","name":"search","required":false,"description":"Requested part of the name or the id of the rule.","schema":{"type":"string"}},"query-rules-v2-inPathIndexId":{"in":"path","name":"indexId","required":true,"description":"ID of the index","schema":{"type":"string"}},"query-rules-v2-inPathRuleId":{"in":"path","name":"ruleId","required":true,"description":"Rule identifier","schema":{"type":"integer"}},"query-rules-v2-statusFilter":{"name":"status","in":"query","required":false,"description":"Only rules with this status will be retrieved.","schema":{"type":"string","enum":["finished","draft","paused","scheduled","active"]}},"query-rules-v2-nameFilter":{"name":"name","in":"query","required":false,"description":"Only rules containing this name will be retrieved.","schema":{"type":"string"}},"query-rules-v2-consequenceTypeFilter":{"name":"consequenceType","in":"query","required":false,"description":"Only rules producing at least one of the given consequence types will be retrieved. May be repeated.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["hide","promote","standardFilter","elasticFilter","boost","topHits","sortBy","customData","returnNoData","distinctFilter","pinFacet","hideFacet","replaceWord","removeWord","replaceQuery","scoringOverride"]}}},"recommendation-campaigns-campaignId":{"name":"campaignId","in":"path","description":"ID of the campaign","required":true,"schema":{"type":"string"}},"recommendations-api-materializer-campaignIdentifier":{"name":"campaignIdentifier","in":"path","description":"Recommendation campaign identifier - a campaignID or a slug","required":true,"schema":{"type":"string"}},"recommendations-api-materializer-identifierName":{"name":"identifierName","in":"path","description":"The name of the profile identifier to use for the request. By default, the allowed identifier types are `id`, `uuid`, `email`, and `custom_identify`. This may be changed in the workspace configuration.","required":true,"schema":{"type":"string","enum":["id","uuid","email","custom_identify"]}},"recommendations-api-materializer-itemsSourceType":{"in":"query","name":"itemsSourceType","description":"Item ID or item IDs source type for the recommendation context.\n\nMust be used with `itemSourceId`. This overrides the `itemsSource` settings of the campaign definition.\n\nIn recommendations whose models doesn't use the item context, the attributes of those items can only be used in filters.  \n\nIf the items' source type is 'aggregate', the aggregate result will be used as context items. If the items' source type is 'expression', the expression result will be used as context items.\n\nThe item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.\n\nAlternatively, you can pass the `itemId` parameter to define context items directly. Only one of these options is allowed at the same time.\n","required":false,"schema":{"type":"string","enum":["aggregate","expression"]}},"recommendations-api-materializer-itemsSourceId":{"in":"query","name":"itemsSourceId","description":"Source of item IDs for the recommendation context. In recommendations whose models doesn't use the item context, the attributes of those items can only be used in filters.\n\nMust be used with `itemsSourceType`.\n\nIf the items' source type is 'aggregate', this is the aggregate's ID. If the items' source type is 'expression', this is the expression's ID.\n\nThe item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.\n\nAlternatively, you can pass the `itemId` parameter to define context items directly. Only one of these options is allowed at the same time.\n","required":false,"schema":{"type":"string"}},"recommendations-api-materializer-paramsMaterializer":{"name":"params","in":"query","required":false,"description":"List of extra params that will be added to the `recommendation.generated` event. They must be in the `name:value` format. The total size must not exceed 500 bytes when written as a JSON object.\n","example":["source:mobile"],"schema":{"type":"array","items":{"type":"string"}}},"recommendations-config-InPathItemFeedId":{"in":"path","name":"itemFeedId","required":true,"description":"ID of an item feed","schema":{"type":"string"}},"recommendations-config-InQueryCatalogType":{"in":"query","name":"catalogType","required":true,"description":"Catalog type","schema":{"type":"string","enum":["items","metadata","inventory"]}},"recommendations-rust-all-recommendationsMinNumItems":{"name":"minNumItems","in":"query","required":false,"description":"The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error.","schema":{"type":"integer","description":"The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error.","default":1,"minimum":1}},"recommendations-rust-all-recommendationsMaxNumItems":{"name":"maxNumItems","in":"query","required":false,"description":"The maximal number of returned item recommendations.","schema":{"type":"integer","description":"The maximal number of returned item recommendations.","maximum":100,"default":5}},"recommendations-rust-all-recommendationsCampaignId":{"name":"campaignId","in":"query","required":false,"description":"The campaignId which will be passed as *utm_campaign* in a link to the recommended item.","schema":{"type":"string","default":"defaultCampaign"}},"recommendations-rust-all-recommendationsCampaignName":{"name":"campaignName","in":"query","required":false,"description":"The campaign name which will be included in the recommendation.generated event.","schema":{"type":"string"}},"recommendations-rust-all-pathAggregateUuid":{"name":"aggregateUUID","in":"path","description":"Information will be shown for the provided aggregate UUID.","required":true,"schema":{"type":"string"}},"recommendations-rust-all-pathClientUuid":{"name":"clientUuid","in":"path","description":"Information will be shown for the provided profile UUID.","required":true,"schema":{"type":"string"}},"recommendations-rust-all-recommendationsClientUUID":{"name":"clientUUID","in":"query","description":"Profile UUID. This parameter is required for these recommendation types:\n  - Personalized\n  - Last seen\n  - Recent interactions\n  - Section\n  - Attribute\n\nThis parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters.\n","required":false,"schema":{"type":"string"}},"recommendations-rust-all-recommendationsBoostMetric":{"name":"boostMetric","in":"query","required":false,"description":"ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results. The list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).","schema":{"type":"string"}},"recommendations-rust-all-recommendationsSortMetric":{"name":"sortMetric","in":"query","required":false,"description":"ID of the metric to sort the results by. The list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2).","schema":{"type":"string"}},"recommendations-rust-all-recommendationsExcludePurchasedItems":{"name":"excludePurchasedItems","in":"query","required":false,"description":"When true, the recommendation results will include only items that the profile hasn't purchased before.  \n**IMPORTANT**: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation.\n","schema":{"description":"When true, the recommendation results will include only items that the Profile hasn't purchased before.  \n**IMPORTANT**: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation.\n","type":"boolean","default":false}},"recommendations-rust-all-recommendationsExcludePurchasedItemsSince":{"name":"excludePurchasedItemsSinceDays","in":"query","required":false,"description":"Limits the application of the `excludePurchasedItems` filter to a specified number of days.","schema":{"description":"Limits the application of the `excludePurchasedItems` filter to a specified number of days.","type":"integer"}},"recommendations-rust-all-recommendationsIncludeContextItems":{"name":"includeContextItems","in":"query","required":false,"description":"The recommendation results will include context items from the request.","schema":{"type":"boolean"}},"recommendations-rust-all-filterExpr":{"name":"filters","in":"query","required":false,"description":"This string defines the criteria that an item must meet in order to be considered for recommendation.  \nFor information on building filters, see [\"Items Query Language (IQL)\" in the Developer Guide](https://hub.synerise.com/developers/iql/).\n","schema":{"type":"string"}},"recommendations-rust-all-elasticFilterExpr":{"name":"elastic:filters","in":"query","required":false,"description":"This string defines the criteria that an item must meet in order to be considered for recommendation. The Elastic filter may be dropped if not enough products meet the required criteria.  \nFor information on building filters, see [\"Items Query Language (IQL)\" in the Developer Guide](https://hub.synerise.com/developers/iql/).\n","schema":{"type":"string"}},"recommendations-rust-all-itemCatalogId":{"name":"itemCatalogId","in":"query","required":false,"description":"ID (_not_ name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed.","schema":{"type":"string","default":"default"}},"recommendations-rust-all-inParamsItemId":{"name":"itemId","in":"query","required":false,"description":"Item identifier, equal to `itemId` from the *item feed*. It can be used to define the item context of the query.","schema":{"type":"string"}},"recommendations-rust-all-inParamsItemIdList":{"name":"itemId","in":"query","required":false,"description":"Item identifiers, equal to `itemId` from the *item feed*. They can be used to define the item context of the query.","schema":{"type":"array","items":{"type":"string","description":"Item identifier, equal to `itemId` from the *item feed*. It can be used to define the item context of the query."}}},"recommendations-rust-all-inPathItemId":{"in":"path","name":"itemId","required":true,"description":"Item identifier, equal to `itemId` from the *item feed*.","schema":{"type":"string"}},"recommendations-rust-all-inPathClientUUID":{"name":"clientUuid","in":"path","description":"Recommendations will be generated for the provided profile UUID.","required":true,"schema":{"type":"string"}},"recommendations-rust-all-distinctFilter":{"in":"query","name":"distinctFilter","required":false,"schema":{"type":"object","description":"Distinct filters allow you to specify how many recommended items can have the same value of specified attributes.","properties":{"elastic":{"type":"boolean","description":"When TRUE, allows to complete the recommended items with items which don't meet the distinct filter criteria."},"filters":{"type":"array","minItems":1,"maxItems":5,"description":"Array of distinct filters","items":{"type":"object","properties":{"field":{"type":"string","description":"Attribute name"},"maxNumItems":{"type":"number","format":"integer","description":"Max number of items with the same value of the attribute"},"levelRangeModifier":{"type":"number","format":"integer","description":"Parameter used (for the `category` field) to specify how many categories to cut off from the end"}},"required":["field","maxNumItems"]}}},"required":["elastic","filters"]}},"recommendations-rust-all-params":{"name":"params","in":"query","required":false,"description":"List of extra params that will be added to the `recommendation.generated` event. They must be in the `name:value` format. The total size must not exceed 500 bytes when written as a JSON object.\n","example":["source:mobile"],"schema":{"type":"array","items":{"type":"string"}}},"recommendations-rust-all-inventoryChannelId":{"name":"inventoryChannelId","in":"query","required":false,"description":"Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied.\n","schema":{"type":"string"}},"recommendations-rust-all-crossWorkspaceMode":{"name":"crossWorkspaceMode","in":"query","required":false,"description":"Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available.\n","schema":{"type":"boolean"}},"sauth-pathClientId":{"name":"clientID","in":"path","description":"The ID of the Profile","required":true,"schema":{"type":"string","example":"434428563"}},"schema-service-pathFeedId":{"name":"feedId","in":"path","required":true,"description":"UUID of a screen view feed","schema":{"type":"string","format":"uuid"}},"schema-service-pathDirectoryId":{"name":"directoryId","in":"path","required":true,"description":"UUID of the directory","schema":{"type":"string","format":"uuid"}},"schema-service-pathGroupId":{"name":"groupId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"schema-service-queryDirectoryId":{"name":"directoryId","in":"query","required":false,"description":"UUID of the directory for filtering the results","schema":{"type":"string","format":"uuid"}},"schema-service-queryFeedId":{"name":"feedId","in":"query","required":false,"schema":{"type":"string","format":"uuid","description":"UUID of the screen view feed for filtering the results"}},"schema-service-querySchema":{"name":"schema","in":"query","description":"Name of the document schema (type) for filtering the results","required":false,"schema":{"type":"string"}},"schema-service-queryGroupId":{"name":"groupId","in":"query","required":false,"description":"UUID of the document group for filtering the results","schema":{"type":"string","format":"uuid","description":"UUID of the document schema for filtering the results"}},"schema-service-queryStatus":{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["DRAFT","ACTIVE","SCHEDULED","PAUSED","FINISHED"],"description":"Filter by status"}},"schema-service-queryPage":{"name":"page","in":"query","required":false,"schema":{"type":"number","format":"int32","minimum":1,"default":1}},"schema-service-queryLimit":{"name":"limit","in":"query","required":false,"description":"Limit of items per page","schema":{"type":"number","format":"int32","default":25}},"schema-service-querySearch":{"name":"search","in":"query","required":false,"description":"A string to search for in resource names","schema":{"type":"string"}},"schema-service-pathFeedSlug":{"in":"path","name":"feedSlug","description":"Slug of the screen view feed","required":true,"schema":{"type":"string"}},"schema-service-pathIdentifierType":{"in":"path","name":"identifierType","description":"Type of the profile identifier. The value is sent in `identifierValue` in the request body.","required":true,"schema":{"type":"string","enum":["id","uuid","email","custom_identify"]}},"schema-service-pathDocumentSlugLegacy":{"in":"path","name":"slug","description":"Document slug","required":true,"schema":{"type":"string"}},"schema-service-pathDocumentUuidLegacy":{"in":"path","name":"uuid","description":"Document UUID. The UUID is the same for all versions of a document.","required":true,"schema":{"type":"string","format":"uuid"}},"schema-service-pathDocumentIdLegacy":{"in":"path","name":"id","description":"Document ID. Each version of a document has a unique ID.","required":true,"schema":{"type":"integer"}},"schema-service-PathDocumentSlug":{"name":"slug","in":"path","required":true,"description":"Slug of the document","schema":{"type":"string","pattern":"[a-z0-9]+(?:-[a-z0-9]+)*"}},"schema-service-PathDocumentUuid":{"name":"documentId","in":"path","required":true,"description":"UUID of the document","schema":{"type":"string","format":"uuid"}},"schema-service-PathDocumentIdentifier":{"name":"documentIdentifier","in":"path","required":true,"description":"UUID or slug of the document","schema":{"type":"string"}},"schema-service-pathScreenViewId":{"name":"screenViewId","in":"path","required":true,"description":"UUID of the screen view","schema":{"type":"string","format":"uuid"}},"schema-service-pathScreenViewVersion":{"name":"screenViewVersion","in":"path","required":true,"description":"Version of the screen view","schema":{"type":"string"}},"schema-service-QueryLimitRequired":{"in":"query","name":"limit","description":"The maximum number of items to retrieve for pagination","required":true,"schema":{"type":"string"}},"schema-service-QueryPageRequired":{"in":"query","name":"page","description":"The number of the page to retrieve","required":true,"schema":{"type":"integer"}},"synonyms-crud-paginationSortBy":{"name":"sortBy","in":"query","required":false,"description":"Name of the attribute by which the data will be sorted and ordered by. Supported values: `indexId`, `updatedAt`, `createdAt`, `confidence`. Defaults to `updatedAt`.","schema":{"type":"string","example":["confidence:asc"]}},"synonyms-crud-paginationOrdering":{"name":"ordering","in":"query","required":false,"description":"Sorting order","schema":{"type":"string","default":"desc","enum":["desc","asc"]}},"synonyms-crud-paginationPage":{"name":"page","in":"query","description":"Page number to return for pagination. The first page has the index `1`.","required":false,"schema":{"type":"integer","format":"int32","example":4,"default":1}},"synonyms-crud-paginationLimit":{"name":"limit","in":"query","description":"The number of items to return per page","required":false,"schema":{"type":"integer","format":"int32","example":100,"default":1000,"maximum":1000}},"synonyms-crud-paginationIncludeMeta":{"name":"includeMeta","in":"query","required":false,"description":"\nWhen `true`, pagination metadata is included in the response body.\n\nWhen `false`, the data is included in the response headers:\n\n- Link: links to neighbors, first, and last pages in pagination.\n\n- X-Pagination-Total-Count: total number of items on all pages\n\n- X-Pagination-Total-Pages: total number of pages\n\n- X-Pagination-Page: current page\n\n- X-Pagination-Limit: maximum number of items on a page\n\n- X-Pagination-Sorted-By: parameter that the items were sorted by\n\n- X-Pagination-Ordering: sorting direction\n","schema":{"type":"boolean","default":false}},"synonyms-crud-source":{"name":"source","in":"query","required":false,"description":"Filter synonyms by source","schema":{"type":"string","description":"Origin of the synonym","enum":["User","Agent","Import"],"default":"User"}},"synonyms-crud-sourceForImport":{"name":"source","in":"query","required":false,"description":"Source to assign to imported synonyms","schema":{"allOf":[{"$ref":"#/components/schemas/synonyms-crud-SynonymSource"},{"default":"Import"}]}},"synonyms-crud-state":{"name":"state","in":"query","required":false,"description":"Filter synonyms by state","schema":{"type":"string","description":"Current state of the synonym","enum":["New","Accepted","Pending","Rejected"],"default":"Accepted"}},"synonyms-crud-search":{"name":"search","in":"query","required":false,"description":"Search synonyms by word or synonym phrase (case-insensitive partial match)","schema":{"type":"string"}},"synonyms-crud-synonymType":{"name":"type","in":"query","required":false,"description":"Filter synonyms by type","schema":{"type":"string","description":"Type of the synonym.\n\n  - `oneway`: when the word is searched, the results show the results as if the synonyms were searched. Searching for the synonyms does NOT return results for the word or the other synonyms.\n  - `synonyms`: the `word` column is empty, all phrases in `synonym` return results for every other phrase in the list.\n","enum":["oneway","synonyms"],"default":"oneway"}},"synonyms-crud-confidence":{"name":"confidence","in":"query","required":false,"description":"Filter synonyms with confidence greater than or equal to this value","schema":{"type":"number","format":"float","minimum":0,"maximum":1}},"synonyms-crud-inPathSynonymId":{"in":"path","name":"synonymId","required":true,"description":"Synonym identifier","schema":{"type":"integer"}},"synonyms-crud-inPathIndexId":{"in":"path","name":"indexId","required":true,"description":"Index identifier","schema":{"type":"string","format":"uuid"}},"tags-collector-DirectoryHash-collector":{"in":"path","name":"directoryHash","description":"Hash ID of the directory","required":true,"schema":{"type":"string"}},"tags-collector-TagHash-collector":{"in":"path","name":"tagHash","description":"HashID of a tag","required":true,"schema":{"type":"string"}},"template-backend-templateUuid":{"in":"path","name":"templateUuid","schema":{"type":"string","format":"uuid","example":"e0326a2d-7697-4ae9-b490-31f97041adcb"},"description":"Template UUID","required":true},"template-backend-directoryUuid":{"in":"path","name":"directoryUUID","schema":{"type":"string","format":"uuid","example":"e0326a2d-7697-4ae9-b490-31f97041adcb"},"description":"Directory UUID","required":true},"template-backend-previewUuid":{"in":"path","name":"previewUuid","schema":{"type":"string","format":"uuid","example":"e0326a2d-7697-4ae9-b490-31f97041adcb"},"description":"Preview UUID","required":true},"uauth-PaginationPage":{"name":"page","in":"query","description":"The page of results to retrieve. The first page has the index `0`.","required":true,"schema":{"type":"integer","format":"int32"}},"uauth-PaginationSize":{"name":"size","in":"query","description":"The number of entries on a page","required":true,"schema":{"type":"integer","format":"int32"}},"uauth-InvitationIds":{"name":"invitationIds","in":"path","description":"Comma-separated list of invitation IDs. To obtain the invitation ID, check the [list of users with PENDING status](#/operation/UsersListingUsingGET). The invitation ID for a user is the same as the ID of that user.","required":true,"schema":{"type":"string"}},"uauth-roleId":{"name":"roleId","in":"path","description":"Role ID","required":true,"schema":{"type":"integer","format":"int64"}},"uauth-roleGroupId":{"name":"groupId","in":"path","description":"Role group ID","required":true,"schema":{"type":"integer","format":"int64"}},"uauth-businessProfileId":{"name":"businessProfileUUID","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"UUID of the workspace"},"uauth-mfaType":{"name":"mfaType","in":"query","description":"Type of multi-factor authentication","required":true,"schema":{"type":"string","enum":["TOTP_AUTHENTICATOR","EMAIL"]}},"uauth-UserId":{"name":"userId","in":"path","required":true,"description":"User ID","schema":{"type":"integer"}},"uauth-UserIds":{"name":"ids","in":"path","description":"Comma-separated user IDs","required":true,"schema":{"type":"string","example":"11405,11406,11407"}},"uploader-service-pathIdentifierType":{"in":"path","name":"identifierType","description":"Type of the profile identifier. The value is sent in `identifierValue` in the request body.","required":true,"schema":{"type":"string","enum":["id","uuid","email","custom_identify"]}},"vouchers-acceptHeader":{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},"vouchers-contentTypeHeader":{"name":"Content-Type","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["application/json"]}},"vouchers-apiVersionHeader":{"name":"Api-Version","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["4.4","4.2"]}},"vouchers-queryLimit":{"name":"limit","in":"query","description":"The number of items to return per page","required":false,"schema":{"type":"integer","format":"int32","example":100,"default":100,"maximum":1000}},"vouchers-queryPage":{"name":"page","in":"query","description":"Page number to return for pagination. The first page has the index `1`.","required":false,"schema":{"type":"integer","format":"int32","example":4,"default":1}},"vouchers-queryIncludeMeta":{"name":"includeMeta","in":"query","description":"\nWhen `true`, pagination metadata is included in the response body.\n\nWhen `false`, the data is included in the response headers:\n\n- Link: links to neighbors, first, and last pages in pagination.\n\n- X-Pagination-Total-Count: total number of items on all pages\n\n- X-Pagination-Total-Pages: total number of pages\n\n- X-Pagination-Page: current page\n\n- X-Pagination-Limit: maximum number of items on a page\n","required":false,"schema":{"type":"boolean","example":false,"default":false}},"vouchers-querySortFieldName":{"name":"orderFieldName","in":"query","description":"Name of the parameter used for sorting. If you include this parameter, you **must** also send the `order` parameter.","required":false,"schema":{"type":"string","enum":["name","poolLimit","startAt","expireIn","createdAt"],"default":"createdAt"}},"vouchers-querySortingOrder":{"name":"order","in":"query","description":"Sorting order. If you include this parameter, you **must** also send the `orderFieldName` parameter.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},"vouchers-queryFilter":{"name":"query","in":"query","description":"Filter by phrase in pool name.","required":false,"schema":{"type":"string"}},"vouchers-queryClientIdentifierName":{"name":"clientIdentifierName","in":"query","description":"The Profile identifier to use for the request.","required":true,"schema":{"type":"string","enum":["id","uuid","email","custom_identify"]},"example":"custom_identify"},"vouchers-queryClientIdentifierValue":{"name":"clientIdentifierValue","in":"query","description":"The value of the selected profile identifier","required":true,"schema":{"type":"string"},"example":"custom_identify_123456"},"vouchers-pathVoucherUuid":{"name":"voucherUuid","in":"path","description":"UUID of the voucher","required":true,"schema":{"type":"string","example":"29392878-d43f-402e-8297-f63d465cf173"}},"vouchers-pathVoucherSearchValue":{"name":"searchValue","in":"path","description":"The value to search for","required":true,"schema":{"type":"string","example":"29392878-d43f-402e-8297-f63d465cf173"}},"vouchers-pathVoucherSearchKey":{"name":"searchKey","in":"path","description":"The key type to search by","required":true,"schema":{"type":"string","example":"code","enum":["code","uuid"]}},"vouchers-pathClientUuid":{"name":"clientUuid","in":"path","description":"UUID of the Profile","required":true,"schema":{"type":"string","example":"e9e6840b-b9d4-4c7b-8191-9c4f9e751c76"}},"vouchers-pathPoolUuid":{"name":"poolUuid","in":"path","description":"UUID of the voucher pool","required":true,"style":"simple","explode":false,"schema":{"type":"string","example":"8465c240-d38e-42f8-af29-b9fa1ed05115"}}},"schemas":{"activities-api-action":{"type":"object","title":"Action","description":"Details of the action.","properties":{"name":{"$ref":"#/components/schemas/activities-api-actionName"},"label":{"type":"string","description":"Human-readable label of the event. Used in Data Management, Analytics, and Automation modules. You can add this parameter to an event the Data Management module, but up to 48 hours may pass until it's returned here."},"description":{"type":"string","description":"Description of the event. Used in Data Management, Analytics, and Automation modules. You can add this parameter to an event the Data Management module, but up to 48 hours may pass until it's returned here.","nullable":true}}},"activities-api-actionName":{"type":"string","example":"page.visit","description":"Action name. Can be up to 32 characters long and must match the following regular expression: `^[a-zA-Z0-9\\.\\-_]+$`"},"activities-api-ActivityRaw1":{"type":"object","title":"Raw data","properties":{"action":{"$ref":"#/components/schemas/activities-api-actionName"},"eventUUID":{"$ref":"#/components/schemas/activities-api-EventUUID"},"unique":{"type":"integer","nullable":true,"description":"Not available (null) with raw data"},"label":{"type":"string","deprecated":true,"description":"The label that was sent with the event."},"createDate":{"$ref":"#/components/schemas/activities-api-Timestamp"},"params":{"$ref":"#/components/schemas/activities-api-RawParams"}}},"activities-api-ActivityRaw2":{"type":"object","title":"Raw data","properties":{"action":{"$ref":"#/components/schemas/activities-api-actionName"},"eventUUID":{"$ref":"#/components/schemas/activities-api-EventUUID"},"unique":{"$ref":"#/components/schemas/activities-api-UniqueInt"},"label":{"type":"string","deprecated":true},"client":{"$ref":"#/components/schemas/activities-api-client"},"params":{"type":"object","description":"Parameters of the event","properties":{"ip":{"$ref":"#/components/schemas/activities-api-SourceIp"},"eventCreateTime":{"$ref":"#/components/schemas/activities-api-EventCreateTime"}},"additionalProperties":{"description":"Custom parameters that were sent with the event"}},"createDate":{"$ref":"#/components/schemas/activities-api-Timestamp"}}},"activities-api-ActivityTerrarium1":{"type":"object","title":"Data from event storage","properties":{"action":{"$ref":"#/components/schemas/activities-api-actionName"},"eventUUID":{"$ref":"#/components/schemas/activities-api-EventUUID"},"unique":{"$ref":"#/components/schemas/activities-api-UniqueInt"},"createDate":{"$ref":"#/components/schemas/activities-api-Timestamp"},"label":{"type":"string","deprecated":true},"params":{"type":"object","description":"Parameters of the event","properties":{"eventCreateTime":{"$ref":"#/components/schemas/activities-api-EventCreateTime"},"ip":{"$ref":"#/components/schemas/activities-api-SourceIp"}},"additionalProperties":{"description":"Additional parameters required by this event type and custom parameters."}}}},"activities-api-ActivityTerrarium2":{"type":"object","title":"Data from event storage","properties":{"action":{"$ref":"#/components/schemas/activities-api-action"},"description":{"$ref":"#/components/schemas/activities-api-EventDescription"},"eventUUID":{"$ref":"#/components/schemas/activities-api-EventUUID"},"unique":{"$ref":"#/components/schemas/activities-api-UniqueInt"},"icon":{"type":"string","description":"URL of the event's icon"},"icons":{"nullable":true,"$ref":"#/components/schemas/activities-api-iconDetails"},"time":{"$ref":"#/components/schemas/activities-api-Timestamp"},"label":{"description":"Event name shown in a Profile card (not in Analytics). Can include jinja inserts, which are returned unprocessed.\n\nThis name is not used when searching for events in Analytics or for Automation trigger purposes.\n\nIf no label is defined in the Data Management settings, this field returns the value of `label` that was sent with the original event, but that is not used by the Synerise Web Application.","type":"string"},"client":{"$ref":"#/components/schemas/activities-api-client"},"userAgent":{"$ref":"#/components/schemas/activities-api-userAgent"},"modifiedBy":{"nullable":true,"type":"string","deprecated":true}}},"activities-api-client":{"type":"object","description":"Profile's data","properties":{"uuid":{"$ref":"#/components/schemas/activities-api-ClientUuid"},"id":{"$ref":"#/components/schemas/activities-api-ClientId"},"firstname":{"description":"Profile's first name","type":"string"},"lastname":{"description":"Profile's last name","type":"string"},"email":{"description":"Profile's email address","type":"string"},"avatarUrl":{"description":"URL of the profile's avatar","type":"string"}}},"activities-api-ClientEventsRequest":{"type":"object","required":["identifierValue","additionalData"],"properties":{"identifierValue":{"$ref":"#/components/schemas/activities-api-IdentifierValue"},"additionalData":{"$ref":"#/components/schemas/activities-api-ClientEventsRequestAdditionalData"}}},"activities-api-ClientEventsRequestAdditionalData":{"type":"object","description":"Pagination, date filters, and other optional parameters","properties":{"actions":{"type":"string","example":"page.visit,client.login","description":"A comma-separated list of actions (or a single action) that will be included in the response."},"dateFrom":{"type":"string","example":"1720688755000","description":"Lower value of the time range, as a Unix timestamp in milliseconds."},"dateTo":{"type":"string","example":"1720695955000","description":"Upper limit of the time range, as a Unix timestamp in milliseconds."},"limit":{"type":"string","default":50,"description":"The maximum number of items per page"},"raw":{"type":"string","enum":["true","false"],"default":"false","description":"When `true`, the response returns raw data. If raw data is not available, processed data from event storage (like from `\"raw\": false`) is returned instead."},"pageToken":{"type":"string","description":"The token of the page to retrieve. You can check the tokens of the next/previous page in the response to this endpoint. If not provided, the first page is retrieved."},"sortBy":{"type":"string","enum":["time:desc","time:asc"],"default":"time:desc","description":"Sorting order. `time:desc` (default) returns newest events first."}}},"activities-api-ClientId":{"type":"number","description":"Profile's ID"},"activities-api-ClientUuid":{"type":"string","description":"Profile's UUID"},"activities-api-descriptionRequest":{"type":"object","description":"This object holds the details of the custom description","properties":{"action":{"$ref":"#/components/schemas/activities-api-actionName"},"description":{"$ref":"#/components/schemas/activities-api-EventDescription"}}},"activities-api-descriptionResponse":{"type":"object","description":"This object holds the details of the custom description","properties":{"id":{"$ref":"#/components/schemas/activities-api-MappingId"},"businessProfileId":{"type":"number","description":"Workspace where this mapping applies"},"action":{"$ref":"#/components/schemas/activities-api-actionName"},"description":{"$ref":"#/components/schemas/activities-api-EventDescription"}}},"activities-api-EventCreateTime":{"type":"string","format":"date-time","description":"Time when the event was received, as an ISO string.\nWhen you overwrite an event with eventSalt, this value changes to the time of overwriting.","example":"2022-11-04T12:09:30.404Z"},"activities-api-EventDescription":{"type":"string","description":"Event description shown in a Profile card. Can include jinja inserts, which are returned unprocessed.\nThis description is not used when searching for events in Analytics or for Automation trigger purposes."},"activities-api-EventLabel":{"type":"string","description":"Event name shown in a Profile card. Can include jinja inserts, which are returned unprocessed.\nThis description is not used when searching for events in Analytics or for Automation trigger purposes."},"activities-api-EventUUID":{"type":"string","description":"UUID of the event","example":"482af443-7f6f-4b80-b4ac-a7db5a2f543a"},"activities-api-iconDetails":{"type":"object","description":"Icon configuration with primary, secondary icon and color","required":["primary"],"properties":{"primary":{"type":"string","description":"Primary icon ID/name from the system SVG library"},"secondary":{"type":"string","nullable":true,"description":"Secondary icon ID/name from the system SVG library"},"color":{"type":"string","nullable":true,"description":"Semantic color name (e.g. positive, negative, warning, neutral) or hex color code"}}},"activities-api-iconRequest":{"type":"object","description":"Details of the icon mapping","required":["action","icons"],"properties":{"action":{"$ref":"#/components/schemas/activities-api-actionName"},"icons":{"$ref":"#/components/schemas/activities-api-iconDetails"}}},"activities-api-iconResponse":{"type":"object","description":"Details of the icon mapping","properties":{"id":{"$ref":"#/components/schemas/activities-api-MappingId"},"businessProfileId":{"type":"number","description":"Workspace where this mapping applies"},"action":{"$ref":"#/components/schemas/activities-api-actionName"},"icons":{"$ref":"#/components/schemas/activities-api-iconDetails"}}},"activities-api-IdentifierValue":{"type":"string","description":"Value of the identifier selected in `identifierType`"},"activities-api-labelRequest":{"type":"object","description":"This object holds the details of the custom label","properties":{"action":{"$ref":"#/components/schemas/activities-api-actionName"},"label":{"$ref":"#/components/schemas/activities-api-EventLabel"}}},"activities-api-labelResponse":{"type":"object","description":"This object holds the details of the custom label","properties":{"id":{"$ref":"#/components/schemas/activities-api-MappingId"},"businessProfileId":{"type":"number","description":"Workspace where this mapping applies"},"action":{"$ref":"#/components/schemas/activities-api-actionName"},"label":{"$ref":"#/components/schemas/activities-api-EventLabel"}}},"activities-api-MappingId":{"type":"number","description":"ID of the mapping"},"activities-api-RawParams":{"type":"object","description":"Parameters of the event. Some of the parameters listed here don't exist in system events.","additionalProperties":{"description":"Other parameters depending on event type and custom parameters"},"properties":{"ip":{"$ref":"#/components/schemas/activities-api-SourceIp"},"clientId":{"$ref":"#/components/schemas/activities-api-ClientId"},"uuid":{"$ref":"#/components/schemas/activities-api-ClientUuid"},"snr-original-time":{"type":"string","description":"Original ISO string that was sent with the event. This is saved without modification even if the time was rejected (for example, because it was a future date)."},"eventUUID":{"$ref":"#/components/schemas/activities-api-EventUUID"},"eventCreateTime":{"$ref":"#/components/schemas/activities-api-EventCreateTime"},"time":{"$ref":"#/components/schemas/activities-api-Timestamp"},"businessProfileId":{"type":"integer","description":"Workspace ID"}}},"activities-api-SingleActivityRequest":{"type":"object","required":["identifierValue","additionalData"],"properties":{"identifierValue":{"type":"string","description":"Value of the selected profile identifier"},"additionalData":{"description":"Identification of the event to retrieve","oneOf":[{"type":"object","title":"Event storage data request","required":["time","unique"],"properties":{"time":{"type":"string","description":"Unix timestamp of when the event occurred, in milliseconds. To find the value you need:\n- from raw data responses, use the `time` property from the `params` object\n- from event storage responses, use the `time` or `createDate` property","example":"1667563770404"},"unique":{"$ref":"#/components/schemas/activities-api-UniqueStr"}}},{"type":"object","title":"Raw data request (if not available, data from event storage is returned)","required":["time","eventUUID"],"properties":{"time":{"$ref":"#/components/schemas/activities-api-Timestamp"},"eventUUID":{"$ref":"#/components/schemas/activities-api-EventUUID"}}}]}}},"activities-api-SourceIp":{"type":"string","description":"IP of the device which sent the event"},"activities-api-Timestamp":{"type":"integer","description":"Unix timestamp of when the event occurred, in milliseconds.\n\nThis is the time that:\n- is sent as `recordedAt` to **v4/transactions/** endpoints\n- is sent as `time` to **v4/events/** endpoints\n- is the occurrence time of system events\n- is used (after converting to ISO string) as the event time when overwriting with eventSalt (see v4/events endpoints)\n\nIf the event had no time provided when sending, the time of receiving the event is used.\n\nIf the event had a future time when sending, it was rejected and the time of receiving the event is used.","example":1667563770404},"activities-api-UniqueInt":{"type":"integer","description":"Unique identifier of the event","example":1245924049},"activities-api-UniqueStr":{"type":"string","description":"Unique identifier of the event","example":"1245924049"},"activities-api-userAgent":{"type":"object","description":"User Agent details","properties":{"system":{"type":"string","description":"Operating System"},"browser":{"description":"Browser","type":"string"}}},"activities-api-Cursors":{"type":"object","description":"Tokens of the next and previous pages","required":["after","before"],"properties":{"after":{"type":"string","description":"Token of the next page"},"before":{"type":"string","description":"Token of the previous page"}}},"activities-api-Link":{"type":"object","required":["url","rel"],"properties":{"url":{"type":"string","description":"URL of the page, used for navigation"},"rel":{"type":"string","description":"The type of relation to the current page. `first` is always the first page.","enum":["first","prev","next"]}}},"activities-api-Meta":{"type":"object","description":"Pagination metadata","properties":{"links":{"type":"array","description":"Links to the neighboring pages and the first page","items":{"$ref":"#/components/schemas/activities-api-Link"}},"cursors":{"$ref":"#/components/schemas/activities-api-Cursors"},"limit":{"type":"integer","format":"int32","description":"Limit of items per page"},"count":{"type":"integer","nullable":true,"description":"The number of items on the current page"}}},"activities-api-PaginatedEvents":{"type":"object","required":["meta","data"],"properties":{"meta":{"$ref":"#/components/schemas/activities-api-Meta"},"data":{"type":"array","description":"A list of events","items":{"oneOf":[{"$ref":"#/components/schemas/activities-api-ActivityTerrarium2"},{"type":"object","title":"Raw data","properties":{"eventUUID":{"$ref":"#/components/schemas/activities-api-EventUUID"},"unique":{"type":"integer","nullable":true,"description":"Not available (null) with raw data"},"action":{"$ref":"#/components/schemas/activities-api-actionName"},"label":{"type":"string","deprecated":true,"description":"The label that was sent with the event."},"client":{"$ref":"#/components/schemas/activities-api-client"},"params":{"$ref":"#/components/schemas/activities-api-RawParams"},"createDate":{"$ref":"#/components/schemas/activities-api-Timestamp"}}}]}}}},"activity-time-estimator-Hours":{"type":"array","description":"An array of best hour prediction arrays.  \n\nThe array at index `0` is for the profile at index `0` in the profile list, the array at `1` is for profile `1`, and so on.\n","example":[16,32,64],"items":{"type":"array","items":{"type":"integer","example":17}}},"activity-time-estimator-Predictions":{"type":"array","description":"An array of predicted probabilities for each hour in the `hours` array.  \n\nResults at index `0` are for the hours at index `0` in the `hours` array. Result at index `0` is for the hour at index `0`.  \n\nHigher values mean higher probability.\n","example":[0.013318098150193691,0.012947574257850647,0.0123398806899786],"items":{"type":"array","items":{"type":"number","format":"float","example":0.013318098150193691}}},"activity-time-estimator-ClientIDs":{"type":"array","maxItems":1000,"description":"An array of profile IDs. To generate predictions for fake profiles, send empty strings as the identifiers.","items":{"type":"string","description":"Profile ID","example":"67346"}},"activity-time-estimator-ClientUUIDs":{"type":"array","maxItems":1000,"description":"An array of profile UUIDs. To generate predictions for fake profiles, send empty strings as the identifiers.","items":{"type":"string","description":"Profile UUID","example":"6768085e-5925-43c6-b64f-4b90d02de8f2"}},"activity-time-estimator-TimeIndexValue":{"type":"integer","title":"Hour","description":"Hour of the week.  \nThe count starts from `0` at 00:00 on Monday. The counter changes on a full hour.  \n**Examples**:\n  - Monday, 00:00 is `0`\n  - Monday, 00:47 is `0`\n  - Monday, 01:00 is `1`\n  - Monday, 23:59 is `23`\n  - Tuesday, 00:00 is `24`\n  - Tuesday, 01:15 is `25`\n","minimum":0,"maximum":167},"activity-time-estimator-TimeRange":{"type":"array","title":"Hour range","description":"A range of hours","minItems":2,"maxItems":2,"example":[4,7],"items":{"$ref":"#/components/schemas/activity-time-estimator-TimeIndexValue"}},"activity-time-estimator-TimeIndex":{"type":"array","maxItems":168,"description":"An array of times and time ranges to include in the predictions. If empty or omitted, the entire week is included (with the exceptions listed in `timeIndexExclude`, if they exist).\n\nA time range is a two-item array. For example, `[4,7]` is the range from Monday, 03:00 to Monday, 06:59. You can mix hours and time ranges in the request.\n","example":[[0,23],24,25,26,[27,48]],"items":{"anyOf":[{"$ref":"#/components/schemas/activity-time-estimator-TimeRange"},{"$ref":"#/components/schemas/activity-time-estimator-TimeIndexValue"}]}},"activity-time-estimator-Mode":{"type":"string","description":"The mode name","default":"standard"},"activity-time-estimator-TimeIndexExclude":{"type":"array","maxItems":168,"description":"An array of times and time ranges to exclude from the predictions. If empty or omitted, the entire week is included (according to the time selections made in `timeIndex`, if they exist).\n\nA time range is a two-item array. For example, `[4,7]` is the range from Monday, 03:00 to Monday, 06:59. You can mix hours and time ranges in the request.\n","example":[[0,23],24,25,26],"items":{"anyOf":[{"$ref":"#/components/schemas/activity-time-estimator-TimeRange"},{"$ref":"#/components/schemas/activity-time-estimator-TimeIndexValue"}]}},"activity-time-estimator-TopN":{"type":"integer","minimum":1,"maximum":168,"description":"The number of best predictions to return for each profile. If omitted, predictions for every hour of the week are returned."},"ai-stats-averageClickPosition":{"type":"number","format":"float","description":"The average position of the clicked item on the list of results."},"ai-stats-averageOrderValue":{"type":"number","format":"float","description":"The average value of orders resulting from the search."},"ai-stats-clickThroughRate":{"type":"number","format":"float","description":"CTR of the search."},"ai-stats-conversionRate":{"type":"number","format":"float","description":"Conversion rate of the search."},"ai-stats-conversions":{"type":"integer","description":"The number of successful conversions."},"ai-stats-noResultsCount":{"type":"integer","description":"The number of searches which returned no results."},"ai-stats-revenue":{"type":"number","format":"float","description":"Revenue generated from the search."},"ai-stats-totalClicks":{"type":"integer","description":"The number of times a result was clicked."},"ai-stats-query":{"type":"string","description":"Query used for search."},"ai-stats-totalCount":{"type":"integer","description":"The number of times the search was performed."},"ai-stats-totalSuggestionsUsed":{"type":"integer","description":"The number of times a user accepted a suggestion."},"ai-stats-views":{"type":"integer","description":"The number of recommendation frame views."},"ai-stats-generations":{"type":"integer","description":"The number of generated recommendations."},"ai-stats-itemPurchases":{"type":"integer","description":"The number of individual item purchases."},"ai-stats-transactions":{"type":"integer","description":"The number of transactions resulting from the recommendation."},"ai-stats-recommendationsRevenue":{"type":"number","format":"float","description":"Total revenue generated by recommendations."},"ai-stats-itemPurchasesPerItemClick":{"type":"number","format":"float","description":"Item purchases per item click ratio."},"ai-stats-frameClicksPerGeneration":{"type":"number","format":"float","description":"Frame clicks per generation ratio."},"ai-stats-frameClicksPerView":{"type":"number","format":"float","description":"Frame clicks per view ratio."},"ai-stats-uniqueClients":{"type":"number","format":"integer","description":"Number of unique profiles which generated a recommendation."},"ai-stats-frameClicks":{"type":"number","format":"integer","description":"Number of clicks on a recommendation frame."},"ai-stats-itemClicks":{"type":"number","format":"integer","description":"Number of clicks on a recommendation item."},"ai-stats-QueriesSummaryData":{"type":"object","description":"Queries statistics","properties":{"averageClickPosition":{"$ref":"#/components/schemas/ai-stats-averageClickPosition"},"averageOrderValue":{"$ref":"#/components/schemas/ai-stats-averageOrderValue"},"clickThroughRate":{"$ref":"#/components/schemas/ai-stats-clickThroughRate"},"conversionRate":{"$ref":"#/components/schemas/ai-stats-conversionRate"},"conversions":{"$ref":"#/components/schemas/ai-stats-conversions"},"noResultsCount":{"$ref":"#/components/schemas/ai-stats-noResultsCount"},"revenue":{"$ref":"#/components/schemas/ai-stats-revenue"},"totalClicks":{"$ref":"#/components/schemas/ai-stats-totalClicks"},"totalCount":{"$ref":"#/components/schemas/ai-stats-totalCount"},"totalSuggestionsUsed":{"$ref":"#/components/schemas/ai-stats-totalSuggestionsUsed"}}},"ai-stats-QueriesTopData":{"type":"array","description":"Top queries","items":{"type":"object","properties":{"query":{"$ref":"#/components/schemas/ai-stats-query"},"count":{"$ref":"#/components/schemas/ai-stats-totalCount"},"clicks":{"$ref":"#/components/schemas/ai-stats-totalClicks"},"clickThroughRate":{"$ref":"#/components/schemas/ai-stats-clickThroughRate"},"revenue":{"$ref":"#/components/schemas/ai-stats-revenue"},"conversions":{"$ref":"#/components/schemas/ai-stats-conversions"},"conversionRate":{"$ref":"#/components/schemas/ai-stats-conversionRate"}}}},"ai-stats-FiltersSummaryData":{"type":"array","description":"Filters stats","items":{"type":"object","properties":{"filterName":{"type":"string","description":"Name of the filterable attribute"},"count":{"type":"integer","description":"The number of times the filter was used"}}}},"ai-stats-RulesSummaryData":{"type":"array","description":"Rules stats","items":{"type":"object","properties":{"ruleId":{"type":"integer","description":"Applied rule id"},"count":{"type":"integer","description":"The number of times the rule was applied"}}}},"ai-stats-QueriesSummaryMultipleIndicesData":{"type":"array","description":"Queries statistics for multiple indices","items":{"type":"object","properties":{"indexId":{"type":"string","description":"ID of the index for which the stats are requested","example":"4add1a1fa877c1651906bb22c9dfd37a1618852272"},"stats":{"$ref":"#/components/schemas/ai-stats-QueriesSummaryData"}}}},"ai-stats-Error":{"type":"object","properties":{"httpStatus":{"type":"integer","example":500,"description":"HTTP status of the error."},"errorCode":{"type":"integer","description":"Status code. See [error reference](https://developers.synerise.com/errors.html)."},"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred."},"message":{"type":"string","description":"Description of the problem."},"traceId":{"type":"string","description":"Trace ID for debugging."},"help":{"type":"string","description":"Currently unused."}}},"ai-stats-RecoStatsSchema":{"type":"object","description":"Recommendation statistics.","properties":{"views":{"$ref":"#/components/schemas/ai-stats-views"},"revenue":{"$ref":"#/components/schemas/ai-stats-recommendationsRevenue"},"itemPurchases":{"$ref":"#/components/schemas/ai-stats-itemPurchases"},"itemPurchasesPerItemClick":{"$ref":"#/components/schemas/ai-stats-itemPurchasesPerItemClick"},"itemClicks":{"$ref":"#/components/schemas/ai-stats-itemClicks"},"transactions":{"$ref":"#/components/schemas/ai-stats-transactions"},"frameClicks":{"$ref":"#/components/schemas/ai-stats-frameClicks"},"frameClicksPerGeneration":{"$ref":"#/components/schemas/ai-stats-frameClicksPerGeneration"},"frameClicksPerView":{"$ref":"#/components/schemas/ai-stats-frameClicksPerView"},"generations":{"$ref":"#/components/schemas/ai-stats-generations"},"uniqueClients":{"$ref":"#/components/schemas/ai-stats-uniqueClients"}}},"ai-stats-RecoDateStatsSchema":{"type":"object","description":"Recommendation campaigns stats for a single date.","properties":{"date":{"type":"string","description":"The date.","format":"date"},"stats":{"$ref":"#/components/schemas/ai-stats-RecoStatsSchema"}}},"ai-stats-RecoStatsByDateData":{"type":"object","description":"Recommendation campaigns statistics payload.","properties":{"summary":{"$ref":"#/components/schemas/ai-stats-RecoStatsSchema"},"byDate":{"type":"array","description":"Results for individual days.","items":{"$ref":"#/components/schemas/ai-stats-RecoDateStatsSchema"}}}},"ai-stats-WrappedRecoStatsByDate":{"type":"object","description":"Response envelope for `GetCampaignsGlobalStats` and `GetCampaignStats`.\nThe `data` field carries aggregated campaign statistics: an overall\nsummary plus a per-day breakdown.\n","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ai-stats-RecoStatsByDateData"}}},"ai-stats-RecoCampaignStatsSchema":{"type":"object","description":"Stats for a single recommendation campaign.","properties":{"campaignId":{"type":"string","description":"Id of the campaign."},"stats":{"$ref":"#/components/schemas/ai-stats-RecoStatsSchema"}}},"ai-stats-RecoStatsByCampaignData":{"type":"object","description":"Recommendation campaigns stats payload.","properties":{"summary":{"$ref":"#/components/schemas/ai-stats-RecoStatsSchema"},"byCampaign":{"type":"array","items":{"$ref":"#/components/schemas/ai-stats-RecoCampaignStatsSchema"}}}},"ai-stats-WrappedRecoStatsByCampaign":{"type":"object","description":"Response envelope for `PostCampaignsStats`. The `data` field carries\naggregated statistics: an overall summary plus a per-campaign\nbreakdown for the requested campaign IDs.\n","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ai-stats-RecoStatsByCampaignData"}}},"ai-stats-RecoTopProductsEntryStatsSchema":{"type":"object","description":"Statistics for a single item.","properties":{"productId":{"type":"string","description":"Id of the item."},"stats":{"$ref":"#/components/schemas/ai-stats-RecoStatsSchema"}}},"ai-stats-RecoTopProductsStatsData":{"type":"array","description":"Statistics of best-performing products in the campaign, ordered by the selected metric. Each item is one product's stats.","items":{"$ref":"#/components/schemas/ai-stats-RecoTopProductsEntryStatsSchema"}},"ai-stats-WrappedRecoTopProductsStats":{"type":"object","description":"Response envelope for `GetRecoTopProductsStats`. The `data` field\ncarries an array of per-product statistics, one entry per product,\nordered by the metric selected in the request.\n","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ai-stats-RecoTopProductsStatsData"}}},"ai-stats-WrappedQueriesSummary":{"type":"object","description":"Response envelope for `GetQueriesSummary`. The `data` field carries\naggregate query statistics for one search index over the requested\ntime window.\n","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ai-stats-QueriesSummaryData"}}},"ai-stats-WrappedQueriesTop":{"type":"object","description":"Response envelope for `GetQueriesTop`. The `data` field carries\nthe ranked list of top queries (up to 1000) for one search index.\n","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ai-stats-QueriesTopData"}}},"ai-stats-WrappedFiltersSummary":{"type":"object","description":"Response envelope for `GetFiltersSummary`. The `data` field carries\nan array of filter usage statistics — one entry per filterable\nattribute on the index.\n","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ai-stats-FiltersSummaryData"}}},"ai-stats-WrappedRulesSummary":{"type":"object","description":"Response envelope for `GetRulesSummary`. The `data` field carries\nan array of query rule application statistics — one entry per rule.\n","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ai-stats-RulesSummaryData"}}},"ai-stats-WrappedQueriesSummaryMultipleIndices":{"type":"object","description":"Response envelope for `GetQueriesSummaryMultipleIndices`. The `data`\nfield carries an array of per-index query stats summaries, one entry\nper requested search index.\n","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ai-stats-QueriesSummaryMultipleIndicesData"}}},"analytics-AnalyticsBatchDeleteRequest":{"type":"object","properties":{"funnelIds":{"type":"array","minItems":0,"description":"A list of funnels to delete","items":{"type":"string","format":"uuid"}},"segmentationIds":{"type":"array","minItems":0,"description":"A list of segmentations to delete","items":{"type":"string","format":"uuid"}},"trendIds":{"type":"array","minItems":0,"description":"A list of trends to delete","items":{"type":"string","format":"uuid"}},"metricIds":{"type":"array","minItems":0,"description":"A list of metrics to delete","items":{"type":"string","format":"uuid"}},"histogramIds":{"type":"array","minItems":0,"description":"A list of histograms to delete","items":{"type":"string","format":"uuid"}},"reportIds":{"type":"array","minItems":0,"description":"A list of reports to delete","items":{"type":"string","format":"uuid"}},"aggregateIds":{"type":"array","minItems":0,"description":"A list of aggregates to delete","items":{"type":"string","format":"uuid"}},"expressionIds":{"type":"array","minItems":0,"description":"A list of expressions to delete","items":{"type":"string","format":"uuid"}},"sankeyIds":{"type":"array","minItems":0,"description":"A list of sankey analyses to delete","items":{"type":"string","format":"uuid"}}},"required":["aggregateIds","expressionIds","funnelIds","histogramIds","metricIds","reportIds","sankeyIds","segmentationIds","trendIds"]},"analytics-Variable":{"type":"object","properties":{"name":{"type":"string","description":"The name of the variable (dynamic key) which will receive this value for the current calculation."},"value":{"description":"The value of the variable. Can be one of: string, integer, boolean, string[], integer[], or a DateFilter object (with type ABSOLUTE/RELATIVE).\n","example":"example-string-value"}},"required":["name","value"]},"analytics-DateFilter":{"description":"Definition of a date filter. Only data that meets the result of the filter will be included in the analysis. For no filter, leave this object empty.\n\nAn absolute date filter lets you define static dates and times that always apply to the analysis.\n\nA relative date filter lets you create a date filter that goes back a certain time from the moment of calculating the analysis.\n","discriminator":{"propertyName":"type","mapping":{"ABSOLUTE":"#/components/schemas/analytics-AbsoluteDateFilter","RELATIVE":"#/components/schemas/analytics-RelativeDateFilter"}},"oneOf":[{"$ref":"#/components/schemas/analytics-AbsoluteDateFilter"},{"$ref":"#/components/schemas/analytics-RelativeDateFilter"}]},"analytics-AbsoluteDateFilter":{"type":"object","title":"AbsoluteDateFilter","properties":{"type":{"title":"AbsoluteDateFilterType","x-class-name":"AbsoluteDateFilterType","x-interface-name-ts":"AbsoluteDateFilterType","type":"string","enum":["ABSOLUTE"],"description":"Absolute filters have the same start and end regardless of when the analysis is calculated."},"from":{"type":"string","format":"date-time","description":"The lower boundary of the date filter."},"to":{"type":"string","format":"date-time","description":"The upper boundary of the date filter. Must be later than `from`."},"filter":{"$ref":"#/components/schemas/analytics-CustomDateFilter"}},"required":["type"]},"analytics-RelativeDateFilter":{"type":"object","title":"RelativeDateFilter","properties":{"type":{"title":"RelativeDateFilterType","x-class-name":"RelativeDateFilterType","x-interface-name-ts":"RelativeDateFilterType","type":"string","enum":["RELATIVE"],"description":"Relative filters allow you to create a filter that depends on when the analysis is calculated. \n\n- `duration` is the length of time that the filter covers.\n- `offset` is the time that the filter goes back to set the beginning of the duration.\n"},"duration":{"$ref":"#/components/schemas/analytics-Period"},"offset":{"$ref":"#/components/schemas/analytics-Period"},"filter":{"$ref":"#/components/schemas/analytics-CustomDateFilter"}},"required":["duration","offset","type"]},"analytics-CustomDateFilter":{"description":"This object allows you to define a pattern for a more detailed time filter. These patterns are applied within the constraints of the `dateFilter` object that contains them, regardless of its type relative or absolute).","oneOf":[{"$ref":"#/components/schemas/analytics-CustomDailyDateFilter"},{"$ref":"#/components/schemas/analytics-CustomWeeklyDateFilter"},{"$ref":"#/components/schemas/analytics-CustomMonthlyDateFilter"}],"discriminator":{"propertyName":"type","mapping":{"DAILY":"#/components/schemas/analytics-CustomDailyDateFilter","WEEKLY":"#/components/schemas/analytics-CustomWeeklyDateFilter","MONTHLY":"#/components/schemas/analytics-CustomMonthlyDateFilter"}}},"analytics-CustomDailyDateFilter":{"type":"object","title":"Daily","x-class-name":"CustomDailyFilter","x-interface-name-ts":"CustomDailyFilter","properties":{"type":{"type":"string","x-class-name":"CustomDailyFilterType","x-interface-name-ts":"CustomDailyFilterType","enum":["DAILY"],"description":"Daily filters limit the data scope to a range of hours every day."},"nestingType":{"x-class-name":"CustomDailyFilterNestingType","type":"string","enum":["IN_PLACE"]},"from":{"$ref":"#/components/schemas/analytics-DatePickerDayFrom"},"to":{"$ref":"#/components/schemas/analytics-DatePickerDayTo"},"inverted":{"$ref":"#/components/schemas/analytics-DatePickerInverted"}},"required":["nestingType","type","from","to"]},"analytics-DatePickerDayFrom":{"type":"string","description":"Lower boundary of the pattern's timeframe, in HH:MM:SS format."},"analytics-DatePickerDayTo":{"type":"string","description":"Upper boundary of the pattern's timeframe, in HH:MM:SS format."},"analytics-DatePickerInverted":{"type":"boolean","default":false,"description":"Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."},"analytics-CustomWeeklyDateFilter":{"type":"object","title":"Weekly","x-class-name":"CustomWeeklyFilter","x-interface-name-ts":"CustomWeeklyFilter","properties":{"type":{"type":"string","x-class-name":"CustomWeeklyFilterType","x-interface-name-ts":"CustomWeeklyFilterType","enum":["WEEKLY"],"description":"Weekly filters let you define separate rules for each day of the week."},"nestingType":{"x-class-name":"CustomWeeklyFilterNestingType","type":"string","enum":["IN_PLACE"]},"days":{"$ref":"#/components/schemas/analytics-WeeklyDays"}},"required":["days","nestingType","type"]},"analytics-CustomMonthlyDateFilter":{"type":"object","title":"Monthly","x-class-name":"CustomMonthlyFilterType","x-interface-name-ts":"CustomMonthlyFilterType","properties":{"type":{"type":"string","x-class-name":"CustomMonthlyFilterType","x-interface-name-ts":"CustomMonthlyFilterType","enum":["MONTHLY"],"description":"Monthly filters allow you to build rules for days of the month and/or weeks, including rules for different days of the week."},"nestingType":{"x-class-name":"CustomMonthlyFilterNestingType","type":"string","enum":["IN_PLACE"]},"rules":{"$ref":"#/components/schemas/analytics-DateRule"}},"required":["nestingType","rules","type"]},"analytics-DateRule":{"description":"A set of rules. Within a monthly filter, you can include a mixture of rules for days of the month and days of the week.","oneOf":[{"$ref":"#/components/schemas/analytics-WeekDateRule"},{"$ref":"#/components/schemas/analytics-MonthDateRule"}],"discriminator":{"propertyName":"type","mapping":{"WEEK":"#/components/schemas/analytics-WeekDateRule","MONTH":"#/components/schemas/analytics-MonthDateRule"}}},"analytics-WeekDateRule":{"type":"object","title":"Days of the week","x-class-name":"WeekDateRule","x-interface-name-ts":"WeekDateRule","properties":{"type":{"type":"string","x-class-name":"WeekDateRuleType","x-interface-name-ts":"WeekDateRuleType","enum":["WEEK"],"description":"Weekly filters limit the scope to days in a week"},"weeks":{"type":"array","description":"Weeks of the month included in the pattern","items":{"$ref":"#/components/schemas/analytics-WeekOfMonth"}},"inverted":{"type":"boolean","default":false,"description":"When set to `true`, weeks are counted from the end of the month.\n\nFor example, if `inverted` is true and `week` is set to 1, the rule applies to the last week of each month. This lets you take into account the varying length of months.\n\n**NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array of each week..\n"}},"required":["type","weeks"]},"analytics-MonthDateRule":{"type":"object","title":"Days of the month","x-class-name":"MonthDateRule","x-interface-name-ts":"MonthDateRule","properties":{"type":{"description":"Rules for days of the month","type":"string","x-class-name":"MonthDateRuleType","x-interface-name-ts":"MonthDateRuleType","enum":["MONTH"]},"days":{"type":"array","description":"Days of the month included in the pattern.","items":{"$ref":"#/components/schemas/analytics-DayOf"}},"inverted":{"type":"boolean","default":false,"description":"When set to `true`, days are counted from the end of the month.\n\nFor example, if `inverted` is true and `day` is set to 1, the rule applies to the last day of each month. This lets you take into account the varying length of months.  \n\n**NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array.\n"}},"required":["days","type"]},"analytics-WeekOfMonth":{"type":"object","properties":{"week":{"type":"integer","description":"Number of the week. The direction of counting depends on the `inverted` boolean property of the ancestor object."},"days":{"type":"array","description":"Days included in the pattern","items":{"$ref":"#/components/schemas/analytics-DayOf"}}},"required":["days","type"]},"analytics-WeeklyDays":{"type":"array","description":"An array of rules for different days of the week.","items":{"$ref":"#/components/schemas/analytics-DayOf"}},"analytics-DayOf":{"type":"object","properties":{"day":{"type":"integer","description":"The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted)."},"from":{"$ref":"#/components/schemas/analytics-DatePickerDayFrom"},"to":{"$ref":"#/components/schemas/analytics-DatePickerDayTo"},"mode":{"$ref":"#/components/schemas/analytics-DayOfMode"},"inverted":{"$ref":"#/components/schemas/analytics-DatePickerInverted"}},"required":["day","from","inverted","to"]},"analytics-DayOfMode":{"type":"string","enum":["Range","Hour"]},"analytics-Period":{"type":"object","description":"The definition of a length of time.","properties":{"type":{"$ref":"#/components/schemas/analytics-TimePeriod"},"value":{"$ref":"#/components/schemas/analytics-TimeValue"}},"required":["type","value"]},"analytics-TimePeriod":{"type":"string","x-class-name":"TimePeriod","x-interface-name-ts":"TimePeriod","description":"The unit of time","enum":["YEARS","MONTHS","WEEKS","DAYS","HOURS","MINUTES","SECONDS","UNKNOWN"]},"analytics-TimeValue":{"type":"integer","description":"The number of time units","format":"int64"},"analytics-DirectoryId":{"type":"string","format":"uuid","description":"Unique ID of the directory which contains this analysis. A 'default' directory is automatically created in every workspace."},"analytics-Predecessor":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-Id"},"type":{"type":"string","x-class-name":"AnalyticPredecessorType","enum":["SEGMENTATION","METRIC","FUNNEL","TREND","EXPRESSION","AGGREGATE","SANKEY"]},"name":{"type":"string"},"children":{"type":"array","items":{"$ref":"#/components/schemas/analytics-Predecessor"}}},"required":["children","id","type"]},"analytics-Successor":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-Id"},"type":{"type":"string","x-class-name":"SuccessorAnalyticType","enum":["SEGMENTATION","METRIC","FUNNEL","TREND","EXPRESSION","AGGREGATE","SANKEY"]},"name":{"type":"string"},"children":{"type":"array","items":{"$ref":"#/components/schemas/analytics-Successor"}}},"required":["children","id","type"]},"analytics-AnalyticId":{"type":"string","format":"uuid","description":"UUID of the analysis\n","example":"5370bf3c-2dfa-4e89-98ff-07100cffee6c"},"analytics-ClientId":{"type":"number","format":"int64","description":"ID of the profile"},"analytics-AnalysisOldId":{"type":"integer","format":"int64","minimum":0,"description":"Unique numeric ID of the analysis"},"analytics-AnalyticName":{"type":"string","description":"Name of the analysis","example":"Nice people who read the documentation"},"analytics-MetricListItem":{"allOf":[{"type":"object","properties":{"action":{"$ref":"#/components/schemas/analytics-Action"},"actions":{"description":"Event definitions","type":"array","items":{"$ref":"#/components/schemas/analytics-Action"}},"eventName":{"$ref":"#/components/schemas/analytics-ActionName"},"eventNames":{"description":"Event definition names","type":"array","items":{"$ref":"#/components/schemas/analytics-ActionName"}},"actionId":{"$ref":"#/components/schemas/analytics-ActionId"},"actionIds":{"description":"Event definition IDs","type":"array","items":{"$ref":"#/components/schemas/analytics-ActionId"}},"isNumber":{"$ref":"#/components/schemas/analytics-IsNumber"},"isMetricHistogram":{"$ref":"#/components/schemas/analytics-IsMetricHistogram"},"isReportMetric":{"$ref":"#/components/schemas/analytics-IsReportMetric"}}},{"$ref":"#/components/schemas/analytics-ListAnalyticsItemCommon"}]},"analytics-Action":{"type":"object","description":"The analyzed event","nullable":true,"required":["name"],"properties":{"id":{"$ref":"#/components/schemas/analytics-ActionId"},"name":{"$ref":"#/components/schemas/analytics-ActionName"}}},"analytics-ActionId":{"type":"integer","format":"int64","deprecated":true,"nullable":true,"description":"Deprecated parameter. DO NOT use. Has no effect in create/update requests."},"analytics-ActionName":{"type":"string","description":"Action name of the event.","example":"page.visit"},"analytics-IsNumber":{"type":"boolean","description":"`true` when the metric is purely numerical (does not calculate any events, parameters, etc.)"},"analytics-IsMetricHistogram":{"type":"boolean","description":"`true` when the metric can be used in a histogram"},"analytics-IsReportMetric":{"type":"boolean","description":"`true` when the metric can be used as a report metric (the expression references either client params or event params, but not both)"},"analytics-InlineAnalytic":{"description":"An inline analytic definition carried alongside a request so it can be referenced by id without being persisted.","oneOf":[{"$ref":"#/components/schemas/analytics-InlineExpression"},{"$ref":"#/components/schemas/analytics-InlineSegmentation"},{"$ref":"#/components/schemas/analytics-InlineAggregate"},{"$ref":"#/components/schemas/analytics-InlineRunningAggregate"},{"$ref":"#/components/schemas/analytics-InlineMetric"}],"discriminator":{"propertyName":"analyticType","mapping":{"EXPRESSION":"#/components/schemas/analytics-InlineExpression","SEGMENTATION":"#/components/schemas/analytics-InlineSegmentation","AGGREGATE":"#/components/schemas/analytics-InlineAggregate","RUNNING_AGGREGATE":"#/components/schemas/analytics-InlineRunningAggregate","METRIC":"#/components/schemas/analytics-InlineMetric"}}},"analytics-InlineAnalytics":{"type":"array","description":"Analyses added to the request. They can be referenced by their ID in filters and expressions same as other analyses, but are not saved in persistent storage.","items":{"$ref":"#/components/schemas/analytics-InlineAnalytic"}},"analytics-InlineExpression":{"type":"object","x-class-name":"InlineExpression","x-interface-name-ts":"InlineExpression","properties":{"id":{"$ref":"#/components/schemas/analytics-Id"},"analyticType":{"type":"string","enum":["EXPRESSION"]},"analysis":{"discriminator":{"propertyName":"type","mapping":{"EVENT":"#/components/schemas/analytics-EventExpressionEntity","CLIENT":"#/components/schemas/analytics-ClientExpressionEntity"}},"oneOf":[{"$ref":"#/components/schemas/analytics-EventExpressionEntity"},{"$ref":"#/components/schemas/analytics-ClientExpressionEntity"}]}},"required":["id","analyticType","analysis"]},"analytics-InlineSegmentation":{"type":"object","x-class-name":"InlineSegmentation","x-interface-name-ts":"InlineSegmentation","properties":{"id":{"$ref":"#/components/schemas/analytics-Id"},"analyticType":{"type":"string","enum":["SEGMENTATION"]},"analysis":{"$ref":"#/components/schemas/analytics-SegmentationAnalysis"}},"required":["id","analyticType","analysis"]},"analytics-InlineAggregate":{"type":"object","x-class-name":"InlineAggregate","x-interface-name-ts":"InlineAggregate","properties":{"id":{"$ref":"#/components/schemas/analytics-Id"},"analyticType":{"type":"string","enum":["AGGREGATE"]},"analysis":{"$ref":"#/components/schemas/analytics-AggregateAnalysis"}},"required":["id","analyticType","analysis"]},"analytics-InlineRunningAggregate":{"type":"object","x-class-name":"InlineRunningAggregate","x-interface-name-ts":"InlineRunningAggregate","properties":{"id":{"$ref":"#/components/schemas/analytics-Id"},"analyticType":{"type":"string","enum":["RUNNING_AGGREGATE"]},"analysis":{"$ref":"#/components/schemas/analytics-AggregateAnalysis"}},"required":["id","analyticType","analysis"]},"analytics-InlineMetric":{"type":"object","x-class-name":"InlineMetric","x-interface-name-ts":"InlineMetric","properties":{"id":{"$ref":"#/components/schemas/analytics-Id"},"analyticType":{"type":"string","enum":["METRIC"]},"analysis":{"$ref":"#/components/schemas/analytics-MetricAnalysis"}},"required":["id","analyticType","analysis"]},"analytics-ReportListItem":{"allOf":[{"type":"object","properties":{"isMultiMetric":{"type":"boolean","description":"True when the report has more than one metric."}},"required":["isMultiMetric"]},{"$ref":"#/components/schemas/analytics-ListAnalyticsItemCommon"}]},"analytics-ListAnalyticsItemCommon":{"type":"object","description":"Common elements retrieved in lists of analyses","properties":{"id":{"$ref":"#/components/schemas/analytics-Id"},"name":{"$ref":"#/components/schemas/analytics-Name"},"author":{"$ref":"#/components/schemas/analytics-Author"},"updatedAt":{"$ref":"#/components/schemas/analytics-UpdatedAt"},"usedAt":{"$ref":"#/components/schemas/analytics-UsedAt"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"directoryId":{"$ref":"#/components/schemas/analytics-DirectoryId"},"isDynamicAnalytic":{"$ref":"#/components/schemas/analytics-IsDynamicAnalytic"},"variables":{"$ref":"#/components/schemas/analytics-Variables"}},"required":["author","createdAt","directoryId","id","isDynamicAnalytic","name","updatedAt","usedAt","variables"]},"analytics-Id":{"type":"string","format":"uuid","description":"Unique ID of the resource"},"analytics-Name":{"type":"string","description":"Name of the resource"},"analytics-Author":{"type":"object","description":"Data of the author of the analysis","properties":{"id":{"$ref":"#/components/schemas/analytics-AuthorId"},"name":{"type":"string","description":"Name of the author"},"icon":{"type":"string","description":"URL of the author's avatar icon"}},"required":["id","name"]},"analytics-AuthorId":{"type":"integer","format":"int64","description":"Unique ID of the original creator. `1` means the resource was created by a request with workspace authorization."},"analytics-UpdatedAt":{"type":"string","format":"date-time","description":"Last update time"},"analytics-CreatedAt":{"type":"string","format":"date-time","description":"Creation time"},"analytics-Variables":{"type":"array","description":"Dynamic keys used in this analysis","items":{"$ref":"#/components/schemas/analytics-Variable"}},"analytics-IsDynamicAnalytic":{"type":"boolean","description":"`true` if the analysis contains any [dynamic values](https://hub.synerise.com/docs/analytics/i_events-parameter-value/#dynamic-key)."},"analytics-UsedAt":{"type":"string","format":"date-time","description":"The date and time when the item was last used","nullable":true},"analytics-BusinessProfileId":{"type":"integer","format":"int32","description":"ID of the workspace (formerly business profile)","example":48},"analytics-PathNamespace":{"type":"string","enum":["profiles"]},"analytics-Meta":{"type":"object","description":"Pagination metadata","properties":{"links":{"type":"array","description":"Links to the neighboring pages and the first page","items":{"$ref":"#/components/schemas/analytics-Link"}},"limit":{"type":"integer","format":"int32","description":"Limit of items per page"},"count":{"type":"integer","description":"Currently unused","nullable":true}},"required":["links","limit"]},"analytics-Link":{"type":"object","properties":{"url":{"type":"string","description":"URL of the page, used for navigation"},"rel":{"type":"string","x-class-name":"LinkRel","description":"The type of relation to the current page. `first` is always the first page.","enum":["first","prev","next"]}},"required":["rel","url"]},"analytics-MetricRequest":{"type":"object","properties":{"analysis":{"$ref":"#/components/schemas/analytics-MetricAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}}},"analytics-MetricAnalysis":{"type":"object","description":"Structure of the analytical query","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"title":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"format":{"$ref":"#/components/schemas/analytics-MetricFormat"},"comparison":{"$ref":"#/components/schemas/analytics-MetricComparison"},"metricType":{"$ref":"#/components/schemas/analytics-MetricType"},"expression":{"$ref":"#/components/schemas/analytics-MetricExpressionContent"},"isVisibleForClientProfile":{"$ref":"#/components/schemas/analytics-IsVisibleForClientProfile"},"allowNull":{"$ref":"#/components/schemas/analytics-AllowNull"},"grouping":{"description":"Defines how the results are returned","type":"array","items":{"$ref":"#/components/schemas/analytics-ReportMetricGrouping"}}},"required":["id","title","description","format","comparison","metricType","expression","isVisibleForClientProfile"]},"analytics-Description":{"type":"string","description":"Description of the resource"},"analytics-MetricFormat":{"type":"object","description":"\nThis object defines the display format of the data in the Synerise Web UI. The JSON format of the results is not affected.\n\nValues other than in the enums or min-max ranges are accepted by the backend, but may not be displayed properly by the Synerise Web UI.\n","properties":{"compactNumbers":{"type":"boolean","default":false,"description":"When `true`, numbers are shortened. For example, \"20500\" becomes \"20.5k\"."},"currency":{"type":"string","x-class-name":"Currency","nullable":true,"title":"CurrencyName","enum":["EUR","USD","PLN","JPY"],"description":"The currency to use when `dataFormat` is `cash`"},"dataFormat":{"type":"string","title":"DateFormatName","x-class-name":"DateFormatName","nullable":true,"enum":["cash","numeric","percent"],"description":"Format of the data"},"fixedLength":{"description":"The number of digits after the decimal point","type":"integer","format":"int32","default":0,"minimum":0,"maximum":4},"useSeparator":{"type":"boolean","default":false,"description":"Enables the use of a comma as the thousands separator. When `false`, no separator is used."}}},"analytics-MetricComparison":{"type":"object","description":"Use this filter to compare the data from `expression` with another period. If this is used, then the result of the analysis is the difference between the two periods.","properties":{"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"}}},"analytics-MetricType":{"type":"string","x-class-name":"MetricType","enum":["SIMPLE","FORMULA"],"description":"Defines the type of the metric. This affects the contents of the\n`expression` object.\n\nWhen the type is `SIMPLE`, the `expression` can only include a single argument.\n"},"analytics-MetricExpression":{"discriminator":{"propertyName":"type","mapping":{"OPERATOR":"#/components/schemas/analytics-OperatorMetricExpression","NUMBER":"#/components/schemas/analytics-NumberMetricExpression","EVENT":"#/components/schemas/analytics-EventMetricExpression","CLIENT":"#/components/schemas/analytics-ClientMetricExpression","METRIC":"#/components/schemas/analytics-NestedMetricExpression"}},"oneOf":[{"$ref":"#/components/schemas/analytics-ClientMetricExpression"},{"$ref":"#/components/schemas/analytics-EventMetricExpression"},{"$ref":"#/components/schemas/analytics-NestedMetricExpression"},{"$ref":"#/components/schemas/analytics-NumberMetricExpression"},{"$ref":"#/components/schemas/analytics-OperatorMetricExpression"}]},"analytics-IsVisibleForClientProfile":{"type":"boolean","description":"When set to `true`, information about this analysis is shown on a profile's card."},"analytics-ReportMetricGrouping":{"description":"The type and number of results to show. \"TOP\" shows the highest results. \"LAST\" shows the most recent results.\n","discriminator":{"propertyName":"type","mapping":{"TOP":"#/components/schemas/analytics-TopReportMetricGrouping","LAST":"#/components/schemas/analytics-LastReportMetricGrouping"}},"oneOf":[{"$ref":"#/components/schemas/analytics-TopReportMetricGrouping"},{"$ref":"#/components/schemas/analytics-LastReportMetricGrouping"}]},"analytics-TopReportMetricGrouping":{"type":"object","title":"Top","required":["type","top"],"properties":{"type":{"title":"TopReportMetricGroupingType","x-class-name":"TopReportMetricGroupingType","description":"Returns the top results","type":"string","enum":["TOP"]},"top":{"type":"integer","description":"The number of results to show in the report"}}},"analytics-LastReportMetricGrouping":{"type":"object","title":"Last","description":"This type shows the most recent occurrences","required":["type","last"],"properties":{"type":{"title":"LastReportMetricGroupingType","x-class-name":"LastReportMetricGroupingType","type":"string","description":"This type shows the most recent occurrences","enum":["LAST"]},"last":{"type":"integer","description":"The number of results to show in the report"}}},"analytics-MetricExpressionContent":{"example":{"type":"VALUE","value":{"type":"NUMBER","value":100}},"discriminator":{"propertyName":"type","mapping":{"FUNCTION":"#/components/schemas/analytics-MetricExpressionContentFunction","VALUE":"#/components/schemas/analytics-MetricExpressionContentValue"}},"oneOf":[{"$ref":"#/components/schemas/analytics-MetricExpressionContentFunction"},{"$ref":"#/components/schemas/analytics-MetricExpressionContentValue"}]},"analytics-MetricExpressionContentValue":{"type":"object","description":"An expression to calculate","properties":{"type":{"$ref":"#/components/schemas/analytics-MetricExpressionContentValueType"},"title":{"$ref":"#/components/schemas/analytics-Name"},"value":{"$ref":"#/components/schemas/analytics-MetricExpression"}}},"analytics-MetricExpressionContentValueType":{"type":"string","enum":["VALUE"]},"analytics-MetricExpressionContentFunction":{"type":"object","description":"A function to apply","x-interface-name-ts":"MetricExpressionContentFunction","properties":{"type":{"$ref":"#/components/schemas/analytics-MetricExpressionContentFunctionType"},"function":{"x-class-name":"MetricExpressionContentFunctionFunction","description":"The function to apply. The number of required arguments depends on the function arity:\n- Nullary (0 args): NOW\n- Unary (1 arg via `arg`): LN, ABS, CEIL, EXP, FLOOR, ROUND, TO_NUMBER, TO_STRING, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_YEAR, HOUR, MONTH, WEEK, YEAR, TO_MONEY, TO_TIMESTAMP, TO_DATE, BRACKET\n- Binary (2 args via `arg1`, `arg2`): DIVIDE, IF_NULL, MAX, MIN, MOD, MULTIPLY, SUB, SUM, GREATER, GREATER_OR_EQUALS, LESS, LESS_OR_EQUAL, NOT_EQUAL, EQUALS, ADD_YEARS, CONCAT, REGEXP\n- Ternary (3 args via `arg1`, `arg2`, `arg3`): IF (arg1 - condition; arg2 - return if true; arg3 - return if false)\n","type":"string","enum":["NOW","LN","ABS","CEIL","EXP","FLOOR","ROUND","BRACKET","TO_NUMBER","TO_STRING","DAY_OF_MONTH","DAY_OF_WEEK","DAY_OF_YEAR","HOUR","MONTH","WEEK","YEAR","TO_MONEY","TO_TIMESTAMP","TO_DATE","DIVIDE","IFNULL","MAX","MIN","MOD","MULTIPLY","SUB","SUM","GREATER","GREATER_OR_EQUALS","LESS","LESS_OR_EQUALS","NOT_EQUALS","EQUALS","ADD_YEARS","CONCAT","REGEXP","IF"]},"arg":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"MetricExpressionContent"},"arg1":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"MetricExpressionContent"},"arg2":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"MetricExpressionContent"},"arg3":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"MetricExpressionContent"}},"required":["type","function"]},"analytics-MetricExpressionContentFunctionType":{"type":"string","enum":["FUNCTION"]},"analytics-MetricExpressionClientType":{"type":"string","enum":["CLIENT"]},"analytics-MetricExpressionEventType":{"type":"string","enum":["EVENT"]},"analytics-MetricExpressionOperatorType":{"type":"string","enum":["OPERATOR"]},"analytics-MetricExpressionMetricType":{"type":"string","enum":["METRIC"]},"analytics-MetricExpressionNumberType":{"type":"string","enum":["NUMBER"]},"analytics-ClientMetricExpression":{"type":"object","description":"Definition of a metric expression","x-class-name":"ClientMetricExpression","x-interface-name-ts":"ClientMetricExpression","properties":{"type":{"$ref":"#/components/schemas/analytics-MetricExpressionClientType"},"title":{"$ref":"#/components/schemas/analytics-Name"},"aggregation":{"$ref":"#/components/schemas/analytics-ClientMetricAggregation"},"filter":{"$ref":"#/components/schemas/analytics-ExpressionFilter"},"groupBy":{"$ref":"#/components/schemas/analytics-ClientValue"}},"required":["type","title","aggregation","filter"]},"analytics-ClientMetricAggregation":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/analytics-AggregateExpressionType"},"attribute":{"$ref":"#/components/schemas/analytics-ClientAttribute"},"level":{"$ref":"#/components/schemas/analytics-QuantileLevel"}},"required":["type","attribute"]},"analytics-AggregateExpressionType":{"type":"string","description":"The type of calculation.\n\n- COUNT allows you to count the total number of the entities that meet the filters.\n\n- COUNT_DISTINCT allows you to count the total number of distinct (unique) attribute values in entities which match the filters.\n\n- SUM, MIN, MAX, MEDIAN, QUANTILE (requires `level`) and AVG allow you to perform calculations on numerical-value parameters within the entities that meet the filters.\n\n- EXISTS checks the existence of at least a single entity that meets the filters and returns 1 when \"true\" or 0 when \"false\".\n\n- LAST and LAST_MULTI (requires `size`) retrieve the newest matching data.\n\n- FIRST and FIRST_MULTI (requires `size`) retrieve the oldest matching data.\n\n- LAST_TIME and FIRST_TIME (running aggregates only; require `timeWindow`) retrieve the single newest / oldest matching value from events within the time window preceding the currently evaluated event.\n\n- LAST_MULTI_TIME and FIRST_MULTI_TIME (running aggregates only; require `size` and `timeWindow`) retrieve the newest / oldest matching data from events within the time window preceding the currently evaluated event.\n","enum":["AVG","SUM","MIN","MAX","COUNT","MEDIAN","QUANTILE","COUNT_DISTINCT","LAST","FIRST","EXISTS","FIRST_MULTI","LAST_MULTI","FIRST_TIME","LAST_TIME","FIRST_MULTI_TIME","LAST_MULTI_TIME","TOP","BOTTOM","TOP_MULTI","BOTTOM_MULTI"]},"analytics-QuantileLevel":{"type":"number","format":"double","nullable":true,"description":"Only applies when `type` is `QUANTILE`. This is the percentile whose value will be the result of the analysis. For example, `0.35` is the 35th percentile."},"analytics-AggregateSize":{"type":"integer","format":"int32","minimum":0,"description":"Only applies and is required when `type` is *_MULTI. Defines how many results to return."},"analytics-AggregateUnique":{"type":"boolean","description":"Only applies when `type`` is *_MULTI. When set to `true``, only unique occurrences of an event parameter are included in the results."},"analytics-ExcludeCurrent":{"type":"boolean","description":"When `false`, data from the event that is the subject of the analysis is analyzed in addition to data of the events that occurred before it."},"analytics-ClientAttributeParamType":{"type":"string","enum":["PARAM"]},"analytics-ClientAttributeTagType":{"type":"string","enum":["TAG"]},"analytics-ClientAttributeAggregateType":{"type":"string","enum":["AGGREGATE"]},"analytics-ClientAttributeSegmentationType":{"type":"string","enum":["SEGMENTATION"]},"analytics-ClientAttributeExpressionType":{"type":"string","enum":["EXPRESSION"]},"analytics-ClientAttributeSpecialType":{"type":"string","enum":["SPECIAL"]},"analytics-ClientAttributeEmptyType":{"type":"string","enum":["EMPTY"]},"analytics-ClientAttribute":{"description":"A profile attribute to analyze","discriminator":{"propertyName":"type","mapping":{"PARAM":"#/components/schemas/analytics-ClientParamAttribute","TAG":"#/components/schemas/analytics-ClientTagAttribute","AGGREGATE":"#/components/schemas/analytics-ClientAggregateAttribute","SEGMENTATION":"#/components/schemas/analytics-ClientSegmentationAttribute","EXPRESSION":"#/components/schemas/analytics-ClientExpressionAttribute","SPECIAL":"#/components/schemas/analytics-ClientSpecialAttribute","EMPTY":"#/components/schemas/analytics-ClientEmptyAttribute"}},"oneOf":[{"$ref":"#/components/schemas/analytics-ClientParamAttribute"},{"$ref":"#/components/schemas/analytics-ClientTagAttribute"},{"$ref":"#/components/schemas/analytics-ClientAggregateAttribute"},{"$ref":"#/components/schemas/analytics-ClientSegmentationAttribute"},{"$ref":"#/components/schemas/analytics-ClientExpressionAttribute"},{"$ref":"#/components/schemas/analytics-ClientSpecialAttribute"},{"$ref":"#/components/schemas/analytics-ClientEmptyAttribute"}]},"analytics-ClientParamAttribute":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/analytics-ClientAttributeParamType"},"param":{"description":"Name of the parameter","type":"string"}},"required":["type","param"]},"analytics-ClientTagAttribute":{"type":"object","description":"Reference to a tag","properties":{"type":{"$ref":"#/components/schemas/analytics-ClientAttributeTagType"},"tag":{"description":"Name of the tag","type":"string"}},"required":["type","tag"]},"analytics-ClientAggregateAttribute":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/analytics-ClientAttributeAggregateType"},"uuid":{"$ref":"#/components/schemas/analytics-AnalyticId"},"id":{"$ref":"#/components/schemas/analytics-AnalyticId"}},"required":["type","uuid","id"]},"analytics-ClientSegmentationAttribute":{"type":"object","description":"Reference to a segmentation","properties":{"type":{"$ref":"#/components/schemas/analytics-ClientAttributeSegmentationType"},"id":{"$ref":"#/components/schemas/analytics-AnalyticId"}},"required":["type","id"]},"analytics-ClientExpressionAttribute":{"type":"object","description":"Pointer to an expression","properties":{"type":{"$ref":"#/components/schemas/analytics-ClientAttributeExpressionType"},"id":{"$ref":"#/components/schemas/analytics-AnalyticId"}},"required":["type","id"]},"analytics-ClientSpecialAttribute":{"type":"object","description":"Reference to a special parameter","properties":{"type":{"$ref":"#/components/schemas/analytics-ClientAttributeSpecialType"},"special":{"type":"string","description":"The name of the special parameter"}},"required":["type","special"]},"analytics-ClientEmptyAttribute":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/analytics-ClientAttributeEmptyType"}},"required":["type"]},"analytics-ExpressionFilter":{"type":"object","description":"This filter lets you limit the results to profiles that match it. For no filter, leave the object empty.  \n\nThe `expression` object is only used by the Synerise Web Portal. If you're integrating an API, don't send this object or send it empty. If you send `expression` and `expressions`, `expressions` takes priority.\n","properties":{"matching":{"$ref":"#/components/schemas/analytics-matching"},"expressions":{"type":"array","description":"Profile filter details. The expressions are applied according to their position in the array. The logical AND/OR operator must be placed between expressions. An empty array means no filters are applied.","items":{"$ref":"#/components/schemas/analytics-FilterBox"}},"expression":{"$ref":"#/components/schemas/analytics-FilterExpressionContent"},"groupBy":{"type":"array","items":{"$ref":"#/components/schemas/analytics-ClientValue"}}},"required":["matching","expressions","expression"]},"analytics-MetricView":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"author":{"$ref":"#/components/schemas/analytics-AuthorId"},"modifier":{"$ref":"#/components/schemas/analytics-modifierId"},"updatedAt":{"$ref":"#/components/schemas/analytics-UpdatedAt"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"usedAt":{"$ref":"#/components/schemas/analytics-UsedAt"},"analysis":{"$ref":"#/components/schemas/analytics-MetricAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"},"isPredefinedAnalytic":{"$ref":"#/components/schemas/analytics-IsPredefinedAnalytic"},"isDynamicAnalytic":{"$ref":"#/components/schemas/analytics-IsDynamicAnalytic"},"isMetricHistogram":{"$ref":"#/components/schemas/analytics-IsMetricHistogram"},"isDeleted":{"$ref":"#/components/schemas/analytics-IsDeleted"},"namespace":{"$ref":"#/components/schemas/analytics-Namespace"},"directoryId":{"$ref":"#/components/schemas/analytics-DirectoryId"}},"required":["id","name","author","modifier","updatedAt","createdAt","usedAt","analysis","isPredefinedAnalytic","isDynamicAnalytic","isMetricHistogram","isDeleted","namespace","directoryId"]},"analytics-ClientValue":{"discriminator":{"propertyName":"type","mapping":{"CONSTANT":"#/components/schemas/analytics-ConstantClientValue","CLIENT":"#/components/schemas/analytics-ClientAttributeValue","VARIABLE":"#/components/schemas/analytics-VariableClientValue"}},"oneOf":[{"$ref":"#/components/schemas/analytics-ConstantClientValue"},{"$ref":"#/components/schemas/analytics-ClientAttributeValue"},{"$ref":"#/components/schemas/analytics-VariableClientValue"}]},"analytics-ConstantClientValue":{"type":"object","title":"Static value","description":"Inserts a static value.","properties":{"type":{"x-class-name":"ConstantClientValueType","type":"string","description":"Inserts a static value.","enum":["CONSTANT"]},"constant":{"description":"The value can't:\n  - be longer than 21000 characters if it's a string\n  - be larger than 65000 items if it's an array. Strings in the array can't be longer than 21000 characters.\n","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"required":["type","constant"]},"analytics-ClientAttributeValue":{"type":"object","title":"Profile attribute","properties":{"type":{"x-class-name":"ClientClientValueType","type":"string","enum":["CLIENT"],"description":"Definition of a profile attribute"},"attribute":{"$ref":"#/components/schemas/analytics-ClientAttribute"}},"required":["type","attribute"]},"analytics-VariableClientValue":{"type":"object","title":"Dynamic value","properties":{"type":{"x-class-name":"VariableClientValueType","type":"string","description":"This type is called a Dynamic Key in the Synerise Portal. It can be used to let other analytic components, such as dashboards, insert a value.","enum":["VARIABLE"]},"name":{"type":"string","description":"The name of the dynamic key"},"defaultValue":{"description":"The default value to use","oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{}}]}},"required":["type","name","defaultValue"]},"analytics-EventMetricExpression":{"type":"object","x-class-name":"EventMetricExpression","description":"An event metric","x-interface-name-ts":"EventMetricExpression","properties":{"type":{"$ref":"#/components/schemas/analytics-MetricExpressionEventType"},"occurrenceType":{"$ref":"#/components/schemas/analytics-OccurrenceType"},"title":{"$ref":"#/components/schemas/analytics-Name"},"aggregation":{"$ref":"#/components/schemas/analytics-EventMetricAggregation"},"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"},"action":{"$ref":"#/components/schemas/analytics-Action"},"filter":{"$ref":"#/components/schemas/analytics-ExpressionFilter"},"expressions":{"$ref":"#/components/schemas/analytics-EventExpressions"},"eventName":{"type":"string","description":"Name (action) of the analyzed event","nullable":true}},"required":["type","occurrenceType","title","aggregation","dateFilter","action","filter","expressions"]},"analytics-EventMetricAggregation":{"type":"object","x-class-name":"EventMetricAggregation","x-interface-name-ts":"EventMetricAggregation","properties":{"type":{"$ref":"#/components/schemas/analytics-AggregateExpressionType"},"attribute":{"$ref":"#/components/schemas/analytics-EventAttribute"},"level":{"type":"number","nullable":true}},"required":["type","attribute"]},"analytics-OccurrenceType":{"type":"string","x-class-name":"OccurrenceType","x-interface-name-ts":"OccurrenceType","enum":["FIRST","LAST","ALL"]},"analytics-NestedMetricExpression":{"type":"object","description":"Reference to a metric","x-class-name":"NestedMetricExpression","x-interface-name-ts":"NestedMetricExpression","properties":{"type":{"$ref":"#/components/schemas/analytics-MetricExpressionMetricType"},"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"title":{"type":"string","description":"Can't be empty, can't contain whitespace only"}},"required":["type","id","title"]},"analytics-NumberMetricExpression":{"type":"object","x-class-name":"NumberMetricExpression","x-interface-name-ts":"NumberMetricExpression","properties":{"type":{"$ref":"#/components/schemas/analytics-MetricExpressionNumberType"},"value":{"description":"The numeric value","type":"number"}},"required":["type","value"]},"analytics-OperatorMetricExpression":{"type":"object","x-class-name":"OperatorMetricExpression","x-interface-name-ts":"OperatorMetricExpression","properties":{"type":{"$ref":"#/components/schemas/analytics-MetricExpressionOperatorType"},"operator":{"$ref":"#/components/schemas/analytics-MetricOperator"}},"required":["type","operator"]},"analytics-MetricOperator":{"type":"string","description":"A mathematical/logical operator","enum":["ADDITION_SIGN","SUBSTRACTION_SIGN","DIVISION_SIGN","MULTIPLICATION_SIGN","REMINDER","LEFT_BRACKET","RIGHT_BRACKET"]},"analytics-FilterBox":{"discriminator":{"propertyName":"type","mapping":{"ATTRIBUTE":"#/components/schemas/analytics-AttributeFilterBox","EXPRESSION":"#/components/schemas/analytics-ExpressionFilterBox","FUNNEL":"#/components/schemas/analytics-FunnelFilterBox","OPERATOR":"#/components/schemas/analytics-OperatorFilterBox"}},"oneOf":[{"$ref":"#/components/schemas/analytics-AttributeFilterBox"},{"$ref":"#/components/schemas/analytics-ExpressionFilterBox"},{"$ref":"#/components/schemas/analytics-FunnelFilterBox"},{"$ref":"#/components/schemas/analytics-OperatorFilterBox"}]},"analytics-AttributeFilterBox":{"type":"object","properties":{"type":{"x-class-name":"AttributeFilterBoxType","type":"string","enum":["ATTRIBUTE"],"description":"Tests a profile attribute against a condition"},"name":{"$ref":"#/components/schemas/analytics-Name"},"matching":{"$ref":"#/components/schemas/analytics-matching"},"attribute":{"$ref":"#/components/schemas/analytics-Attribute"}}},"analytics-Attribute":{"type":"object","description":"The condition to test a profile attribute","properties":{"expressions":{"$ref":"#/components/schemas/analytics-ClientExpressions"}},"required":["expressions"]},"analytics-ClientExpression":{"type":"object","properties":{"constraint":{"$ref":"#/components/schemas/analytics-ClientConstraint"},"attribute":{"$ref":"#/components/schemas/analytics-ClientAttribute"}}},"analytics-ClientExpressions":{"type":"array","description":"An array of conditions. All conditions must be met.","items":{"$ref":"#/components/schemas/analytics-ClientExpression"}},"analytics-ExpressionFilterBox":{"description":"A condition to test","type":"object","properties":{"type":{"description":"A condition to test","x-class-name":"ExpressionFilterBoxType","type":"string","enum":["EXPRESSION"]},"name":{"type":"string"},"matching":{"type":"boolean"},"expressions":{"$ref":"#/components/schemas/analytics-FilterBox"}},"required":["type","expressions"]},"analytics-FunnelFilterBox":{"type":"object","properties":{"type":{"description":"Tests against a funnel","x-class-name":"ExpressionFilterBoxType","type":"string","enum":["FUNNEL"]},"name":{"$ref":"#/components/schemas/analytics-Name"},"matching":{"$ref":"#/components/schemas/analytics-matching"},"funnel":{"$ref":"#/components/schemas/analytics-Funnel"}},"required":["type","funnel"]},"analytics-OperatorFilterBox":{"type":"object","properties":{"type":{"description":"Logical operator between expressions","x-class-name":"OperatorFilterBoxType","type":"string","enum":["OPERATOR"]},"name":{"$ref":"#/components/schemas/analytics-Name"},"logic":{"x-class-name":"FilterBoxOperatorType","type":"string","enum":["OR","AND","LEFT_BRACKET","RIGHT_BRACKET"]}},"required":["type","name","logic"]},"analytics-Funnel":{"type":"object","description":"Funnel conditions","properties":{"title":{"type":"string","description":"Title of the funnel."},"completedWithin":{"$ref":"#/components/schemas/analytics-CompletedWithin"},"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"},"steps":{"type":"array","minItems":0,"description":"An array of steps in the funnel. The order of the steps in the array determines the order of their analysis (that is, the step at index 0 is the first step, the step at index 1 is the second step, and so on).","items":{"$ref":"#/components/schemas/analytics-FunnelStep"}},"exact":{"type":"boolean","default":false,"description":"When true, the profile's events must be exactly as in the funnel. For example, if the profile's history has events `A -> B -> C -> D`, and the funnel is `A -> C -> D`, the match is not exact, because there is an event between A and C.\n"}},"required":["title","steps"]},"analytics-FunnelStep":{"type":"object","properties":{"title":{"type":"string","description":"The name of the step"},"action":{"$ref":"#/components/schemas/analytics-Action"},"expressions":{"$ref":"#/components/schemas/analytics-EventExpressions"}},"required":["action","title","expressions"]},"analytics-EventExpression":{"type":"object","description":"The `attribute` object is an event attribute that must exist in the analyzed event. The `constraint` object is a condition that the attribute must meet.","properties":{"constraint":{"$ref":"#/components/schemas/analytics-EventConstraint"},"attribute":{"$ref":"#/components/schemas/analytics-EventAttribute"}},"required":["constrain","attribute"]},"analytics-EventExpressions":{"type":"array","description":"An array of conditions that the event must meet","items":{"$ref":"#/components/schemas/analytics-EventExpression"}},"analytics-EventAttribute":{"description":"An event attribute to analyze","discriminator":{"propertyName":"type","mapping":{"PARAM":"#/components/schemas/analytics-ParameterEventAttribute","RUNNING_AGGREGATE":"#/components/schemas/analytics-RunningAggregateEventAttribute","EXPRESSION":"#/components/schemas/analytics-ExpressionEventAttribute","SPECIAL":"#/components/schemas/analytics-SpecialEventAttribute","EMPTY":"#/components/schemas/analytics-EmptyEventAttribute"}},"oneOf":[{"$ref":"#/components/schemas/analytics-ParameterEventAttribute"},{"$ref":"#/components/schemas/analytics-RunningAggregateEventAttribute"},{"$ref":"#/components/schemas/analytics-ExpressionEventAttribute"},{"$ref":"#/components/schemas/analytics-SpecialEventAttribute"},{"$ref":"#/components/schemas/analytics-EmptyEventAttribute"}]},"analytics-ParameterEventAttribute":{"type":"object","title":"Event parameter","properties":{"type":{"x-class-name":"ParamEventAttributeType","enum":["PARAM"],"description":"This `type` refers to parameters in an event."},"param":{"type":"string","description":"Name of the parameter"}},"required":["type"]},"analytics-RunningAggregateEventAttribute":{"type":"object","title":"Event aggregate","properties":{"type":{"x-class-name":"RunningAggregateEventAttributeType","type":"string","enum":["RUNNING_AGGREGATE"],"description":"This type refers to event aggregates. You must provide the ID of the aggregate."},"id":{"type":"string","format":"uuid","description":"ID of the event aggregate"}},"required":["type","id"]},"analytics-ExpressionEventAttribute":{"type":"object","title":"Expression","properties":{"type":{"x-class-name":"ExpressionEventAttributeType","type":"string","enum":["EXPRESSION"],"description":"This type refers to expressions. You must provide the ID of the expression."},"id":{"type":"string","format":"uuid","description":"ID of the expression"}},"required":["type","id"]},"analytics-SpecialEventAttribute":{"type":"object","title":"Special property","properties":{"type":{"x-class-name":"SpecialEventAttributeType","type":"string","enum":["SPECIAL"],"description":"This type lets you access special properties of an event."},"special":{"$ref":"#/components/schemas/analytics-SpecialTypeAttribute"}},"required":["type","special"]},"analytics-EmptyEventAttribute":{"type":"object","title":"No attribute","properties":{"type":{"x-class-name":"EmptyEventAttributeType","type":"string","enum":["EMPTY"],"description":"Can be used for analyses whose result isn't based on an attribute, such as `EXISTS`. **Can't be used with `constraint`**."}},"required":["type"]},"analytics-SpecialTypeAttribute":{"type":"string","description":"The type of special attribute you want to use","enum":["TIMESTAMP"]},"analytics-EventConstraint":{"description":"This object defines the logic to apply to the `attribute`, and the values to compare it against (if required).\n\n**The analytics engine doesn't check if the data types match - you need to ensure that your data types are consistent in the data you send to the database**.\n","discriminator":{"propertyName":"type","mapping":{"BOOL":"#/components/schemas/analytics-BoolConstraintEventConstraint","STRING_ZERO":"#/components/schemas/analytics-StringZeroConstraintEventConstraint","STRING_ONE":"#/components/schemas/analytics-StringOneConstraintEventConstraint","NUMBER_ONE":"#/components/schemas/analytics-NumberOneConstraintEventConstraint","NUMBER_TWO":"#/components/schemas/analytics-NumberTwoConstraintEventConstraint","STRING_ARRAY":"#/components/schemas/analytics-StringArrayConstraintEventConstraint","ARRAY_STRING_ONE_DEPRECATED":"#/components/schemas/analytics-StringArrayOneConstraintEventConstraint","NULL":"#/components/schemas/analytics-NullConstraintEventConstraint","DATE_ZERO":"#/components/schemas/analytics-DateZeroConstraintEventConstraint","DATE_ONE":"#/components/schemas/analytics-DateOneConstraintEventConstraint","DATE_TWO":"#/components/schemas/analytics-DateTwoConstraintEventConstraint","DATE_FILTER":"#/components/schemas/analytics-DateFilterConstraintEventConstraint"}},"oneOf":[{"$ref":"#/components/schemas/analytics-BoolConstraintEventConstraint"},{"$ref":"#/components/schemas/analytics-StringZeroConstraintEventConstraint"},{"$ref":"#/components/schemas/analytics-StringOneConstraintEventConstraint"},{"$ref":"#/components/schemas/analytics-NumberOneConstraintEventConstraint"},{"$ref":"#/components/schemas/analytics-NumberTwoConstraintEventConstraint"},{"$ref":"#/components/schemas/analytics-StringArrayConstraintEventConstraint"},{"$ref":"#/components/schemas/analytics-StringArrayOneConstraintEventConstraint"},{"$ref":"#/components/schemas/analytics-NullConstraintEventConstraint"},{"$ref":"#/components/schemas/analytics-DateZeroConstraintEventConstraint"},{"$ref":"#/components/schemas/analytics-DateOneConstraintEventConstraint"},{"$ref":"#/components/schemas/analytics-DateTwoConstraintEventConstraint"},{"$ref":"#/components/schemas/analytics-DateFilterConstraintEventConstraint"}]},"analytics-BoolConstraintEventConstraint":{"type":"object","title":"Boolean","properties":{"type":{"x-class-name":"BoolConstraintType","type":"string","enum":["BOOL"],"description":"Tests a boolean value"},"logic":{"x-class-name":"BoolConstraintLogic","type":"string","description":"Boolean logic. Empty (zero-length) strings, `0`, and `\"0\"` are considered false. Null values are false.","enum":["IS_TRUE","IS_FALSE"]}},"required":["type","logic"]},"analytics-StringZeroConstraintEventConstraint":{"type":"object","title":"Check empty","description":"This type is used to check if a string is empty.","properties":{"type":{"title":"String zero","x-class-name":"StringZeroConstraintType","type":"string","description":"This type is used to check if a string is empty.","enum":["STRING_ZERO"]},"logic":{"x-class-name":"StringZeroConstraintLogic","type":"string","description":"Checks if a string is empty (zero-length). Null value is considered empty. A string of whitespace characters is NOT empty.","enum":["IS_EMPTY","IS_NOT_EMPTY"]}},"required":["type","logic"]},"analytics-StringOneConstraintEventConstraint":{"type":"object","title":"String","properties":{"type":{"x-class-name":"StringOneConstraintType","type":"string","enum":["STRING_ONE"],"description":"This type is used to test values that are a single string."},"logic":{"x-class-name":"StringOneConstraintLogic","type":"string","description":"Logic of the test. For example, if the logic is `CONTAIN` and the `value` returns \"foo\", the expression checks if the `attribute` (sibling object to `constraint`) contains the string \"foo\".","enum":["CONTAIN","NOT_CONTAIN","EQUAL","NOT_EQUAL","STARTS_WITH","REGEXP","ENDS_WITH"]},"value":{"$ref":"#/components/schemas/analytics-EventValue"}},"required":["type","logic","value"]},"analytics-NumberOneConstraintEventConstraint":{"type":"object","title":"Number","properties":{"type":{"x-class-name":"NumberOneConstraintType","type":"string","enum":["NUMBER_ONE"],"description":"This type is used to test values that are a single number"},"logic":{"x-class-name":"NumberOneConstraintLogic","type":"string","description":"Logic of the test. For example, if the logic is `EQUAL` and the `value` returns 15, the expression checks if the `attribute` (sibling object to `constraint`) is 15.","enum":["EQUAL","NOT_EQUAL","LESS","MORE","MORE_OR_EQUAL","LESS_OR_EQUAL"]},"value":{"$ref":"#/components/schemas/analytics-EventValue"}},"required":["type","logic","value"]},"analytics-NumberTwoConstraintEventConstraint":{"type":"object","title":"Two numbers","properties":{"type":{"x-class-name":"NumberTwoConstraintType","type":"string","enum":["NUMBER_TWO"],"description":"Checks if the `attribute` is between two numbers, defined in `value1` and `value2`."},"logic":{"description":"Checks if the attribute is between two numbers.","x-class-name":"NumberTwoConstraintLogic","type":"string","enum":["BETWEEN"]},"value1":{"$ref":"#/components/schemas/analytics-EventValue"},"value2":{"$ref":"#/components/schemas/analytics-EventValue"}},"required":["type","logic","value1","value2"]},"analytics-StringArrayConstraintEventConstraint":{"type":"object","title":"Check if string in array","properties":{"type":{"x-class-name":"StringArrayConstraintType","type":"string","enum":["STRING_ARRAY"],"description":"This type is used to check if a string exists in an array defined in `value`"},"logic":{"type":"string","x-class-name":"StringArrayConstraintLogic","description":"You can check if the value from `attribute` is in the array defined in `value`","enum":["IN","NOT_IN"]},"value":{"$ref":"#/components/schemas/analytics-EventValue"}},"required":["type","logic","value"]},"analytics-StringArrayOneConstraintEventConstraint":{"type":"object","title":"Other string array tests","properties":{"type":{"x-class-name":"ArrayStringOneConstraintType","type":"string","enum":["ARRAY_STRING_ONE_DEPRECATED"],"description":"`value` should be an array"},"logic":{"x-class-name":"ArrayStringOneConstraintLogic","type":"string","description":"- CONTAIN/NOT_CONTAIN test if any item in the array contains/doesn't contain the value from `attribute`\n- EQUAL/NOT_EQUAL test if any item in the array is/isn't identical to the value from `attribute`\n- STARTS_WITH/ENDS_WITH test if any item in the array starts/ends with the value from `attribute`\n- REGEXP tests if any item in the array matches the regular expression from `attribute`\n","enum":["CONTAIN","NOT_CONTAIN","EQUAL","NOT_EQUAL","STARTS_WITH","REGEXP","ENDS_WITH"]},"value":{"$ref":"#/components/schemas/analytics-EventValue"}},"required":["type","logic","value"]},"analytics-NullConstraintEventConstraint":{"type":"object","title":"Check if null","properties":{"type":{"x-class-name":"NullConstraintType","description":"This type is used to check if a value is null","type":"string","enum":["NULL"]},"logic":{"x-class-name":"NullConstraintLogic","type":"string","description":"Checks if the attribute is or isn't null. Empty strings, `0`, and negative numbers are NOT null. String `\"null\"` is NOT null.","enum":["IS_NULL","IS_NOT_NULL"]}},"required":["type","logic"]},"analytics-DateZeroConstraintEventConstraint":{"type":"object","title":"Current date","properties":{"type":{"x-class-name":"DateZeroConstraintType","type":"string","enum":["DATE_ZERO"],"description":"Compare a date from `attribute` to the current date"},"logic":{"x-class-name":"LogicZeroConstraintLogic","type":"string","enum":["MATCHES_CURRENT_DAY","MATCHES_CURRENT_HOUR","MATCHES_CURRENT_MONTH","MATCHES_CURRENT_YEAR"],"description":"Logic to apply to the date from `attribute`"}},"required":["type","logic"]},"analytics-DateOneConstraintEventConstraint":{"description":"This type is used to check `attribute` against a date.","type":"object","title":"Date","properties":{"type":{"x-class-name":"DateOneConstraintType","type":"string","description":"This type is used to check `attribute` against a date.","enum":["DATE_ONE"]},"logic":{"x-class-name":"DateOneConstraintLogic","type":"string","description":"Checks how the date from `attribute` compares to the one in `value`. For example, MORE returns true if `attribute` is the later date.","enum":["LESS","MORE","LESS_OR_EQUAL","MORE_OR_EQUAL"]},"value":{"$ref":"#/components/schemas/analytics-EventValue"}},"required":["type","logic","value"]},"analytics-DateTwoConstraintEventConstraint":{"description":"This type is used to check if a date is between two other dates.","type":"object","title":"Date range","properties":{"type":{"x-class-name":"DateTwoConstraintType","type":"string","description":"This type is used to check if a date is between two other dates.","enum":["DATE_TWO"]},"logic":{"x-class-name":"DateTwoConstraintLogic","type":"string","description":"Checks if the date from `attribute` is between the dates from `value1` and `value2`.","enum":["BETWEEN"]},"value1":{"$ref":"#/components/schemas/analytics-EventValue"},"value2":{"$ref":"#/components/schemas/analytics-EventValue"}},"required":["type","logic","value1","value2"]},"analytics-DateFilterConstraintEventConstraint":{"description":"This type is used to check if a date matches a date filter.","type":"object","title":"Date filter","properties":{"type":{"x-class-name":"DateFilterConstraintType","type":"string","description":"This type is used to check if a date matches a date filter.","enum":["DATE_FILTER"]},"logic":{"x-class-name":"DateFilterConstraintLogic","type":"string","enum":["DATE_FILTER"],"description":"Checks if the date from `attribute` matches a date filter."},"value":{"$ref":"#/components/schemas/analytics-DateFilter"}},"required":["type","logic","value"]},"analytics-EventValue":{"description":"The value to test `attribute` against.","discriminator":{"propertyName":"type","mapping":{"CONSTANT":"#/components/schemas/analytics-ConstantValue","EVENT":"#/components/schemas/analytics-EventParameter","CLIENT":"#/components/schemas/analytics-ClientParameter","VARIABLE":"#/components/schemas/analytics-VariableValue"}},"oneOf":[{"$ref":"#/components/schemas/analytics-ConstantValue"},{"$ref":"#/components/schemas/analytics-EventParameter"},{"$ref":"#/components/schemas/analytics-ClientParameter"},{"$ref":"#/components/schemas/analytics-VariableValue"}]},"analytics-ConstantValue":{"type":"object","title":"Static value","description":"Inserts a static value.","properties":{"type":{"x-class-name":"ConstantValueType","type":"string","description":"Inserts a static value.","enum":["CONSTANT"]},"constant":{"$ref":"#/components/schemas/analytics-ConstantValueConstant"}},"required":["type","constant"]},"analytics-ConstantValueConstant":{"description":"The value can't:\n  - be longer than 21000 characters if it's a string\n  - be larger than 65000 items if it's an array. Strings in the array can't be longer than 21000 characters.\n","oneOf":[{"type":"string","maxLength":21000},{"type":"number"},{"type":"boolean"},{"type":"array","maxItems":65000,"items":{"type":"string","maxLength":21000}}]},"analytics-EventParameter":{"type":"object","title":"Event parameter","description":"Inserts an event parameter value","properties":{"type":{"x-class-name":"EventParameterType","description":"Inserts an event parameter value","type":"string","enum":["EVENT"]},"attribute":{"$ref":"#/components/schemas/analytics-EventAttribute"}},"required":["type","attribute"]},"analytics-ClientParameter":{"type":"object","title":"Profile attribute","properties":{"type":{"description":"References a profile attribute, including analyses.","x-class-name":"ClientEventValueType","type":"string","enum":["CLIENT"]},"attribute":{"$ref":"#/components/schemas/analytics-ClientAttribute"}},"required":["type","attribute"]},"analytics-VariableValue":{"type":"object","title":"Dynamic value","properties":{"type":{"x-class-name":"VariableValueType","type":"string","enum":["VARIABLE"],"description":"This type is called a Dynamic Key in the Synerise Portal. It can be used to let other analytic components, such as dashboards, insert a value.\n\nThe variable value can't:\n  - be longer than 21000 characters if it's a string\n  - be larger than 65000 items if it's an array. Strings in the array can't be longer than 21000 characters.\n"},"name":{"type":"string","description":"The name of the dynamic key"},"defaultValue":{"type":"string","maxLength":21000,"description":"The default value to use"}},"required":["type","name","defaultValue"]},"analytics-FilterExpressionContent":{"deprecated":true,"example":{"type":"EMPTY"},"discriminator":{"propertyName":"type","mapping":{"FUNCTION":"#/components/schemas/analytics-FilterExpressionFunction","ATTRIBUTE":"#/components/schemas/analytics-AttributeFilterExpressionContent","FUNNEL":"#/components/schemas/analytics-FunnelFilterExpressionContent","EXPRESSION":"#/components/schemas/analytics-ExpressionFilterExpressionContent","EMPTY":"#/components/schemas/analytics-EmptyFilterExpressionContent"}},"oneOf":[{"$ref":"#/components/schemas/analytics-FilterExpressionFunction"},{"$ref":"#/components/schemas/analytics-AttributeFilterExpressionContent"},{"$ref":"#/components/schemas/analytics-FunnelFilterExpressionContent"},{"$ref":"#/components/schemas/analytics-ExpressionFilterExpressionContent"},{"$ref":"#/components/schemas/analytics-EmptyFilterExpressionContent"}]},"analytics-FilterExpressionFunction":{"type":"object","description":"Logical operators","properties":{"type":{"description":"Logical operators","x-class-name":"FunctionFilterExpressionContentType","type":"string","enum":["FUNCTION"]},"function":{"x-class-name":"FilterFunctionType","type":"string","enum":["AND","OR","BRACKET"]},"arg":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"FilterExpressionContent"},"arg1":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"FilterExpressionContent"},"arg2":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"FilterExpressionContent"},"name":{"type":"string"}},"required":["type","function"]},"analytics-AttributeFilterExpressionContent":{"type":"object","title":"Profile attribute","properties":{"type":{"x-class-name":"AttributeFilterExpressionContentType","type":"string","enum":["ATTRIBUTE"],"description":"Tests a profile attribute against a condition"},"matching":{"$ref":"#/components/schemas/analytics-matching"},"attribute":{"$ref":"#/components/schemas/analytics-Attribute"}}},"analytics-FunnelFilterExpressionContent":{"type":"object","title":"Funnel","properties":{"type":{"description":"Tests against a funnel","x-class-name":"FunnelFilterExpressionContentType","type":"string","enum":["FUNNEL"]},"matching":{"$ref":"#/components/schemas/analytics-matching"},"funnel":{"$ref":"#/components/schemas/analytics-Funnel"}}},"analytics-ExpressionFilterExpressionContent":{"description":"Definition of a profile filter","type":"object","properties":{"type":{"x-class-name":"ExpressionFilterExpressionContentType","type":"string","enum":["EXPRESSION"]},"name":{"type":"string"},"matching":{"$ref":"#/components/schemas/analytics-matching"},"expressions":{"description":"Profile filter details. The expressions are applied according to their position in the array. The logical AND/OR operator must be placed between expressions. An empty array means no filters are applied.","type":"array","items":{"$ref":"#/components/schemas/analytics-FilterBox"}},"expression":{"$ref":"#/components/schemas/analytics-FilterExpressionContent"}},"required":["type","expressions"]},"analytics-EmptyFilterExpressionContent":{"description":"An empty value","type":"object","properties":{"type":{"description":"An empty value","x-class-name":"EmptyFilterExpressionContentType","type":"string","enum":["EMPTY"]},"name":{"type":"string"}},"required":["type"]},"analytics-ClientConstraint":{"discriminator":{"propertyName":"type","mapping":{"BOOL":"#/components/schemas/analytics-BoolConstraintClientConstraint","STRING_ZERO":"#/components/schemas/analytics-StringZeroConstraintClientConstraint","STRING_ONE":"#/components/schemas/analytics-StringOneConstraintClientConstraint","NUMBER_ONE":"#/components/schemas/analytics-NumberOneConstraintClientConstraint","NUMBER_TWO":"#/components/schemas/analytics-NumberTwoConstraintClientConstraint","STRING_ARRAY":"#/components/schemas/analytics-StringArrayConstraintClientConstraint","ARRAY_STRING_ONE_DEPRECATED":"#/components/schemas/analytics-StringArrayOneConstraintClientConstraint","NULL":"#/components/schemas/analytics-NullConstraintClientConstraint","DATE_ZERO":"#/components/schemas/analytics-DateZeroConstraintClientConstraint","DATE_ONE":"#/components/schemas/analytics-DateOneConstraintClientConstraint","DATE_TWO":"#/components/schemas/analytics-DateTwoConstraintClientConstraint","DATE_FILTER":"#/components/schemas/analytics-DateFilterConstraintClientConstraint"}},"oneOf":[{"$ref":"#/components/schemas/analytics-BoolConstraintClientConstraint"},{"$ref":"#/components/schemas/analytics-StringZeroConstraintClientConstraint"},{"$ref":"#/components/schemas/analytics-StringOneConstraintClientConstraint"},{"$ref":"#/components/schemas/analytics-NumberOneConstraintClientConstraint"},{"$ref":"#/components/schemas/analytics-NumberTwoConstraintClientConstraint"},{"$ref":"#/components/schemas/analytics-StringArrayConstraintClientConstraint"},{"$ref":"#/components/schemas/analytics-StringArrayOneConstraintClientConstraint"},{"$ref":"#/components/schemas/analytics-NullConstraintClientConstraint"},{"$ref":"#/components/schemas/analytics-DateZeroConstraintClientConstraint"},{"$ref":"#/components/schemas/analytics-DateOneConstraintClientConstraint"},{"$ref":"#/components/schemas/analytics-DateTwoConstraintClientConstraint"},{"$ref":"#/components/schemas/analytics-DateFilterConstraintClientConstraint"}]},"analytics-BoolConstraintClientConstraint":{"type":"object","title":"Boolean","properties":{"type":{"x-class-name":"BoolClientConstraintType","type":"string","enum":["BOOL"],"description":"Tests a boolean value"},"logic":{"description":"Boolean logic. Empty (zero-length) strings, `0`, and `\"0\"` are considered false. Null values are false.","x-class-name":"BoolClientConstraintLogic","type":"string","enum":["IS_TRUE","IS_FALSE"]}},"required":["type","logic"]},"analytics-StringZeroConstraintClientConstraint":{"type":"object","title":"Check empty","description":"This type is used to check if a string is empty.","properties":{"type":{"x-class-name":"StringZeroClientConstraintType","type":"string","description":"This type is used to check if a string is empty.","enum":["STRING_ZERO"]},"logic":{"description":"Checks if a string is empty (zero-length). Null value is considered empty. A string of whitespace characters is NOT empty.","x-class-name":"StringZeroClientConstraintLogic","type":"string","enum":["IS_EMPTY","IS_NOT_EMPTY"]}},"required":["type","logic"]},"analytics-StringOneConstraintClientConstraint":{"type":"object","title":"String","properties":{"type":{"description":"This type is used to test values that are a single string.","x-class-name":"StringOneClientConstraintType","type":"string","enum":["STRING_ONE"]},"logic":{"description":"Logic of the test. For example, if the logic is `CONTAIN` and the `value` returns \"foo\", the expression checks if the `attribute` (sibling object to `constraint`) contains the string \"foo\".","x-class-name":"StringOneClientConstraintLogic","type":"string","enum":["CONTAIN","NOT_CONTAIN","EQUAL","NOT_EQUAL","STARTS_WITH","REGEXP","ENDS_WITH"]},"value":{"$ref":"#/components/schemas/analytics-ClientValue"}},"required":["type","logic","value"]},"analytics-NumberOneConstraintClientConstraint":{"type":"object","title":"Number","properties":{"type":{"description":"This type is used to test values that are a single number","x-class-name":"NumberOneClientConstraintType","type":"string","enum":["NUMBER_ONE"]},"logic":{"description":"Logic of the test. For example, if the logic is `EQUAL` and the `value` returns 15, the expression checks if the `attribute` (sibling object to `constraint`) is 15.","x-class-name":"NumberOneClientConstraintLogic","type":"string","enum":["EQUAL","NOT_EQUAL","LESS","MORE","MORE_OR_EQUAL","LESS_OR_EQUAL"]},"value":{"$ref":"#/components/schemas/analytics-ClientValue"}},"required":["type","logic","value"]},"analytics-NumberTwoConstraintClientConstraint":{"type":"object","title":"Two numbers","properties":{"type":{"description":"Checks if the `attribute` is between two numbers, defined in `value1` and `value2`.","x-class-name":"NumberTwoClientConstraintType","type":"string","enum":["NUMBER_TWO"]},"logic":{"description":"Checks if the attribute is between two numbers.","x-class-name":"NumberTwoClientConstraintLogic","type":"string","enum":["BETWEEN"]},"value1":{"$ref":"#/components/schemas/analytics-ClientValue"},"value2":{"$ref":"#/components/schemas/analytics-ClientValue"}},"required":["type","logic","value1","value2"]},"analytics-StringArrayConstraintClientConstraint":{"type":"object","title":"Check if string in array","properties":{"type":{"description":"This type is used to check if a string exists in an array defined in `value`","x-class-name":"StringArrayClientConstraintType","type":"string","enum":["STRING_ARRAY"]},"logic":{"description":"You can check if the value from `attribute` is in the array defined in `value`","x-class-name":"StringArrayClientConstraintLogic","type":"string","enum":["IN","NOT_IN"]},"value":{"$ref":"#/components/schemas/analytics-ClientValue"}},"required":["type","logic","value"]},"analytics-StringArrayOneConstraintClientConstraint":{"type":"object","title":"Other string array tests","properties":{"type":{"description":"`value` should be an array","x-class-name":"ArrayStringOneClientConstraintType","type":"string","enum":["ARRAY_STRING_ONE_DEPRECATED"]},"logic":{"description":"- CONTAIN/NOT_CONTAIN test if any item in the array contains/doesn't contain the value from `attribute` - EQUAL/NOT_EQUAL test if any item in the array is/isn't identical to the value from `attribute` - STARTS_WITH/ENDS_WITH test if any item in the array starts/ends with the value from `attribute` - REGEXP tests if any item in the array matches the regular expression from `attribute` ","x-class-name":"ArrayStringOneClientConstraintLogic","type":"string","enum":["CONTAIN","NOT_CONTAIN","EQUAL","NOT_EQUAL","STARTS_WITH","REGEXP","ENDS_WITH"]},"value":{"$ref":"#/components/schemas/analytics-ClientValue"}},"required":["type","logic","value"]},"analytics-NullConstraintClientConstraint":{"type":"object","title":"Check if null","properties":{"type":{"x-class-name":"NullClientConstraintType","type":"string","enum":["NULL"],"description":"This type is used to check if a value is null"},"logic":{"description":"Checks if the attribute is or isn't null. Empty strings, `0`, and negative numbers are NOT null. String `\"null\"` is NOT null.","x-class-name":"NullClientConstraintLogic","type":"string","enum":["IS_NULL","IS_NOT_NULL"]}},"required":["type","logic"]},"analytics-DateZeroConstraintClientConstraint":{"type":"object","title":"Current date","properties":{"type":{"description":"Compare a date from `attribute` to the current date","x-class-name":"DateZeroClientConstraintType","type":"string","enum":["DATE_ZERO"]},"logic":{"description":"Logic to apply to the date from `attribute`","x-class-name":"DateZeroClientConstraintLogic","type":"string","enum":["MATCHES_CURRENT_DAY","MATCHES_CURRENT_HOUR","MATCHES_CURRENT_MONTH","MATCHES_CURRENT_YEAR"]}},"required":["type","logic"]},"analytics-DateOneConstraintClientConstraint":{"description":"This type is used to check `attribute` against a date.","type":"object","title":"Date","properties":{"type":{"x-class-name":"DateOneClientConstraintType","type":"string","description":"This type is used to check `attribute` against a date.","enum":["DATE_ONE"]},"logic":{"description":"Checks how the date from `attribute` compares to the one in `value`. For example, MORE returns true if `attribute` is the later date.","x-class-name":"DateOneClientConstraintLogic","type":"string","enum":["LESS","MORE","LESS_OR_EQUAL","MORE_OR_EQUAL"]},"value":{"$ref":"#/components/schemas/analytics-ClientValue"}},"required":["type","logic","value"]},"analytics-DateTwoConstraintClientConstraint":{"description":"This type is used to check if a date is between two other dates.","type":"object","title":"Date range","properties":{"type":{"x-class-name":"DateTwoClientConstraintType","type":"string","description":"This type is used to check if a date is between two other dates.","enum":["DATE_TWO"]},"logic":{"description":"Checks if the date from `attribute` is between the dates from `value1` and `value2`.","x-class-name":"DateTwoClientConstraintLogic","type":"string","enum":["BETWEEN"]},"value1":{"$ref":"#/components/schemas/analytics-ClientValue"},"value2":{"$ref":"#/components/schemas/analytics-ClientValue"}},"required":["type","logic","value1","value2"]},"analytics-DateFilterConstraintClientConstraint":{"type":"object","title":"Date filter","description":"This type is used to check if a date matches a date filter.","properties":{"type":{"x-class-name":"DateFilterClientConstraintType","type":"string","description":"This type is used to check if a date matches a date filter.","enum":["DATE_FILTER"]},"logic":{"description":"Checks if the date from `attribute` matches a date filter.","x-class-name":"DateFilterClientConstraintLogic","type":"string","enum":["DATE_FILTER"]},"value":{"$ref":"#/components/schemas/analytics-DateFilter"}},"required":["type","logic","value"]},"analytics-ReportPreviewRequest":{"type":"object","properties":{"allowNull":{"$ref":"#/components/schemas/analytics-AllowNull"},"analysis":{"$ref":"#/components/schemas/analytics-ReportAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["analysis"]},"analytics-AllowNull":{"type":"boolean","default":true,"description":"When `true`, null values can be included in the results."},"analytics-ReportAnalysis":{"type":"object","description":"Structure of the report analysis","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"title":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"reportMetrics":{"type":"array","minLength":0,"description":"An array of metrics in the report. The Synerise Web Portal currently only supports reports with one metric.","items":{"$ref":"#/components/schemas/analytics-ReportMetricDefinition"}},"filter":{"$ref":"#/components/schemas/analytics-ExpressionFilter"}},"required":["title","description","reportMetrics","filter"]},"analytics-OverrideQueryRequest":{"type":"object","description":"Override details","properties":{"title":{"$ref":"#/components/schemas/analytics-Name"},"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"},"aggregateDataBy":{"$ref":"#/components/schemas/analytics-Period"},"filter":{"$ref":"#/components/schemas/analytics-ExpressionFilter"},"variables":{"type":"array","description":"A list of variable values to use in this calculation","items":{"$ref":"#/components/schemas/analytics-Variable"}},"overrideNested":{"description":"When `true`, the date filter overrides date filters in analyses nested in the conditions.","type":"boolean","default":false}}},"analytics-ReportCalculationResponse":{"type":"object","properties":{"data":{"type":"array","description":"Calculation results. Each object in this array corresponds to one metric included in the report. The Synerise Web UI currently only supports single-metric reports.","items":{"$ref":"#/components/schemas/analytics-ReportCalculationData"}}},"required":["data"]},"analytics-ReportCalculationData":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-Id"},"columnName":{"type":"string","description":"Column header for this metric. Uses the per-metric `columnName` from the report\ndefinition when set; otherwise falls back to the underlying metric's title.\n"},"values":{"type":"array","description":"\nAn array of results for each grouping.\n\nNote that `values` is a single-item array of arrays.\n\n**Example**: if the dimensions of your report are _firstname_ and _title_ in a page visit event, this may be the result:\n\n```json\n\"values\": [\n  [\n    {\n      \"name\": [\n        \"John\",\n        \"Discounted Product Page\"\n      ],\n      \"value\": 26.0\n    },\n    {\n      \"name\": [\n        \"Steve\",\n        \"Discounted Product Page\"\n      ],\n      \"value\": 12.0\n    },\n    {\n      \"name\": [\n        \"Steve\",\n        \"New product pre-order\"\n      ],\n      \"value\": 117.0\n    }\n  ]\n]\n```\n\nThis means that 26 profiles named John visited a page titled \"Discounted Product Page\". The same page was visited by 12 profiles named Steve. Profiles named Steve visited \"New product pre-order\" page 117 times.\n","items":{"type":"array","items":{"$ref":"#/components/schemas/analytics-GroupingReportMetric"}}},"groups":{"type":"array","description":"A list of parameters that were used for creating dimensions (grouping)","items":{"type":"string"}}},"required":["columnName","groups","id","values"]},"analytics-GroupingReportMetric":{"type":"object","properties":{"name":{"type":"array","description":"Parameter values","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"value":{"type":"number","description":"The number of occurrences of the combination defined in `name`","format":"double"}},"required":["name","value"]},"analytics-ReportMetricGroup":{"description":"The type and source of data shown in the report.\nWhen type is CLIENT, attribute refers to a ProfileAttribute.\nWhen type is EVENT, attribute refers to an EventAttribute.\n","discriminator":{"propertyName":"type","mapping":{"CLIENT":"#/components/schemas/analytics-ClientReportMetricGroup","EVENT":"#/components/schemas/analytics-EventReportMetricGroup"}},"oneOf":[{"$ref":"#/components/schemas/analytics-ClientReportMetricGroup"},{"$ref":"#/components/schemas/analytics-EventReportMetricGroup"}]},"analytics-ClientReportMetricGroup":{"type":"object","title":"ClientReportMetricGroup","required":["type","attribute"],"properties":{"title":{"type":"string","description":"The name of the dimension"},"format":{"$ref":"#/components/schemas/analytics-MetricFormat"},"type":{"title":"ClientReportMetricGroupType","x-class-name":"ClientReportMetricGroupType","type":"string","enum":["CLIENT"],"description":"Defines the source type of the data shown in the report."},"attribute":{"$ref":"#/components/schemas/analytics-ClientAttribute"}}},"analytics-EventReportMetricGroup":{"type":"object","title":"EventReportMetricGroup","required":["type","attribute"],"properties":{"title":{"type":"string","description":"The name of the dimension"},"format":{"$ref":"#/components/schemas/analytics-MetricFormat"},"type":{"title":"EventReportMetricGroupType","x-class-name":"EventReportMetricGroupType","type":"string","enum":["EVENT"],"description":"Defines the source type of the data shown in the report."},"attribute":{"$ref":"#/components/schemas/analytics-EventAttribute"}}},"analytics-DynamicVariablesRequest":{"type":"object","properties":{"variables":{"$ref":"#/components/schemas/analytics-Variables"}},"required":["variables"]},"analytics-SegmentationCalculationResponse":{"type":"object","properties":{"calculationResults":{"type":"array","description":"A list of segments","items":{"$ref":"#/components/schemas/analytics-CalculationResult"}},"totalContacts":{"type":"integer","description":"The total number of profiles in the database"},"excludedContacts":{"type":"integer","description":"The number of profiles which did not match the conditions of any segment"},"metadata":{"$ref":"#/components/schemas/analytics-Metadata"}},"required":["calculationResults"]},"analytics-CalculationResult":{"type":"object","properties":{"name":{"type":"string","description":"Segment name"},"result":{"type":"integer","format":"int64","description":"\nThe number of profiles which matched the conditions of this segment.\n\n**IMPORTANT:** If a profile matches a segment's conditions, that profile is not included in any further calculations, even if it would normally match the conditions of the segments that follow.\n"}},"required":["name","result"]},"analytics-Metadata":{"type":"object","description":"Raw data of the calculation","properties":{"source":{"type":"array","description":"An array of results. Each number is the number of profiles which matched a segment, according to the segments' order in the request. The last number is the the number of profiles which don't match any of the segment.","items":{"type":"integer"}}}},"analytics-DirectoryRenameRequest":{"type":"object","properties":{"newName":{"type":"string","description":"New name for the directory"}},"required":["newName"]},"analytics-ObjectType":{"type":"string","enum":["EXPRESSION","AGGREGATE","SEGMENTATION","METRIC","FUNNEL","SANKEY","TREND","HISTOGRAM","REPORT","ANALYTICS_QUERY","ANALYTICS_DASHBOARD"]},"analytics-Directory":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-Id"},"businessProfileId":{"$ref":"#/components/schemas/analytics-BusinessProfileId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"objectType":{"$ref":"#/components/schemas/analytics-ObjectType"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/analytics-UpdatedAt"},"isDefault":{"type":"boolean","description":"`true` if this is the default directory"}},"required":["createdAt","id","isDefault","name","objectType","updatedAt"]},"analytics-DirectoryCreateRequest":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/analytics-Name"},"analyticType":{"$ref":"#/components/schemas/analytics-ObjectType"}},"required":["analyticType","name"]},"analytics-SegmentationPreviewRequest":{"type":"object","properties":{"analysis":{"$ref":"#/components/schemas/analytics-SegmentationAnalysis"},"allowNull":{"$ref":"#/components/schemas/analytics-AllowNull"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["analysis"]},"analytics-SegmentationAnalysis":{"type":"object","description":"Definition of the segmentation.","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"title":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"segments":{"type":"array","description":"An array of segments in the segmentation. By default, a profile is only included in the first matching segment, even if it meets the filters of the following segments. To change this, use the `unique` parameter.","minItems":1,"items":{"$ref":"#/components/schemas/analytics-OneSegment"}},"unique":{"$ref":"#/components/schemas/analytics-SegmentationUnique"}},"required":["title","segments"]},"analytics-SegmentationView":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"businessProfileId":{"$ref":"#/components/schemas/analytics-BusinessProfileId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"author":{"$ref":"#/components/schemas/analytics-AuthorId"},"modifier":{"$ref":"#/components/schemas/analytics-modifierId"},"updatedAt":{"$ref":"#/components/schemas/analytics-UpdatedAt"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"usedAt":{"$ref":"#/components/schemas/analytics-UsedAt"},"analysis":{"$ref":"#/components/schemas/analytics-SegmentationAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"},"isPredefinedAnalytic":{"$ref":"#/components/schemas/analytics-IsPredefinedAnalytic"},"isVisibleForClientProfile":{"$ref":"#/components/schemas/analytics-IsVisibleForClientProfile"},"isDynamicAnalytic":{"$ref":"#/components/schemas/analytics-IsDynamicAnalytic"},"isDeleted":{"$ref":"#/components/schemas/analytics-IsDeleted"},"namespace":{"$ref":"#/components/schemas/analytics-Namespace"},"directoryId":{"$ref":"#/components/schemas/analytics-DirectoryId"},"sharing":{"$ref":"#/components/schemas/analytics-SharingData"}},"required":["id","businessProfileId","name","description","author","modifier","updatedAt","createdAt","usedAt","analysis","isPredefinedAnalytic","isVisibleForClientProfile","isDynamicAnalytic","isDeleted","namespace","directoryId","sharing"]},"analytics-SegmentationUnique":{"type":"boolean","description":"When `true`, a profile is only included in the first segment that it matches; segments that follow do not include this profile in their results even if their conditions are met. The segments are checked according to their order in the request.","default":true},"analytics-OneSegment":{"type":"object","x-class-name":"Segment","properties":{"title":{"type":"string","description":"Name of the segment. If you want to use the segment name (for example, by creating an expression that returns it for use in a filter), the name shouldn't include any whitespace or special characters."},"description":{"type":"string","description":"Description of the segment"},"filter":{"$ref":"#/components/schemas/analytics-ExpressionFilter"}},"required":["title","description","filter"]},"analytics-DirectoryChangeRequest":{"type":"object","properties":{"newDir":{"description":"ID of the new directory","type":"string","format":"uuid"},"analyticType":{"$ref":"#/components/schemas/analytics-ObjectType"}},"required":["analyticType","newDir"]},"analytics-MetricCalculationResponse":{"type":"object","properties":{"result":{"description":"The numerical result. In metrics that return true/false values, `1` is \"true\" and `0` is \"false\".","type":"number","format":"double"},"metricData":{"$ref":"#/components/schemas/analytics-MetricCalculationData"}},"required":["metricData","result"]},"analytics-MetricCalculationData":{"type":"object","description":"Basic information about the metric","properties":{"name":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"format":{"$ref":"#/components/schemas/analytics-MetricFormat"},"initialDateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"}},"required":["description","format","initialDateFilter","name"]},"analytics-IdentifierValue":{"type":"string","description":"Value of the selected identifier. Note that IDs must also be sent as strings."},"analytics-BatchCalculationResult":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"name":{"$ref":"#/components/schemas/analytics-AnalyticName"},"result":{"description":"Result of the analysis","oneOf":[{"$ref":"#/components/schemas/analytics-SuccessResult"},{"$ref":"#/components/schemas/analytics-FailureResult"}]}},"required":["id","name","result"]},"analytics-SuccessResult":{"type":"object","example":{"success":true,"value":"123"},"properties":{"success":{"type":"boolean","description":"Always `true`"},"value":{"type":"string","description":"Calculation result"}},"required":["success","value"],"title":"Successful calculation"},"analytics-FailureResult":{"type":"object","example":{"success":false,"errorMessage":"Analytic or one of nested analytics does not exist","httpStatus":400,"errorCode":"ANA-002"},"properties":{"success":{"type":"boolean","description":"Always `false`"},"errorMessage":{"type":"string","description":"Details of the error which caused the calculation failure"},"httpStatus":{"type":"integer","description":"HTTP status of the error which caused the calculation failure"},"errorCode":{"type":"string","description":"Code of the error which caused the calculation failure"}},"required":["errorMessage","success"],"title":"Failed calculation"},"analytics-ExpressionTypedCalculationResponse":{"type":"object","properties":{"expressionId":{"type":"string","format":"uuid","description":"Random ID for this expression preview"},"clientId":{"type":"integer","format":"int64","description":"ID of the profile"},"title":{"type":"string","description":"Expression title"},"result":{"description":"Result of the expression","anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"},{"type":"object"},{"type":"array","items":{}}]},"variables":{"$ref":"#/components/schemas/analytics-Variables"}},"required":["clientId","expressionId","result","title","variables"]},"analytics-ExpressionListItem":{"allOf":[{"type":"object","properties":{"action":{"$ref":"#/components/schemas/analytics-Action"},"type":{"$ref":"#/components/schemas/analytics-ExpressionType"}},"required":["action","type"]},{"$ref":"#/components/schemas/analytics-ListAnalyticsItemCommon"}]},"analytics-ExpressionView":{"type":"object","x-interface-name-ts":"ExpressionView","properties":{"analysis":{"$ref":"#/components/schemas/analytics-ExpressionEntity"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"},"analyticVersion":{"$ref":"#/components/schemas/analytics-AnalyticVersion"},"isVisibleForClientProfile":{"$ref":"#/components/schemas/analytics-IsVisibleForClientProfile"},"id":{"$ref":"#/components/schemas/analytics-Id"},"businessProfileId":{"$ref":"#/components/schemas/analytics-BusinessProfileId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"author":{"$ref":"#/components/schemas/analytics-AuthorId"},"modifier":{"$ref":"#/components/schemas/analytics-modifierId"},"updatedAt":{"$ref":"#/components/schemas/analytics-UpdatedAt"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"usedAt":{"$ref":"#/components/schemas/analytics-UsedAt"},"isPredefinedAnalytic":{"$ref":"#/components/schemas/analytics-IsPredefinedAnalytic"},"isDynamicAnalytic":{"$ref":"#/components/schemas/analytics-IsDynamicAnalytic"},"isDeleted":{"$ref":"#/components/schemas/analytics-IsDeleted"},"namespace":{"$ref":"#/components/schemas/analytics-Namespace"},"directoryId":{"$ref":"#/components/schemas/analytics-DirectoryId"}},"required":["analysis","analyticVersion","author","businessProfileId","createdAt","description","directoryId","id","isDeleted","isDynamicAnalytic","isPredefinedAnalytic","isVisibleForClientProfile","modifier","name","namespace","updatedAt","usedAt"]},"analytics-ExpressionType":{"type":"string","x-class-name":"ExpressionType","enum":["EVENT","CLIENT"]},"analytics-ExpressionEntity":{"description":"Details of the analysis","discriminator":{"propertyName":"type","mapping":{"EVENT":"#/components/schemas/analytics-EventExpressionEntity","CLIENT":"#/components/schemas/analytics-ClientExpressionEntity"}},"oneOf":[{"$ref":"#/components/schemas/analytics-EventExpressionEntity"},{"$ref":"#/components/schemas/analytics-ClientExpressionEntity"}]},"analytics-EventExpressionEntity":{"type":"object","title":"Event expression","properties":{"type":{"type":"string","enum":["EVENT"],"description":"This type of expression can be used to analyze event attributes, including the attributes of the profile that owns the event."},"action":{"$ref":"#/components/schemas/analytics-Action"},"name":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"expression":{"$ref":"#/components/schemas/analytics-EventExpressionContentEntity"}},"required":["expression","name","type","description"]},"analytics-EventExpressionContentEntity":{"description":"Structure of the expression. This is a recursive schema - functions can contain more functions.","example":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}},"discriminator":{"propertyName":"type","mapping":{"VALUE":"#/components/schemas/analytics-EventExpressionContentEntityValue","FUNCTION":"#/components/schemas/analytics-EventExpressionContentEntityFunction"}},"oneOf":[{"$ref":"#/components/schemas/analytics-EventExpressionContentEntityValue"},{"$ref":"#/components/schemas/analytics-EventExpressionContentEntityFunction"}]},"analytics-EventExpressionContentEntityValue":{"type":"object","title":"Value","description":"A value reference in the expression - can reference an event parameter, profile parameter, constant, or variable.","properties":{"type":{"description":"A value reference in the expression - can reference an event parameter, profile parameter, constant, or variable.","x-class-name":"EventExpressionContentEntityValueType","type":"string","enum":["VALUE"]},"title":{"type":"string","description":"Title of the value"},"value":{"$ref":"#/components/schemas/analytics-EventValue"}},"required":["title","type","value"]},"analytics-EventExpressionContentEntityFunction":{"type":"object","title":"Function","description":"A function in the expression. Arguments are optional depending on function arity:\n- `arg` - argument for single-argument (unary) functions\n- `arg1` - first argument for multi-argument functions (binary, ternary)\n- `arg2` - second argument for multi-argument functions (binary, ternary)\n- `arg3` - third argument for ternary functions (IF)\n","example":{"type":"FUNCTION","function":"LN","arg":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}},"properties":{"type":{"x-class-name":"EventExpressionContentEntityFunctionType","type":"string","enum":["FUNCTION"]},"function":{"x-class-name":"EventExpressionFunctionType","type":"string","description":"The function to apply. The number of required arguments depends on the function arity:\n- Nullary (0 args): NOW\n- Unary (1 arg via `arg`): LN, ABS, CEIL, EXP, FLOOR, ROUND, TO_NUMBER, TO_STRING, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_YEAR, HOUR, MONTH, WEEK, YEAR, TO_MONEY, TO_TIMESTAMP, TO_DATE, BRACKET\n- Binary (2 args via `arg1`, `arg2`): DIVIDE, IF_NULL, MAX, MIN, MOD, MULTIPLY, SUB, SUM, GREATER, GREATER_OR_EQUALS, LESS, LESS_OR_EQUAL, NOT_EQUAL, EQUALS, ADD_YEARS, CONCAT, REGEXP\n- Ternary (3 args via `arg1`, `arg2`, `arg3`): IF (arg1 - condition; arg2 - return if true; arg3 - return if false)\n","enum":["NOW","LN","ABS","CEIL","EXP","FLOOR","ROUND","TO_NUMBER","TO_STRING","DAY_OF_MONTH","DAY_OF_WEEK","DAY_OF_YEAR","HOUR","MONTH","WEEK","YEAR","TO_MONEY","TO_TIMESTAMP","TO_DATE","BRACKET","DIVIDE","IF_NULL","MAX","MIN","MOD","MULTIPLY","SUB","SUM","GREATER","GREATER_OR_EQUALS","LESS","LESS_OR_EQUAL","NOT_EQUAL","EQUALS","ADD_YEARS","CONCAT","REGEXP","IF"]},"arg":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"EventExpressionContentEntity"},"arg1":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"EventExpressionContentEntity"},"arg2":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"EventExpressionContentEntity"},"arg3":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"EventExpressionContentEntity"}},"required":["type","function"]},"analytics-ClientExpressionEntity":{"type":"object","title":"Profile expression","description":"Details of a profile expression. In the Synerise Portal, they are called _attribute_ expressions.","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"type":{"type":"string","enum":["CLIENT"],"description":"This type of expression can be used to analyze profile attributes."},"name":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"expression":{"$ref":"#/components/schemas/analytics-ClientExpressionContentEntity"}},"required":["type","name","expression"]},"analytics-ClientExpressionContentEntity":{"description":"Structure of the expression. This is a recursive schema - functions can contain more functions.","example":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}},"discriminator":{"propertyName":"type","mapping":{"VALUE":"#/components/schemas/analytics-ClientExpressionContentEntityValue","FUNCTION":"#/components/schemas/analytics-ClientExpressionContentEntityFunction"}},"oneOf":[{"$ref":"#/components/schemas/analytics-ClientExpressionContentEntityValue"},{"$ref":"#/components/schemas/analytics-ClientExpressionContentEntityFunction"}]},"analytics-ClientExpressionContentEntityValue":{"type":"object","title":"Value","description":"A value reference in the expression - can reference a profile parameter, constant, or variable.","properties":{"type":{"x-class-name":"ClientExpressionContentEntityValueType","type":"string","description":"A value reference in the expression - can reference a profile parameter, constant, or variable.","enum":["VALUE"]},"title":{"type":"string","description":"Title of the value"},"value":{"oneOf":[{"$ref":"#/components/schemas/analytics-ClientParameter"},{"$ref":"#/components/schemas/analytics-ConstantValue"},{"$ref":"#/components/schemas/analytics-VariableValue"}]}},"required":["title","type","value"]},"analytics-ClientExpressionContentEntityFunction":{"type":"object","title":"Function","description":"A function in the expression. Arguments are optional depending on function arity:\n- `arg` - argument for single-argument (unary) functions\n- `arg1` - first argument for multi-argument functions (binary, ternary)\n- `arg2` - second argument for multi-argument functions (binary, ternary)\n- `arg3` - third argument for ternary functions (IF)\n","example":{"type":"FUNCTION","function":"LN","arg":{"type":"VALUE","title":"title","value":{"type":"CONSTANT","constant":10}}},"properties":{"type":{"x-class-name":"ClientExpressionContentEntityFunctionType","type":"string","enum":["FUNCTION"]},"function":{"x-class-name":"ClientExpressionFunctionType","type":"string","description":"The function to apply. The number of required arguments depends on the function arity:\n- Nullary (0 args): NOW\n- Unary (1 arg via `arg`): LN, ABS, CEIL, EXP, FLOOR, ROUND, TO_NUMBER, TO_STRING, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_YEAR, HOUR, MONTH, WEEK, YEAR, TO_MONEY, TO_TIMESTAMP, TO_DATE, BRACKET\n- Binary (2 args via `arg1`, `arg2`): DIVIDE, IF_NULL, MAX, MIN, MOD, MULTIPLY, SUB, SUM, GREATER, GREATER_OR_EQUALS, LESS, LESS_OR_EQUAL, NOT_EQUAL, EQUALS, ADD_YEARS, CONCAT, REGEXP\n- Ternary (3 args via `arg1`, `arg2`, `arg3`): IF (arg1 - condition; arg2 - return if true; arg3 - return if false)\n","enum":["NOW","LN","ABS","CEIL","EXP","FLOOR","ROUND","TO_NUMBER","TO_STRING","DAY_OF_MONTH","DAY_OF_WEEK","DAY_OF_YEAR","HOUR","MONTH","WEEK","YEAR","TO_MONEY","TO_TIMESTAMP","TO_DATE","BRACKET","DIVIDE","IF_NULL","MAX","MIN","MOD","MULTIPLY","SUB","SUM","GREATER","GREATER_OR_EQUALS","LESS","LESS_OR_EQUAL","NOT_EQUAL","EQUALS","ADD_YEARS","CONCAT","REGEXP","IF"]},"arg":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"ClientExpressionContentEntity"},"arg1":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"ClientExpressionContentEntity"},"arg2":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"ClientExpressionContentEntity"},"arg3":{"type":"object","description":"An argument of the function. This is a recursive schema; an argument can be a function which contains more functions in its arguments.","x-codegen-schema":"ClientExpressionContentEntity"}},"required":["type","function"]},"analytics-Namespace":{"type":"string","description":"Name of the namespace in the database where this resource is saved. This is **different than the namespace in the path parameters** of the request."},"analytics-IsDeleted":{"type":"boolean","description":"`true` if the resource was deleted"},"analytics-IsPredefinedAnalytic":{"type":"boolean","description":"`true` if the analysis was automatically created with the workspace"},"analytics-ExpressionPreviewRequestWithClient":{"type":"object","properties":{"identifierValue":{"$ref":"#/components/schemas/analytics-IdentifierValue"},"expression":{"$ref":"#/components/schemas/analytics-ClientExpressionEntity"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["expression","identifierValue"]},"analytics-HistogramAnalysis":{"type":"object","description":"Details of a histogram","properties":{"title":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"histogram":{"$ref":"#/components/schemas/analytics-HistogramDefinition"}},"required":["description","histogram","title"]},"analytics-HistogramView":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"businessProfileId":{"$ref":"#/components/schemas/analytics-BusinessProfileId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"author":{"$ref":"#/components/schemas/analytics-AuthorId"},"modifier":{"$ref":"#/components/schemas/analytics-modifierId"},"updatedAt":{"$ref":"#/components/schemas/analytics-UpdatedAt"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"usedAt":{"$ref":"#/components/schemas/analytics-UsedAt"},"analysis":{"$ref":"#/components/schemas/analytics-HistogramAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"},"isPredefinedAnalytic":{"$ref":"#/components/schemas/analytics-IsPredefinedAnalytic"},"isDynamicAnalytic":{"$ref":"#/components/schemas/analytics-IsDynamicAnalytic"},"isDeleted":{"$ref":"#/components/schemas/analytics-IsDeleted"},"namespace":{"$ref":"#/components/schemas/analytics-Namespace"},"directoryId":{"$ref":"#/components/schemas/analytics-DirectoryId"}},"required":["id","businessProfileId","name","author","modifier","updatedAt","createdAt","usedAt","analysis","isPredefinedAnalytic","isDynamicAnalytic","isDeleted","namespace","directoryId"]},"analytics-HistogramMetric":{"type":"object","properties":{"metricId":{"$ref":"#/components/schemas/analytics-AnalyticId"},"chartType":{"$ref":"#/components/schemas/analytics-ChartType"},"title":{"type":"string","description":"Name of the metric on the histogram (can be different than the name saved in the metric's details)"}},"required":["chartType","metricId"]},"analytics-ChartType":{"type":"string","description":"Currently unused. For compatibility, set to COLUMN","enum":["COLUMN","LINE"]},"analytics-MetricProjectionResponse":{"type":"object","properties":{"hashId":{"$ref":"#/components/schemas/analytics-Id"},"name":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"action":{"$ref":"#/components/schemas/analytics-Action"},"eventName":{"$ref":"#/components/schemas/analytics-ActionName"},"actionId":{"$ref":"#/components/schemas/analytics-ActionId"},"isNumber":{"$ref":"#/components/schemas/analytics-IsNumber"},"isDynamicAnalytic":{"$ref":"#/components/schemas/analytics-IsDynamicAnalytic"},"variables":{"$ref":"#/components/schemas/analytics-Variables"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"isMetricHistogram":{"$ref":"#/components/schemas/analytics-IsMetricHistogram"}},"required":["createdAt","isNumber","name"]},"analytics-HistogramCalculationResponse":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/analytics-HistogramMetadata"},"items":{"type":"array","description":"The numerical results, divided into time units defined in the `period` object. Each object in the array holds the results of all metrics for a particular aggregation period.","items":{"$ref":"#/components/schemas/analytics-HistogramItems"}},"legends":{"type":"array","description":"Information about included metrics and their display mode","items":{"$ref":"#/components/schemas/analytics-HistogramLegends"}}},"required":["items","legends","metadata"]},"analytics-HistogramItems":{"type":"object","properties":{"aggregateTimeDescription":{"type":"string","description":"Timestamp of the result","format":"date-time"},"values":{"type":"array","description":"An array of the results of the included metrics","items":{"$ref":"#/components/schemas/analytics-HistogramItemsValues"}}},"required":["aggregateTimeDescription","values"]},"analytics-HistogramItemsValues":{"type":"object","properties":{"metricId":{"type":"string","description":"UUID of a metric","format":"uuid"},"value":{"type":"number","format":"double","description":"Result of a metric"}},"required":["metricId","value"]},"analytics-HistogramLegends":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"UUID of a metric"},"title":{"type":"string","description":"Title of a metric"},"chartType":{"$ref":"#/components/schemas/analytics-ChartType"}},"required":["chartType","id","title"]},"analytics-HistogramMetadata":{"type":"object","description":"Time constraints and aggregation details","properties":{"period":{"$ref":"#/components/schemas/analytics-Period"},"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"}},"required":["aggregateDataBy","dateFilter"]},"analytics-TrendAnalysis":{"type":"object","description":"Details of a trend analysis","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"title":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"filter":{"$ref":"#/components/schemas/analytics-ExpressionFilter"},"trend":{"$ref":"#/components/schemas/analytics-Trend"}},"required":["filter","title","trend"]},"analytics-Trend":{"type":"object","properties":{"aggregateDataBy":{"$ref":"#/components/schemas/analytics-Period"},"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"},"trendDefinitions":{"type":"array","description":"An array of trends included in the trend analysis","items":{"$ref":"#/components/schemas/analytics-TrendDefinition"}}}},"analytics-TrendDefinition":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"title":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"action":{"$ref":"#/components/schemas/analytics-Action"},"expressions":{"$ref":"#/components/schemas/analytics-EventExpressions"},"tabIndex":{"type":"integer","format":"int32","description":"Currently unused. For compatibility, set to 0.","default":0},"aggregationType":{"type":"string","default":"EVENT","description":"Currently unused. For compatibility, set to EVENT","enum":["EVENT","CLIENT"]},"chartType":{"$ref":"#/components/schemas/analytics-ChartType"}},"required":["title","chartType","action","expressions","tabIndex","aggregationType"]},"analytics-TerrariumVariable":{"type":"object","properties":{"name":{"type":"string"},"value":{}},"required":["name","value"]},"analytics-HistogramLegacyPreviewRequest":{"type":"object","properties":{"analysis":{"$ref":"#/components/schemas/analytics-HistogramAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}}},"analytics-AnalyticsFirstMatchRequest":{"type":"object","properties":{"identifierValue":{"$ref":"#/components/schemas/analytics-IdentifierValue"},"segmentations":{"type":"array","description":"An array of objects. The objects are checked in the order from the array, and when a segmentation from an object matches the profile, the value of that object's `id` is returned in the response. Note that each object can check multiple segmentations - in such cases, only one of those segmentation needs to match for the object to be considered a match.","items":{"$ref":"#/components/schemas/analytics-FirstMatchingSegmentation"}}},"required":["identifierValue","segmentations"]},"analytics-FirstMatchingSegmentation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"This ID will be returned in the response to identify which object contains the first matching segmentation."},"segmentationIds":{"type":"array","description":"An array of segmentations to check in this entry","items":{"type":"string","format":"uuid"},"minItems":0},"query":{"type":"object","description":"A segmentation query to check","properties":{"analysis":{"$ref":"#/components/schemas/analytics-SegmentationAnalysis"}}}},"required":["id","segmentationIds"]},"analytics-SegmentationBasic":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"author":{"$ref":"#/components/schemas/analytics-Author"},"updatedAt":{"$ref":"#/components/schemas/analytics-UpdatedAt"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"usedAt":{"$ref":"#/components/schemas/analytics-UsedAt"},"segments":{"description":"The number of segments in the segmentation","type":"integer"},"starred":{"description":"`true` if the segmentation is added to starred items","type":"boolean"},"isPredefinedAnalytic":{"$ref":"#/components/schemas/analytics-IsPredefinedAnalytic"},"children":{"description":"Analyses nested in the segmentation","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/analytics-SegmentationChild"}},"directoryId":{"$ref":"#/components/schemas/analytics-DirectoryId"},"isDynamicAnalytic":{"$ref":"#/components/schemas/analytics-IsDynamicAnalytic"},"variables":{"$ref":"#/components/schemas/analytics-Variables"},"sharing":{"$ref":"#/components/schemas/analytics-SharingData"}},"required":["author","children","createdAt","directoryId","id","isDynamicAnalytic","isPredefinedAnalytic","name","segments","sharing","starred","updatedAt","usedAt","variables"]},"analytics-SegmentationChild":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-Id"},"segmentationId":{"$ref":"#/components/schemas/analytics-Id"},"name":{"$ref":"#/components/schemas/analytics-Name"}},"required":["name","segmentationId"]},"analytics-SharingData":{"type":"object","properties":{"process":{"$ref":"#/components/schemas/analytics-SharingProcessSimple"},"attribute":{"$ref":"#/components/schemas/analytics-AttributeData"}},"required":["process","attribute"]},"analytics-SharingProcessSimple":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-SharingProcessId"},"name":{"$ref":"#/components/schemas/analytics-SharingProcessName"},"shareType":{"$ref":"#/components/schemas/analytics-SharingProcessShareType"},"automationId":{"$ref":"#/components/schemas/analytics-SharingProcessAutomationId"},"status":{"$ref":"#/components/schemas/analytics-SharingProcessStatus"}},"required":["id","name","shareType","status"]},"analytics-AttributeData":{"type":"object","properties":{"name":{"description":"Name of the attribute","type":"string"},"id":{"description":"Unique ID of the attribute","type":"integer","format":"int64"}},"required":["name","id"]},"analytics-SegmentationRequest":{"type":"object","properties":{"analysis":{"$ref":"#/components/schemas/analytics-SegmentationAnalysis"},"isVisibleForClientProfile":{"$ref":"#/components/schemas/analytics-IsVisibleForClientProfile"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["analysis","isVisibleForClientProfile"]},"analytics-CalculatedAnalytic":{"type":"object","properties":{"analyticId":{"$ref":"#/components/schemas/analytics-AnalyticId"},"name":{"$ref":"#/components/schemas/analytics-AnalyticName"},"result":{"$ref":"#/components/schemas/analytics-CalculationResult"}},"required":["analyticId","name","result"]},"analytics-AggregateHistogramRequest":{"type":"object","properties":{"variables":{"type":"array","description":"A list of variable values to use in this calculation","items":{"$ref":"#/components/schemas/analytics-Variable"}},"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"},"aggregateDataBy":{"$ref":"#/components/schemas/analytics-Period"}},"required":["aggregateDataBy","dateFilter","variables"]},"analytics-AggregateHistogramCalculationResponse":{"type":"object","properties":{"items":{"type":"array","description":"The numerical results, divided into time units according to `aggregateDataBy`. Each object in the array holds the results for a particular aggregation period.","items":{"$ref":"#/components/schemas/analytics-HistogramTimeDistributionItem"}},"metadata":{"$ref":"#/components/schemas/analytics-HistogramMetadata"}},"required":["items","metadata"]},"analytics-HistogramTimeDistributionItem":{"type":"object","properties":{"aggregateTimeDescription":{"type":"string","description":"Time when this interval ended"},"values":{"type":"array","description":"The result of the aggregate","items":{"$ref":"#/components/schemas/analytics-HistogramAggregateTimeDistributedChartItem"}}},"required":["aggregateTimeDescription","values"]},"analytics-HistogramAggregateTimeDistributedChartItem":{"type":"object","properties":{"uuid":{"description":"Identifier of the value","type":"string","format":"uuid"},"value":{"description":"The value","type":"number","format":"double"}},"required":["metricId","value"]},"analytics-AggregatePreviewRequest":{"properties":{"identifierValue":{"$ref":"#/components/schemas/analytics-IdentifierValue"},"aggregate":{"$ref":"#/components/schemas/analytics-ClientAggregate"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["aggregate","identifierValue"]},"analytics-ClientAggregate":{"type":"object","description":"The definition of an aggregate","properties":{"aggregateType":{"x-class-name":"ClientAggregateAggregateType","type":"string","description":"An aggregate with a profile context","enum":["AGGREGATE"]},"id":{"$ref":"#/components/schemas/analytics-AnalysisOldId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"uuid":{"$ref":"#/components/schemas/analytics-AnalyticId"},"type":{"$ref":"#/components/schemas/analytics-AggregateExpressionType"},"level":{"$ref":"#/components/schemas/analytics-QuantileLevel"},"size":{"$ref":"#/components/schemas/analytics-AggregateSize"},"unique":{"$ref":"#/components/schemas/analytics-AggregateUnique"},"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"},"expressions":{"$ref":"#/components/schemas/analytics-EventExpressions"},"attribute":{"$ref":"#/components/schemas/analytics-EventAttribute"},"action":{"$ref":"#/components/schemas/analytics-Action"}},"required":["aggregateType","id","name","description","uuid","type","level","size","unique","dateFilter","expressions","attribute","action"]},"analytics-RunningAggregate":{"type":"object","properties":{"aggregateType":{"description":"An aggregate with an event context","x-class-name":"RunningAggregateAggregateType","type":"string","enum":["RUNNING_AGGREGATE"]},"id":{"$ref":"#/components/schemas/analytics-AnalysisOldId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"uuid":{"$ref":"#/components/schemas/analytics-AnalyticId"},"type":{"$ref":"#/components/schemas/analytics-AggregateExpressionType"},"level":{"$ref":"#/components/schemas/analytics-QuantileLevel"},"size":{"$ref":"#/components/schemas/analytics-AggregateSize"},"unique":{"$ref":"#/components/schemas/analytics-AggregateUnique"},"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"},"expressions":{"$ref":"#/components/schemas/analytics-EventExpressions"},"attribute":{"$ref":"#/components/schemas/analytics-EventAttribute"},"action":{"$ref":"#/components/schemas/analytics-Action"},"excludeCurrent":{"$ref":"#/components/schemas/analytics-ExcludeCurrent"},"timeWindow":{"$ref":"#/components/schemas/analytics-Period"}},"required":["aggregateType","id","name","description","uuid","type","level","size","unique","dateFilter","expressions","attribute","action","excludeCurrent"]},"analytics-AggregateTypedCalculationResponse":{"type":"object","properties":{"aggregateId":{"$ref":"#/components/schemas/analytics-AnalyticId"},"aggregateUuid":{"$ref":"#/components/schemas/analytics-AnalyticId"},"clientId":{"$ref":"#/components/schemas/analytics-ClientId"},"title":{"$ref":"#/components/schemas/analytics-AnalyticName"},"result":{"description":"The result of the calculation","anyOf":[{"type":"string"},{"type":"number"},{"type":"object"},{"type":"boolean"},{"type":"array","items":{}}]},"variables":{"$ref":"#/components/schemas/analytics-Variables"},"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"},"analyticVersion":{"$ref":"#/components/schemas/analytics-AnalyticVersion"}},"required":["aggregateId","aggregateUuid","clientId","title","result","variables","dateFilter","analyticVersion"]},"analytics-AggregateResult":{"type":"object","properties":{"clientId":{"type":"integer","format":"int32","description":"ID of the profile"},"aggregateId":{"type":"string","format":"uuid","description":"UUID of the aggregate"},"name":{"type":"string","description":"Name of the aggregate"},"result":{"description":"The result of the calculation","anyOf":[{"type":"string"},{"type":"number"},{"type":"object"},{"type":"boolean"},{"type":"array","items":{}}]}},"required":["aggregateId","clientId","name","result"]},"analytics-AggregateType":{"type":"string","enum":["AGGREGATE","RUNNING_AGGREGATE"]},"analytics-AggregateRequest":{"type":"object","description":"Definition of the aggregate","properties":{"analysis":{"$ref":"#/components/schemas/analytics-AggregateAnalysis"},"isVisibleForClientProfile":{"$ref":"#/components/schemas/analytics-IsVisibleForClientProfile"},"aggregateType":{"$ref":"#/components/schemas/analytics-AggregateType"},"previewDefaultObjectId":{"$ref":"#/components/schemas/analytics-PreviewDefaultObjectId"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["analysis","isVisibleForClientProfile"]},"analytics-AggregateAnalysis":{"description":"Definition of the aggregate. In `attribute`, define the attribute that you want to analyze.\n","discriminator":{"propertyName":"aggregateType","mapping":{"AGGREGATE":"#/components/schemas/analytics-ClientAggregate","RUNNING_AGGREGATE":"#/components/schemas/analytics-RunningAggregate"}},"oneOf":[{"$ref":"#/components/schemas/analytics-ClientAggregate"},{"$ref":"#/components/schemas/analytics-RunningAggregate"}]},"analytics-AggregatePaginationContainer":{"type":"object","properties":{"data":{"type":"array","description":"An array of funnels","items":{"$ref":"#/components/schemas/analytics-AggregateSimplifiedView"}},"meta":{"$ref":"#/components/schemas/analytics-Meta"}},"required":["data"]},"analytics-AggregateSimplifiedView":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"author":{"$ref":"#/components/schemas/analytics-AuthorId"},"updatedAt":{"$ref":"#/components/schemas/analytics-UpdatedAt"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"usedAt":{"$ref":"#/components/schemas/analytics-UsedAt"},"directoryId":{"$ref":"#/components/schemas/analytics-DirectoryId"},"isDynamicAnalytic":{"$ref":"#/components/schemas/analytics-IsDynamicAnalytic"},"aggregateType":{"$ref":"#/components/schemas/analytics-AggregateType"},"variables":{"description":"Dynamic keys used in this analysis","type":"array","items":{"$ref":"#/components/schemas/analytics-TerrariumVariable"}}},"required":["id","name","author","updatedAt","createdAt","usedAt","directoryId","isDynamicAnalytic","aggregateType","variables"]},"analytics-AggregateView":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"oldId":{"$ref":"#/components/schemas/analytics-OldId"},"businessProfileId":{"$ref":"#/components/schemas/analytics-BusinessProfileId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"author":{"$ref":"#/components/schemas/analytics-AuthorId"},"modifier":{"$ref":"#/components/schemas/analytics-modifierId"},"updatedAt":{"$ref":"#/components/schemas/analytics-UpdatedAt"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"usedAt":{"$ref":"#/components/schemas/analytics-UsedAt"},"analysis":{"$ref":"#/components/schemas/analytics-AggregateAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"},"isPredefinedAnalytic":{"$ref":"#/components/schemas/analytics-IsPredefinedAnalytic"},"isVisibleForClientProfile":{"$ref":"#/components/schemas/analytics-IsVisibleForClientProfile"},"isDynamicAnalytic":{"$ref":"#/components/schemas/analytics-IsDynamicAnalytic"},"isDeleted":{"$ref":"#/components/schemas/analytics-IsDeleted"},"analyticVersion":{"$ref":"#/components/schemas/analytics-AnalyticVersion"},"namespace":{"$ref":"#/components/schemas/analytics-Namespace"},"directoryId":{"$ref":"#/components/schemas/analytics-DirectoryId"},"aggregateType":{"$ref":"#/components/schemas/analytics-AggregateType"},"previewDefaultObjectId":{"$ref":"#/components/schemas/analytics-PreviewDefaultObjectId"}},"required":["id","oldId","businessProfileId","name","description","author","modifier","updatedAt","createdAt","usedAt","analysis","isPredefinedAnalytic","isVisibleForClientProfile","isDynamicAnalytic","isDeleted","analyticVersion","namespace","directoryId","aggregateType","previewDefaultObjectId"]},"analytics-PreviewDefaultObjectId":{"type":"number","format":"int64","nullable":true,"description":"The ID of the default profile for generating a preview of the results."},"analytics-AggregateUpdateRequest":{"type":"object","description":"Definition of the aggregate","properties":{"analysis":{"$ref":"#/components/schemas/analytics-AggregateAnalysis"},"isVisibleForClientProfile":{"$ref":"#/components/schemas/analytics-IsVisibleForClientProfile"},"aggregateType":{"$ref":"#/components/schemas/analytics-AggregateType"},"previewDefaultObjectId":{"$ref":"#/components/schemas/analytics-PreviewDefaultObjectId"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["analysis","isVisibleForClientProfile"]},"analytics-OldId":{"type":"integer","description":"A unique numeric ID required for backwards compatibility. Cannot be changed."},"analytics-CreateRequestSankeyAnalysis":{"type":"object","properties":{"analysis":{"$ref":"#/components/schemas/analytics-SankeyAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["analysis"]},"analytics-SankeyAnalysis":{"type":"object","description":"Details of a Sankey analysis","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"title":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"sourceEvent":{"$ref":"#/components/schemas/analytics-SankeySourceEvent"},"reverseOrder":{"type":"boolean","description":"Defines the direction of the analysis:\n- When \"false\", the analysis shows paths that begin with the `sourceEvent`.\n- When \"true\", the analysis shows paths that end with the `sourceEvent`.\n"},"numberOfSteps":{"type":"integer","format":"int32","minimum":0,"description":"The number of steps to analyze before or after the source event"},"numberOfPaths":{"type":"integer","format":"int32","minimum":0,"description":"The number of paths to analyze"},"drillDown":{"type":"array","description":"An array of drilldown conditions. On each layer, an event can only have one drilldown assigned.","items":{"$ref":"#/components/schemas/analytics-SankeyDrillDown"}},"drillDownCount":{"type":"integer","nullable":true,"description":"Defines the number of displayed top drilldown results."},"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"},"filter":{"$ref":"#/components/schemas/analytics-ExpressionFilter"},"eventFilters":{"type":"array","description":"An array of events to include or exclude according to the `excludeEvents` setting.","items":{"$ref":"#/components/schemas/analytics-FunnelStep"}},"excludeEvents":{"type":"boolean","description":"- When \"true\", the events defined in `eventFilters` are excluded from the analysis.\n- When \"false\", ONLY the events defined in `eventFilters` are included in the analysis.\n"},"firstOccurrenceOnly":{"type":"boolean","description":"When `true`, only the first occurrence of the source event is counted in the analysis."}},"required":["id","title","description","sourceEvent","reverseOrder","numberOfSteps","numberOfPaths","drillDown","drillDownCount","dateFilter","filter","eventFilters","excludeEvents","firstOccurrenceOnly"]},"analytics-SankeySourceEvent":{"type":"object","description":"The event that serves as the basis of the Sankey analysis","properties":{"action":{"$ref":"#/components/schemas/analytics-Action"},"expressions":{"$ref":"#/components/schemas/analytics-EventExpressions"}},"required":["action","expressions"]},"analytics-SankeyDrillDown":{"type":"object","description":"A drilldown condition. On each layer, an event can only have one drilldown assigned.","properties":{"layer":{"type":"integer","format":"int32","minimum":0,"description":"The layer where this drilldown applies. Layer indexes start at 0."},"action":{"$ref":"#/components/schemas/analytics-Action"},"attribute":{"$ref":"#/components/schemas/analytics-EventAttribute"}},"required":["layer","action","attribute"]},"analytics-SankeyCalculationResponse":{"type":"object","properties":{"results":{"type":"array","description":"\nEach array in this array is one transition.\n\nEach transition array includes six strings.\n- index 0 is the FROM event in the format `\"<layer>_<eventId>_<drilldownResult>\"`<br>Layer indexes start at 0. If you are analyzing paths starting at the sourceEvent, that event is layer 0. If you are analyzing paths that end with the sourceEvent, layer 0 is the first event in the path.<br>Drilldown result is nullified if no drilldown is defined for this event at this layer.\n- index 1 is the TO event in the same format\n- index 2 is the number of occurrences\n- index 3 is the average transition time in ms\n- index 4 is the shortest transition time in ms\n- index 5 is the longest transition time in ms\n\n**EXAMPLE:**\n\nConsider the following snippet, which includes two transitions:\n<pre><code><span>\"results\"</span><span>:</span> <span>[</span>\n<span>[</span>\n    <span>\"0_531_\\\"Mac OS X\\\"\"</span><span>,</span>\n    <span>\"1_1051_null\"</span><span>,</span>\n    <span>\"2\"</span><span>,</span>\n    <span>\"20\"</span><span>,</span>\n    <span>\"10\"</span><span>,</span>\n    <span>\"30\"</span>\n<span>]</span><span>,</span>\n<span>[</span>\n    <span>\"1_1604_null\"</span><span>,</span>\n    <span>\"2_6961_null\"</span><span>,</span>\n    <span>\"1\"</span><span>,</span>\n    <span>\"4242\"</span><span>,</span>\n    <span>\"4242\"</span><span>,</span>\n    <span>\"4242\"</span>\n<span>]</span><span>,</span> </code></pre>\nThe results of the first transition can be read as follows:\n\nTransition was FROM layer 0; sourceEvent (`action.id 531`); drilldown result \\\"Mac OS X\\\".\n\nTransition was TO layer 1; event with ID 1051, drilldown was undefined or result is null.\n\nTwo profiles completed this transition.\n\nThe average transition time was 20 ms, the longest time was 30 ms, and the shortest time was 10 ms.\n","items":{"type":"array","items":{"type":"string"}}}}},"analytics-SankeyView":{"type":"object","description":"A Sankey analytic view","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"businessProfileId":{"$ref":"#/components/schemas/analytics-BusinessProfileId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"author":{"$ref":"#/components/schemas/analytics-AuthorId"},"modifier":{"$ref":"#/components/schemas/analytics-modifierId"},"updatedAt":{"$ref":"#/components/schemas/analytics-UpdatedAt"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"usedAt":{"$ref":"#/components/schemas/analytics-UsedAt"},"analysis":{"$ref":"#/components/schemas/analytics-SankeyAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"},"isPredefinedAnalytic":{"$ref":"#/components/schemas/analytics-IsPredefinedAnalytic"},"isDynamicAnalytic":{"$ref":"#/components/schemas/analytics-IsDynamicAnalytic"},"isDeleted":{"$ref":"#/components/schemas/analytics-IsDeleted"},"namespace":{"$ref":"#/components/schemas/analytics-Namespace"},"directoryId":{"$ref":"#/components/schemas/analytics-DirectoryId"}},"required":["id","businessProfileId","name","description","author","modifier","updatedAt","createdAt","usedAt","analysis","isPredefinedAnalytic","isDynamicAnalytic","isDeleted","namespace","directoryId"]},"analytics-FunnelCalculationResponse":{"type":"object","properties":{"calculationResult":{"type":"array","description":"Funnel calculation results, listed step-by-step","items":{"$ref":"#/components/schemas/analytics-FunnelCalculationResult"}},"metadata":{"$ref":"#/components/schemas/analytics-FunnelMetadata"},"timeBetweenSteps":{"type":"array","description":"Data about time between steps. The objects are arranged according to step order (the first object in the array relates to transition between step 1 and step 2). All times are in milliseconds.","items":{"$ref":"#/components/schemas/analytics-TimeBetweenSteps"}}}},"analytics-FunnelCalculationResult":{"type":"object","description":"Calculation results, divided into steps","properties":{"name":{"type":"string","description":"Step name"},"result":{"type":"integer","format":"int64","description":"The number of profiles which completed this step"}}},"analytics-FunnelMetadata":{"type":"object","description":"Raw data of the calculation","properties":{"source":{"type":"array","description":"An array of results. The first item of the array is the number of profiles that matched the profile filter (if applicable), but didn't complete any steps. The second number is the number of profiles who completed the first step, and so on.","items":{"type":"integer","format":"int64"}}}},"analytics-TimeBetweenSteps":{"type":"object","description":"Data about time between steps. All times are in milliseconds.","properties":{"min":{"type":"integer","format":"int64","description":"Shortest time"},"max":{"type":"integer","format":"int64","description":"Longest time"},"avg":{"type":"integer","format":"int64","description":"Average time"}},"required":["min","max","avg"]},"analytics-FunnelAnalysis":{"type":"object","description":"Details of the funnel","properties":{"title":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"funnel":{"$ref":"#/components/schemas/analytics-Funnel"},"filter":{"$ref":"#/components/schemas/analytics-ExpressionFilter"}},"required":["description","filter","funnel","title"]},"analytics-FunnelView":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"businessProfileId":{"$ref":"#/components/schemas/analytics-BusinessProfileId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"author":{"$ref":"#/components/schemas/analytics-AuthorId"},"modifier":{"$ref":"#/components/schemas/analytics-modifierId"},"updatedAt":{"$ref":"#/components/schemas/analytics-UpdatedAt"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"usedAt":{"$ref":"#/components/schemas/analytics-UsedAt"},"analysis":{"$ref":"#/components/schemas/analytics-FunnelAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"},"isPredefinedAnalytic":{"$ref":"#/components/schemas/analytics-IsPredefinedAnalytic"},"isDynamicAnalytic":{"$ref":"#/components/schemas/analytics-IsDynamicAnalytic"},"isDeleted":{"$ref":"#/components/schemas/analytics-IsDeleted"},"namespace":{"$ref":"#/components/schemas/analytics-Namespace"},"directoryId":{"$ref":"#/components/schemas/analytics-DirectoryId"}},"required":["id","businessProfileId","name","description","author","modifier","updatedAt","createdAt","usedAt","analysis","isPredefinedAnalytic","isDynamicAnalytic","isDeleted","namespace","directoryId"]},"analytics-FunnelRequest":{"type":"object","properties":{"analysis":{"$ref":"#/components/schemas/analytics-FunnelAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["analysis"]},"analytics-CompletedWithin":{"type":"object","description":"Time constraint for completing all the steps in the funnel. Timer starts\nwhen the first step is triggered.\n\n- `period` sets the time unit\n- `value` sets the number of time units\n","properties":{"period":{"$ref":"#/components/schemas/analytics-TimePeriod"},"value":{"description":"The number of time units","type":"number","format":"int64"}}},"analytics-ReportView":{"type":"object","description":"Full report analysis details","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"businessProfileId":{"$ref":"#/components/schemas/analytics-BusinessProfileId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"author":{"$ref":"#/components/schemas/analytics-AuthorId"},"modifier":{"$ref":"#/components/schemas/analytics-modifierId"},"updatedAt":{"$ref":"#/components/schemas/analytics-UpdatedAt"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"usedAt":{"$ref":"#/components/schemas/analytics-UsedAt"},"analysis":{"$ref":"#/components/schemas/analytics-ReportAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"},"isPredefinedAnalytic":{"$ref":"#/components/schemas/analytics-IsPredefinedAnalytic"},"isDynamicAnalytic":{"$ref":"#/components/schemas/analytics-IsDynamicAnalytic"},"allowNull":{"$ref":"#/components/schemas/analytics-AllowNull"},"isDeleted":{"$ref":"#/components/schemas/analytics-IsDeleted"},"namespace":{"$ref":"#/components/schemas/analytics-Namespace"},"directoryId":{"$ref":"#/components/schemas/analytics-DirectoryId"}},"required":["id","businessProfileId","name","description","author","modifier","updatedAt","createdAt","usedAt","analysis","isPredefinedAnalytic","isDynamicAnalytic","allowNull","isDeleted","namespace","directoryId"]},"analytics-ReportRequest":{"type":"object","properties":{"analysis":{"$ref":"#/components/schemas/analytics-ReportAnalysis"},"allowNull":{"$ref":"#/components/schemas/analytics-AllowNull"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}}},"analytics-TrendRequest":{"type":"object","properties":{"analysis":{"$ref":"#/components/schemas/analytics-TrendAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["analysis"]},"analytics-TrendView":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"businessProfileId":{"$ref":"#/components/schemas/analytics-BusinessProfileId"},"name":{"$ref":"#/components/schemas/analytics-Name"},"description":{"$ref":"#/components/schemas/analytics-Description"},"author":{"$ref":"#/components/schemas/analytics-AuthorId"},"modifier":{"$ref":"#/components/schemas/analytics-modifierId"},"updatedAt":{"$ref":"#/components/schemas/analytics-UpdatedAt"},"createdAt":{"$ref":"#/components/schemas/analytics-CreatedAt"},"usedAt":{"$ref":"#/components/schemas/analytics-UsedAt"},"analysis":{"$ref":"#/components/schemas/analytics-TrendAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"},"isPredefinedAnalytic":{"$ref":"#/components/schemas/analytics-IsPredefinedAnalytic"},"isDynamicAnalytic":{"$ref":"#/components/schemas/analytics-IsDynamicAnalytic"},"isDeleted":{"$ref":"#/components/schemas/analytics-IsDeleted"},"namespace":{"$ref":"#/components/schemas/analytics-Namespace"},"directoryId":{"$ref":"#/components/schemas/analytics-DirectoryId"}},"required":["id","businessProfileId","name","description","author","modifier","updatedAt","createdAt","usedAt","analysis","isPredefinedAnalytic","isDynamicAnalytic","isDeleted","namespace","directoryId"]},"analytics-TrendSignedCalculationResponse":{"type":"object","properties":{"name":{"description":"Name of the resource","type":"string"},"metadata":{"$ref":"#/components/schemas/analytics-TrendMetadata"},"items":{"description":"Results, grouped by time unit","type":"array","items":{"$ref":"#/components/schemas/analytics-TrendTimeDistributionItem"}},"legends":{"description":"Information about included trends and their display mode","type":"array","items":{"$ref":"#/components/schemas/analytics-TrendCalculationLegend"}}},"required":["name","metadata","items","legends"]},"analytics-TrendMetadata":{"type":"object","description":"Metadata of the analysis","properties":{"aggregateDataBy":{"$ref":"#/components/schemas/analytics-TrendAggregateDataBy"},"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"}},"required":["aggregateDataBy","dateFilter"]},"analytics-TrendAggregateDataBy":{"type":"object","description":"The interval for grouping data","properties":{"type":{"$ref":"#/components/schemas/analytics-TimePeriod"},"value":{"$ref":"#/components/schemas/analytics-TimeValue"}},"required":["type","value"]},"analytics-TrendTimeDistributionItem":{"type":"object","properties":{"aggregateTimeDescription":{"type":"string","description":"Timestamp of the result","format":"date-time"},"values":{"description":"An array of the results of the included metrics","type":"array","items":{"$ref":"#/components/schemas/analytics-TrendCalculationExpression"}}},"required":["aggregateTimeDescription","values"]},"analytics-TrendCalculationExpression":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-AnalyticId"},"countedEvents":{"type":"number","format":"double","description":"The number of events that matched the trend. If the trend analyzes profiles, this value is `0.0`."},"countedClients":{"type":"number","format":"double","description":"The number of profiles which matched the trend. If the trend analyzes events, this value is `0.0`."}},"required":["id","countedEvents","countedClients"]},"analytics-TrendCalculationLegend":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/analytics-Id"},"title":{"$ref":"#/components/schemas/analytics-Name"},"chartType":{"$ref":"#/components/schemas/analytics-ChartType"}},"required":["id","title","chartType"]},"analytics-TrendAnalysisRequest":{"type":"object","description":"A trend analysis","properties":{"analysis":{"$ref":"#/components/schemas/analytics-TrendAnalysis"},"tags":{"description":"Currently unused","type":"array","items":{"type":"string"}}},"required":["analysis"]},"analytics-SharingProcessId":{"type":"string","format":"uuid","description":"Unique identifier of the sharing process"},"analytics-SharingProcessName":{"type":"string","description":"Name of the sharing process"},"analytics-SharingProcessAutomationId":{"type":"string","format":"uuid","description":"ID of the automation which handles the sharing"},"analytics-SharingProcessShareType":{"type":"string","description":"Type of sharing process","enum":["CROSSWORKSPACE","INTERNAL"]},"analytics-SharingProcessStatus":{"type":"string","description":"Status of the sharing process","enum":["ACTIVE","INACTIVE","DELETED"]},"analytics-Error":{"allOf":[{"type":"object","properties":{"source":{"type":"object","nullable":true,"description":"Information about a parameter that caused the error, if applicable.","properties":{"pointer":{"type":"string","description":"Information about a parameter"},"value":{"type":"string","nullable":true,"description":"Currently unused"}}},"errors":{"type":"array","description":"An array of errors, if applicable","items":{"$ref":"#/components/schemas/analytics-ErrorContent"}}}},{"$ref":"#/components/schemas/analytics-ErrorContent"}]},"analytics-ErrorContent":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"errorCode":{"type":"string","description":"Code of the error, needed for troubleshooting. See [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)."},"httpStatus":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Description of the problem"},"traceId":{"type":"string","description":"Currently unused","nullable":true},"help":{"type":"string","nullable":true,"description":"Currently unused"}}},"analytics-matching":{"type":"boolean","description":"When `true`, the results include only data that matched the condition. When `false`, the results include only data that did not match the condition.","default":true},"analytics-modifierId":{"type":"integer","format":"int64","description":"Unique ID of the last editor. `1` means the resource was edited by a request with workspace authorization."},"analytics-ReportMetricDefinition":{"type":"object","properties":{"metricId":{"$ref":"#/components/schemas/analytics-Id"},"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"},"action":{"$ref":"#/components/schemas/analytics-Action"},"format":{"$ref":"#/components/schemas/analytics-MetricFormat"},"columnName":{"type":"string","description":"Optional alias displayed as this metric's column header. Falls back to the underlying metric's title when null or omitted."},"grouping":{"$ref":"#/components/schemas/analytics-ReportMetricGrouping"},"groups":{"type":"array","description":"\nThe data to be included in the report. This data is called the _dimensions_ of the report.\nEach object in the array adds one dimension.\n- When you choose a metric created on the basis of one event only, you can group the results in reports only by the parameters assigned to this event.\n- When you choose a metric that is based only on the profile attributes, then you can group the results according to attributes assigned to profiles.\n- When you choose a metric that is created on the basis of events and profile attributes which don't have a common parameter, then you can group the results in reports only by attributes assigned to profiles.\nGrouping: The parameters of an event defined in this object can be used in the dimensions (`group` object) of the report. The event must be included in the metric that is the base of the report.\nDate filter: This date filter overrides the date filter in the metric.\n**Example 1:**\nYou have a metric that counts page visits. You want to see the results of the report grouped by the first name of the person who visited the page.\nTo achieve this, you need to add one dimension: the profile's first name. The response will include an array of objects that list the names and the number of their occurrences.\n\n**Example 2:**\nWhile using the same metric as in example 1, you add two dimensions:\n- profile's name (`firstname` param)\n- title of the page (`title` param)\n\nThe response will include the firstname/title combinations and the number of their occurrences. For a JSON example, see the description of the response schema for this method.\n","items":{"$ref":"#/components/schemas/analytics-ReportMetricGroup"}}},"required":["action","dateFilter","format","grouping","groups","metricId"]},"analytics-MetricLegacyPreview":{"type":"object","properties":{"analysis":{"$ref":"#/components/schemas/analytics-MetricAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["analysis"]},"analytics-PathIdentifierType":{"type":"string","enum":["id","uuid","email","custom_identify"]},"analytics-ExpressionResult":{"type":"object","properties":{"clientId":{"type":"integer","format":"int32","description":"ID of the profile"},"expressionId":{"type":"string","format":"uuid","description":"UUID of the expression"},"name":{"type":"string","description":"Name of the expression"},"result":{"type":"string","description":"The result of the expression"}},"required":["clientId","expressionId","name","result"]},"analytics-expressionCreateRequestBody":{"type":"object","properties":{"isVisibleForClientProfile":{"$ref":"#/components/schemas/analytics-IsVisibleForClientProfile"},"analysis":{"$ref":"#/components/schemas/analytics-ExpressionEntity"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["isVisibleForClientProfile","analysis"]},"analytics-AnalyticVersion":{"type":"string","format":"uuid","nullable":true,"description":"Unique ID of this version of the resource"},"analytics-HistogramDefinition":{"type":"object","description":"Structure of a histogram analysis. A histogram must have a date filter - an empty (infinite) filter causes a Bad Request error due to database limits per request.","properties":{"dateFilter":{"$ref":"#/components/schemas/analytics-DateFilter"},"period":{"$ref":"#/components/schemas/analytics-Period"},"eventMetrics":{"type":"array","description":"An array of metrics in the histogram","items":{"$ref":"#/components/schemas/analytics-HistogramMetric"}}},"required":["dateFilter","eventMetrics","period"]},"analytics-HistogramRequest":{"type":"object","properties":{"analysis":{"$ref":"#/components/schemas/analytics-HistogramAnalysis"},"inlineAnalytics":{"$ref":"#/components/schemas/analytics-InlineAnalytics"}},"required":["analysis"]},"analytics-SegmentationWithRelated":{"type":"object","properties":{"segmentationId":{"$ref":"#/components/schemas/analytics-AnalyticId"},"related":{"type":"boolean","description":"`true` if profile belongs to this segmentation."}},"required":["related","segmentationId"]},"api-service-TransactionMeta-apiv4":{"type":"object","description":"Any custom parameters.   \nIf you want to send `promotionCode` and `quantityToRedeem`, contact the Synerise support to enable it for your workspace.   \nInclude these parameters in the `metadata` object, so Synerise can redeem it automatically.\n","additionalProperties":true,"properties":{"promotionCode":{"$ref":"#/components/schemas/api-service-promotionCode-apiv4"},"quantityToRedeem":{"$ref":"#/components/schemas/api-service-quantityToRedeem-apiv4"}}},"api-service-JWTtoken-apiv4":{"type":"object","properties":{"token":{"type":"string","description":"[JWT](https://jwt.io/) token","example":"eyJhbGciOiinvalidI6IkFQSSIsInJsbSI6ImNsaWVudCIsImN0ZCI6MTUyODM1NTgzMjEzOCwiZW1sIjoia3J6eXN6dG9mLmN6ZXJlcGFrQGdtYWlsLmNvbSIsImlzcyI6IlN5bmVyaXNlIiwiYnBpIjo1OTQsImNsSWQiOjUyNTQ0NjU3NCwinvalidx2XwJp-QBZ94d_EEKf41KtDCE33KhP_vTAYrs-JzbnIHgKRvG6ZRwsNOL8OTnbfbUZH4XYaqBB_tZTPPKfzHutP6GEGp7PLtu2E92JbChkVyrn8VCQ5v4z2e1-zsdgbmWcQk2g9RydaydO6NYO55suT3Hz2ZRv0AYLsG8rM1biZGdREWx9OaknVVuIo2ivehBiukL7VQ6Bu8ugjep3mn-z666a-nCMh6ZuASiQ6Geq0NSWmdDQIoCa5Hg44KzMfGRlCR2uKBXeHTD0SkwJ1VJM0sHNKwSfMXKpaX8OJ5wUJpgCzDzQwKVgxgWFp4eO_sbcvxWrpI7W0lfdCy1WKirnZ6Uh3uJ06v97GQDAQqVgBZFEpS47MrGZhTNuAG4ZbfYO7yyxVO8AHQbEC-UvZ-8DC1XZjvQ6S1uNqQIlVGcthnrxg8K6vKVhNzu6ifQI0bbsCl8bGsKkXOEK1pKR3ekckcSjNeeY2LrcdXs8F2gtkm0TjXU"}}},"api-service-recommendationEventParams-apiv4":{"type":"object","description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nAside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:\n\n<span style=\"color:red\"><strong>WARNING:</strong></span>\n- If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.\n- Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>\n<code>modifiedBy</code><br>\n<code>apiKey</code><br>\n<code>eventUUID</code><br>\n<code>ip</code><br>\n<code>time</code><br>\n<code>businessProfileId</code>\n","properties":{"productId":{"$ref":"#/components/schemas/api-service-ItemSku-apiv4"},"name":{"$ref":"#/components/schemas/api-service-ItemName-apiv4"},"source":{"$ref":"#/components/schemas/api-service-eventSource-apiv4"},"campaignHash":{"$ref":"#/components/schemas/api-service-CampaignHash-apiv4"},"url":{"$ref":"#/components/schemas/api-service-inBodyResourceUrl-apiv4"},"category":{"$ref":"#/components/schemas/api-service-ItemCategory-apiv4"}}},"api-service-AiCompatBatchEventRequest-apiv4":{"type":"object","properties":{"eventType":{"type":"string","enum":["item.search.click","suggestion.search.click","product.search.click","recommendation.click","recommendation.view"],"description":"A request can only include events of the same type."},"items":{"type":"array","description":"An array of events","items":{"oneOf":[{"$ref":"#/components/schemas/api-service-ItemSearchClickEventDataCompat-apiv4"},{"$ref":"#/components/schemas/api-service-SuggestionSearchClickEventDataCompat-apiv4"},{"$ref":"#/components/schemas/api-service-RecommendationViewEventDataCompat-apiv4"},{"$ref":"#/components/schemas/api-service-RecommendationClickEventDataCompat-apiv4"},{"$ref":"#/components/schemas/api-service-ProductSearchClickEventDataCompat-apiv4"}]}}}},"api-service-ItemSearchClickEventDataCompat-apiv4":{"title":"item.search.click","type":"object","required":["correlationId","clientUUID","position","searchType","item"],"properties":{"correlationId":{"$ref":"#/components/schemas/api-service-CorrelationId-apiv4"},"clientUUID":{"$ref":"#/components/schemas/api-service-inBodyClientUuid-apiv4"},"position":{"$ref":"#/components/schemas/api-service-ItemPosition-apiv4"},"searchType":{"$ref":"#/components/schemas/api-service-SearchType-apiv4"},"item":{"$ref":"#/components/schemas/api-service-Item-apiv4"},"EventTimestamp":{"$ref":"#/components/schemas/api-service-Time-apiv4"}},"additionalProperties":{"description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nEvents accept custom, free-form parameters, with the following restrictions:\n\n  <span style=\"color:red\"><strong>WARNING:</strong></span>\n  - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.\n  - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>\n  <code>modifiedBy</code><br>\n  <code>apiKey</code><br>\n  <code>eventUUID</code><br>\n  <code>ip</code><br>\n  <code>time</code><br>\n  <code>businessProfileId</code>\n"}},"api-service-SuggestionSearchClickEventDataCompat-apiv4":{"title":"suggestion.search.click","type":"object","required":["correlationId","clientUUID","position","searchType","suggestion"],"properties":{"correlationId":{"$ref":"#/components/schemas/api-service-CorrelationId-apiv4"},"clientUUID":{"$ref":"#/components/schemas/api-service-inBodyClientUuid-apiv4"},"position":{"$ref":"#/components/schemas/api-service-ItemPosition-apiv4"},"searchType":{"$ref":"#/components/schemas/api-service-SearchType-apiv4"},"EventTimestamp":{"$ref":"#/components/schemas/api-service-Time-apiv4"},"suggestion":{"$ref":"#/components/schemas/api-service-Suggestion-apiv4"}},"additionalProperties":{"description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nEvents accept custom, free-form parameters, with the following restrictions:\n\n  <span style=\"color:red\"><strong>WARNING:</strong></span>\n  - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.\n  - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>\n  <code>modifiedBy</code><br>\n  <code>apiKey</code><br>\n  <code>eventUUID</code><br>\n  <code>ip</code><br>\n  <code>time</code><br>\n  <code>businessProfileId</code>\n"}},"api-service-RecommendationViewEventDataCompat-apiv4":{"title":"recommendation.view","type":"object","required":["correlationId","clientUUID","items"],"properties":{"correlationId":{"$ref":"#/components/schemas/api-service-CorrelationId-apiv4"},"clientUUID":{"$ref":"#/components/schemas/api-service-inBodyClientUuid-apiv4"},"items":{"$ref":"#/components/schemas/api-service-RecommendationItems-apiv4"},"EventTimestamp":{"$ref":"#/components/schemas/api-service-Time-apiv4"},"campaignId":{"$ref":"#/components/schemas/api-service-CampaignId-apiv4"}},"additionalProperties":{"description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nEvents accept custom, free-form parameters, with the following restrictions:\n\n  <span style=\"color:red\"><strong>WARNING:</strong></span>\n  - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.\n  - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>\n  <code>modifiedBy</code><br>\n  <code>apiKey</code><br>\n  <code>eventUUID</code><br>\n  <code>ip</code><br>\n  <code>time</code><br>\n  <code>businessProfileId</code>\n"}},"api-service-RecommendationClickEventDataCompat-apiv4":{"title":"recommendation.click","type":"object","required":["correlationId","clientUUID","item"],"properties":{"correlationId":{"$ref":"#/components/schemas/api-service-CorrelationId-apiv4"},"clientUUID":{"$ref":"#/components/schemas/api-service-inBodyClientUuid-apiv4"},"item":{"$ref":"#/components/schemas/api-service-Item-apiv4"},"campaignId":{"$ref":"#/components/schemas/api-service-CampaignId-apiv4"},"sessionId":{"type":"string","description":"ID of the user session"},"EventTimestamp":{"$ref":"#/components/schemas/api-service-Time-apiv4"}},"additionalProperties":{"description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nEvents accept custom, free-form parameters, with the following restrictions:\n\n  <span style=\"color:red\"><strong>WARNING:</strong></span>\n  - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.\n  - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>\n  <code>modifiedBy</code><br>\n  <code>apiKey</code><br>\n  <code>eventUUID</code><br>\n  <code>ip</code><br>\n  <code>time</code><br>\n  <code>businessProfileId</code>\n"}},"api-service-ProductSearchClickEventDataCompat-apiv4":{"title":"product.search.click","deprecated":true,"type":"object","required":["correlationId","clientUUID","position","searchType","productId"],"properties":{"correlationId":{"$ref":"#/components/schemas/api-service-CorrelationId-apiv4"},"clientUUID":{"$ref":"#/components/schemas/api-service-inBodyClientUuid-apiv4"},"position":{"$ref":"#/components/schemas/api-service-ItemPosition-apiv4"},"searchType":{"$ref":"#/components/schemas/api-service-SearchType-apiv4"},"productId":{"$ref":"#/components/schemas/api-service-Item-apiv4"},"EventTimestamp":{"$ref":"#/components/schemas/api-service-Time-apiv4"}},"additionalProperties":{"description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nEvents accept custom, free-form parameters, with the following restrictions:\n\n  <span style=\"color:red\"><strong>WARNING:</strong></span>\n  - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.\n  - Some params are reserved for system use. If you send them, they are ignored or overwritten with system-assigned values:<br>\n  <code>modifiedBy</code><br>\n  <code>apiKey</code><br>\n  <code>eventUUID</code><br>\n  <code>ip</code><br>\n  <code>time</code><br>\n  <code>businessProfileId</code>\n"}},"api-service-RecommendationViewEventData-apiv4":{"type":"object","allOf":[{"type":"object","required":["params"],"properties":{"params":{"type":"object","description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nAside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:\n\n  <span style=\"color:red\"><strong>WARNING:</strong></span>\n  - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.\n  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>\n  <code>modifiedBy</code><br>\n  <code>apiKey</code><br>\n  <code>eventUUID</code><br>\n  <code>ip</code><br>\n  <code>time</code><br>\n  <code>businessProfileId</code>\n","required":["items","correlationId"],"properties":{"items":{"$ref":"#/components/schemas/api-service-RecommendationItems-apiv4"},"correlationId":{"$ref":"#/components/schemas/api-service-CorrelationId-apiv4"},"campaignId":{"$ref":"#/components/schemas/api-service-CampaignId-apiv4"}},"additionalProperties":true}}},{"$ref":"#/components/schemas/api-service-EventBase-apiv4"}]},"api-service-promotionCode-apiv4":{"type":"string","description":"Unique promotion ID.  \nIf you want to send `promotionCode` and `quantityToRedeem`, contact the Synerise support to enable it for your workspace.  \nInclude these parameters in the metadata object, so Synerise can redeem it automatically.\n"},"api-service-quantityToRedeem-apiv4":{"type":"integer","description":"The number of items to which the promotion has been applied.  \nIf you want to send `promotionCode` and `quantityToRedeem`, contact the Synerise support to enable it for your workspace.  \nInclude these parameters in the metadata object, so Synerise can redeem it automatically.\n"},"api-service-ItemSearchClickEventData-apiv4":{"type":"object","allOf":[{"type":"object","required":["params"],"properties":{"params":{"type":"object","description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nAside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:\n\n  <span style=\"color:red\"><strong>WARNING:</strong></span>\n  - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.\n  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>\n  <code>modifiedBy</code><br>\n  <code>apiKey</code><br>\n  <code>eventUUID</code><br>\n  <code>ip</code><br>\n  <code>time</code><br>\n  <code>businessProfileId</code>\n","required":["item","correlationId","position","searchType"],"properties":{"item":{"$ref":"#/components/schemas/api-service-Item-apiv4"},"correlationId":{"$ref":"#/components/schemas/api-service-CorrelationId-apiv4"},"position":{"$ref":"#/components/schemas/api-service-ItemPosition-apiv4"},"searchType":{"$ref":"#/components/schemas/api-service-SearchType-apiv4"}},"additionalProperties":true}}},{"$ref":"#/components/schemas/api-service-EventBase-apiv4"}]},"api-service-Currency-apiv4":{"type":"string","description":"The currency of the transaction in ISO 4217","example":"USD"},"api-service-OrderId-apiv4":{"type":"string","description":"ID of the transaction.\nIf you want to be able to overwrite this transaction in the future, you use `eventSalt`. If you send a transaction with the same `orderId` multiple times, the system generates multiple transaction events.","example":"be466362-71e9-4bdd-ad11-bfacead5276b"},"api-service-ClientChangeset-apiv4":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/api-service-inBodyClientAddress-apiv4"},"agreements":{"$ref":"#/components/schemas/api-service-Agreements-apiv4"},"attributes":{"$ref":"#/components/schemas/api-service-Attributes-apiv4-apiv4"},"avatarUrl":{"$ref":"#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4"},"birthDate":{"$ref":"#/components/schemas/api-service-inBodyClientBirthDate-apiv4"},"city":{"$ref":"#/components/schemas/api-service-inBodyClientCity-apiv4"},"company":{"$ref":"#/components/schemas/api-service-inBodyClientCompany-apiv4"},"countryCode":{"$ref":"#/components/schemas/api-service-inBodyClientCountryCode-apiv4"},"customId":{"$ref":"#/components/schemas/api-service-inBodyClientCustomId-apiv4"},"displayName":{"$ref":"#/components/schemas/api-service-inBodyClientDisplayName-apiv4"},"email":{"$ref":"#/components/schemas/api-service-inBodyClientEmail-apiv4"},"firstName":{"$ref":"#/components/schemas/api-service-inBodyClientFirstName-apiv4"},"lastName":{"$ref":"#/components/schemas/api-service-inBodyClientLastName-apiv4"},"phone":{"$ref":"#/components/schemas/api-service-inBodyClientPhone-apiv4"},"province":{"$ref":"#/components/schemas/api-service-inBodyClientProvince-apiv4"},"sex":{"$ref":"#/components/schemas/api-service-inBodyClientSex-apiv4"},"whatsAppId":{"$ref":"#/components/schemas/api-service-inBodyClientWhatsAppId-apiv4"},"zipCode":{"$ref":"#/components/schemas/api-service-inBodyClientZipCode-apiv4"}}},"api-service-ClientId-apiv4":{"description":"Unique ID. This ID is generated by the system during profile creation.\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n","type":"integer","format":"int64","example":433230297},"api-service-TagAssociation-apiv4":{"type":"object","properties":{"clientId":{"$ref":"#/components/schemas/api-service-ClientId-apiv4"},"id":{"type":"integer","format":"int64","description":"ID of the assignment","example":73},"tagId":{"type":"integer","format":"int64","description":"ID of the tag","example":645}}},"api-service-Error-apiv4":{"type":"object","properties":{"code":{"type":"integer","format":"int32","example":12082,"description":"A numeric identifier of the error type"},"field":{"type":"string","example":"countryCode","description":"Field in the request body that caused the error"},"message":{"type":"string","example":"Country Code must have 0 or 3 characters as per ISO format.","description":"A detailed description of the problem"},"rejectedValue":{"type":"string","example":"Poland","description":"The value that caused the error"}}},"api-service-RegularUnitPrice-apiv4":{"description":"The regular price of the items","required":["amount","currency"],"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"The price of the items"},"currency":{"$ref":"#/components/schemas/api-service-Currency-apiv4"}}},"api-service-DiscountedUnitPrice-apiv4":{"required":["amount","currency"],"description":"Price after discounts","type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"The amount of currency"},"currency":{"$ref":"#/components/schemas/api-service-Currency-apiv4"}}},"api-service-FinalUnitPrice-apiv4":{"description":"Final price per unit.","required":["amount","currency"],"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"The price of the items","example":3.25},"currency":{"$ref":"#/components/schemas/api-service-Currency-apiv4"}}},"api-service-inBodyResourceUrl-apiv4":{"type":"string","description":"URL address of the resource"},"api-service-ItemSku-apiv4":{"type":"string","example":"189784563455","description":"SKU of the item"},"api-service-ClientCartEventRequest-apiv4":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"required":["params"],"type":"object","properties":{"params":{"type":"object","description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nAside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:\n\n  <span style=\"color:red\"><strong>WARNING:</strong></span>\n  - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.\n  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>\n  <code>modifiedBy</code><br>\n  <code>apiKey</code><br>\n  <code>eventUUID</code><br>\n  <code>ip</code><br>\n  <code>time</code><br>\n  <code>businessProfileId</code>\n","required":["sku","source","finalUnitPrice","quantity"],"properties":{"sku":{"$ref":"#/components/schemas/api-service-ItemSku-apiv4"},"name":{"$ref":"#/components/schemas/api-service-ItemName-apiv4"},"category":{"$ref":"#/components/schemas/api-service-ItemCategory-apiv4"},"categories":{"$ref":"#/components/schemas/api-service-ItemCategories-apiv4"},"offline":{"$ref":"#/components/schemas/api-service-Offline-apiv4"},"source":{"$ref":"#/components/schemas/api-service-eventSource-apiv4"},"regularUnitPrice":{"$ref":"#/components/schemas/api-service-RegularUnitPrice-apiv4"},"discountedUnitPrice":{"$ref":"#/components/schemas/api-service-DiscountedUnitPrice-apiv4"},"finalUnitPrice":{"$ref":"#/components/schemas/api-service-FinalUnitPrice-apiv4"},"ItemUrlAddress":{"$ref":"#/components/schemas/api-service-ItemUrlAddress-apiv4"},"producer":{"$ref":"#/components/schemas/api-service-Producer-apiv4"},"quantity":{"$ref":"#/components/schemas/api-service-Quantity-apiv4"}},"additionalProperties":true}}}]},"api-service-inBodyClientDeviceId-apiv4":{"type":"string","description":"Unique Android or iOS device ID"},"api-service-eventLabel-apiv4":{"type":"string","example":"Human-readable label","minLength":1,"description":"This parameter is required, but not saved in the database. It can't be used in Analytics, Automations, and so on."},"api-service-Time-apiv4":{"type":"string","description":"Time when the event occurred, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601). \n\nThis time isn't affected and doesn't affect the timezone of your workspace - you can send events with a timezone different than that of the workspace. Synerise calculates the times into UTC standard when saving events in the database.\n\nIf not defined, the backend inserts the time of receiving the event.\n\nA time with a \"Z\" at the end (for example, `2022-10-14T12:02:06Z`) denotes a time in the UTC standard.\n\nIf you want to send time in a different timezone, you can do this by appending `{+|-}hh:mm` at the end of the string.  \n\nNote that if the timezone is ahead (+) of UTC, the UTC time is calculated by subtraction. When the timezone is behind (-) UTC, the UTC time is calculated by addition.  \nFor example:\n  - if your timezone is UTC+1, append `+01:00`. When you send `2022-10-14T15:00:000+01:00`, it is saved in the database as `2022-10-14T14:00:000Z`\n  - if your timezone is UTC-8, append `-08:00`. When you send `2022-10-14T22:00:000-08:00`, it is saved in the database as `2022-10-15T06:00:000Z` (note that the date also changes between timezones in this example)\n\n**IMPORTANT**: If you send an event with a future time, the parameter is rejected and the time of receiving the event is saved as the occurrence time. For example, if your timezone is UTC+1 and you send the event at 15:00 local time, future times are:  \n- later than 15:00 local time\n- later than 14:00 UTC\n\nWhen you retrieve an event, its time is always shown as UTC. The original time string that you sent (even if it was a future time and was rejected) can be retrieved with the [activities](https://developers.synerise.com/DataManagement/DataManagement.html#tag/Activities) endpoints, as `snr-original-time`.\n","example":"2019-02-07T09:53:56.999+00:00"},"api-service-ApplicationstartedRequest-apiv4":{"allOf":[{"$ref":"#/components/schemas/api-service-EventBase-apiv4"},{"required":["params"],"type":"object","properties":{"params":{"$ref":"#/components/schemas/api-service-ClientApplicationStartedEventParams-apiv4"}}}]},"api-service-GetClientevents-HTTP200-apiv4":{"type":"object","properties":{"time":{"type":"string","description":"Time when the event occurred. \n\nThis is the time that:\n- is sent as `recordedAt` to **v4/transactions/** endpoints\n- is sent as `time` to **v4/events/** endpoints\n- is the occurrence time of system events\n\nIf the event had no time provided when sending, the time of saving in the database is used.\n\nIf the event had a future time when sending, it was rejected and the time of saving in the database is used.\n\nThis is the value that needs to be used as `time` (`recordedAt` in v4/transactions endpoints) when overwriting events by using eventSalt.\n"},"action":{"type":"string","example":"client.updateData","description":"The system name for the action"},"label":{"$ref":"#/components/schemas/api-service-eventLabel-apiv4"},"client":{"$ref":"#/components/schemas/api-service-Client-apiv4"},"params":{"type":"object","properties":{"eventCreateTime":{"type":"string","description":"Time when the event was received. If the event had no time or a future time, this value is used as the time when the event occurred.\n\nThis parameter does not exist in system events.\n\nWhen you overwrite an event with eventSalt, this value changes to the time of overwriting.\n","format":"date-time","example":"2022-11-23T18:39:26.789Z"},"ip":{"description":"IP of the source device. This parameter does not exist in system events."}},"additionalProperties":{"description":"Additional properties depending on event type and custom parameters."},"description":"Details of the event, depending on event type and the requirements of your own system. This can be almost any type of data.\n\n  <span style=\"color:red\"><strong>WARNING:</strong></span>\n  - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.\n  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:\n  <details><summary>Click to expand the list of reserved params</summary>\n  <code>modifiedBy</code><br>\n  <code>apiKey</code><br>\n  <code>eventUUID</code><br>\n  <code>ip</code><br>\n  <code>time</code><br>\n  <code>businessProfileId</code>\n  </details>\n"}}},"api-service-LinkaClientdeviceRequest-apiv4":{"type":"object","required":["deviceId","type","registrationId"],"properties":{"deviceId":{"$ref":"#/components/schemas/api-service-inBodyClientDeviceId-apiv4"},"registrationId":{"type":"string","description":"Registration ID for [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/)"},"type":{"type":"string","description":"Device type","enum":["android","ios","windows"]},"bluetoothAddress":{"type":"string","description":"Bluetooth MAC address of the device"},"macAddress":{"type":"string","description":"MAC address of the network adapter"},"manufacturer":{"type":"string","description":"Manufacturer of the device"},"model":{"type":"string","description":"Model of the device"},"osVersion":{"type":"string","description":"Operating system of the device"},"product":{"type":"string","description":"Additional information about the OS on the device","example":"a51ul_htc_europe"},"screenHeight":{"type":"integer","format":"int32","description":"Screen height in pixels"},"screenWidth":{"type":"integer","format":"int32","description":"Screen width in pixels"},"publicKey":{"type":"string","description":"Public key used to encrypt push messages"}}},"api-service-inBodyClientCompany-apiv4":{"type":"string","description":"Profiles's company\n\nThe value:\n  - can't include variation selectors (`[\\uFE00-\\uFE0F]`), unless there are other characters in the string.\n- can't include the \"null\" control character (`\\u0000`)\n"},"api-service-inBodyClientBirthDate-apiv4":{"type":"string","description":"Date of birth in the profile. Must be in `yyyy-mm-dd` format and later than `1900-01-01`. Must be a date in the past. <br>**IMPORTANT**: Months and days must be zero-padded. For example: May 3, 1993 is `1993-05-03`.","example":"1987-10-24"},"api-service-inBodyClientAvatarUrl-apiv4":{"type":"string","nullable":true,"description":"URL of the profile's avatar picture\n\nThe value:\n  - can't include variation selectors (`[\\uFE00-\\uFE0F]`), unless there are other characters in the string.\n- can't include the \"null\" control character (`\\u0000`)\n"},"api-service-inBodyClientDisplayName-apiv4":{"type":"string","description":"Currently unused"},"api-service-inBodyClientLastName-apiv4":{"type":"string","description":"Profile's last name\n\nThe value:\n  - can't include variation selectors (`[\\uFE00-\\uFE0F]`), unless there are other characters in the string.\n- can't include the \"null\" control character (`\\u0000`)\n"},"api-service-inBodyClientCustomId-apiv4":{"type":"string","description":"A custom ID for the Profile. It is a unique identifier.\n\nThe value can't include any characters that match the pattern (ECMA flavor): `/([\\uD800-\\uDBFF][\\uDC00-\\uDFFF])|([\\r\\n\\u2028\\u2029\\u00AD]|[\\uFE00-\\uFE0F]|[\\u0000])/`\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n"},"api-service-inBodyClientPhone-apiv4":{"type":"string","description":"Phone number of the profile\n\n- Must match the pattern (ECMA flavor): `/(^\\+[0-9 \\-()/]{6,19}$)|(^[0-9 \\-()/]{6,20}$)/`  \n- The value can't include any characters that match the pattern (ECMA flavor): `/([\\uD800-\\uDBFF][\\uDC00-\\uDFFF])|([\\r\\n\\u2028\\u2029\\u00AD]|[\\uFE00-\\uFE0F]|[\\u0000])/`\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n","example":"+48111222333"},"api-service-inBodyClientWhatsAppId-apiv4":{"type":"string","nullable":true,"description":"WhatsApp identifier of the profile, used for WhatsApp communication.\n\nThe value:\n  - can't include variation selectors (`[\\uFE00-\\uFE0F]`), unless there are other characters in the string.\n  - can't include the \"null\" control character (`\\u0000`)\n","example":"TestWhatsappId"},"api-service-inBodyClientEmail-apiv4":{"type":"string","description":"The profile's e-mail address. \n\n- Must match the pattern (ECMA flavor): `/^(([^<>()[\\]\\\\.,;:\\s@\\\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\\\"]+)*)|(\\\\\".+\\\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/`  \n- The value can't include any characters that match the pattern (ECMA flavor): `/([\\uD800-\\uDBFF][\\uDC00-\\uDFFF])|([\\r\\n\\u2028\\u2029\\u00AD]|[\\uFE00-\\uFE0F]|[\\u0000])/`\n\nBy default, email is a unique identifier.\n\nIf [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, this field should not be used. It is no longer an identifier. The configuration of non-unique emails includes creating an email parameter for communication.\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n"},"api-service-inBodyClientFirstName-apiv4":{"type":"string","description":"Profile's first name.\n\nThe value:\n  - can't include variation selectors (`[\\uFE00-\\uFE0F]`), unless there are other characters in the string.\n  - can't include the \"null\" control character (`\\u0000`)\n"},"api-service-inBodyClientUuid-apiv4":{"type":"string","description":"UUID of the Profile. It is a unique identifier.\n\nThe value can't include any characters that match the pattern (ECMA flavor): `/([\\uD800-\\uDBFF][\\uDC00-\\uDFFF])|([\\r\\n\\u2028\\u2029\\u00AD]|[\\uFE00-\\uFE0F]|[\\u0000])/`\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n","example":"07243772-008a-42e1-ba37-c3807cebde8f"},"api-service-inBodyClientCity-apiv4":{"type":"string","description":"Profile's city of residence.\n\nThe value:\n  - can't include variation selectors (`[\\uFE00-\\uFE0F]`), unless there are other characters in the string.\n- can't include the \"null\" control character (`\\u0000`)\n"},"api-service-inBodyClientAddress-apiv4":{"type":"string","description":"Profile's street address.\n\nThe value:\n  - can't include variation selectors (`[\\uFE00-\\uFE0F]`), unless there are other characters in the string.\n- can't include the \"null\" control character (`\\u0000`)\n"},"api-service-inBodyClientZipCode-apiv4":{"type":"string","description":"Profile's zip code\n\nThe value:\n  - can't include variation selectors (`[\\uFE00-\\uFE0F]`), unless there are other characters in the string.\n- can't include the \"null\" control character (`\\u0000`)\n"},"api-service-inBodyClientProvince-apiv4":{"type":"string","description":"Profile's province of residence\n\nThe value:\n  - can't include variation selectors (`[\\uFE00-\\uFE0F]`), unless there are other characters in the string.\n- can't include the \"null\" control character (`\\u0000`)\n"},"api-service-inBodyClientCountryCode-apiv4":{"type":"string","description":"Code of profile's country of residence in accordance with the ISO 3166 format","example":"PL"},"api-service-inBodyClientSex-apiv4":{"type":"string","description":"Profile's sex","enum":["FEMALE","MALE","NOT_SPECIFIED","OTHER"]},"api-service-CreateClientRequestBody-apiv4":{"type":"object","properties":{"email":{"$ref":"#/components/schemas/api-service-inBodyClientEmail-apiv4"},"phone":{"$ref":"#/components/schemas/api-service-inBodyClientPhone-apiv4"},"customId":{"$ref":"#/components/schemas/api-service-inBodyClientCustomId-apiv4"},"firstName":{"$ref":"#/components/schemas/api-service-inBodyClientFirstName-apiv4"},"lastName":{"$ref":"#/components/schemas/api-service-inBodyClientLastName-apiv4"},"displayName":{"$ref":"#/components/schemas/api-service-inBodyClientDisplayName-apiv4"},"uuid":{"$ref":"#/components/schemas/api-service-inBodyClientUuid-apiv4"},"avatarUrl":{"$ref":"#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4"},"birthDate":{"$ref":"#/components/schemas/api-service-inBodyClientBirthDate-apiv4"},"company":{"$ref":"#/components/schemas/api-service-inBodyClientCompany-apiv4"},"city":{"$ref":"#/components/schemas/api-service-inBodyClientCity-apiv4"},"address":{"$ref":"#/components/schemas/api-service-inBodyClientAddress-apiv4"},"zipCode":{"$ref":"#/components/schemas/api-service-inBodyClientZipCode-apiv4"},"province":{"$ref":"#/components/schemas/api-service-inBodyClientProvince-apiv4"},"countryCode":{"$ref":"#/components/schemas/api-service-inBodyClientCountryCode-apiv4"},"sex":{"$ref":"#/components/schemas/api-service-inBodyClientSex-apiv4"},"whatsAppId":{"$ref":"#/components/schemas/api-service-inBodyClientWhatsAppId-apiv4"},"agreements":{"$ref":"#/components/schemas/api-service-Agreements-apiv4"},"attributes":{"$ref":"#/components/schemas/api-service-Attributes-apiv4-apiv4"},"tags":{"$ref":"#/components/schemas/api-service-Tags-apiv4"}}},"api-service-Tags-apiv4":{"type":"array","description":"Tags can be used to group profiles.\n\nTag names (strings):\n- can't include variation selectors (`[\\uFE00-\\uFE0F]`), unless there are other characters in the string.\n- can't include the \"null\" control character (`\\u0000`)\n","items":{"type":"string","description":"Tag names (strings):\n- can't include variation selectors (`[\\uFE00-\\uFE0F]`), unless there are other characters in the string.\n- can't include the \"null\" control character (`\\u0000`)\n"}},"api-service-Attributes-apiv4-apiv4":{"type":"object","description":"This object contains custom attributes that can have any name (except for reserved attributes, see warning below) and data type, as required by your integration.\n\nThe attribute names can't include any characters that match the pattern (ECMA flavor): `/[\\r\\n\\u2028\\u2029\\u00AD\\u0000\\uFE00-\\uFE0F]/`\n\nString values:\n  - can't include variation selectors (`[\\uFE00-\\uFE0F]`), unless there are other characters in the string.\n  - can't include the \"null\" control character (`\\u0000`)\n\nIf you want to send a date/time attribute for use in analytics, take the following into account:\n- The date/time should be formatted according to ISO 8601.\n- The time zone of the workspace affects dates/times in the attributes that DON'T have a defined timezone. Example:\n    - `2023-10-09T12:00:00` doesn't have a timezone indicator and will be considered as a time in the workspace's time zone.\n    - `2023-10-09T12:00:00+02:00` has a timezone indicator (`+02:00`), so the timezone of the workspace doesn't affect it.\n    - `2023-10-09T12:00:00Z` is a time in the UTC time zone (denoted by the `Z` at the end), so the timezone of the workspace doesn't affect it.\n\n<strong><span style=\"color:red\">WARNING<span></strong>: Some attributes cannot be sent in this object and will be ignored. Some of these are reserved for system use, and others must be sent as properties of the profile in the root object of the request body instead of inside the `attributes` object.\n\n<details><summary><span style=\"background:red;color:white\">Click to expand the list of reserved attributes</span></summary>\n<code>email</code><br><code>id</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br>\n<code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br>\n<code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br>\n<code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br>\n<code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br>\n<code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br>\n<code>receive_whatsapp_messages</code><br><code>whatsAppId</code><br><code>whatsapp_id</code><br>\n<code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br>\n<code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_country</code><br><code>geo_loc_isp</code><br>\n<code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>deletedAt</code><br><code>deleted_unique</code><br><code>status</code><br><code>recognized</code><br><code>previous_clients</code><br><code>testProfile</code><br>\n<code>apikey</code><br><code>apiKey</code><br><code>ApiKey</code><br><code>Apikey</code><br><code>tracker</code><br><code>snr_sdk_version</code><br><code>eventCreateTime</code><br><code>correlationId</code>\n</details>\n","additionalProperties":{"description":"The attribute names can't include any characters that match the pattern (ECMA flavor): `/[\\r\\n\\u2028\\u2029\\u00AD\\u0000\\uFE00-\\uFE0F]/`\n\nString values:\n- can't include variation selectors (`[\\uFE00-\\uFE0F]`), unless there are other characters in the string.\n- can't include the \"null\" control character (`\\u0000`)\n"}},"api-service-Agreements-apiv4":{"description":"This object contains the marketing agreements of the Profile.\n\nYou can also pass the values as strings (`\"true\"`;`\"True\"`/`\"false\"`;`\"False\"`) or integers (`1` for true and `0` for false).","type":"object","properties":{"email":{"type":"boolean","description":"Permission to receive marketing information by e-mail. This field has no effect if [email is not a unique identifier](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/).","default":false},"sms":{"type":"boolean","description":"Permission to receive marketing information by SMS","default":false},"push":{"type":"boolean","description":"Permission to receive push notifications","default":false},"webPush":{"type":"boolean","description":"Permission to receive webpush notifications","default":false},"whatsApp":{"type":"boolean","description":"Permission to receive marketing information via WhatsApp","default":false},"bluetooth":{"type":"boolean","deprecated":true,"description":"This field is ignored when sent.","default":false},"rfid":{"type":"boolean","deprecated":true,"description":"This field is ignored when sent.","default":false},"wifi":{"type":"boolean","deprecated":true,"description":"This field is ignored when sent.","default":false}}},"api-service-inResponseClientDetailsArray-apiv4":{"type":"array","items":{"$ref":"#/components/schemas/api-service-inResponseClientDetails-apiv4"}},"api-service-inResponseClientDetails-apiv4":{"type":"object","properties":{"clientId":{"$ref":"#/components/schemas/api-service-ClientId-apiv4"},"email":{"$ref":"#/components/schemas/api-service-inBodyClientEmail-apiv4"},"phone":{"$ref":"#/components/schemas/api-service-inBodyClientPhone-apiv4"},"customId":{"$ref":"#/components/schemas/api-service-inBodyClientCustomId-apiv4"},"uuid":{"$ref":"#/components/schemas/api-service-inBodyClientUuid-apiv4"},"firstName":{"$ref":"#/components/schemas/api-service-inBodyClientFirstName-apiv4"},"lastName":{"$ref":"#/components/schemas/api-service-inBodyClientLastName-apiv4"},"displayName":{"$ref":"#/components/schemas/api-service-inBodyClientDisplayName-apiv4"},"company":{"$ref":"#/components/schemas/api-service-inBodyClientCompany-apiv4"},"address":{"$ref":"#/components/schemas/api-service-inBodyClientAddress-apiv4"},"city":{"$ref":"#/components/schemas/api-service-inBodyClientCity-apiv4"},"province":{"$ref":"#/components/schemas/api-service-inBodyClientProvince-apiv4"},"zipCode":{"$ref":"#/components/schemas/api-service-inBodyClientZipCode-apiv4"},"countryCode":{"$ref":"#/components/schemas/api-service-inBodyClientCountryCode-apiv4"},"birthDate":{"$ref":"#/components/schemas/api-service-inBodyClientBirthDate-apiv4"},"sex":{"$ref":"#/components/schemas/api-service-inBodyClientSex-apiv4"},"avatarUrl":{"$ref":"#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4"},"whatsAppId":{"$ref":"#/components/schemas/api-service-inBodyClientWhatsAppId-apiv4"},"anonymous":{"description":"Information if the profile is anonymous","type":"boolean","example":false},"agreements":{"$ref":"#/components/schemas/api-service-Agreements-apiv4"},"attributes":{"$ref":"#/components/schemas/api-service-Attributes-apiv4-apiv4"},"tags":{"$ref":"#/components/schemas/api-service-Tags-apiv4"},"previousClients":{"$ref":"#/components/schemas/api-service-PreviousClients-apiv4"},"lastActivityDate":{"deprecated":true,"type":"string","example":"2019-03-19T14:05:39Z","description":"**Don't use** the values from this field. The last activity calculation mechanism is disabled and the value is always the profile's creation date. The field will be removed in a future release."}}},"api-service-PreviousClients-apiv4":{"type":"array","description":"- When retrieving profile data, this field is always empty.\n- In the response after a profile merge, the format depends on the merge type.  \n      This field only provides information about the last merge. If a profile in the last merge was the result of another merge in the past, the data of the previous merge isn't included.\n","items":{"oneOf":[{"type":"integer","title":"Merged by ID","description":"IDs of the profiles which were merged into the target profile"},{"type":"object","title":"Merged by customId","description":"Profiles which were merged into the target profile","properties":{"customId":{"type":"string","description":"customId of a profile merged into the target profile"}}}]}},"api-service-CreateatransactionRequest-apiv4":{"required":["client","orderId","paymentInfo","products","revenue","value","source"],"type":"object","properties":{"client":{"$ref":"#/components/schemas/api-service-Client-apiv4"},"discountAmount":{"description":"How much the total cost decreased","type":"object","nullable":true,"properties":{"amount":{"type":"number","description":"The discount amount","minimum":0},"currency":{"$ref":"#/components/schemas/api-service-Currency-apiv4"}}},"metadata":{"$ref":"#/components/schemas/api-service-TransactionMeta-apiv4"},"orderId":{"$ref":"#/components/schemas/api-service-OrderId-apiv4"},"paymentInfo":{"$ref":"#/components/schemas/api-service-PaymentInfo-apiv4"},"products":{"type":"array","items":{"$ref":"#/components/schemas/api-service-Product-apiv4"},"description":"A list of items in the transaction.\n\nEach item creates a `product.buy` event. The UUID of that event is generated from a combination of:\n  - the UUID of the `transaction.charge` event created by the transaction\n  - the position of the item in this array. This has an effect on updating transaction events. \n\nThis means that when you update a transaction (a transaction can only be updated if it has an `eventSalt` and the same timestamp as the original), you must keep the original order of items in the array. Otherwise, you may accidentally overwrite a `product.buy` event with another item's event. The system does NOT recognize the item by SKU in this case.\n\n**Example**:\n  1. You create a transaction with items A, B and C (in that order).\n  2. You update the transaction and the items are now A, B, D, and C (in that order).\n  3. Because item D took the position of C in the event, it has the same UUID as C had earlier. The event of D overwrites the event of C, and C is generated as a new event.\n\nAdditionally, because events can't be deleted from the database, cancelled items remain as events in a Profile's history. You can use a custom free-form property to tag items as cancelled. This way, you can keep cancelled items in `products` when updating a transaction without breaking the order of items. You can also use the property to filter cancelled items out in Analytics.\n"},"recordedAt":{"$ref":"#/components/schemas/api-service-Time-apiv4"},"revenue":{"$ref":"#/components/schemas/api-service-Revenue-apiv4"},"value":{"required":["amount","currency"],"type":"object","description":"If you want to display the price before taxation, use this object. If you only want to display the price after taxation, set the values to the same as in `revenue`.","properties":{"amount":{"type":"number","minimum":0,"description":"The total amount","example":112.25},"currency":{"$ref":"#/components/schemas/api-service-Currency-apiv4"}}},"source":{"$ref":"#/components/schemas/api-service-eventSource-apiv4"},"eventSalt":{"$ref":"#/components/schemas/api-service-EventSalt-apiv4"}}},"api-service-EventSalt-apiv4":{"type":"string","example":"972346context.action2019-02-07T09:53:56.999+00:00","description":"When an event has an `eventSalt`, it can be overwritten by sending another event. The event's UUID stays the same.\n\n`eventSalt` must be unique in a workspace. An example of creating a salt is by generating a UUID or concatenating the profile ID, event's name, and timestamp, including milliseconds. This creates a value whose possibility of being duplicated is practically zero.\n\nTo overwrite an event with another one, the new event MUST:\n- have the same `eventSalt` as the original event\n- have the same date and time as the original event (If the date and time don't match the original event, event salt doesn't have any effect.)\n- belong to the same `clientId` as the original event\n- have the same action (event name) as the original event\n\n------\n**IMPORTANT**:  \n- DO NOT send the same `eventSalt` to different profiles!\n- DO NOT send the same `eventSalt` with a different action!\n- Pay attention to timezones - more details in the description of the `time` property (in v4/transactions events, it's called `recordedAt`).\n- If you send a future time in an event, it is rejected and the current time is assigned automatically. This means it's impossible to use event salt with future times.\n- An event without an `eventSalt` can't be overwritten. The parameter cannot be added to an event at a later time.\n- The parameter can't be retrieved later. You must keep track of the values that you send.  \n- In Automations that use the overwritten event as a trigger, the **automation is triggered if the new event is sent more than 72 hours after the original**. This is because the event UUID stays the same, and Automation treats events with the same UUID within 72 hours as duplicates that were sent due to an error.\n"},"api-service-HTTP400-apiv4":{"type":"object","properties":{"error":{"type":"string","description":"Summary of the error"},"status":{"type":"integer","format":"int32","description":"Status code"},"timestamp":{"type":"string","description":"Time when the message was sent"},"path":{"type":"string","description":"URL of the requested resource"},"message":{"type":"string","description":"Description of the problem"},"errors":{"type":"array","description":"Additional details of the errors, if applicable","items":{"$ref":"#/components/schemas/api-service-Error-apiv4"}}}},"api-service-PaymentInfo-apiv4":{"description":"Payment details","required":["method"],"type":"object","properties":{"method":{"description":"Payment method","type":"string","example":"CASH"}}},"api-service-Product-apiv4":{"required":["finalUnitPrice","quantity","sku"],"type":"object","additionalProperties":{"description":"Additional, free-form properties of the item"},"properties":{"finalUnitPrice":{"description":"Total final price of the item per unit, including tax and discounts","required":["amount","currency"],"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"The price of the items","example":3.25},"currency":{"$ref":"#/components/schemas/api-service-Currency-apiv4"}}},"name":{"type":"string","example":"Soft drink","description":"Name of the item"},"sku":{"$ref":"#/components/schemas/api-service-ItemSku-apiv4"},"categories":{"type":"array","description":"A list of the item's categories","items":{"type":"string"}},"image":{"type":"string","description":"URL of the item's image"},"url":{"type":"string","description":"URL of the item's page"},"netUnitPrice":{"required":["amount","currency"],"type":"object","description":"Price before taxation (before or after discounts, depending on your implementation and discount type)","properties":{"amount":{"type":"number","minimum":0,"description":"The amount of money","example":3.25},"currency":{"$ref":"#/components/schemas/api-service-Currency-apiv4"}}},"tax":{"type":"number","format":"float","description":"Tax as a percentage"},"quantity":{"type":"number","example":2.5,"description":"The number or amount of purchased items"},"regularPrice":{"description":"Regular price of the item after taxation, before discounts","required":["amount","currency"],"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"The amount of money","example":3.25},"currency":{"$ref":"#/components/schemas/api-service-Currency-apiv4"}}},"discountPrice":{"description":"Discount as an amount. For example, if the regular price is 500, and the final price is 450, the discount amount is 50.","type":"object","required":["amount","currency"],"properties":{"amount":{"type":"number","minimum":0,"description":"The amount of money","example":15.5},"currency":{"$ref":"#/components/schemas/api-service-Currency-apiv4"}}},"discountPercent":{"type":"number","format":"float","description":"Discount as a percentage"}}},"api-service-Client-apiv4":{"type":"object","description":"You must provide at least one of those profile identifiers.\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n","properties":{"customId":{"$ref":"#/components/schemas/api-service-inBodyClientCustomId-apiv4"},"id":{"$ref":"#/components/schemas/api-service-ClientId-apiv4"},"uuid":{"$ref":"#/components/schemas/api-service-inBodyClientUuid-apiv4"},"email":{"$ref":"#/components/schemas/api-service-inBodyClientEmail-apiv4"}}},"api-service-eventSource-apiv4":{"type":"string","enum":["WEB_DESKTOP","WEB_MOBILE","MOBILE_APP","POS","MOBILE","DESKTOP"],"description":"Source of the event. \n","example":"MOBILE"},"api-service-Tag-apiv4":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/api-service-TagId-apiv4"},"name":{"$ref":"#/components/schemas/api-service-TagName-apiv4"},"color":{"$ref":"#/components/schemas/api-service-TagColor-apiv4"}}},"api-service-TagCreate-apiv4":{"type":"object","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/api-service-TagName-apiv4"},"color":{"$ref":"#/components/schemas/api-service-TagColor-apiv4"}}},"api-service-TagUpdate-apiv4":{"type":"object","properties":{"color":{"$ref":"#/components/schemas/api-service-TagColor-apiv4"}}},"api-service-TagResponse-apiv4":{"type":"object","properties":{"businessProfileId":{"type":"integer","description":"ID of the Workspace where the tag was created","example":100005},"id":{"$ref":"#/components/schemas/api-service-TagId-apiv4"},"name":{"$ref":"#/components/schemas/api-service-TagName-apiv4"},"color":{"$ref":"#/components/schemas/api-service-TagColor-apiv4"}}},"api-service-TagId-apiv4":{"description":"ID of the tag","type":"integer","format":"int32","example":645},"api-service-TagColor-apiv4":{"description":"Display color of the tag; hexadecimal value","type":"string","example":"#0768ff"},"api-service-TagName-apiv4":{"description":"Name of the tag","type":"string","example":"nice tag"},"api-service-EventBase-apiv4":{"type":"object","required":["label","client"],"properties":{"label":{"$ref":"#/components/schemas/api-service-eventLabel-apiv4"},"client":{"$ref":"#/components/schemas/api-service-Client-apiv4"},"time":{"$ref":"#/components/schemas/api-service-Time-apiv4"},"eventSalt":{"$ref":"#/components/schemas/api-service-EventSalt-apiv4"}}},"api-service-DiscountAmount-apiv4":{"description":"How much the total cost decreased","type":"object","nullable":true,"properties":{"amount":{"type":"number","description":"The discount amount","minimum":0},"currency":{"$ref":"#/components/schemas/api-service-Currency-apiv4"}}},"api-service-DiscountPercent-apiv4":{"description":"Discount as a percentage","type":"number","format":"float"},"api-service-DiscountCode-apiv4":{"description":"Discount code","type":"string"},"api-service-OrderStatus-apiv4":{"description":"Status of the order","type":"string"},"api-service-Value-apiv4":{"required":["amount","currency"],"type":"object","description":"If you want to display the price without tax, use this object. If you only want to display the total price of the transaction, set the values to the same as in `revenue`.","properties":{"amount":{"type":"number","minimum":0,"description":"The total amount","example":112.25},"currency":{"$ref":"#/components/schemas/api-service-Currency-apiv4"}}},"api-service-Revenue-apiv4":{"required":["amount","currency"],"type":"object","description":"Transaction revenue (amount after taxation). This field is not calculated automatically by the backend, you must provide the value by summing up the results of `finalUnitPrice * quantity` from all items in the `products` array.","properties":{"amount":{"type":"number","minimum":0,"description":"The total amount","example":64.25},"currency":{"$ref":"#/components/schemas/api-service-Currency-apiv4"}}},"api-service-Products-apiv4":{"type":"array","items":{"$ref":"#/components/schemas/api-service-Product-apiv4"},"description":"A list of items in the transaction"},"api-service-ItemName-apiv4":{"type":"string","description":"Item name","example":"Soft drink"},"api-service-ItemCategory-apiv4":{"type":"string","description":"Item category","example":"Beverages"},"api-service-ItemCategories-apiv4":{"type":"array","items":{"type":"string"},"description":"If an item belongs to more than one category, include the categories in an array"},"api-service-Offline-apiv4":{"type":"boolean","description":"Set to `true` if the event occurred outside a website, for example in a cash register"},"api-service-ItemUrlAddress-apiv4":{"type":"string","description":"URL address of the item page"},"api-service-Producer-apiv4":{"type":"string","description":"Manufacturer of the item"},"api-service-Quantity-apiv4":{"description":"The amount of goods","type":"number"},"api-service-FromRecommendation-apiv4":{"type":"boolean","description":"Set to `true` if the event is triggered by an element from a recommendation."},"api-service-CampaignHash-apiv4":{"type":"string","description":"If the event results from a recommendation, this is the from the `x-Correlation-Id` header of AI Recommendations download","example":"21e0d4b0-bd4e-497b-817b-4fr660284918"},"api-service-DefaultParamSource-apiv4":{"type":"object","description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nIf you want to send a date/time param for use in analytics, take the following into account:\n- The date/time should be formatted according to ISO 8601.\n- The time zone of the workspace affects dates/times in the params that DON'T have a defined timezone. Example:\n    - `2023-10-09T12:00:00` doesn't have a timezone indicator and will be considered as a time in the workspace's time zone.\n    - `2023-10-09T12:00:00+02:00` has a timezone indicator (`+02:00`), so the timezone of the workspace doesn't affect it.\n    - `2023-10-09T12:00:00Z` is a time in the UTC time zone (denoted by the `Z` at the end), so the timezone of the workspace doesn't affect it.\n\nAside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:\n\n<span style=\"color:red\"><strong>WARNING:</strong></span>\n- If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.\n- Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>\n<code>modifiedBy</code><br>\n<code>apiKey</code><br>\n<code>eventUUID</code><br>\n<code>ip</code><br>\n<code>time</code><br>\n<code>businessProfileId</code>\n","additionalProperties":true},"api-service-ClientApplicationStartedEventParams-apiv4":{"type":"object","description":"Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.\n\nAside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:\n\n<span style=\"color:red\"><strong>WARNING:</strong></span>\n- If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.\n- Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>\n<code>modifiedBy</code><br>\n<code>apiKey</code><br>\n<code>eventUUID</code><br>\n<code>ip</code><br>\n<code>time</code><br>\n<code>businessProfileId</code>\n","required":["applicationName","version"],"properties":{"applicationName":{"$ref":"#/components/schemas/api-service-ApplicationName-apiv4"},"version":{"$ref":"#/components/schemas/api-service-Version-apiv4"}},"additionalProperties":true},"api-service-ApplicationName-apiv4":{"type":"string","description":"Name of the application which sends the event"},"api-service-Version-apiv4":{"type":"string","description":"Version of the application which sends the event"},"api-service-EventAction-apiv4":{"type":"string","example":"context.action","pattern":"^[a-zA-Z0-9\\.\\-_]{2,64}$","description":"For custom events, enter your own action name. For pre-defined events, omit this field.<br>The action name can be up to 32 characters long and must match the following regular expression (ECMA flavor): `^[a-zA-Z0-9\\\\.\\\\-_]{2,64}$`\n"},"api-service-EventType-apiv4":{"type":"string","description":"The type of event. If custom event, use `custom`.\n\nIf other type, use the value that corresponds to the single event's endpoint.(for example, \"content shared\" events, which use the `/v4/events/shared` endpoint when sent as single events, have the type set to `shared`).\n"},"api-service-CorrelationId-apiv4":{"type":"string","description":"`correlationId` of the request which this event relates to, for example a recommendation or search request (the parameter is included in the response to that request).\n"},"api-service-CampaignId-apiv4":{"type":"string","description":"ID of the campaign related to the event"},"api-service-RecommendationItems-apiv4":{"type":"array","description":"An array of items included in the recommendation. The items are identified by their `itemId` (also called `sku`, `productId`, and `retailer_part_no` in other APIs and SDKs)","minItems":0,"items":{"$ref":"#/components/schemas/api-service-Item-apiv4"}},"api-service-Item-apiv4":{"type":"string","description":"itemId (also called `sku`, `productId`, and `retailer_part_no` in other APIs and SDKs) of the item"},"api-service-ItemPosition-apiv4":{"type":"integer","description":"Position of the clicked item in the result list (count starts with 1)"},"api-service-SearchType-apiv4":{"type":"string","description":"Type of the search","enum":["full-text-search","autocomplete","listing","visual"]},"api-service-Suggestion-apiv4":{"type":"string","description":"Suggestion name"},"automation-brain-TriggerTypeCount":{"type":"object","properties":{"triggerType":{"type":"string","description":"The type of trigger node","example":"EventTrigger"},"count":{"type":"integer","description":"Number of running workflows with this trigger type","example":25}},"required":["triggerType","count"]},"automation-brain-DiagramCountByTriggerTypeResponse":{"type":"object","properties":{"counts":{"type":"array","items":{"$ref":"#/components/schemas/automation-brain-TriggerTypeCount"},"description":"List of trigger types with their workflow counts"},"total":{"type":"integer","description":"Total number of active workflows across all trigger types","example":55}},"required":["counts","total"]},"automation-brain-DiagramStatus":{"type":"string","description":"The status of the workflow","enum":["Draft","Pending","Running","Paused","Stopped"]},"automation-brain-StatusCount":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/automation-brain-DiagramStatus"},"count":{"type":"integer","description":"Number of workflows with this status","example":42}},"required":["status","count"]},"automation-brain-DiagramCountByStatusResponse":{"type":"object","properties":{"counts":{"type":"array","items":{"$ref":"#/components/schemas/automation-brain-StatusCount"},"description":"List of statuses with their workflow counts (always includes all 5 statuses)"},"total":{"type":"integer","description":"Total number of workflows across all statuses","example":70}},"required":["counts","total"]},"automation-brain-DashboardDiagramMostUsedItem":{"type":"object","properties":{"diagramId":{"$ref":"#/components/schemas/automation-brain-DiagramId"},"name":{"$ref":"#/components/schemas/automation-brain-DiagramName"},"status":{"$ref":"#/components/schemas/automation-brain-DiagramStatus"},"dataPoints":{"type":"integer","description":"Number of data points generated by this workflow","example":1500}},"required":["diagramId","name","status","dataPoints"]},"automation-brain-PaginatedDashboardDiagramsMostUsed":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","description":"An array of most used workflows","items":{"$ref":"#/components/schemas/automation-brain-DashboardDiagramMostUsedItem"}},"meta":{"$ref":"#/components/schemas/automation-brain-PaginationV2"}}},"automation-brain-DashboardDiagramMostTriggeredItem":{"type":"object","properties":{"diagramId":{"$ref":"#/components/schemas/automation-brain-DiagramId"},"name":{"$ref":"#/components/schemas/automation-brain-DiagramName"},"status":{"$ref":"#/components/schemas/automation-brain-DiagramStatus"},"triggeredPathsCount":{"type":"integer","description":"Number of triggered paths for this workflow","example":320}},"required":["diagramId","name","status","triggeredPathsCount"]},"automation-brain-PaginatedDashboardDiagramsMostTriggered":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","description":"An array of most triggered workflows","items":{"$ref":"#/components/schemas/automation-brain-DashboardDiagramMostTriggeredItem"}},"meta":{"$ref":"#/components/schemas/automation-brain-PaginationV2"}}},"automation-brain-DashboardDiagramInProgressItem":{"type":"object","properties":{"diagramId":{"$ref":"#/components/schemas/automation-brain-DiagramId"},"name":{"$ref":"#/components/schemas/automation-brain-DiagramName"},"status":{"$ref":"#/components/schemas/automation-brain-DiagramStatus"},"journeysInProgress":{"type":"integer","description":"Number of paths currently active in this workflow","example":42}},"required":["diagramId","name","status","journeysInProgress"]},"automation-brain-PaginatedDashboardDiagramsInProgress":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","description":"An array of workflows with at least one path in progress","items":{"$ref":"#/components/schemas/automation-brain-DashboardDiagramInProgressItem"}},"meta":{"$ref":"#/components/schemas/automation-brain-PaginationV2"}}},"automation-brain-DashboardUpcomingStatusChangeItem":{"type":"object","properties":{"actionType":{"type":"string","description":"Type of the scheduled status change","enum":["Resume","Pause","Stop"],"example":"Pause"},"plannedAt":{"$ref":"#/components/schemas/automation-brain-PlannedAt"},"diagramId":{"$ref":"#/components/schemas/automation-brain-DiagramId"},"name":{"$ref":"#/components/schemas/automation-brain-DiagramName"},"currentStatus":{"type":"string","description":"Current status of the workflow","enum":["Draft","Running","Paused","Stopped","Pending"],"example":"Running"}},"required":["actionType","plannedAt","diagramId","name","currentStatus"]},"automation-brain-DashboardUpcomingTriggerItem":{"type":"object","properties":{"triggerType":{"type":"string","description":"Type of the trigger","example":"RepeatTrigger"},"plannedAt":{"$ref":"#/components/schemas/automation-brain-PlannedAt"},"diagramId":{"$ref":"#/components/schemas/automation-brain-DiagramId"},"name":{"$ref":"#/components/schemas/automation-brain-DiagramName"}},"required":["plannedAt","diagramId","name"]},"automation-brain-PaginatedDashboardUpcomingStatusChanges":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","description":"An array of upcoming status changes","items":{"$ref":"#/components/schemas/automation-brain-DashboardUpcomingStatusChangeItem"}},"meta":{"$ref":"#/components/schemas/automation-brain-PaginationV2"}}},"automation-brain-PaginatedDashboardUpcomingTriggers":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","description":"An array of upcoming trigger events","items":{"$ref":"#/components/schemas/automation-brain-DashboardUpcomingTriggerItem"}},"meta":{"$ref":"#/components/schemas/automation-brain-PaginationV2"}}},"automation-brain-DashboardDiagramWithIssuesItem":{"type":"object","properties":{"diagramId":{"$ref":"#/components/schemas/automation-brain-DiagramId"},"name":{"$ref":"#/components/schemas/automation-brain-DiagramName"},"status":{"$ref":"#/components/schemas/automation-brain-DiagramStatus"},"failureCount":{"type":"integer","description":"Number of failures encountered by this workflow","example":12}},"required":["diagramId","name","status","failureCount"]},"automation-brain-PaginatedDashboardDiagramsWithIssues":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","description":"An array of workflows with issues","items":{"$ref":"#/components/schemas/automation-brain-DashboardDiagramWithIssuesItem"}},"meta":{"$ref":"#/components/schemas/automation-brain-PaginationV2"}}},"automation-brain-DiagramId":{"type":"string","format":"uuid","description":"UUID of the workflow"},"automation-brain-DiagramName":{"type":"string","description":"Name of the workflow","example":"Example workflow"},"automation-brain-PointerSource":{"type":"object","description":"Source of the problem","properties":{"pointer":{"type":"string"},"value":{"type":"string"}},"required":["pointer"]},"automation-brain-ErrorDetails":{"type":"object","description":"Additional details","additionalProperties":{"type":"string"}},"automation-brain-Error":{"type":"object","properties":{"httpStatus":{"type":"integer","description":"HTTP status code of error"},"errorCode":{"type":"string","description":"Synerise error code. See [API error reference](https://developers.synerise.com/errors.html)"},"message":{"type":"string","description":"A description of the problem"},"timestamp":{"type":"string","format":"date-time","description":"Time when the problem occurred"},"help":{"type":"string","description":"Link to the error reference"},"traceId":{"type":"string","description":"Trace ID for troubleshooting"},"errors":{"type":"array","description":"Array of errors","items":{"$ref":"#/components/schemas/automation-brain-Error"}},"source":{"$ref":"#/components/schemas/automation-brain-PointerSource"},"details":{"$ref":"#/components/schemas/automation-brain-ErrorDetails"},"field":{"type":"string","description":"JSON field which caused a problem"}},"required":["errorCode","httpStatus","message"]},"automation-brain-AutomationContext":{"description":"Context of the workflow.\n- `Client` workflows are triggered by \"Profile Event\"; \"Data Changed\"; and \"Audience\" nodes.\n- `Business` workflows are triggered by \"Business Event\" and \"Scheduled Run\" nodes.\n- `Undefined` workflows have no trigger and can't be started until their configuration is finished.\n","type":"string","enum":["Client","Business","Undefined"]},"automation-brain-PaginatedDiagrams":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","description":"An array of workflows","items":{"$ref":"#/components/schemas/automation-brain-DiagramDetails"}},"meta":{"$ref":"#/components/schemas/automation-brain-Pagination"}}},"automation-brain-PaginatedDiagramsV2":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","description":"An array of workflows","items":{"$ref":"#/components/schemas/automation-brain-DiagramDetails"}},"meta":{"$ref":"#/components/schemas/automation-brain-PaginationV2"}}},"automation-brain-DiagramDetails":{"type":"object","description":"Details of the workflow","required":["diagramId","author","listingAuthor","name","created","updated","status","scheduleStatus","configuration","catalogId","context","tags","description","hasTransformation","businessProfileId"],"properties":{"diagramId":{"$ref":"#/components/schemas/automation-brain-DiagramId"},"author":{"description":"Author of the workflow","type":"string","example":"example@synerise.com"},"listingAuthor":{"type":"object","properties":{"userId":{"type":"number"},"clientId":{"type":"number"},"clientApiHash":{"type":"string"},"businessProfileApiHash":{"type":"string"}}},"name":{"$ref":"#/components/schemas/automation-brain-DiagramName"},"created":{"description":"Creation time","type":"string","format":"date-time","example":"2019-01-04T13:17:18.315Z"},"updated":{"description":"Last update time","type":"string","format":"date-time","example":"2019-01-04T13:17:18.315Z"},"status":{"$ref":"#/components/schemas/automation-brain-DiagramStatus"},"scheduleStatus":{"description":"Workflow schedule status","type":"string","enum":["On","Off","NoSchedule"]},"configuration":{"$ref":"#/components/schemas/automation-brain-DiagramConfiguration"},"catalogId":{"description":"UUID of the catalog where the workflow is saved","type":"string","example":"030a9be3-8ccc-44c7-b20b-27768816cab7"},"context":{"$ref":"#/components/schemas/automation-brain-AutomationContext"},"tags":{"description":"Tags associated with this workflow","type":"array","items":{"$ref":"#/components/schemas/automation-brain-TagDetails"}},"description":{"description":"Workflow description","type":"string","example":"Sample workflow description"},"hasTransformation":{"type":"boolean","description":"`true` if the workflow contains Data Transformation nodes"},"businessProfileId":{"type":"number"}}},"automation-brain-DiagramConfiguration":{"description":"Workflow configuration","type":"object","properties":{"capping":{"$ref":"#/components/schemas/automation-brain-LimitConfiguration"},"multipleJourneys":{"type":"boolean","description":"Diagram has multiple journeys enabled","default":false}}},"automation-brain-LimitConfiguration":{"type":"object","description":"Capping configuration of the workflow","required":["limit","period"],"properties":{"limit":{"type":"number","description":"The maximum number of times the a journey for a single profile within the limits defined in `period`"},"period":{"type":"object","description":"The time period for the quantitative limit defined in `limit`","required":["type"],"properties":{"type":{"type":"string","description":"The type of time limit. `Time` is the only type available for workflows. A journey can be started X times in a period defined by `timeSeconds`.\nX is defined by the `limit` field.","enum":["Time"]},"timeSeconds":{"type":"number","description":"The length of the limit, in seconds (the limit is always calculated into seconds, even if another unit of time is used in the Synerise Web Application)."}}}}},"automation-brain-TagDetails":{"type":"object","required":["hash","value","color"],"properties":{"hash":{"type":"string","example":"030a9be3-8ccc-44c7-b20b-27768816cab7","description":"Unique ID of the tag"},"value":{"type":"string","description":"Name of the tag"},"color":{"type":"string","description":"Color of the tag, hexadecimal","example":"#0b68ff"},"description":{"type":"string","description":"Description of the tag"},"icon":{"type":"string","description":"URL of the tag's icon"}}},"automation-brain-Pagination":{"type":"object","description":"Pagination data","required":["limit","page","totalPages","totalCount"],"properties":{"limit":{"type":"number","example":3,"description":"Maximum number of items per page"},"page":{"type":"number","example":1,"description":"Current page number"},"totalPages":{"type":"number","example":10,"description":"Total number of pages"},"totalCount":{"description":"Total number of workflows on all pages","type":"number","example":29}}},"automation-brain-PaginationV2":{"type":"object","description":"Pagination data","required":["limit","links"],"properties":{"limit":{"type":"number","example":3,"description":"Maximum number of items per page"},"links":{"type":"array","description":"Links to previous/next/first pages","items":{"$ref":"#/components/schemas/automation-brain-ListingLink"}}}},"automation-brain-ListingLink":{"type":"object","required":["rel","url"],"properties":{"rel":{"type":"string","description":"The type of relation","example":"first","enum":["first","prev","next"]},"url":{"type":"string","description":"Link to the page","example":"http://automation-brain/v2/diagrams?page=1&limit=10"}}},"automation-brain-RepeatModel":{"description":"Repetition times","type":"object","required":["repeatType","body"],"properties":{"repeatType":{"description":"Repetition type. **Currently, only `OnDate` is compatible with the Synerise Web Portal.**\n\n- \"Interval\" runs the rule after a counter finishes. Then the counter restarts.\n- \"Daily\" runs the rule at a specific time each day.\n- \"Weekly\" runs the rule on specific days of the week, at a specific time.\n- \"Monthly\" runs the rule on specific days of the month, at a specific time.\n- \"OnDate\" runs the rule once, at a specific date and time.\n","type":"string","enum":["Interval","Daily","Weekly","Monthly","OnDate"]},"body":{"description":"Repetition time","oneOf":[{"$ref":"#/components/schemas/automation-brain-RepeatInterval"},{"$ref":"#/components/schemas/automation-brain-RepeatDaily"},{"$ref":"#/components/schemas/automation-brain-RepeatWeekly"},{"$ref":"#/components/schemas/automation-brain-RepeatMonthly"},{"$ref":"#/components/schemas/automation-brain-OnDate"}]}}},"automation-brain-RepeatInterval":{"title":"Interval","type":"object","required":["start","intervalSeconds"],"properties":{"start":{"type":"string","description":"Date and time to start counting the interval from","format":"date-time","example":"2020-01-01T01:00:00.000"},"intervalSeconds":{"type":"integer","minimum":3600,"maximum":31536000,"description":"The interval value in seconds","example":6000}}},"automation-brain-RepeatDaily":{"title":"Daily","type":"object","required":["hours"],"properties":{"hours":{"type":"array","description":"Used for running the rule at a specific time or times every day.","items":{"type":"string","description":"Hour with minutes","example":"12:30"}}}},"automation-brain-RepeatWeekly":{"title":"Weekly","type":"object","required":["daysOfWeek"],"properties":{"daysOfWeek":{"type":"array","description":"Used for running the rule on specific days of the week.","items":{"type":"object","required":["day","dayTime","ruleId"],"properties":{"day":{"type":"integer","description":"Number of the day in the week. `1` is Monday."},"dayTime":{"type":"string","description":"Hour with minutes","example":"21:37"},"ruleId":{"type":"integer","description":"Number of the rule"}}}}}},"automation-brain-RepeatMonthly":{"title":"Monthly","type":"object","required":["daysOfMonth"],"properties":{"daysOfMonth":{"type":"array","description":"Used for running the automation on specific days of the month.","items":{"type":"object","required":["day","dayTime","ruleId"],"properties":{"day":{"type":"integer","description":"Days of the month with. `-1` is the last day of the month."},"dayTime":{"type":"string","description":"Hour with minutes","example":"21:37"},"ruleId":{"type":"integer","description":"Number of rule"}}}}}},"automation-brain-OnDate":{"title":"OnDate","type":"object","required":["date"],"properties":{"date":{"type":"string","description":"A date and time when the rule runs.","example":"2020-01-01T01:00:00.000"}}},"automation-brain-ExternalBlockStatsWithInfo":{"type":"object","description":"The name of this object is the UUID of the node","required":["type","entered"],"properties":{"name":{"type":"string","description":"Name of the node, if defined"},"type":{"type":"string","description":"Node type","example":"EventTrigger"},"entered":{"type":"integer","format":"int64","description":"The number of profiles which entered this node"},"executed":{"type":"integer","format":"int64","description":"The number of profiles which completed this node. NOT available for: Trigger nodes, End nodes, ABx Test nodes, Split Path nodes, and Merge Paths nodes."}},"additionalProperties":{"type":"integer","description":"Additional statistics, depending on node type. See the [User guide](https://hub.synerise.com/docs/automation/automation-activity-tracking/#statistics-reference) for a list.","format":"int64"}},"automation-brain-ExternalDiagramStatsWithInfo":{"type":"object","required":["started","finished","inProgress","blocks"],"properties":{"started":{"type":"integer","format":"int64","description":"The number of times a workdlow was started (a trigger node was activated)"},"finished":{"type":"integer","format":"int64","description":"The number of times an \"End\" node was reached."},"inProgress":{"type":"integer","format":"int64","description":"The number of profiles currently in the workflow."},"blocks":{"type":"object","description":"Statistics for individual nodes.","additionalProperties":{"$ref":"#/components/schemas/automation-brain-ExternalBlockStatsWithInfo"}}}},"automation-brain-HTTP400":{"type":"object","properties":{"error":{"type":"string","description":"Summary of the error"},"status":{"type":"integer","format":"int32","description":"Status code"},"timestamp":{"type":"string","description":"Time when the message was sent"},"message":{"type":"string","description":"Description of the problem"}}},"automation-brain-ScheduledActionType":{"type":"string","description":"The status to apply when the rule runs. **A stopped workflow can't be restarted**.","enum":["Resume","Pause","Stop"]},"automation-brain-ScheduleTimezone":{"description":"Timezone of the schedule. Accepts these formats:\n- \"Europe/Paris\"\n- \"-05:00\"\n- \"UTC-1\"\n","type":"string","example":"Europe/Paris"},"automation-brain-RuleId":{"type":"string","format":"uuid","description":"Unique ID of the rule"},"automation-brain-DiagramScheduleRequest":{"type":"object","properties":{"timezone":{"$ref":"#/components/schemas/automation-brain-ScheduleTimezone"},"rules":{"type":"array","description":"Rules of the schedule","items":{"type":"object","properties":{"ruleId":{"type":"string","format":"uuid","description":"In POST requests, rule ID is only used in `preview` requests. It lets you match a rule with upcoming events and status changes."},"actionType":{"$ref":"#/components/schemas/automation-brain-ScheduledActionType"},"repeatModel":{"$ref":"#/components/schemas/automation-brain-RepeatModel"}},"required":["actionType","repeatModel"]}}},"required":["timezone","rules"]},"automation-brain-DiagramSchedule":{"type":"object","properties":{"active":{"description":"`true` if schedule is enabled.","type":"boolean"},"timezone":{"$ref":"#/components/schemas/automation-brain-ScheduleTimezone"},"rules":{"type":"array","description":"Rules of the schedule","items":{"type":"object","properties":{"ruleId":{"$ref":"#/components/schemas/automation-brain-RuleId"},"actionType":{"$ref":"#/components/schemas/automation-brain-ScheduledActionType"},"repeatModel":{"$ref":"#/components/schemas/automation-brain-RepeatModel"},"listingAuthor":{"type":"object","description":"Author of the rule","properties":{"userId":{"type":"number","description":"Unique ID of a Synerise user"}}},"createdAt":{"type":"string","example":"2020-01-01T01:00:00Z","format":"date-time","description":"Date and time when the rule was created"}},"required":["ruleId","actionType","repeatModel","listingAuthor","createdAt"]}}},"required":["active","timezone","rules"]},"automation-brain-ExecutedDiagramScheduleEvent":{"type":"object","properties":{"actionType":{"$ref":"#/components/schemas/automation-brain-ScheduledActionType"},"ruleId":{"$ref":"#/components/schemas/automation-brain-RuleId"},"executedAt":{"type":"string","example":"2020-01-01T01:00:00Z","description":"Date and time when the rule was executed"},"timezone":{"$ref":"#/components/schemas/automation-brain-ScheduleTimezone"},"status":{"type":"string","enum":["Success","Failure"]},"error":{"$ref":"#/components/schemas/automation-brain-Error"}},"required":["actionId","actionType","executedAt","timezone","status"]},"automation-brain-UpcomingDiagramScheduleEvent":{"type":"object","properties":{"actionType":{"$ref":"#/components/schemas/automation-brain-ScheduledActionType"},"ruleId":{"$ref":"#/components/schemas/automation-brain-RuleId"},"plannedAt":{"$ref":"#/components/schemas/automation-brain-PlannedAtNoTz"},"timezone":{"$ref":"#/components/schemas/automation-brain-ScheduleTimezone"}},"required":["actionId","actionType","plannedAt","timezone"]},"automation-brain-UpcomingDiagramStatusChange":{"type":"object","description":"A workflow status change defined by a schedule","properties":{"status":{"type":"string","description":"The status to apply","enum":["Running","Paused","Stopped"]},"ruleId":{"$ref":"#/components/schemas/automation-brain-RuleId"},"plannedAt":{"$ref":"#/components/schemas/automation-brain-PlannedAtNoTz"},"timezone":{"$ref":"#/components/schemas/automation-brain-ScheduleTimezone"}},"required":["actionId","actionType","plannedAt","timezone"]},"automation-brain-DiagramActionRequest":{"type":"object","properties":{"scheduleAction":{"type":"string","enum":["On","Off","NoAction"]}}},"automation-brain-HasMore":{"type":"boolean","description":"`true` when there are entries outside the start/end range"},"automation-brain-PlannedAt":{"type":"string","format":"date-time","description":"Planned execution time","example":"2024-06-15T10:00:00.000Z"},"automation-brain-PlannedAtNoTz":{"type":"string","description":"The time when this rule will be executed","example":"2020-01-01T01:00:00Z"},"boxes-v2-designHideLabel":{"type":"boolean","description":"When true, the label is not displayed"},"boxes-v2-designPlaceholder":{"type":"string","description":"Placeholder text displayed until the user fills in a value"},"boxes-v2-designDescription":{"type":"string","description":"The description appears under the field."},"boxes-v2-designTooltip":{"type":"string","description":"Tooltip text is displayed when the user hovers over the information icon."},"boxes-v2-designTabIndex":{"type":"number","description":"Tab index defines the order of field display when the user uses the **TAB** key to navigate the form."},"boxes-v2-designInitialFocus":{"type":"boolean","description":"If true, the field becomes the initially focused element when the form is opened."},"boxes-v2-validationRequired":{"type":"boolean","description":"When true, the field must be filled in before the form can be submitted."},"boxes-v2-validationUnique":{"type":"boolean","description":"When true, the form cannot be sent if the field contains the same data that was sent before (for example, if a user is trying to send a record with a clientUUID that already exists in another record)."},"boxes-v2-validationRegexPattern":{"type":"string","description":"A regular expression that the entered value must match"},"boxes-v2-validationErrorMessage":{"type":"string","description":"The message to display if a validation error occurs"},"boxes-v2-Label":{"type":"string","description":"A descriptive label for the field, displayed in the UI"},"boxes-v2-DataSourceDefaultValue":{"type":"string","enum":["FIRST","LAST"],"description":"Defines which option is initially selected when the form is opened"},"boxes-v2-ValuesDataSource":{"type":"object","description":"Definition of available values","required":["type","data"],"properties":{"type":{"type":"string","enum":["VALUES"],"description":"Used when the selection is from a list of values."},"data":{"type":"object","description":"Value-related data","required":["values"],"properties":{"values":{"type":"array","description":"An array of values","items":{"$ref":"#/components/schemas/boxes-v2-LabelValue"}}}}}},"boxes-v2-RelationDataSource":{"type":"object","description":"Definition of relations","required":["type","data"],"properties":{"type":{"type":"string","enum":["RELATION"],"description":"Used for defining relations"},"data":{"type":"object","description":"Relation definition","required":["rhsSchemaId","relationType"],"properties":{"rhsSchemaId":{"type":"string","example":"0790bd7c-8c2b-4e31-b01a-eee434331800","description":"UUID of the schema that the relation refers to, called a Right-Hand Schema (RHS)"},"relationType":{"type":"string","enum":["many_to_one","one_to_many","many_to_many","one_to_one"],"description":"\n*Origin schema* is the schema where this relation is defined.\n*RHS* is the schema identified by `rhsSchemaId`.\n- `one_to_many`: origin schema record can store multiple references to RHS records; RHS record can store one reference to origin schema record.\n- `many_to_one`: origin schema record can store one reference to RHS record; RHS record can store multiple references to origin schema records.\n- `many_to_many`: origin schema record can store multiple references to RHS records; RHS records can store multiple references to origin schema records.\n- `one_to_one`: origin schema record can store one reference to RHS record; RHS record can store one reference to origin schema record.\n"},"displayField":{"type":"string","example":"field1","description":"Unique name of the field whose value should represent the related record"}}}}},"boxes-v2-LabelValue":{"type":"object","required":["label","value"],"properties":{"label":{"type":"string","description":"HTML `<label>` tag of the option"},"value":{"type":"string","description":"HTML `value` attribute of the option"}}},"boxes-v2-ValueType":{"description":"This object represents a field that can be used for storing data.\n\nThe name of a field (this object) cannot contain spaces or special characters other than the underscore `_`,dash `-`, or dot `.`\n\nThis name is the ID of the field and must be unique across the schema.\n","oneOf":[{"$ref":"#/components/schemas/boxes-v2-TextValueType"},{"$ref":"#/components/schemas/boxes-v2-PasswordValueType"},{"$ref":"#/components/schemas/boxes-v2-ButtonValueType"},{"$ref":"#/components/schemas/boxes-v2-SelectValueType"},{"$ref":"#/components/schemas/boxes-v2-NumberValueType"},{"$ref":"#/components/schemas/boxes-v2-CheckboxGroupValueType"},{"$ref":"#/components/schemas/boxes-v2-SwitchValueType"},{"$ref":"#/components/schemas/boxes-v2-RadioValueType"},{"$ref":"#/components/schemas/boxes-v2-FileValueType"}],"discriminator":{"propertyName":"type","mapping":{"TEXT":"#/components/schemas/boxes-v2-TextValueType","PASSWORD":"#/components/schemas/boxes-v2-PasswordValueType","BUTTON":"#/components/schemas/boxes-v2-ButtonValueType","SELECT":"#/components/schemas/boxes-v2-SelectValueType","NUMBER":"#/components/schemas/boxes-v2-NumberValueType","CHECKBOX_GROUP":"#/components/schemas/boxes-v2-CheckboxGroupValueType","SWITCH":"#/components/schemas/boxes-v2-SwitchValueType","RADIO_GROUP":"#/components/schemas/boxes-v2-RadioValueType","FILE":"#/components/schemas/boxes-v2-FileValueType"}}},"boxes-v2-ButtonValueType":{"type":"object","title":"Button value type","required":["type","design","layout"],"properties":{"type":{"type":"string","description":"This field type renders an action button.","enum":["BUTTON"]},"design":{"$ref":"#/components/schemas/boxes-v2-TextValueTypeDesign"},"layout":{"$ref":"#/components/schemas/boxes-v2-TypeLayout"}}},"boxes-v2-PasswordValueTypeDesign":{"allOf":[{"$ref":"#/components/schemas/boxes-v2-TextValueTypeDesign"}]},"boxes-v2-PasswordValueTypeValidation":{"allOf":[{"$ref":"#/components/schemas/boxes-v2-TextValueTypeValidation"}]},"boxes-v2-PasswordValueType":{"type":"object","title":"Password value type","required":["type","design","validation","layout"],"properties":{"type":{"type":"string","description":"This field type accepts password values.","enum":["PASSWORD"]},"design":{"$ref":"#/components/schemas/boxes-v2-PasswordValueTypeDesign"},"validation":{"$ref":"#/components/schemas/boxes-v2-PasswordValueTypeValidation"},"layout":{"$ref":"#/components/schemas/boxes-v2-TypeLayout"}}},"boxes-v2-TextValueTypeDesign":{"type":"object","title":"Text value type design","description":"Field design","required":["label","hideLabel","initialFocus"],"properties":{"label":{"$ref":"#/components/schemas/boxes-v2-Label"},"hideLabel":{"$ref":"#/components/schemas/boxes-v2-designHideLabel"},"placeholder":{"$ref":"#/components/schemas/boxes-v2-designPlaceholder"},"description":{"$ref":"#/components/schemas/boxes-v2-designDescription"},"tooltip":{"$ref":"#/components/schemas/boxes-v2-designTooltip"},"tabIndex":{"$ref":"#/components/schemas/boxes-v2-designTabIndex"},"initialFocus":{"$ref":"#/components/schemas/boxes-v2-designInitialFocus"}}},"boxes-v2-TextValueTypeValidation":{"type":"object","description":"Text value type validation","required":["required","unique"],"properties":{"required":{"$ref":"#/components/schemas/boxes-v2-validationRequired"},"unique":{"$ref":"#/components/schemas/boxes-v2-validationUnique"},"minimumLength":{"type":"number","description":"The minimum number of characters"},"maximumLength":{"type":"number","description":"The maximum number of characters"},"regexPattern":{"$ref":"#/components/schemas/boxes-v2-validationRegexPattern"},"errorMessage":{"$ref":"#/components/schemas/boxes-v2-validationErrorMessage"}}},"boxes-v2-TextValueType":{"type":"object","title":"Text value type","required":["type","design","validation","layout"],"properties":{"type":{"type":"string","description":"This field type accepts text values.","enum":["TEXT"]},"design":{"$ref":"#/components/schemas/boxes-v2-TextValueTypeDesign"},"validation":{"$ref":"#/components/schemas/boxes-v2-TextValueTypeValidation"},"layout":{"$ref":"#/components/schemas/boxes-v2-TypeLayout"}}},"boxes-v2-FileValueTypeDesign":{"type":"object","title":"File value type design","description":"Field design","required":["label","hideLabel","initialFocus"],"properties":{"label":{"$ref":"#/components/schemas/boxes-v2-Label"},"hideLabel":{"$ref":"#/components/schemas/boxes-v2-designHideLabel"},"description":{"$ref":"#/components/schemas/boxes-v2-designDescription"},"tooltip":{"$ref":"#/components/schemas/boxes-v2-designTooltip"},"tabIndex":{"$ref":"#/components/schemas/boxes-v2-designTabIndex"},"initialFocus":{"$ref":"#/components/schemas/boxes-v2-designInitialFocus"}}},"boxes-v2-FileValueTypeData":{"type":"object","description":"File value type data","additionalProperties":true},"boxes-v2-FileValueTypeValidation":{"type":"object","description":"File value type validation","additionalProperties":true},"boxes-v2-FileValueType":{"type":"object","title":"File value type","required":["type","design","data","validation","layout"],"properties":{"type":{"type":"string","description":"This field type accepts file values.","enum":["FILE"]},"design":{"$ref":"#/components/schemas/boxes-v2-FileValueTypeDesign"},"data":{"$ref":"#/components/schemas/boxes-v2-FileValueTypeData"},"validation":{"$ref":"#/components/schemas/boxes-v2-FileValueTypeValidation"},"layout":{"$ref":"#/components/schemas/boxes-v2-TypeLayout"}}},"boxes-v2-SelectValueTypeDesign":{"type":"object","title":"Select value design","description":"Field design","required":["label","hideLabel","initialFocus"],"properties":{"label":{"$ref":"#/components/schemas/boxes-v2-Label"},"hideLabel":{"$ref":"#/components/schemas/boxes-v2-designHideLabel"},"placeholder":{"$ref":"#/components/schemas/boxes-v2-designPlaceholder"},"description":{"$ref":"#/components/schemas/boxes-v2-designDescription"},"tooltip":{"$ref":"#/components/schemas/boxes-v2-designTooltip"},"tabIndex":{"$ref":"#/components/schemas/boxes-v2-designTabIndex"},"initialFocus":{"$ref":"#/components/schemas/boxes-v2-designInitialFocus"}}},"boxes-v2-SelectValueTypeData":{"type":"object","description":"Select value type data or details of the relation between schemas","required":["source"],"properties":{"source":{"$ref":"#/components/schemas/boxes-v2-SelectValueTypeDataSource"}}},"boxes-v2-SelectValueTypeDataSource":{"description":"Defines the source of values or relations available for selection.","oneOf":[{"$ref":"#/components/schemas/boxes-v2-ValuesDataSource"},{"$ref":"#/components/schemas/boxes-v2-RelationDataSource"}],"discriminator":{"propertyName":"type","mapping":{"VALUES":"#/components/schemas/boxes-v2-ValuesDataSource","RELATION":"#/components/schemas/boxes-v2-RelationDataSource"}}},"boxes-v2-SelectValueTypeValidation":{"type":"object","description":"Select value type validation","required":["required","unique"],"properties":{"required":{"$ref":"#/components/schemas/boxes-v2-validationRequired"},"unique":{"$ref":"#/components/schemas/boxes-v2-validationUnique"},"errorMessage":{"$ref":"#/components/schemas/boxes-v2-validationErrorMessage"}}},"boxes-v2-SelectValueType":{"type":"object","title":"Select value type","required":["type","design","data","validation","layout"],"properties":{"type":{"type":"string","description":"This field type accepts select values and is also used for creating relations between schemas.","enum":["SELECT"]},"design":{"$ref":"#/components/schemas/boxes-v2-SelectValueTypeDesign"},"data":{"$ref":"#/components/schemas/boxes-v2-SelectValueTypeData"},"validation":{"$ref":"#/components/schemas/boxes-v2-SelectValueTypeValidation"},"layout":{"$ref":"#/components/schemas/boxes-v2-TypeLayout"}}},"boxes-v2-NumberValueTypeDesign":{"type":"object","title":"Number value type design","description":"Field design","required":["label","hideLabel","initialFocus"],"properties":{"label":{"$ref":"#/components/schemas/boxes-v2-Label"},"hideLabel":{"$ref":"#/components/schemas/boxes-v2-designHideLabel"},"placeholder":{"$ref":"#/components/schemas/boxes-v2-designPlaceholder"},"description":{"$ref":"#/components/schemas/boxes-v2-designDescription"},"tooltip":{"$ref":"#/components/schemas/boxes-v2-designTooltip"},"tabIndex":{"$ref":"#/components/schemas/boxes-v2-designTabIndex"},"initialFocus":{"$ref":"#/components/schemas/boxes-v2-designInitialFocus"}}},"boxes-v2-NumberValueTypeData":{"type":"object","description":"Number value type data","required":["decimalPlaces"],"properties":{"decimalPlaces":{"type":"number","description":"Number of digits after the decimal separator"}}},"boxes-v2-NumberValueTypeValidation":{"type":"object","description":"Number value type validation","required":["required","unique"],"properties":{"required":{"$ref":"#/components/schemas/boxes-v2-validationRequired"},"unique":{"$ref":"#/components/schemas/boxes-v2-validationUnique"},"minimumValue":{"type":"number","description":"The minimum value"},"maximumValue":{"type":"number","description":"The maximum value"},"regexPattern":{"$ref":"#/components/schemas/boxes-v2-validationRegexPattern"},"errorMessage":{"$ref":"#/components/schemas/boxes-v2-validationErrorMessage"}}},"boxes-v2-NumberValueType":{"type":"object","title":"Number value type","required":["type","design","data","validation","layout"],"properties":{"type":{"type":"string","description":"This field type accepts number fields.","enum":["NUMBER"]},"design":{"$ref":"#/components/schemas/boxes-v2-NumberValueTypeDesign"},"data":{"$ref":"#/components/schemas/boxes-v2-NumberValueTypeData"},"validation":{"$ref":"#/components/schemas/boxes-v2-NumberValueTypeValidation"},"layout":{"$ref":"#/components/schemas/boxes-v2-TypeLayout"}}},"boxes-v2-CheckboxGroupValueTypeDesign":{"type":"object","title":"CheckboxGroup value type design","description":"Field design","required":["label","hideLabel","initialFocus"],"properties":{"label":{"$ref":"#/components/schemas/boxes-v2-Label"},"hideLabel":{"$ref":"#/components/schemas/boxes-v2-designHideLabel"},"description":{"$ref":"#/components/schemas/boxes-v2-designDescription"},"tooltip":{"$ref":"#/components/schemas/boxes-v2-designTooltip"},"tabIndex":{"$ref":"#/components/schemas/boxes-v2-designTabIndex"},"initialFocus":{"$ref":"#/components/schemas/boxes-v2-designInitialFocus"}}},"boxes-v2-CheckboxGroupValueTypeData":{"type":"object","description":"Checkbox value data source","required":["source"],"properties":{"source":{"$ref":"#/components/schemas/boxes-v2-ValuesDataSource"}}},"boxes-v2-CheckboxGroupValueTypeValidation":{"type":"object","description":"Checkbox Group value type validation","required":["required"],"properties":{"required":{"$ref":"#/components/schemas/boxes-v2-validationRequired"},"minimumAmount":{"type":"number","description":"The minimal allowed number of check boxes"},"maximumAmount":{"type":"number","description":"The maximal allowed number of check boxes"},"errorMessage":{"$ref":"#/components/schemas/boxes-v2-validationErrorMessage"}}},"boxes-v2-CheckboxGroupValueType":{"type":"object","title":"Checkbox group value type","required":["type","design","data","validation","layout"],"properties":{"type":{"type":"string","enum":["CHECKBOX_GROUP"],"description":"This field type creates checkboxes."},"design":{"$ref":"#/components/schemas/boxes-v2-CheckboxGroupValueTypeDesign"},"data":{"$ref":"#/components/schemas/boxes-v2-CheckboxGroupValueTypeData"},"validation":{"$ref":"#/components/schemas/boxes-v2-CheckboxGroupValueTypeValidation"},"layout":{"$ref":"#/components/schemas/boxes-v2-TypeLayout"}}},"boxes-v2-SwitchValueTypeDesign":{"type":"object","title":"Switch value type design","description":"Field design","required":["label","hideLabel","initialFocus"],"properties":{"label":{"$ref":"#/components/schemas/boxes-v2-Label"},"hideLabel":{"$ref":"#/components/schemas/boxes-v2-designHideLabel"},"description":{"$ref":"#/components/schemas/boxes-v2-designDescription"},"tooltip":{"$ref":"#/components/schemas/boxes-v2-designTooltip"},"tabIndex":{"$ref":"#/components/schemas/boxes-v2-designTabIndex"},"initialFocus":{"$ref":"#/components/schemas/boxes-v2-designInitialFocus"}}},"boxes-v2-SwitchValueTypeData":{"type":"object","description":"Switch value type data","required":["defaultValue"],"properties":{"defaultValue":{"type":"boolean","description":"If true, the default state of the switch (toggle) when opening the form is ON."}}},"boxes-v2-SwitchValueType":{"type":"object","title":"Switch value type","required":["type","data","design","layout"],"properties":{"type":{"type":"string","description":"This field type creates switches (toggles).","enum":["SWITCH"]},"design":{"$ref":"#/components/schemas/boxes-v2-SwitchValueTypeDesign"},"data":{"$ref":"#/components/schemas/boxes-v2-SwitchValueTypeData"},"layout":{"$ref":"#/components/schemas/boxes-v2-TypeLayout"}}},"boxes-v2-RadioValueTypeDesign":{"type":"object","title":"Radio value type design","description":"Field design","required":["label","hideLabel","initialFocus"],"properties":{"label":{"$ref":"#/components/schemas/boxes-v2-Label"},"hideLabel":{"$ref":"#/components/schemas/boxes-v2-designHideLabel"},"description":{"$ref":"#/components/schemas/boxes-v2-designDescription"},"tooltip":{"$ref":"#/components/schemas/boxes-v2-designTooltip"},"tabIndex":{"$ref":"#/components/schemas/boxes-v2-designTabIndex"},"initialFocus":{"$ref":"#/components/schemas/boxes-v2-designInitialFocus"}}},"boxes-v2-RadioValueTypeData":{"type":"object","description":"Radio value type data","required":["defaultValue","source"],"properties":{"defaultValue":{"$ref":"#/components/schemas/boxes-v2-DataSourceDefaultValue"},"source":{"$ref":"#/components/schemas/boxes-v2-ValuesDataSource"}}},"boxes-v2-RadioValueType":{"type":"object","title":"Radio value type","required":["type","data","design","layout"],"properties":{"type":{"type":"string","description":"This field type creates radio buttons.","enum":["RADIO_GROUP"]},"design":{"$ref":"#/components/schemas/boxes-v2-RadioValueTypeDesign"},"data":{"$ref":"#/components/schemas/boxes-v2-RadioValueTypeData"},"layout":{"$ref":"#/components/schemas/boxes-v2-TypeLayout"}}},"boxes-v2-TypeLayout":{"type":"object","description":"Layout of the item within its parent element","required":["marginTop","marginRight","marginBottom","marginLeft"],"properties":{"marginTop":{"type":"string","description":"Top margin of the element","example":"15px"},"marginRight":{"type":"string","description":"Right margin of the element","example":"1cm"},"marginBottom":{"type":"string","description":"Bottom margin of the element","example":"12pt"},"marginLeft":{"type":"string","description":"Left margin of the element","example":"1.0em"}}},"boxes-v2-Value":{"description":"Each object is named after the corresponding field in the schema or the relation it refers to.","oneOf":[{"$ref":"#/components/schemas/boxes-v2-TextValue"},{"$ref":"#/components/schemas/boxes-v2-SelectValue"},{"$ref":"#/components/schemas/boxes-v2-NumberValue"},{"$ref":"#/components/schemas/boxes-v2-CheckboxGroupValue"},{"$ref":"#/components/schemas/boxes-v2-SwitchValue"},{"$ref":"#/components/schemas/boxes-v2-RadioValue"},{"$ref":"#/components/schemas/boxes-v2-RelationValue"}]},"boxes-v2-TextValue":{"type":"object","title":"Text","properties":{"value":{"type":"string","example":"This is my first task","description":"Text input"}}},"boxes-v2-SelectValue":{"type":"object","title":"Select","properties":{"value":{"type":"string","example":"Selected value","description":"Select value"},"recordId":{"type":"string","format":"uuid","description":"UUID of the related record (single relation)"},"recordIds":{"type":"array","description":"An array of related record UUIDs (multiple relations)","items":{"type":"string","format":"uuid"}}}},"boxes-v2-NumberValue":{"type":"object","title":"Number","properties":{"value":{"type":"string","example":"33","description":"Numerical input. **The value is sent as a string.**"}}},"boxes-v2-CheckboxGroupValue":{"type":"object","title":"Checkbox","properties":{"values":{"type":"array","items":{"type":"string"},"description":"The checkboxes that were selected"}}},"boxes-v2-SwitchValue":{"type":"object","title":"Switch","required":["value"],"properties":{"value":{"type":"boolean","description":"When `true`, the toggle is switched on.","example":"false"}}},"boxes-v2-RadioValue":{"type":"object","title":"Radio","properties":{"value":{"type":"string","example":"my favourite hobby","description":"Selected radio value"}}},"boxes-v2-RelationValue":{"type":"object","title":"Relation","required":["recordId"],"properties":{"recordId":{"type":"string","format":"uuid","description":"Related record ID"}}},"boxes-v2-CustomCssClass":{"type":"string","description":"CSS class to assign to the element"},"boxes-v2-SingleLayout":{"type":"object","title":"Input field","required":["type","fieldName"],"properties":{"type":{"type":"string","enum":["SINGLE"],"example":"SINGLE","description":"The \"single\" layout must be the final element in each layout structure. It is the only layout that allows the display of fields."},"fieldName":{"type":"string","description":"The input field is identified by the name of that field's object (not the `label` property)."}}},"boxes-v2-ColumnsLayout":{"type":"object","title":"Columns layout","required":["type","columns","design"],"properties":{"type":{"type":"string","enum":["COLUMNS"],"example":"COLUMNS","description":"This element defines a two-column layout. A column layout may include other layouts, allowing you to build complex structures."},"columns":{"type":"array","description":"An array of columns. Each column may contain a number of layouts or fields.","items":{"type":"array","items":{"$ref":"#/components/schemas/boxes-v2-LayoutItem"}}},"design":{"$ref":"#/components/schemas/boxes-v2-ColumnDesign"}}},"boxes-v2-ColumnDesign":{"type":"object","title":"Column design","description":"Columns design","required":["display","layout"],"properties":{"display":{"$ref":"#/components/schemas/boxes-v2-ColumnDisplay"},"layout":{"$ref":"#/components/schemas/boxes-v2-TypeLayout"}}},"boxes-v2-ColumnDisplay":{"type":"object","title":"Column display","description":"Columns display configuration","required":["customCssClass","columnProperties","columnGap"],"properties":{"customCssClass":{"$ref":"#/components/schemas/boxes-v2-CustomCssClass"},"columnProperties":{"type":"array","title":"Column properties","description":"Column properties","default":[],"items":{"$ref":"#/components/schemas/boxes-v2-ColumnProperty"}},"columnGap":{"type":"string","description":"The width of the gap between columns","example":"24px"}}},"boxes-v2-ColumnProperty":{"type":"object","title":"Columns property","required":["column","width"],"properties":{"column":{"type":"number","description":"Column number (left to right, starting with 1)"},"width":{"type":"string","description":"Column width","example":"20%"}}},"boxes-v2-TableLayout":{"type":"object","title":"Table layout","required":["type","cells","design"],"properties":{"type":{"type":"string","enum":["TABLE"],"example":"TABLE","description":"This element defines a table layout. A table layout may include other layouts, allowing you to build complex structures."},"cells":{"type":"array","description":"An array of table cells. Each cell may contain a number of layouts or fields.","items":{"type":"array","items":{"type":"array","items":{"$ref":"#/components/schemas/boxes-v2-LayoutItem"}}}},"design":{"$ref":"#/components/schemas/boxes-v2-TableDesign"}}},"boxes-v2-TableDesign":{"type":"object","title":"Table design","description":"Table design","required":["display","layout"],"properties":{"display":{"$ref":"#/components/schemas/boxes-v2-TableDisplay"},"layout":{"$ref":"#/components/schemas/boxes-v2-TypeLayout"}}},"boxes-v2-TableDisplay":{"type":"object","title":"Table display","description":"Table display configuration","required":["customCssClass","isStriped","isBordered","isHover","isCondensed"],"properties":{"customCssClass":{"$ref":"#/components/schemas/boxes-v2-CustomCssClass"},"isStriped":{"type":"boolean","description":"Defines if the table is striped (every second row has a colored background for better readability)."},"isBordered":{"type":"boolean","description":"Defines if the table has borders."},"isHover":{"type":"boolean","description":"Defines if rows are highlighted when hovered."},"isCondensed":{"type":"boolean","description":"Condenses the size of the table."}}},"boxes-v2-Layout":{"type":"array","title":"Layout","description":"The graphical layout of the schema. The layouts are displayed according to their order in the array.","items":{"$ref":"#/components/schemas/boxes-v2-LayoutItem"}},"boxes-v2-LayoutItem":{"title":"Input field, column layout, or table layout","oneOf":[{"$ref":"#/components/schemas/boxes-v2-SingleLayout"},{"$ref":"#/components/schemas/boxes-v2-ColumnsLayout"},{"$ref":"#/components/schemas/boxes-v2-TableLayout"}],"discriminator":{"propertyName":"type","mapping":{"SINGLE":"#/components/schemas/boxes-v2-SingleLayout","COLUMNS":"#/components/schemas/boxes-v2-ColumnsLayout","TABLE":"#/components/schemas/boxes-v2-TableLayout"}}},"boxes-v2-Fields":{"type":"object","description":"The fields define the data that can be entered into a record.","additionalProperties":{"$ref":"#/components/schemas/boxes-v2-ValueType"}},"boxes-v2-EqualFieldValueRelationConstraint":{"type":"object","description":"Field of one record is equal to second one.","required":["type","schemaFieldName","relatedSchemaFieldName"],"properties":{"type":{"type":"string","enum":["equal"],"description":"This value is used when a record of this schema has to have field equal to record related by relation."},"schemaFieldName":{"type":"string","description":"Name of record of this schema's field."},"relatedSchemaFieldName":{"type":"string","description":"Name of record of related schema's field."}}},"boxes-v2-FieldValueGreaterThanRelationConstraint":{"type":"object","description":"Field of related record is greater than provided value.","required":["type","value","relatedSchemaFieldName"],"properties":{"type":{"type":"string","enum":["greater_than"],"description":"This value is used when a related record field's value should be greater than provided value."},"value":{"type":"string","description":"Provided value."},"relatedSchemaFieldName":{"type":"string","description":"Name of record of related schema's field."}}},"boxes-v2-FieldValueGreaterThanOrEqualRelationConstraint":{"type":"object","description":"Field of related record is greater than or equal to provided value.","required":["type","value","relatedSchemaFieldName"],"properties":{"type":{"type":"string","enum":["greater_than_or_equal"],"description":"This value is used when a related record field's value should be greater than or equal to provided value."},"value":{"type":"string","description":"Provided value."},"relatedSchemaFieldName":{"type":"string","description":"Name of record of related schema's field."}}},"boxes-v2-FieldValueLessThanRelationConstraint":{"type":"object","description":"Field of related record is less than provided value.","required":["type","value","relatedSchemaFieldName"],"properties":{"type":{"type":"string","enum":["less_than"],"description":"This value is used when a related record field's value should be less than provided value."},"value":{"type":"string","description":"Provided value."},"relatedSchemaFieldName":{"type":"string","description":"Name of record of related schema's field."}}},"boxes-v2-FieldValueLessThanOrEqualRelationConstraint":{"type":"object","description":"Field of related record have value that is less than or equal to provided value.","required":["type","value","relatedSchemaFieldName"],"properties":{"type":{"type":"string","enum":["less_than_or_equal"],"description":"This value is used when a related record field's value should be less than or equal to provided value."},"value":{"type":"string","description":"Provided value."},"relatedSchemaFieldName":{"type":"string","description":"Name of record of related schema's field."}}},"boxes-v2-FieldValueBetweenRelationConstraint":{"type":"object","description":"Field of related record is less than or equal to provided value.","required":["type","from","to","relatedSchemaFieldName"],"properties":{"type":{"type":"string","enum":["between"],"description":"This value is used when a related record field's value should be between provided values."},"from":{"type":"string","description":"Provided value (from)."},"to":{"type":"string","description":"Provided value (to)."},"relatedSchemaFieldName":{"type":"string","description":"Name of record of related schema's field."}}},"boxes-v2-FieldValueEqualToConstantRelationConstraint":{"type":"object","description":"Field of related record is equal to provided value.","required":["type","value","relatedSchemaFieldName"],"properties":{"type":{"type":"string","enum":["equal_to_constant"],"description":"This value is used when a related record field's value should be equal to provided value."},"value":{"type":"string","description":"Provided value."},"relatedSchemaFieldName":{"type":"string","description":"Name of record of related schema's field."}}},"boxes-v2-SchemaRelationConstraint":{"title":"Schema relation constraint.","oneOf":[{"$ref":"#/components/schemas/boxes-v2-EqualFieldValueRelationConstraint"},{"$ref":"#/components/schemas/boxes-v2-FieldValueGreaterThanRelationConstraint"},{"$ref":"#/components/schemas/boxes-v2-FieldValueGreaterThanOrEqualRelationConstraint"},{"$ref":"#/components/schemas/boxes-v2-FieldValueLessThanRelationConstraint"},{"$ref":"#/components/schemas/boxes-v2-FieldValueLessThanOrEqualRelationConstraint"},{"$ref":"#/components/schemas/boxes-v2-FieldValueBetweenRelationConstraint"},{"$ref":"#/components/schemas/boxes-v2-FieldValueEqualToConstantRelationConstraint"}]},"boxes-v2-SchemaRelationOne":{"title":"One relation per record","type":"object","required":["type","schemaId"],"properties":{"type":{"type":"string","enum":["one"],"description":"This value is used when a record of this schema can be related to one record of the schema identified by `schemaId`."},"schemaId":{"type":"string","example":"0790bd7c-8c2b-4e31-b01a-eee434331800","description":"UUID of the schema that the relation refers to"},"constraints":{"type":"array","description":"An array of relation constraints.","items":{"$ref":"#/components/schemas/boxes-v2-SchemaRelationConstraint"}}}},"boxes-v2-SchemaRelationMany":{"title":"Many relations per record","type":"object","required":["type","schemaId"],"properties":{"type":{"type":"string","enum":["many"],"description":"This value is used when a record of this schema can be related to more than one record of the schema identified by `schemaId`."},"schemaId":{"type":"string","example":"0790bd7c-8c2b-4e31-b01a-eee434331800","description":"UUID of the schema that the relation refers to"},"constraints":{"type":"array","description":"An array of relation constraints.","items":{"$ref":"#/components/schemas/boxes-v2-SchemaRelationConstraint"}}}},"boxes-v2-SchemaRelationItem":{"description":"Each object is named after the relation it refers to.","oneOf":[{"$ref":"#/components/schemas/boxes-v2-SchemaRelationOne"},{"$ref":"#/components/schemas/boxes-v2-SchemaRelationMany"}]},"boxes-v2-SchemaRelations":{"type":"object","description":"This object stores information (as objects) about relations to other schemas.","additionalProperties":{"$ref":"#/components/schemas/boxes-v2-SchemaRelationItem"}},"boxes-v2-RecordRelationOne":{"title":"One relation","type":"object","required":["type","recordId"],"properties":{"type":{"type":"string","enum":["one"],"description":"This value is used when a record can store relations to only one other record."},"recordId":{"type":"string","example":"0790bd7c-8c2b-4e31-b01a-eee434331800","description":"UUID of the related record"}}},"boxes-v2-RecordRelationMany":{"title":"Many relations","type":"object","required":["type","recordIds"],"properties":{"type":{"type":"string","enum":["many"],"description":"This value is used when a record can store relations to more than one other record."},"recordIds":{"type":"array","description":"An array of related record UUIDs","items":{"$ref":"#/components/schemas/boxes-v2-RecordId"}}}},"boxes-v2-RecordRelationItem":{"title":"Relation","description":"Each object is named after the relation it references.","discriminator":{"propertyName":"type","mapping":{"one":"#/components/schemas/boxes-v2-RecordRelationOne","many":"#/components/schemas/boxes-v2-RecordRelationMany"}},"oneOf":[{"$ref":"#/components/schemas/boxes-v2-RecordRelationOne"},{"$ref":"#/components/schemas/boxes-v2-RecordRelationMany"}]},"boxes-v2-RecordRelations":{"type":"object","description":"This objects stores information (as objects) about relations to other records. Each object is named after the relation. For an example of relation usage, see the description of [this endpoint](#operation/addRelationToSchema)","additionalProperties":{"$ref":"#/components/schemas/boxes-v2-RecordRelationItem"}},"boxes-v2-SchemaInput":{"type":"object","required":["schemaName","layout","fields"],"properties":{"schemaName":{"$ref":"#/components/schemas/boxes-v2-SchemaName"},"primaryKey":{"$ref":"#/components/schemas/boxes-v2-SchemaPrimaryKey"},"fields":{"$ref":"#/components/schemas/boxes-v2-Fields"},"layout":{"$ref":"#/components/schemas/boxes-v2-Layout"},"tags":{"$ref":"#/components/schemas/boxes-v2-SchemaTags"}}},"boxes-v2-SchemaPrimaryKey":{"oneOf":[{"$ref":"#/components/schemas/boxes-v2-SchemaPrimaryKeyAuto"},{"$ref":"#/components/schemas/boxes-v2-SchemaPrimaryKeySingleField"}],"discriminator":{"propertyName":"type","mapping":{"auto_pk":"#/components/schemas/boxes-v2-SchemaPrimaryKeyAuto","single_field_pk":"#/components/schemas/boxes-v2-SchemaPrimaryKeySingleField"}}},"boxes-v2-SchemaPrimaryKeyAuto":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["auto_pk"]}}},"boxes-v2-SchemaPrimaryKeySingleField":{"type":"object","required":["type","fieldName"],"properties":{"type":{"type":"string","enum":["single_field_pk"]},"fieldName":{"type":"string","description":"Name of field of valid type in schema"}}},"boxes-v2-SchemaTags":{"type":"array","description":"Tags assigned to the schema","items":{"type":"string","description":"Name of the tag"}},"boxes-v2-SchemaName":{"type":"string","example":"firstSchema","description":"Name of the schema"},"boxes-v2-Schema":{"type":"object","required":["businessProfileId","primaryKey","schemaName","schemaId","createdAt","createdBy","modifiedAt","modifiedBy","fields","layout","relations","tags","permissionStatus"],"properties":{"businessProfileId":{"type":"integer","example":"48","description":"Workspace ID"},"primaryKey":{"$ref":"#/components/schemas/boxes-v2-SchemaPrimaryKey"},"schemaName":{"$ref":"#/components/schemas/boxes-v2-SchemaName"},"schemaId":{"type":"string","format":"uuid","example":"86403a7d-1120-491a-a789-3d328d91193d","description":"UUID of the schema"},"createdAt":{"type":"string","example":"2020-07-07T09:03:13.390101Z","description":"Time of schema creation"},"createdBy":{"type":"number","example":"1234","description":"ID of the user who created the schema"},"modifiedAt":{"type":"string","example":"2020-07-07T09:03:13.390101Z","description":"Time of last modification of the schema"},"modifiedBy":{"type":"number","example":"1234","description":"ID of the user who modified the schema"},"deletedAt":{"type":"string","example":"2020-07-07T09:03:13.390101Z","description":"Time of schema deletion"},"deletedBy":{"type":"number","example":"1234","description":"ID of the user who deleted the schema"},"fields":{"$ref":"#/components/schemas/boxes-v2-Fields"},"layout":{"$ref":"#/components/schemas/boxes-v2-Layout"},"relations":{"$ref":"#/components/schemas/boxes-v2-SchemaRelations"},"tags":{"$ref":"#/components/schemas/boxes-v2-SchemaTags"},"permissionStatus":{"$ref":"#/components/schemas/boxes-v2-PermissionStatus"}}},"boxes-v2-SchemaProjection":{"type":"object","required":["schemaId","schemaName"],"properties":{"schemaId":{"type":"string","format":"uuid","example":"4da878bc-ed5d-4d32-b31c-b6f7cc68936f","description":"UUID of the schema"},"schemaName":{"type":"string","example":"schema1","description":"Name of the schema"}}},"boxes-v2-PaginatedSchema":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","description":"A list of schemas","items":{"$ref":"#/components/schemas/boxes-v2-Schema"}},"pagination":{"$ref":"#/components/schemas/boxes-v2-Pagination"}}},"boxes-v2-PaginatedSchemaProjection":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","description":"A list of schema names","items":{"$ref":"#/components/schemas/boxes-v2-SchemaProjection"}},"pagination":{"$ref":"#/components/schemas/boxes-v2-Pagination"}}},"boxes-v2-RulePredicate":{"oneOf":[{"$ref":"#/components/schemas/boxes-v2-RulePredicateOr"},{"$ref":"#/components/schemas/boxes-v2-RulePredicateAnd"},{"$ref":"#/components/schemas/boxes-v2-RulePredicateNeg"},{"$ref":"#/components/schemas/boxes-v2-RulePredicateId"}],"discriminator":{"propertyName":"type","mapping":{"OR":"#/components/schemas/boxes-v2-RulePredicateOr","AND":"#/components/schemas/boxes-v2-RulePredicateAnd","NEG":"#/components/schemas/boxes-v2-RulePredicateNeg","ID":"#/components/schemas/boxes-v2-RulePredicateId"}}},"boxes-v2-RulePredicateOr":{"type":"object","required":["type","left","right"],"properties":{"type":{"type":"string","enum":["OR"]},"left":{"$ref":"#/components/schemas/boxes-v2-RulePredicate"},"right":{"$ref":"#/components/schemas/boxes-v2-RulePredicate"}}},"boxes-v2-RulePredicateAnd":{"type":"object","required":["type","left","right"],"properties":{"type":{"type":"string","enum":["AND"]},"left":{"$ref":"#/components/schemas/boxes-v2-RulePredicate"},"right":{"$ref":"#/components/schemas/boxes-v2-RulePredicate"}}},"boxes-v2-RulePredicateNeg":{"type":"object","required":["type","pred"],"properties":{"type":{"type":"string","enum":["NEG"]},"pred":{"$ref":"#/components/schemas/boxes-v2-RulePredicate"}}},"boxes-v2-RulePredicateId":{"type":"object","required":["type","pred"],"properties":{"type":{"type":"string","enum":["ID"]},"pred":{"$ref":"#/components/schemas/boxes-v2-RuleSinglePredicate"}}},"boxes-v2-RuleSinglePredicate":{"oneOf":[{"$ref":"#/components/schemas/boxes-v2-RuleSchemaPredicate"},{"$ref":"#/components/schemas/boxes-v2-RuleRecordPredicate"}],"discriminator":{"propertyName":"resourceType","mapping":{"schema":"#/components/schemas/boxes-v2-RuleSchemaPredicate","record":"#/components/schemas/boxes-v2-RuleRecordPredicate"}}},"boxes-v2-RuleSchemaPredicate":{"type":"object","required":["resourceType","fieldName","propertyPath","expression"],"properties":{"resourceType":{"type":"string","enum":["schema"]},"fieldName":{"type":"string"},"propertyPath":{"type":"array","items":{"type":"string"}},"expression":{"type":"object"}}},"boxes-v2-RuleRecordPredicate":{"type":"object","required":["resourceType","fieldName","propertyPath","expression"],"properties":{"resourceType":{"type":"string","enum":["record"]},"fieldName":{"type":"string"},"propertyPath":{"type":"array","items":{"type":"string"}},"expression":{"type":"object"}}},"boxes-v2-RecordInput":{"type":"object","required":["fields"],"properties":{"fields":{"$ref":"#/components/schemas/boxes-v2-RecordFields"}}},"boxes-v2-RelativeUpdateInput":{"type":"object","required":["actions"],"properties":{"actions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/boxes-v2-NumberValueRelativeUpdate"}}}},"boxes-v2-NumberValueRelativeUpdate":{"type":"object","properties":{"changeBy":{"type":"number","description":"The value is the number to add/subtract."}},"required":["changeBy"]},"boxes-v2-RecordFields":{"type":"object","description":"Fields and their values. Each field is an array of value objects (even if the field type requires only a single value).","additionalProperties":{"$ref":"#/components/schemas/boxes-v2-Value"}},"boxes-v2-RecordId":{"type":"string","example":"10c681d9-5afc-4ea1-ac97-dd1d22c7b045","description":"UUID of the record"},"boxes-v2-Record":{"type":"object","description":"Details of a record","required":["schemaId","recordId","fields","relations","createdAt","createdBy","modifiedAt","modifiedBy","businessProfileId","permissionStatus"],"properties":{"schemaId":{"type":"string","format":"uuid","example":"10c681d9-5afc-4ea1-ac97-dd1d22c7b045","description":"Id of the schema that was used to create this record"},"recordId":{"$ref":"#/components/schemas/boxes-v2-RecordId"},"businessProfileId":{"type":"integer","example":"48","description":"Workspace ID"},"createdAt":{"type":"string","example":"2020-07-07T09:03:13.390101Z","description":"Time of record creation"},"createdBy":{"type":"number","example":"1234","description":"ID of the user who created the record"},"modifiedAt":{"type":"string","example":"2020-07-07T09:03:13.390101Z","description":"Time of record last modification"},"modifiedBy":{"type":"number","example":"1234","description":"ID of the user who modified the record"},"deletedAt":{"type":"string","example":"2020-07-07T09:03:13.390101Z","description":"Time of record deletion"},"deletedBy":{"type":"number","example":"1234","description":"ID of the user who deleted the record"},"fields":{"$ref":"#/components/schemas/boxes-v2-RecordFields"},"relations":{"$ref":"#/components/schemas/boxes-v2-RecordRelations"},"permissionStatus":{"$ref":"#/components/schemas/boxes-v2-PermissionStatus"}}},"boxes-v2-PermissionStatus":{"type":"string","enum":["private","restricted","public","read_only"],"example":"private","description":"Permission status of a record"},"boxes-v2-PaginatedRecord":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","description":"A list of records","items":{"$ref":"#/components/schemas/boxes-v2-Record"}},"pagination":{"$ref":"#/components/schemas/boxes-v2-Pagination"}}},"boxes-v2-PaginatedDocumentation":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","description":"An array of paths that can be used to retrieve schema specifications.","items":{"type":"string"}},"pagination":{"$ref":"#/components/schemas/boxes-v2-Pagination"}}},"boxes-v2-Pagination":{"type":"object","description":"Pagination metadata","required":["limit","page","pages","total"],"properties":{"limit":{"type":"number","example":3,"description":"The number of entries per page"},"page":{"type":"number","example":1,"description":"The current page"},"pages":{"type":"number","example":"10","description":"The total number of pages"},"total":{"type":"number","example":"29","description":"The total number of entries on all pages"}}},"brickworks-service-SchemaPagingResult":{"type":"object","x-class-name":"SchemaPagingResult","x-interface-name-ts":"SchemaPagingResult","required":["meta","data"],"properties":{"meta":{"$ref":"#/components/schemas/brickworks-service-Meta"},"data":{"type":"array","description":"Array of schemas","items":{"$ref":"#/components/schemas/brickworks-service-Schema"}}}},"brickworks-service-Schema":{"type":"object","x-class-name":"Schema","x-interface-name-ts":"Schema","description":"Schema object","required":["id","appId","displayName","createdBy","updatedBy","createdAt","updatedAt","audience"],"properties":{"id":{"$ref":"#/components/schemas/brickworks-service-SchemaId"},"appId":{"$ref":"#/components/schemas/brickworks-service-SchemaAppId"},"displayName":{"$ref":"#/components/schemas/brickworks-service-SchemaDisplayName"},"description":{"$ref":"#/components/schemas/brickworks-service-SchemaDescription"},"fields":{"$ref":"#/components/schemas/brickworks-service-FieldsObject"},"displayConfiguration":{"$ref":"#/components/schemas/brickworks-service-SchemaDisplayConfiguration"},"createdBy":{"$ref":"#/components/schemas/brickworks-service-CreatedBy"},"updatedBy":{"$ref":"#/components/schemas/brickworks-service-UpdatedBy"},"publishedBy":{"$ref":"#/components/schemas/brickworks-service-PublishedBy"},"deletedBy":{"$ref":"#/components/schemas/brickworks-service-DeletedBy"},"createdAt":{"$ref":"#/components/schemas/brickworks-service-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/brickworks-service-UpdatedAt"},"publishedAt":{"$ref":"#/components/schemas/brickworks-service-PublishedAt"},"deletedAt":{"$ref":"#/components/schemas/brickworks-service-DeletedAt"},"version":{"$ref":"#/components/schemas/brickworks-service-SchemaVersion"},"audience":{"$ref":"#/components/schemas/brickworks-service-Audience"},"schemaType":{"$ref":"#/components/schemas/brickworks-service-SchemaType"},"fieldContextConfig":{"$ref":"#/components/schemas/brickworks-service-FieldContextConfig"},"lambdaId":{"$ref":"#/components/schemas/brickworks-service-LambdaFunctionId"}}},"brickworks-service-SchemaPreviewData":{"type":"object","x-class-name":"SchemaPreviewData","x-interface-name-ts":"SchemaPreviewData","description":"Schema preview data","required":["schemaType"],"properties":{"fields":{"$ref":"#/components/schemas/brickworks-service-FieldsObject"},"audience":{"$ref":"#/components/schemas/brickworks-service-Audience"},"schemaType":{"$ref":"#/components/schemas/brickworks-service-SchemaType"},"lambdaId":{"$ref":"#/components/schemas/brickworks-service-LambdaFunctionId"},"id":{"$ref":"#/components/schemas/brickworks-service-SchemaId"}}},"brickworks-service-SchemaId":{"type":"string","format":"uuid","description":"Unique ID of the schema, generated automatically."},"brickworks-service-SchemaAppId":{"type":"string","description":"App ID of the schema. This is used as the identifier of the schema and must be unique. This ID cannot be changed after the schema is created.  \nIn the Synerise Portal, this parameter is called **API name**. \n"},"brickworks-service-SchemaDisplayName":{"type":"string","description":"Schema name shown to users in the Synerise Portal"},"brickworks-service-SchemaDescription":{"type":"string","description":"Schema description"},"brickworks-service-FieldsObject":{"type":"object","x-class-name":"FieldsObject","x-interface-name-ts":"FieldsObject","description":"The content of the schema.","properties":{"type":{"type":"string","description":"The root field of the schema is always an object, and it includes all the other fields.","enum":["object"]},"properties":{"$ref":"#/components/schemas/brickworks-service-FieldFormMap"},"required":{"type":"array","description":"A list of fields (field key names) that must have a value in the record.","items":{"type":"string"}},"allOf":{"type":"array","description":"\nAdditional validation for the fields. To learn more about conditionals, see the [JSON Schema documentation](https://json-schema.org/understanding-json-schema/reference/conditionals#ifthenelse).\n\nThe Synerise Web Portal only supports making a field available and required when another field meets a condition. Using other configurations works in the API, but may cause issues when trying to use the Synerise Web Portal.  \n\nThe following example is a condition supported by the Portal: the `accountNumber` field becomes available (and must be filled) when `paymentType` is `transfer`.\n```\n\"fields\": {\n    \"allOf\": [\n        {\n            \"if\": {\n                \"required\": [\n                    \"paymentType\"\n                ],\n                \"properties\": {\n                    \"paymentType\": {\n                        \"const\": \"transfer\"\n                    }\n                }\n            },\n            \"then\": {\n                \"required\": [\n                    \"accountNumber\"\n                ],\n                \"properties\": {}\n            }\n        }\n    ],\n...\n}\n```\nFor Portal compatibility, you can only change the field condition (`const` in the above example) to a different one. The `pattern` condition and `else` statements are currently not supported by the Portal.  \n","items":{"$ref":"#/components/schemas/brickworks-service-ValidationConditions"}},"additionalProperties":{"type":"boolean","description":"System parameter, generated automatically. Don't send this in requests."}},"required":["type","properties","required"]},"brickworks-service-SchemaDisplayConfiguration":{"type":"object","x-class-name":"SchemaDisplayConfiguration","x-interface-name-ts":"SchemaDisplayConfiguration","description":"The layout details of the schema","properties":{"ordering":{"type":"object","description":"Order of the fields. If not included, the backend creates the ordering in alphabetical order.","additionalProperties":{"description":"The name of the field is the key in this object and the value is its position in the schema (`0` is displayed first in the Synerise Portal).","type":"integer","minimum":0,"format":"int32"}},"metadata":{"type":"object","description":"Configuration of displaying the fields in the editor","additionalProperties":{"$ref":"#/components/schemas/brickworks-service-FieldMetadata"}}},"required":["ordering","metadata"]},"brickworks-service-CreatedBy":{"type":"integer","format":"int64","description":"ID of the user who created the resource. If created by a workspace, the value is `0`."},"brickworks-service-UpdatedBy":{"type":"integer","format":"int64","description":"ID of the user who last updated the resource. If last updated by a workspace, the value is `0`."},"brickworks-service-PublishedBy":{"type":"integer","format":"int64","nullable":true,"description":"ID of the user who published the resource. If published by a workspace, the value is `0`."},"brickworks-service-DeletedBy":{"type":"integer","format":"int64","nullable":true,"description":"ID of the user who deleted the resource. If deleted by a workspace, the value is `0`."},"brickworks-service-CreatedAt":{"type":"string","format":"date-time","description":"Time when the resource was created"},"brickworks-service-UpdatedAt":{"type":"string","format":"date-time","description":"Time when the resource was last updated"},"brickworks-service-PublishedAt":{"type":"string","format":"date-time","nullable":true,"description":"Time when the resource was published"},"brickworks-service-DeletedAt":{"type":"string","format":"date-time","nullable":true,"description":"Time when the resource was deleted"},"brickworks-service-SchemaVersion":{"type":"integer","format":"int32","description":"Schema version ID. For simple schemas, this is always `1`. When a schema is updated, the ID increases by 1."},"brickworks-service-Audience":{"type":"object","x-class-name":"Audience","x-interface-name-ts":"Audience","description":"Definition of the profiles which can access content created from this schema.","properties":{"targetType":{"type":"string","enum":["SEGMENT","QUERY","ALL"],"description":"- ALL: Available to all profiles\n- SEGMENT: Available to a segmentation or segmentations of profiles, listed in `segments`\n- QUERY: Available to a segmentation of profiles defined with `query`\n"},"segments":{"type":"array","description":"Used when `targetType` is `SEGMENT`. This is a list of existing segmentations (identified by UUID) which define the audience.","items":{"type":"string","format":"uuid","description":"Segmentation UUID"}},"query":{"type":"string","description":"Used when `targetType` is `QUERY`. This is a raw `analysis` object sent to the Analytics service, converted into a string. For details on how to create the analysis object, see the [API reference for creating segmentations](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#tag/Segmentations/operation/analytics2-segmentations-create).","example":"{\\\"analysis\\\":{\\\"title\\\":\\\"notempty\\\",\\\"segments\\\":[{\\\"title\\\":\\\"notempty\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"exampleBool\\\"}}]}}]}}]}}"}}},"brickworks-service-SchemaType":{"type":"string","x-class-name":"SchemaType","x-interface-name-ts":"SchemaType","enum":["SIMPLE","VERSIONED","SINGLETON"],"description":"- SIMPLE: a schema in which records can only have the PUBLISHED status.\n- VERSIONED: a schema in which records can be saved as drafts; and you can also access the version history.\n- SINGLETON: a schema which has no records. All fields must have default values. Values can still be inserted dynamically with Jinjava.\n"},"brickworks-service-FieldForm":{"type":"object","x-class-name":"FieldForm","x-interface-name-ts":"FieldForm","description":"Each key is the name of a field (called \"API name\" in the Synerise Portal).","oneOf":[{"$ref":"#/components/schemas/brickworks-service-NumberForm"},{"$ref":"#/components/schemas/brickworks-service-BooleanForm"},{"$ref":"#/components/schemas/brickworks-service-StringForm"},{"$ref":"#/components/schemas/brickworks-service-IntegerForm"},{"$ref":"#/components/schemas/brickworks-service-EnumForm"},{"$ref":"#/components/schemas/brickworks-service-DateForm"},{"$ref":"#/components/schemas/brickworks-service-DateTimeForm"},{"$ref":"#/components/schemas/brickworks-service-ArrayForm"},{"$ref":"#/components/schemas/brickworks-service-UUIDForm"},{"$ref":"#/components/schemas/brickworks-service-JinJavaForm"},{"$ref":"#/components/schemas/brickworks-service-CatalogItemField"},{"$ref":"#/components/schemas/brickworks-service-KeyValueObject"},{"$ref":"#/components/schemas/brickworks-service-ExternalHttpSource"},{"$ref":"#/components/schemas/brickworks-service-ReferenceForm"},{"$ref":"#/components/schemas/brickworks-service-OneToManyForm"},{"$ref":"#/components/schemas/brickworks-service-MetricField"},{"$ref":"#/components/schemas/brickworks-service-AggregateField"},{"$ref":"#/components/schemas/brickworks-service-ExpressionField"},{"$ref":"#/components/schemas/brickworks-service-PromotionField"},{"$ref":"#/components/schemas/brickworks-service-FileField"},{"$ref":"#/components/schemas/brickworks-service-ImageField"},{"$ref":"#/components/schemas/brickworks-service-RecommendationField"},{"$ref":"#/components/schemas/brickworks-service-AiSearchField"},{"$ref":"#/components/schemas/brickworks-service-AiSearchListingField"},{"$ref":"#/components/schemas/brickworks-service-VoucherField"},{"$ref":"#/components/schemas/brickworks-service-UntypedJson"},{"$ref":"#/components/schemas/brickworks-service-UntypedArray"},{"$ref":"#/components/schemas/brickworks-service-UntypedForm"},{"$ref":"#/components/schemas/brickworks-service-ProfileAttributeField"},{"$ref":"#/components/schemas/brickworks-service-OneToManyFilterForm"}],"discriminator":{"propertyName":"subtype","mapping":{"boolean":"#/components/schemas/brickworks-service-BooleanForm","string":"#/components/schemas/brickworks-service-StringForm","integer":"#/components/schemas/brickworks-service-IntegerForm","number":"#/components/schemas/brickworks-service-NumberForm","enum":"#/components/schemas/brickworks-service-EnumForm","date":"#/components/schemas/brickworks-service-DateForm","date-time":"#/components/schemas/brickworks-service-DateTimeForm","typed_array":"#/components/schemas/brickworks-service-ArrayForm","uuid":"#/components/schemas/brickworks-service-UUIDForm","jinjava":"#/components/schemas/brickworks-service-JinJavaForm","one_to_one":"#/components/schemas/brickworks-service-ReferenceForm","catalog_item":"#/components/schemas/brickworks-service-CatalogItemField","key_value":"#/components/schemas/brickworks-service-KeyValueObject","external_source":"#/components/schemas/brickworks-service-ExternalHttpSource","one_to_many":"#/components/schemas/brickworks-service-OneToManyForm","metric":"#/components/schemas/brickworks-service-MetricField","expression":"#/components/schemas/brickworks-service-ExpressionField","aggregate":"#/components/schemas/brickworks-service-AggregateField","promotion":"#/components/schemas/brickworks-service-PromotionField","file":"#/components/schemas/brickworks-service-FileField","image":"#/components/schemas/brickworks-service-ImageField","recommendation":"#/components/schemas/brickworks-service-RecommendationField","ai_search":"#/components/schemas/brickworks-service-AiSearchField","ai_search_listing":"#/components/schemas/brickworks-service-AiSearchListingField","voucher":"#/components/schemas/brickworks-service-VoucherField","untyped_object":"#/components/schemas/brickworks-service-UntypedJson","untyped_array":"#/components/schemas/brickworks-service-UntypedArray","json":"#/components/schemas/brickworks-service-UntypedForm","client_attribute":"#/components/schemas/brickworks-service-ProfileAttributeField","filter":"#/components/schemas/brickworks-service-OneToManyFilterForm"}}},"brickworks-service-NumberForm":{"type":"object","title":"Number","x-class-name":"NumberForm","x-interface-name-ts":"NumberForm","description":"This field type accepts static numeric values. `number` is used for floating-point values.","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-NumberType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-NumberSubtype"},"minimum":{"type":"number","format":"float","description":"Minimum value"},"maximum":{"type":"number","format":"float","description":"Maximum value"},"unique":{"$ref":"#/components/schemas/brickworks-service-FieldUnique"},"searchable":{"$ref":"#/components/schemas/brickworks-service-FieldSearchable"},"default":{"type":"number","nullable":true,"description":"The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record."},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype"]},"brickworks-service-BooleanForm":{"type":"object","title":"Boolean","x-class-name":"BooleanForm","x-interface-name-ts":"BooleanForm","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-BooleanType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-BooleanSubtype"},"unique":{"$ref":"#/components/schemas/brickworks-service-FieldUnique"},"searchable":{"$ref":"#/components/schemas/brickworks-service-FieldSearchable"},"default":{"nullable":true,"type":"boolean","description":"The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record."},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype"]},"brickworks-service-StringForm":{"type":"object","title":"String","x-class-name":"StringForm","x-interface-name-ts":"StringForm","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-StringType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-StringSubtype"},"minLength":{"type":"number","format":"int32","description":"Minimum number of characters in the string"},"maxLength":{"type":"number","format":"int32","description":"Maximum number of characters in the string"},"pattern":{"type":"string","description":"Regular expression that the string must match"},"unique":{"$ref":"#/components/schemas/brickworks-service-FieldUnique"},"searchable":{"$ref":"#/components/schemas/brickworks-service-FieldSearchable"},"default":{"type":"string","nullable":true,"description":"The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record."},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype"]},"brickworks-service-IntegerForm":{"type":"object","title":"Integer","x-class-name":"IntegerForm","x-interface-name-ts":"IntegerForm","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-IntegerType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-IntegerSubtype"},"minimum":{"type":"number","format":"int32","description":"Minimum value"},"maximum":{"type":"number","format":"int32","description":"Maximum value"},"unique":{"$ref":"#/components/schemas/brickworks-service-FieldUnique"},"searchable":{"$ref":"#/components/schemas/brickworks-service-FieldSearchable"},"default":{"type":"number","nullable":true,"description":"The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record."},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype"]},"brickworks-service-EnumForm":{"type":"object","title":"Enumeration","x-class-name":"EnumForm","x-interface-name-ts":"EnumForm","description":"This type of field defines a list of strings which can be used as the value. Only one of the allowed values can be saved in the record.","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-StringType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-EnumSubtype"},"enum":{"type":"array","description":"A list of strings which can be selected as the value","items":{"type":"string"}},"names":{"type":"object","description":"A mapping of the field values and their names displayed in the record.\n\nFor example, if `enum` contains the value `exampleValue` and you want the UI to show `Example Value` on the list, set:\n```\n\"names\": {\n  \"exampleValue\": \"Example Value\"\n}\n```\n","additionalProperties":{"type":"string"}},"default":{"type":"string","nullable":true,"description":"The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record."},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype","enum","names"]},"brickworks-service-DateForm":{"type":"object","title":"Date","x-class-name":"DateForm","x-interface-name-ts":"DateForm","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-StringType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-DateSubtype"},"default":{"type":"string","format":"date","nullable":true,"description":"The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record."},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype"]},"brickworks-service-DateTimeForm":{"type":"object","title":"Date and time","x-class-name":"DateTimeForm","x-interface-name-ts":"DateTimeForm","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-StringType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-DateTimeSubtype"},"default":{"type":"string","format":"date-time","nullable":true,"description":"The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record."},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype"]},"brickworks-service-ArrayForm":{"type":"object","title":"Array","x-class-name":"ArrayForm","x-interface-name-ts":"ArrayForm","description":"This type of field accepts an array of values. The type of values is defined in `items`","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ArrayType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-TypedArraySubtype"},"items":{"type":"object","description":"The definition of the type of value allowed in the array. All values must be of the same type.","oneOf":[{"$ref":"#/components/schemas/brickworks-service-NumberForm"},{"$ref":"#/components/schemas/brickworks-service-IntegerForm"},{"$ref":"#/components/schemas/brickworks-service-BooleanForm"},{"$ref":"#/components/schemas/brickworks-service-StringForm"},{"$ref":"#/components/schemas/brickworks-service-EnumForm"}],"discriminator":{"propertyName":"subtype","mapping":{"number":"#/components/schemas/brickworks-service-NumberForm","integer":"#/components/schemas/brickworks-service-IntegerForm","boolean":"#/components/schemas/brickworks-service-BooleanForm","string":"#/components/schemas/brickworks-service-StringForm","enum":"#/components/schemas/brickworks-service-EnumForm"}}},"maxItems":{"type":"number","format":"int32","description":"The maximum number of items allowed in the array"},"uniqueItems":{"type":"boolean","description":"When `true`, the values in the array must be unique"},"default":{"type":"array","nullable":true,"description":"The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.","items":{}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","items","subtype"]},"brickworks-service-UUIDForm":{"type":"object","title":"UUID","x-class-name":"UUIDForm","x-interface-name-ts":"UUIDForm","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-StringType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-UuidSubtype"},"default":{"type":"string","format":"uuid","title":"UUID default","x-class-name":"UUIDFormDefault","x-interface-name-ts":"UUIDFormDefault"},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype"]},"brickworks-service-JinJavaForm":{"type":"object","title":"Jinjava","x-class-name":"JinJavaForm","x-interface-name-ts":"JinJavaForm","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-StringType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-JinJavaSubtype"},"default":{"type":"string","nullable":true,"description":"The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record."},"settings":{"$ref":"#/components/schemas/brickworks-service-JinJavaSettings"},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype"]},"brickworks-service-CatalogItemField":{"type":"object","title":"Catalog","x-class-name":"CatalogItemField","x-interface-name-ts":"CatalogItemField","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-CatalogItemSubtype"},"properties":{"type":"object","title":"CatalogItemFieldProperties","description":"The data of the catalog. `id` is the default catalogId and `itemKey` is the default unique identifier of an item. You can override both when creating/updating a record.\n","properties":{"id":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"itemKey":{"oneOf":[{"$ref":"#/components/schemas/brickworks-service-StringForm"},{"$ref":"#/components/schemas/brickworks-service-JinJavaForm"}],"discriminator":{"propertyName":"subtype","mapping":{"jinjava":"#/components/schemas/brickworks-service-JinJavaForm","string":"#/components/schemas/brickworks-service-StringForm"}}},"nullOnFail":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"}},"required":["id","itemKey"]},"default":{"type":"object","title":"Catalog default","x-class-name":"CatalogFieldDefault","x-interface-name-ts":"CatalogFieldDefault","description":"The default value of the field.\n  - This object overrides the defaults from the `properties` object.\n  - **To set no default, send this object empty**. `\"default\": null` overrides `properties` with a null value.\n  - This object is required when `isConstantField = true`\n","properties":{"id":{"type":"string","description":"Unique ID of a catalog"},"itemKey":{"type":"string","description":"Static string or Jinjava that inserts the unique ID of an item in the catalog"}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype","properties"]},"brickworks-service-KeyValueObject":{"type":"object","title":"Key and value","x-class-name":"KeyValueObject","x-interface-name-ts":"KeyValueObject","description":"A key/value map.","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-KeyValueSubtype"},"properties":{"$ref":"#/components/schemas/brickworks-service-FieldFormMap"},"default":{"type":"object","title":"Key and value default","x-class-name":"KeyValueObjectDefault","x-interface-name-ts":"KeyValueObjectDefault"},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"},"additionalProperties":{"type":"boolean"}},"required":["type","subtype"]},"brickworks-service-ExternalHttpSource":{"type":"object","title":"External source","x-class-name":"ExternalSourceField","x-interface-name-ts":"ExternalSourceField","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceSubtype"},"sourceType":{"type":"string","enum":["http"]},"sourceId":{"type":"string","description":"Unique ID of the external source definition","format":"uuid"},"headers":{"$ref":"#/components/schemas/brickworks-service-KeyValueObject"},"params":{"$ref":"#/components/schemas/brickworks-service-KeyValueObject"},"body":{"$ref":"#/components/schemas/brickworks-service-FieldForm"},"properties":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceFieldProperties"},"default":{"type":"object","title":"External source default","x-class-name":"ExternalHttpSourceDefault","x-interface-name-ts":"ExternalHttpSourceDefault","nullable":true,"properties":{"headers":{"type":"object","description":"Request headers","additionalProperties":true},"params":{"type":"object","description":"The url parameters","additionalProperties":true},"body":{"type":"object","description":"Request body","additionalProperties":true},"properties":{"type":"object","title":"External source properties","x-class-name":"ExternalHttpSourcePropertiesValues","x-interface-name-ts":"ExternalHttpSourcePropertiesValues","properties":{"nullOnFail":{"type":"boolean"}}}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype","sourceType","sourceId"]},"brickworks-service-ReferenceForm":{"type":"object","title":"Record reference","x-class-name":"ReferenceForm","x-interface-name-ts":"ReferenceForm","description":"Definition of a reference to another schema","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-StringType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-OneToOneSubtype"},"referenceId":{"type":"string","description":"Unique identifier of the schema you want to access a record from. When creating a record with this field, you will provide the UUID of the referenced record from that schema."},"default":{"type":"string","format":"uuid","description":"The default record to reference. In \"one to many\" fields, use the `default` array in the parent object instead of this property."},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype"]},"brickworks-service-OneToManyForm":{"type":"object","title":"Multiple record reference","x-class-name":"OneToManyForm","x-interface-name-ts":"OneToManyForm","description":"This type of field allows you to reference multiple records from another schema. `items` defines the target schema.","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ArrayType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-OneToManySubtype"},"items":{"$ref":"#/components/schemas/brickworks-service-ReferenceForm"},"maxItems":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"The maximum number of records that can be referenced."},"default":{"type":"array","description":"An array of default record references (record UUIDs)","items":{"type":"string","format":"uuid"}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","items","subtype"]},"brickworks-service-MetricField":{"type":"object","description":"Reference to a Synerise analysis","title":"Metric","x-class-name":"MetricField","x-interface-name-ts":"MetricField","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-MetricSubtype"},"properties":{"type":"object","description":"- `id` is the default ID of an metric.\n- `variables` is a set of variables to pass when the analysis has dynamic fields.\n- `includeDetails` defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.\n","properties":{"id":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"variables":{"$ref":"#/components/schemas/brickworks-service-KeyValueObject"},"includeDetails":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"},"nullOnFail":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"}},"required":["id"]},"default":{"type":"object","title":"Metric default","x-class-name":"MetricFieldDefault","x-interface-name-ts":"MetricFieldDefault","nullable":true,"description":"The default value of the field.\n  - This object overrides the defaults from the `properties` object.\n  - **To set no default, send this object empty**. `\"default\": null` overrides `properties` with a null value.\n  - This object is required when `isConstantField = true`\n","properties":{"id":{"type":"string","description":"UUID of an analysis"},"variables":{"type":"object","additionalProperties":{"description":"Values of dynamic keys in the analysis"}},"includeDetails":{"type":"boolean","description":"Defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record."}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype","properties"]},"brickworks-service-AggregateField":{"type":"object","description":"Reference to a Synerise analysis","title":"Aggregate","x-class-name":"AggregateField","x-interface-name-ts":"AggregateField","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-AggregateSubtype"},"properties":{"type":"object","description":"- `id` is the default ID of an analysis.\n- `variables` is a set of variables to pass when the analysis has dynamic fields.\n- `includeDetails` defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.\n","properties":{"id":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"variables":{"$ref":"#/components/schemas/brickworks-service-KeyValueObject"},"includeDetails":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"},"nullOnFail":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"}},"required":["id"]},"default":{"type":"object","title":"Aggregate default","x-class-name":"AggregateFieldDefault","x-interface-name-ts":"AggregateFieldDefault","nullable":true,"description":"The default value of the field.\n  - This object overrides the defaults from the `properties` object.\n  - **To set no default, send this object empty**. `\"default\": null` overrides `properties` with a null value.\n  - This object is required when `isConstantField = true`\n","properties":{"id":{"type":"string","description":"UUID of an analysis"},"variables":{"type":"object","additionalProperties":{"description":"Values of dynamic keys in the analysis"}},"includeDetails":{"type":"boolean","description":"Defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record."}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype","properties"]},"brickworks-service-ExpressionField":{"type":"object","description":"Reference to a Synerise analysis","title":"Expression","x-class-name":"ExpressionField","x-interface-name-ts":"ExpressionField","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-ExpressionSubtype"},"properties":{"type":"object","description":"- `id` is the default ID of an expression.\n- `variables` is a set of variables to pass when the analysis has dynamic fields.\n- `includeDetails` defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record.\n","properties":{"id":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"variables":{"$ref":"#/components/schemas/brickworks-service-KeyValueObject"},"includeDetails":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"},"nullOnFail":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"}},"required":["id"]},"default":{"type":"object","x-class-name":"ExpressionFieldDefault","x-interface-name-ts":"ExpressionFieldDefault","title":"Expression default","nullable":true,"description":"The default value of the field.\n  - This object overrides the defaults from the `properties` object.\n  - **To set no default, send this object empty**. `\"default\": null` overrides `properties` with a null value.\n  - This object is required when `isConstantField = true`\n","properties":{"id":{"type":"string","description":"UUID of an analysis"},"variables":{"type":"object","additionalProperties":{"description":"Values of dynamic keys in the analysis"}},"includeDetails":{"type":"boolean","description":"Defines if the generated object includes just the result of the analysis (true) or additional details such as the ID of the analysis and profile ID for which the analysis was made (false). This can't be changed per record."}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype","properties"]},"brickworks-service-PromotionField":{"type":"object","title":"Promotion","x-class-name":"PromotionField","x-interface-name-ts":"PromotionField","description":"Reference to a promotion","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-PromotionSubtype"},"properties":{"$ref":"#/components/schemas/brickworks-service-PromotionFieldProperties"},"default":{"type":"object","title":"Promotion default","x-class-name":"PromotionFieldDefault","x-interface-name-ts":"PromotionFieldDefault","description":"The default value of the field.\n  - This object overrides the defaults from the `properties` object.\n  - **To set no default, send this object empty**. `\"default\": null` overrides `properties` with a null value.\n  - This object is required when `isConstantField = true`\n","properties":{"id":{"type":"string","description":"ID of a promotion campaign"}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype","properties"]},"brickworks-service-FileField":{"type":"object","title":"File","x-class-name":"FileField","x-interface-name-ts":"FileField","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-FileSubtype"},"properties":{"$ref":"#/components/schemas/brickworks-service-FileFieldProperties"},"default":{"type":"object","title":"File default","x-class-name":"FileFieldDefault","x-interface-name-ts":"FileFieldDefault","description":"The default value of the field.\n  - This object overrides the defaults from the `properties` object.\n  - **To set no default, send this object empty**. `\"default\": null` overrides `properties` with a null value.\n  - This object is required when `isConstantField = true`\n","properties":{"id":{"type":"string","description":"Unique identifier of an image/file in the File Explorer"}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype","properties"]},"brickworks-service-ImageField":{"type":"object","title":"Image","x-class-name":"ImageField","x-interface-name-ts":"ImageField","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-ImageSubtype"},"properties":{"$ref":"#/components/schemas/brickworks-service-FileFieldProperties"},"default":{"type":"object","title":"Image default","x-class-name":"ImageFieldDefault","x-interface-name-ts":"ImageFieldDefault","description":"The default value of the field.\n  - This object overrides the defaults from the `properties` object.\n  - **To set no default, send this object empty**. `\"default\": null` overrides `properties` with a null value.\n  - This object is required when `isConstantField = true`\n","properties":{"id":{"type":"string","description":"Unique identifier of an image/file in the File Explorer"}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype","properties"]},"brickworks-service-RecommendationField":{"type":"object","title":"Recommendation","x-class-name":"RecommendationField","x-interface-name-ts":"RecommendationField","description":"Reference to a recommendation campaign","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-RecommendationSubtype"},"properties":{"type":"object","title":"Recommendation properties","x-class-name":"RecommendationFieldProperties","x-interface-name-ts":"RecommendationFieldProperties","description":"- `id.default` defines the default recommendation campaign to generate a recommendation from.  \n- In `params.itemId`, you can add a default item context (required by some recommendation types):\n  ```\n  \"itemId\": {\n    \"type\": \"string\",\n    \"subtype\": \"string\"\n    \"default\": \"defaultItemIdForItemContext\"\n    }\n  ```\n","properties":{"id":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"params":{"$ref":"#/components/schemas/brickworks-service-KeyValueObject"},"nullOnFail":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"}},"required":["id"]},"default":{"type":"object","title":"Recommendation default","x-class-name":"RecommendationFieldDefault","x-interface-name-ts":"RecommendationFieldDefault","description":"The default value of the field.\n  - This object overrides the defaults from the `properties` object.\n  - **To set no default, send this object empty**. `\"default\": null` overrides `properties` with a null value.\n  - This object is required when `isConstantField = true`\n","properties":{"id":{"type":"string","description":"UUID of a recommendation campaign"},"params":{"type":"object","title":"Recommendation default params","x-class-name":"RecommendationFieldDefaultParams","x-interface-name-ts":"RecommendationFieldDefaultParams","description":"Item context","properties":{"itemId":{"type":"string","description":"Unique ID of an item context (required for some recommendation types)"}}}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype","properties"]},"brickworks-service-AiSearchField":{"type":"object","title":"AI Search","x-class-name":"AiSearchField","x-interface-name-ts":"AiSearchField","description":"Reference to an AI Search index used to perform a search query","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-AiSearchSubtype"},"properties":{"type":"object","title":"AI Search properties","x-class-name":"AiSearchFieldProperties","x-interface-name-ts":"AiSearchFieldProperties","description":"- `id.default` defines the default AI Search index used to perform the search.\n- `query.default` defines the default search phrase (accepts a string or a Jinjava expression).\n- In `params`, you can declare additional query parameters supported by the AI Search API\n  (e.g. `filters`, `facets`, `displayAttributes`, `personalize`).\n","properties":{"id":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"query":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"params":{"$ref":"#/components/schemas/brickworks-service-KeyValueObject"},"nullOnFail":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"}},"required":["id","query"]},"default":{"type":"object","title":"AI Search default","x-class-name":"AiSearchFieldDefault","x-interface-name-ts":"AiSearchFieldDefault","description":"The default value of the field.\n  - This object overrides the defaults from the `properties` object.\n  - Set to `null` (or omit) to declare no default at all.\n  - Send an empty object `{}` to declare an empty default — it is merged with the record value, or applied directly when the record does not provide one.\n  - This object is required when `isConstantField = true`\n","properties":{"id":{"type":"string","description":"ID of the AI Search index"},"query":{"type":"string","description":"Default search query phrase"},"params":{"type":"object","title":"AI Search default params","x-class-name":"AiSearchFieldDefaultParams","x-interface-name-ts":"AiSearchFieldDefaultParams","description":"Additional default query parameters"}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype","properties"]},"brickworks-service-AiSearchListingField":{"type":"object","title":"AI Listing","x-class-name":"AiSearchListingField","x-interface-name-ts":"AiSearchListingField","description":"Reference to an AI Search index used to retrieve a listing (no query phrase)","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-AiSearchListingSubtype"},"properties":{"type":"object","title":"AI Listing properties","x-class-name":"AiSearchListingFieldProperties","x-interface-name-ts":"AiSearchListingFieldProperties","description":"- `id.default` defines the default AI Search index used to fetch the listing.\n- In `params`, you can declare additional query parameters supported by the AI Search listing API\n  (e.g. `filters`, `facets`, `displayAttributes`, `personalize`).\n","properties":{"id":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"params":{"$ref":"#/components/schemas/brickworks-service-KeyValueObject"},"nullOnFail":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"}},"required":["id"]},"default":{"type":"object","title":"AI Listing default","x-class-name":"AiSearchListingFieldDefault","x-interface-name-ts":"AiSearchListingFieldDefault","description":"The default value of the field.\n  - This object overrides the defaults from the `properties` object.\n  - Set to `null` (or omit) to declare no default at all.\n  - Send an empty object `{}` to declare an empty default — it is merged with the record value, or applied directly when the record does not provide one.\n  - This object is required when `isConstantField = true`\n","properties":{"id":{"type":"string","description":"ID of the AI Search index"},"params":{"type":"object","title":"AI Listing default params","x-class-name":"AiSearchListingFieldDefaultParams","x-interface-name-ts":"AiSearchListingFieldDefaultParams","description":"Additional default query parameters"}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype","properties"]},"brickworks-service-VoucherField":{"type":"object","title":"Voucher","x-class-name":"VoucherField","x-interface-name-ts":"VoucherField","description":"Reference to a voucher","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-VoucherSubtype"},"properties":{"type":"object","title":"Voucher properties","x-class-name":"VoucherFieldProperties","x-interface-name-ts":"VoucherFieldProperties","description":"- in `id.default`, enter the UUID of the voucher pool. It can be changed per record.\n- in `assign.default`:\n    - `false` means that once a code from a given pool is retrieved to a profile, it becomes assigned to the profile and is always returned in subsequent requests.\n    - `true` means that a different code is retrieved for a profile with every request. This can't be changed per record.\n","properties":{"id":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"assign":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"},"nullOnFail":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"}},"required":["id","assign"]},"default":{"type":"object","title":"Voucher default","x-class-name":"VoucherFieldDefault","x-interface-name-ts":"VoucherFieldDefault","nullable":true,"description":"The default value of the field.\n  - This object overrides the defaults from the `properties` object.\n  - **To set no default, send this object empty**. `\"default\": null` overrides `properties` with a null value.\n  - This object is required when `isConstantField = true`\n","properties":{"id":{"type":"string","description":"ID of the voucher"},"assign":{"type":"boolean","description":"- `false` means that once a code from a given pool is retrieved to a profile, it becomes assigned to the profile and is always returned in subsequent requests.\n- `true` means that a different code is retrieved for a profile with every request. This can't be changed per record.\n"}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype","properties"]},"brickworks-service-UntypedJson":{"type":"object","title":"Untyped JSON","x-class-name":"UntypedJson","x-interface-name-ts":"UntypedJson","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-UntypedObjectSubtype"},"default":{"type":"object","nullable":true,"description":"The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.","additionalProperties":true},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype"]},"brickworks-service-UntypedArray":{"type":"object","title":"Untyped array","x-class-name":"UntypedArray","x-interface-name-ts":"UntypedArray","description":"This type of field accepts an array of values. The values can be of any data type.","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ArrayType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-UntypedArraySubtype"},"default":{"type":"array","nullable":true,"description":"The default value of the field, used when no value is declared. It's not saved in the records, but is used when generating or previewing content from a record.","items":{}},"maxItems":{"type":"number","format":"int32"},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["type","subtype"]},"brickworks-service-UntypedForm":{"type":"object","x-class-name":"UntypedForm","x-interface-name-ts":"UntypedForm","description":"Field without typed structure","properties":{"anyOf":{"type":"array","minItems":2,"maxItems":2,"items":{"oneOf":[{"$ref":"#/components/schemas/brickworks-service-UntypedJson"},{"$ref":"#/components/schemas/brickworks-service-UntypedArray"}]}},"subtype":{"$ref":"#/components/schemas/brickworks-service-UntypedFormSubtype"},"default":{"type":"object","additionalProperties":true},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"}},"required":["anyOf","subtype"]},"brickworks-service-ProfileAttributeField":{"type":"object","title":"Profile attribute field","x-class-name":"ProfileAttributeField","x-interface-name-ts":"ProfileAttributeField","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-ProfileAttributeSubtype"},"settings":{"$ref":"#/components/schemas/brickworks-service-ProfileAttributeSettings"},"properties":{"$ref":"#/components/schemas/brickworks-service-ProfileAttributeProperties"},"default":{"type":"object","title":"ProfileAttributeFieldDefault","x-class-name":"ProfileAttributeFieldDefault","x-interface-name-ts":"ProfileAttributeFieldDefault","description":"The default value of the field.\n  - This object overrides the defaults from the `properties` object.\n  - **To set no default, send this object empty**. `\"default\": null` overrides `properties` with a null value.\n  - This object is required when `isConstantField = true`\n","properties":{"attributeName":{"type":"string","description":"The name of the profile attribute to retrieve a value from when generating content from a record"}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"},"additionalProperties":{"type":"boolean","description":"Always false, don't send in requests"}},"required":["type","subtype","properties"]},"brickworks-service-OneToManyFilterForm":{"type":"object","title":"Record reference filter","x-class-name":"OneToManyFilterForm","x-interface-name-ts":"OneToManyFilterForm","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-ObjectType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-OneToManyFilterSubtype"},"schemaId":{"$ref":"#/components/schemas/brickworks-service-SchemaId"},"properties":{"$ref":"#/components/schemas/brickworks-service-OneToManyFilterProperties"},"default":{"type":"object","title":"One to many filter form default","description":"Default filter settings","x-class-name":"OneToManyFilterFormDefault","x-interface-name-ts":"OneToManyFilterFormDefault","properties":{"query":{"type":"string","description":"RSQL query to filter the records"},"sortBy":{"type":"string","description":"The property to sort by","enum":["id","createdAt","updatedAt"]},"sortDirection":{"type":"string","description":"Sorting direction","enum":["asc","desc"]}}},"isConstantField":{"$ref":"#/components/schemas/brickworks-service-IsConstantField"},"additionalProperties":{"type":"boolean","description":"Field generated automatically, don't send in requests."}},"required":["type","subtype","schemaId","properties"]},"brickworks-service-OneToManyFilterProperties":{"type":"object","title":"One to many filter properties","description":"Definitions of the values allowed in the filter settings. If your integration flow involves using the Synerise Web Portal, you shouldn't use this object.  \n\nYou can sort by these parameters:\n- `id`\n- `createdAt`\n- `updatedAt`\n","x-class-name":"OneToManyFilterProperties","x-interface-name-ts":"OneToManyFilterProperties","properties":{"query":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"sortBy":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"sortDirection":{"$ref":"#/components/schemas/brickworks-service-StringForm"}},"required":["query","sortBy","sortDirection"]},"brickworks-service-FieldUnique":{"type":"boolean","description":"When true, the value in this field must be unique between all records created from this schema. This parameter can't be set on a field when more than 5 records exist for the schema."},"brickworks-service-FieldSearchable":{"type":"boolean","description":"When true, the value in this field can be used to search and sort records."},"brickworks-service-IsConstantField":{"type":"boolean","default":false,"description":"When true:\n- you must set a default value.\n- that default value applies to all records and can't be overwritten in record create/update requests.\n"},"brickworks-service-JinJavaSettings":{"type":"object","x-class-name":"JinJavaSettings","x-interface-name-ts":"JinJavaSettings","nullable":true,"description":"Settings for casting the Jinjava result to a data type. Casting may not be successful - set the `strict` setting to decide how to proceed in that case.","properties":{"castType":{"type":"string","description":"The data type to try casting the Jinjava result to","x-class-name":"JinJavaCastType","x-interface-name-ts":"JinJavaCastType","enum":["boolean","integer","number","json"]},"strict":{"type":"boolean","description":"Defines what happens when casting is not successful:\n- `true` throws an error in generating an object from a record\n- `false` sets the value to null\n"},"removeWhitespaces":{"type":"boolean","description":"When `true`, all whitespace characters (e.g. `\\r`, `\\n`, spaces, tabs) are removed from the Jinjava render result before casting.\n"}},"required":["strict","castType"]},"brickworks-service-ExternalSourceFieldProperties":{"type":"object","x-class-name":"ExternalSourceFieldProperties","x-interface-name-ts":"ExternalSourceFieldProperties","description":"Behavior of the external source field when the source call fails. `returnErrorBodyOnFail` takes precedence over `nullOnFail` for received error responses.","properties":{"nullOnFail":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"},"returnErrorBodyOnFail":{"type":"boolean","nullable":true,"description":"Defines what happens when the external source responds with an error (non-2xx) status:\n- `true` — instead of failing the generate request (or returning null when `nullOnFail` is enabled), the field resolves to a JSON object with the error details: `response.status`, `response.body`, `request.url`, `request.method`, `request.body`. Useful for debugging and for building a custom flow based on errors.\n- `false` (default, also when absent or null) — standard behavior applies: `nullOnFail` decides between failing the request and a null field value.\n\nCovers only received HTTP responses. Connection-level failures (e.g. timeouts) and a missing external source definition still fail the request.\n"}},"required":["nullOnFail"]},"brickworks-service-PromotionFieldProperties":{"type":"object","x-class-name":"PromotionFieldProperties","x-interface-name-ts":"PromotionFieldProperties","description":"`id` defines the promotion to access. In `default`, enter the default promotion UUID.","properties":{"id":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"nullOnFail":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"}},"required":["id"]},"brickworks-service-FileFieldProperties":{"type":"object","x-class-name":"FileFieldProperties","x-interface-name-ts":"FileFieldProperties","description":"`id` defines the unique ID of a [file uploaded to Synerise](https://hub.synerise.com/docs/assets/files-explorer/). In `default`, enter the default file ID.","properties":{"id":{"$ref":"#/components/schemas/brickworks-service-StringForm"}}},"brickworks-service-ProfileAttributeSettings":{"type":"object","x-class-name":"ProfileAttributeSettings","x-interface-name-ts":"ProfileAttributeSettings","description":"Additional settings of the field","properties":{"id":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"castType":{"type":"string","description":"The data type to try casting the attribute to","enum":["none","boolean","number","integer","string"]},"strict":{"description":"Defines what happens when casting is not successful:\n- `true` throws an error in generating an object from a record\n- `false` sets the value to null\n"}},"required":["castType","strict"]},"brickworks-service-ProfileAttributeProperties":{"type":"object","x-class-name":"ProfileAttributeProperties","x-interface-name-ts":"ProfileAttributeProperties","description":"In `attributeName.default`, enter the default name of the profile attribute to retrieve a value from when generating content from a record","properties":{"attributeName":{"$ref":"#/components/schemas/brickworks-service-StringForm"},"nullOnFail":{"$ref":"#/components/schemas/brickworks-service-BooleanForm"}},"required":["attributeName"]},"brickworks-service-FieldMetadata":{"type":"object","x-class-name":"FieldMetadata","x-interface-name-ts":"FieldMetadata","description":"The object name is the name of a field in the schema","properties":{"title":{"type":"string","description":"Display name of the field, shown in the editor","default":"empty title"},"description":{"type":"string","nullable":true,"description":"Description of the field, shown in the editor"},"useAsRecordName":{"type":"boolean","nullable":true,"default":false,"description":"When `true`, the value of this field can be used as the record name. This only happens when the record name is not explicitly defined in its `name` parameter.If multiple fields can be used as the record name, they are checked starting with the highest `ordering` and the first non-empty field is used."}}},"brickworks-service-CreateSchemaRequest":{"type":"object","x-class-name":"CreateSchemaRequest","x-interface-name-ts":"CreateSchemaRequest","description":"Create schema request body","required":["appId","displayName"],"properties":{"appId":{"$ref":"#/components/schemas/brickworks-service-SchemaAppId"},"displayName":{"$ref":"#/components/schemas/brickworks-service-SchemaDisplayName"},"description":{"$ref":"#/components/schemas/brickworks-service-SchemaDescription"},"fields":{"$ref":"#/components/schemas/brickworks-service-FieldsObject"},"displayConfiguration":{"$ref":"#/components/schemas/brickworks-service-SchemaDisplayConfiguration"},"audience":{"$ref":"#/components/schemas/brickworks-service-Audience"},"schemaType":{"$ref":"#/components/schemas/brickworks-service-SchemaType"},"lambdaId":{"$ref":"#/components/schemas/brickworks-service-LambdaFunctionId"}}},"brickworks-service-NumberSubtype":{"type":"string","x-class-name":"NumberSubtype","x-interface-name-ts":"NumberSubtype","enum":["number"]},"brickworks-service-BooleanSubtype":{"type":"string","x-class-name":"BooleanSubtype","x-interface-name-ts":"BooleanSubtype","enum":["boolean"]},"brickworks-service-StringSubtype":{"type":"string","title":"String subtype","x-class-name":"StringSubtype","x-interface-name-ts":"StringSubtype","enum":["string"]},"brickworks-service-IntegerSubtype":{"type":"string","x-class-name":"IntegerSubtype","x-interface-name-ts":"IntegerSubtype","enum":["integer"]},"brickworks-service-EnumSubtype":{"type":"string","x-class-name":"EnumSubtype","x-interface-name-ts":"EnumSubtype","enum":["enum"]},"brickworks-service-DateSubtype":{"type":"string","x-class-name":"DateSubtype","x-interface-name-ts":"DateSubtype","enum":["date"]},"brickworks-service-DateTimeSubtype":{"type":"string","x-class-name":"DateTimeSubtype","x-interface-name-ts":"DateTimeSubtype","enum":["date-time"]},"brickworks-service-TypedArraySubtype":{"type":"string","x-class-name":"TypedArraySubtype","x-interface-name-ts":"TypedArraySubtype","enum":["typed_array"]},"brickworks-service-UuidSubtype":{"type":"string","x-class-name":"UUIDSubtype","x-interface-name-ts":"UUIDSubtype","enum":["uuid"]},"brickworks-service-JinJavaSubtype":{"type":"string","x-class-name":"JinJavaSubtype","x-interface-name-ts":"JinJavaSubtype","enum":["jinjava"]},"brickworks-service-CatalogItemSubtype":{"type":"string","x-class-name":"CatalogItemSubtype","x-interface-name-ts":"CatalogItemSubtype","enum":["catalog_item"]},"brickworks-service-KeyValueSubtype":{"type":"string","x-class-name":"KeyValueSubtype","x-interface-name-ts":"KeyValueSubtype","description":"This type of field is a reference to an external source. The request to an external source is made when you generate content from a record.\n\n**NOTE**: The `headers`, `params`, and `body` properties are not currently supported by the Synerise Portal.\n","enum":["key_value"]},"brickworks-service-ExternalSourceSubtype":{"type":"string","x-class-name":"ExternalSourceSubtype","x-interface-name-ts":"ExternalSourceSubtype","enum":["external_source"]},"brickworks-service-OneToOneSubtype":{"type":"string","x-class-name":"OneToOneSubtype","x-interface-name-ts":"OneToOneSubtype","description":"This field type lets you include references to a record from another schema. To generate an object, the referenced record must be published. Its content (for example, an expression field in the referenced record) will be processed when generating an object.\n","enum":["one_to_one"]},"brickworks-service-OneToManySubtype":{"type":"string","x-class-name":"OneToManySubtype","x-interface-name-ts":"OneToManySubtype","enum":["one_to_many"]},"brickworks-service-MetricSubtype":{"type":"string","x-class-name":"MetricSubtype","x-interface-name-ts":"MetricSubtype","enum":["metric"]},"brickworks-service-AggregateSubtype":{"type":"string","x-class-name":"AggregateSubtype","x-interface-name-ts":"AggregateSubtype","enum":["aggregate"]},"brickworks-service-ExpressionSubtype":{"type":"string","x-class-name":"ExpressionSubtype","x-interface-name-ts":"ExpressionSubtype","enum":["expression"]},"brickworks-service-PromotionSubtype":{"type":"string","x-class-name":"PromotionSubtype","x-interface-name-ts":"PromotionSubtype","enum":["promotion"]},"brickworks-service-FileSubtype":{"type":"string","x-class-name":"FileSubtype","x-interface-name-ts":"FileSubtype","description":"This type of field lets you store links to [files uploaded to Synerise](https://hub.synerise.com/docs/assets/files-explorer/).","enum":["file"]},"brickworks-service-ImageSubtype":{"type":"string","description":"This type of field lets you store links to images.","enum":["image"]},"brickworks-service-RecommendationSubtype":{"type":"string","x-class-name":"RecommendationSubtype","x-interface-name-ts":"RecommendationSubtype","description":"This type of field lets you retrieve the result of a recommendation campaign.","enum":["recommendation"]},"brickworks-service-AiSearchSubtype":{"type":"string","x-class-name":"AiSearchSubtype","x-interface-name-ts":"AiSearchSubtype","description":"This type of field lets you retrieve results of an AI Search query against a chosen index.","enum":["ai_search"]},"brickworks-service-AiSearchListingSubtype":{"type":"string","x-class-name":"AiSearchListingSubtype","x-interface-name-ts":"AiSearchListingSubtype","description":"This type of field lets you retrieve listing results from an AI Search index (without a query phrase).","enum":["ai_search_listing"]},"brickworks-service-VoucherSubtype":{"type":"string","x-class-name":"VoucherSubtype","x-interface-name-ts":"VoucherSubtype","description":"This type of fields lets you retrieve a voucher from a pool. The voucher is retrieved when you generate an object from the record.","enum":["voucher"]},"brickworks-service-UntypedObjectSubtype":{"type":"string","x-class-name":"UntypedObjectSubtype","x-interface-name-ts":"UntypedObjectSubtype","description":"This type of field lets you save any JSON data in the record, without validating it against any schema","enum":["untyped_object"]},"brickworks-service-UntypedArraySubtype":{"type":"string","x-class-name":"UntypedArraySubtype","x-interface-name-ts":"UntypedArraySubtype","enum":["untyped_array"]},"brickworks-service-UntypedFormSubtype":{"type":"string","x-class-name":"UntypedFormSubtype","x-interface-name-ts":"UntypedFormSubtype","enum":["json"]},"brickworks-service-ProfileAttributeSubtype":{"type":"string","x-class-name":"ProfileAttributeSubtype","x-interface-name-ts":"ProfileAttributeSubtype","description":"This type of field references an attribute by name and retrieves its value.","enum":["client_attribute"]},"brickworks-service-OneToManyFilterSubtype":{"type":"string","x-class-name":"OneToManyFilterSubtype","x-interface-name-ts":"OneToManyFilterSubtype","enum":["filter"],"description":"This field type allows you to retrieve records from another schema and filter/sort them"},"brickworks-service-FieldFormMap":{"type":"object","x-class-name":"FieldFormMap","x-interface-name-ts":"FieldFormMap","description":"Fields in the schema","additionalProperties":{"$ref":"#/components/schemas/brickworks-service-FieldForm"},"x-typescript-type":"{ [key: string]: FieldForm }"},"brickworks-service-UpdateSchemaRequest":{"type":"object","x-class-name":"UpdateSchemaRequest","x-interface-name-ts":"UpdateSchemaRequest","description":"Schema update request body","required":["displayName"],"properties":{"displayName":{"$ref":"#/components/schemas/brickworks-service-SchemaDisplayName"},"description":{"$ref":"#/components/schemas/brickworks-service-SchemaDescription"},"fields":{"$ref":"#/components/schemas/brickworks-service-FieldsObject"},"displayConfiguration":{"$ref":"#/components/schemas/brickworks-service-SchemaDisplayConfiguration"},"audience":{"$ref":"#/components/schemas/brickworks-service-Audience"},"lambdaId":{"$ref":"#/components/schemas/brickworks-service-LambdaFunctionId"}}},"brickworks-service-Meta":{"type":"object","description":"Pagination metadata","x-class-name":"Meta","x-interface-name-ts":"Meta","properties":{"links":{"type":"array","description":"Links to the neighboring pages and the first page","items":{"$ref":"#/components/schemas/brickworks-service-Link"}},"limit":{"type":"integer","format":"int32","description":"Limit of items per page"},"count":{"type":"integer","nullable":true,"description":"Currently unused"}}},"brickworks-service-Link":{"type":"object","x-class-name":"Link","x-interface-name-ts":"Link","required":["url","rel"],"properties":{"url":{"type":"string","description":"URL of the page, used for navigation"},"rel":{"type":"string","description":"The type of relation to the current page. `first` is always the first page.","enum":["first","prev","next"]}}},"brickworks-service-ObjectsError":{"type":"object","x-class-name":"ObjectsError","x-interface-name-ts":"ObjectsError","required":["httpStatus","errorCode","timestamp","message"],"properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"errorCode":{"type":"string","description":"Code of the error, needed for troubleshooting\n\nSee error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)\n"},"httpStatus":{"type":"integer","description":"Error's HTTP status code"},"message":{"type":"string","description":"Description of the problem"},"traceId":{"type":"string","description":"Unique identifier of the request, useful for tracing logs"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/brickworks-service-ObjectsError"}},"source":{"type":"object","x-class-name":"ObjectErrorSource","x-interface-name-ts":"ObjectErrorSource","required":["pointer"],"properties":{"pointer":{"type":"string","description":"JSON Pointer for invalid body path"},"value":{"type":"string","description":"Value that caused the validation error"}}},"details":{"type":"object","x-class-name":"ObjectsErrorDetails","x-interface-name-ts":"ObjectsErrorDetails","additionalProperties":{"type":"object"},"description":"Additional structured error information"},"field":{"type":"string","description":"Name of the field that caused the error"}}},"brickworks-service-RecordPagingResult":{"type":"object","x-class-name":"RecordPagingResult","x-interface-name-ts":"RecordPagingResult","required":["meta","data"],"properties":{"meta":{"$ref":"#/components/schemas/brickworks-service-Meta"},"data":{"type":"array","description":"Array of records","items":{"$ref":"#/components/schemas/brickworks-service-ListRecordView"}}}},"brickworks-service-ListRecordView":{"type":"object","x-class-name":"ListRecordView","x-interface-name-ts":"RecordWithoutFields","description":"Record object","required":["id","schemaId","createdBy","updatedBy","createdAt","updatedAt","status","recordVersion"],"properties":{"id":{"$ref":"#/components/schemas/brickworks-service-RecordId"},"name":{"$ref":"#/components/schemas/brickworks-service-RecordName"},"schemaId":{"$ref":"#/components/schemas/brickworks-service-SchemaId"},"createdBy":{"$ref":"#/components/schemas/brickworks-service-CreatedBy"},"updatedBy":{"$ref":"#/components/schemas/brickworks-service-UpdatedBy"},"publishedBy":{"$ref":"#/components/schemas/brickworks-service-PublishedBy"},"deletedBy":{"$ref":"#/components/schemas/brickworks-service-DeletedBy"},"createdAt":{"$ref":"#/components/schemas/brickworks-service-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/brickworks-service-UpdatedAt"},"publishedAt":{"$ref":"#/components/schemas/brickworks-service-PublishedAt"},"deletedAt":{"$ref":"#/components/schemas/brickworks-service-DeletedAt"},"slug":{"$ref":"#/components/schemas/brickworks-service-RecordSlug"},"status":{"$ref":"#/components/schemas/brickworks-service-RecordStatus"},"values":{"$ref":"#/components/schemas/brickworks-service-RecordValues"},"schemaVersion":{"type":"integer","format":"int32","description":"The ID of the schema version that was used when this record was last updated. For simple schemas, this is always `1`."},"recordVersion":{"$ref":"#/components/schemas/brickworks-service-RecordVersionNumber"},"schedule":{"$ref":"#/components/schemas/brickworks-service-ScheduleEntry"}}},"brickworks-service-RecordId":{"type":"string","format":"uuid","description":"Unique identifier of a record, generated by the system. Can't be changed.\n\nThis identifier is common to all versions of the record, even when the slug changes.\n\nIn singleton-type schemas, use the schema's `appId` or `id` in place of record identifiers for generating content.\n"},"brickworks-service-RecordSlug":{"type":"string","minLength":6,"maxLength":40,"pattern":"^([a-zA-Z0-9\\-]|_[a-zA-Z0-9\\-])[\\w\\-]*","description":"Unique (within a schema) identifier of a record. Can't be a UUID.\n\nIn singleton-type schemas, use the schema's `appId` or `id` in place of record identifiers for generating content.\n"},"brickworks-service-RecordName":{"type":"string","maxLength":255,"minLength":1,"nullable":true,"description":"The name of the record. If not defined and there are no fields with `useAsRecordName = true`, GET requests return `Unnamed`."},"brickworks-service-RecordStatus":{"type":"string","x-class-name":"RecordStatus","x-interface-name-ts":"RecordStatus","description":"Status of the record. When generating an object from a record, the last published version is used.  \n- In simple schemas, a record can only be published. Updates overwrite the record without changing the version number.\n- In versioned schemas:\n    - A published record can't be edited directly. You need to send an update which changes to the draft status (this increases the version number, and the existing published version isn't modified), and then publish again.\n    - An unpublished record can't be published immediately. It must receive the draft status first.\n    - When unpublishing a record, you can't edit any data in the record.\n","enum":["DRAFT","SCHEDULED","PUBLISHED","UNPUBLISHED"]},"brickworks-service-ScheduleType":{"type":"string","x-class-name":"ScheduleType","x-interface-name-ts":"ScheduleType","enum":["PUBLISH"]},"brickworks-service-ScheduleEntry":{"type":"object","x-class-name":"ScheduleEntry","x-interface-name-ts":"ScheduleEntry","description":"Time when the record is published - for example, every Monday, from 12:00 to 14:00","properties":{"timezone":{"type":"string","description":"Timezone of the schedule, as `UTC+offset` or according to the [tz database](https://en.wikipedia.org/wiki/Tz_database).","example":"UTC+01:00"},"startType":{"type":"string","description":"If `NOW`, the record is published immediately upon saving.","enum":["NOW","SCHEDULED"]},"startDate":{"type":"string","description":"Time when the schedule becomes active. If `startType` is NOW, this field is null.","format":"date-time"},"endType":{"type":"string","description":"Mode of inactivating the schedule","enum":["NEVER","DATE"]},"endDate":{"type":"string","description":"Time when the schedule becomes inactive, if `endType = DATE`","format":"date-time"},"periodType":{"type":"string","description":"Defines when the schedule applies within its activity period.\n\n- ENTIRE: schedule is applied at all time since it becomes active until it becomes inactive.\n- DAILY: schedule is active every day, at specific times\n- WEEKLY: schedule is applied at specified days of the week (and optionally at specific times during those days)\n- MONTHLY: schedule is applied at specified days of the month (and optionally at specific times during those days)\n- WEEKDAY: schedule is applied on specified weekdays of a month; for example on the second Tuesday of each month\n","enum":["ENTIRE","DAILY","WEEKLY","MONTHLY","WEEKDAY"]},"parts":{"type":"array","description":"An array of time rules that allow more granularity. All objects must match the period type set in `periodType` (for example, you cannot mix weekly and monthly conditions).\n\nIf `periodType` is `ENTIRE`, this array is empty.\n","items":{"$ref":"#/components/schemas/brickworks-service-EntryScheduleRepeatPart"}},"enabled":{"type":"boolean","description":"Defines if the schedule configuration is enabled. A schedule must be enabled in order to become active at the selected time."}},"required":["timezone","startType","startDate","endType","enabled"]},"brickworks-service-EntryScheduleRepeatPart":{"type":"object","x-class-name":"EntryScheduleRepeatPart","x-interface-name-ts":"EntryScheduleRepeatPart","properties":{"startDay":{"type":"integer","format":"int32","example":1,"description":"If `periodType` is:\n\n- DAILY, the value is always 1.\n\n- WEEKLY or WEEKDAY, the values are 1-7 (1 is Monday).\n\n- MONTHLY, the values are 1-31 (days of the month).\n\n**Note:**  \nIf you want to define two time rules for a day (for example, the schedule is active on Monday at 06:00-07:00 and 15:00-16:00), create a separate `part` object for each time period.\n"},"startTime":{"type":"string","example":"08:18:03","description":"The hour when the schedule becomes active."},"endDay":{"type":"integer","format":"int32","example":1,"description":"Must be identical to `startDay`."},"endTime":{"type":"string","example":"12:18:03","description":"The hour when the schedule becomes inactive."},"ordinal":{"type":"string","description":"\nApplies only if `periodType` is WEEKDAY.\n\n**Example:**<br/>\nIf you want a schedule to be active on every third Tuesday of the month, set `ordinal` to THIRD and `startDay` to 2. \n\n**Note:**<br/>\nIf you want a schedule to be active on every second and third Tuesday, you must create two separate `part` objects.\n","enum":["FIRST","SECOND","THIRD","FOURTH","FIFTH","LAST"]}},"required":["startDay","startTime","endDay","endTime"]},"brickworks-service-RecordVersionNumber":{"type":"number","format":"int32","description":"Identifier of the record version. \n- In simple schemas, this is always `1`\n- In versioned schemas, the versions start with `1` on creation and are increased by 1 when you create a new draft. Publishing from a draft does NOT increase the version number.\n"},"brickworks-service-AddRecordToSchemaRequest":{"type":"object","x-class-name":"AddRecordToSchemaRequest","x-interface-name-ts":"AddRecordToSchemaRequest","required":["values","status"],"properties":{"slug":{"$ref":"#/components/schemas/brickworks-service-RecordSlug"},"values":{"$ref":"#/components/schemas/brickworks-service-RecordValues"},"status":{"$ref":"#/components/schemas/brickworks-service-RecordStatus"},"actionOnSchedule":{"$ref":"#/components/schemas/brickworks-service-ScheduleType"},"schedule":{"$ref":"#/components/schemas/brickworks-service-ScheduleEntry"},"name":{"$ref":"#/components/schemas/brickworks-service-RecordName"}}},"brickworks-service-RecordValues":{"type":"object","x-class-name":"RecordValues","x-interface-name-ts":"RecordValues","description":"Values included in the record. Each key is the name of a field. The value must match the configuration of the field in the schema.\n\n**Default values aren't explicitly saved in the record** or shown in GET requests which retrieve the record, but are returned when an object is generated from the record.\n\nSupported value types:\n- Float (number)\n- Integer\n- String\n- Boolean\n- Date (string, format: date)\n- Date-time (string, format: date-time)\n- Profile attribute (object with attributeName)\n- Typed array\n- UUID (string, format: uuid)\n- Jinjava (string)\n- Catalog (object with itemKey, id)\n- Object (free-form)\n- External source (empty object)\n- One-to-one reference (string - record ID)\n- One-to-many reference (array of record IDs)\n- Analysis (string, format: uuid)\n- Promotion (string - promotion ID)\n- File/Image (string - file ID)\n- Recommendation (object with id, params)\n- Voucher (object with id)\n- Untyped JSON (object)\n- Untyped array\n","additionalProperties":true,"example":{"stringField":"example string","numberField":123.45,"integerField":42,"booleanField":true,"dateField":"2024-01-15","dateTimeField":"2024-01-15T10:30:00Z","uuidField":"550e8400-e29b-41d4-a716-446655440000","arrayField":["item1","item2"],"objectField":{"key":"value"},"profileAttribute":{"attributeName":"email"},"catalog":{"itemKey":"SKU123","id":"catalog-id"},"recommendation":{"id":"recommendation-campaign-id","params":{"itemId":"item-123"}}}},"brickworks-service-Record":{"x-class-name":"Record","x-interface-name-ts":"Record","allOf":[{"type":"object","required":["id","schemaId","values","createdBy","updatedBy","createdAt","updatedAt","status","recordVersion"],"properties":{"id":{"$ref":"#/components/schemas/brickworks-service-RecordId"},"name":{"$ref":"#/components/schemas/brickworks-service-RecordName"},"schemaId":{"$ref":"#/components/schemas/brickworks-service-SchemaId"},"createdBy":{"$ref":"#/components/schemas/brickworks-service-CreatedBy"},"updatedBy":{"$ref":"#/components/schemas/brickworks-service-UpdatedBy"},"publishedBy":{"$ref":"#/components/schemas/brickworks-service-PublishedBy"},"deletedBy":{"$ref":"#/components/schemas/brickworks-service-DeletedBy"},"createdAt":{"$ref":"#/components/schemas/brickworks-service-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/brickworks-service-UpdatedAt"},"publishedAt":{"$ref":"#/components/schemas/brickworks-service-PublishedAt"},"deletedAt":{"$ref":"#/components/schemas/brickworks-service-DeletedAt"},"slug":{"$ref":"#/components/schemas/brickworks-service-RecordSlug"},"status":{"$ref":"#/components/schemas/brickworks-service-RecordStatus"},"values":{"$ref":"#/components/schemas/brickworks-service-RecordValues"},"schemaVersion":{"type":"integer","format":"int32","description":"The ID of the schema version that was used when this record was last updated. For simple schemas, this is always `1`."},"recordVersion":{"$ref":"#/components/schemas/brickworks-service-RecordVersionNumber"},"schedule":{"$ref":"#/components/schemas/brickworks-service-ScheduleEntry"}}}]},"brickworks-service-UpdateRecordRequest":{"type":"object","x-class-name":"UpdateRecordRequest","x-interface-name-ts":"UpdateRecordRequest","properties":{"status":{"$ref":"#/components/schemas/brickworks-service-RecordStatus"},"values":{"$ref":"#/components/schemas/brickworks-service-RecordValues"},"actionOnSchedule":{"$ref":"#/components/schemas/brickworks-service-ScheduleType"},"schedule":{"$ref":"#/components/schemas/brickworks-service-ScheduleEntry"},"slug":{"$ref":"#/components/schemas/brickworks-service-RecordSlug"},"lastUpdatedAt":{"type":"string","description":"If updating a draft keeping the draft status, you can check if it was updated by another request in the meantime:\n  1. Fetch a draft record.\n  2. Copy the `updatedAt` property into your update request.\n  3. Make other changes in the record.\n  4. Send the update.\n  5. If the update time you sent is different than the one in the database, it means that the record was updated since you last fetched it. Your update is ignored and error BKW-029 (HTTP 409) is returned.\n","format":"date-time"},"name":{"$ref":"#/components/schemas/brickworks-service-RecordName"},"fromState":{"$ref":"#/components/schemas/brickworks-service-RecordStatus"}}},"brickworks-service-GenerateRequest":{"type":"object","x-class-name":"GenerateRequest","x-interface-name-ts":"GenerateRequest","required":["identifierValue"],"properties":{"identifierValue":{"type":"string","description":"Value of the profile identifier selected in `identifierType` (profile ID is sent as a string)"},"context":{"$ref":"#/components/schemas/brickworks-service-Context"},"fieldContext":{"$ref":"#/components/schemas/brickworks-service-FieldContext"}}},"brickworks-service-GenerateRequestWithoutIdentifier":{"type":"object","x-class-name":"GenerateRequestWithoutIdentifier","x-interface-name-ts":"GenerateRequestWithoutIdentifier","properties":{"context":{"$ref":"#/components/schemas/brickworks-service-Context"},"fieldContext":{"$ref":"#/components/schemas/brickworks-service-FieldContext"}}},"brickworks-service-GeneratedObject":{"type":"object","x-class-name":"GeneratedObject","x-interface-name-ts":"GeneratedObject","description":"Processed content of a record","properties":{"__slug":{"$ref":"#/components/schemas/brickworks-service-RecordSlug"},"__recordVersion":{"$ref":"#/components/schemas/brickworks-service-RecordVersionNumber"},"__publishedAt":{"type":"string","format":"date-time","description":"Record publishing time"},"__updatedAt":{"type":"string","format":"date-time","description":"Last record update time"},"__schemaId":{"$ref":"#/components/schemas/brickworks-service-SchemaId"},"__id":{"$ref":"#/components/schemas/brickworks-service-RecordId"},"__schemaVersion":{"$ref":"#/components/schemas/brickworks-service-SchemaVersion"},"__createdAt":{"type":"string","format":"date-time","description":"Record creation time"},"__matchedAudience":{"type":"boolean","description":"Indicates whether the client matched the audience defined on the schema. `true` when the client belongs to the target audience (or when no audience is defined), `false` when the client does not match the top-level schema audience.\n"},"__unmatchedAudienceRelations":{"type":"array","description":"List of relation field names whose referenced schemas have an audience that the client did not match. These fields are returned as `null` in the response. Only present when at least one relation is audience-restricted for the given client.\n","items":{"type":"string"}},"__logs":{"description":"Lambdas transformer user logs content, available only in preview mode\n","type":"array","items":{"$ref":"#/components/schemas/brickworks-service-LogEntry"}}},"additionalProperties":true,"example":{"__slug":"my-record-slug","__recordVersion":1,"__publishedAt":"2024-01-15T10:30:00Z","__updatedAt":"2024-01-15T10:30:00Z","__schemaId":"550e8400-e29b-41d4-a716-446655440000","__id":"550e8400-e29b-41d4-a716-446655440001","__schemaVersion":1,"__createdAt":"2024-01-15T10:30:00Z","customStringField":"string value","customNumberField":123.45,"customBooleanField":true,"customDateField":"2024-01-15","customArrayField":["item1","item2"],"customObjectField":{"nestedKey":"nestedValue"},"__matchedAudience":true,"__unmatchedAudienceRelations":["deniedRefField"]}},"brickworks-service-Context":{"type":"object","x-class-name":"Context","x-interface-name-ts":"Context","description":"Additional context parameters. You can use these parameters in Jinjava fields by calling `{{ context.keyName }}`. The value will be printed as a string.","additionalProperties":{"description":"In Jinjava, you can retrieve the value of a key from this object by `{{ context.keyName }}`"}},"brickworks-service-FieldContext":{"type":"object","x-class-name":"FieldContext","x-interface-name-ts":"FieldContext","description":"Additional context parameters used in recommendation and relation fields.","additionalProperties":{"$ref":"#/components/schemas/brickworks-service-FieldContextItem"}},"brickworks-service-FieldContextItem":{"type":"object","x-class-name":"FieldContextItem","x-interface-name-ts":"FieldContextItem","description":"The names of the objects correspond to the names of the fields where the object's data is used","additionalProperties":true,"example":{"page":1,"limit":10,"itemId":"item-123","additionalFilters":"custom filter value"}},"brickworks-service-FieldContextConfig":{"type":"object","x-class-name":"FieldContextConfig","x-interface-name-ts":"FieldContextConfig","required":["fields"],"properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/brickworks-service-FieldContextConfigField"}}}},"brickworks-service-FieldContextConfigField":{"type":"object","x-class-name":"FieldContextConfigField","x-interface-name-ts":"FieldContextConfigField","required":["fieldName","descriptors"],"properties":{"fieldName":{"type":"string"},"descriptors":{"type":"array","items":{"$ref":"#/components/schemas/brickworks-service-FieldContextDescriptor"}}}},"brickworks-service-FieldContextDescriptor":{"type":"object","x-class-name":"FieldContextDescriptor","x-interface-name-ts":"FieldContextDescriptor","required":["name","type"],"properties":{"name":{"type":"string"},"type":{"x-class-name":"FieldContextDescriptorType","type":"string","enum":["string","integer","number","boolean","unknown"]}}},"brickworks-service-PreviewRequest":{"type":"object","x-class-name":"PreviewRequest","x-interface-name-ts":"PreviewRequest","required":["identifierValue","schema"],"properties":{"identifierValue":{"type":"string","description":"Value of the profile identifier selected in `identifierType` (profile ID is sent as a string)"},"context":{"$ref":"#/components/schemas/brickworks-service-Context"},"fieldContext":{"$ref":"#/components/schemas/brickworks-service-FieldContext"},"values":{"$ref":"#/components/schemas/brickworks-service-PreviewValues"},"schema":{"$ref":"#/components/schemas/brickworks-service-SchemaPreviewData"}}},"brickworks-service-PreviewValues":{"type":"object","x-class-name":"PreviewValues","x-interface-name-ts":"PreviewValues","description":"The values for fields in the record, to be used when generating the preview.","additionalProperties":{"description":"Each key in this object corresponds to a field name."}},"brickworks-service-PreviewRequestWithoutIdentifier":{"type":"object","x-class-name":"PreviewRequestWithoutIdentifier","x-interface-name-ts":"PreviewRequestWithoutIdentifier","required":["schema"],"properties":{"context":{"$ref":"#/components/schemas/brickworks-service-Context"},"fieldContext":{"$ref":"#/components/schemas/brickworks-service-FieldContext"},"values":{"$ref":"#/components/schemas/brickworks-service-PreviewValues"},"schema":{"$ref":"#/components/schemas/brickworks-service-SchemaPreviewData"},"lambdaId":{"$ref":"#/components/schemas/brickworks-service-LambdaFunctionId"}}},"brickworks-service-CreateExternalSourceRequest":{"type":"object","x-class-name":"CreateExternalSourceRequest","x-interface-name-ts":"CreateExternalSourceRequest","properties":{"name":{"type":"string"},"description":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceDescription"},"properties":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceProperties"},"ttl":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceTtl"}},"required":["name","properties"]},"brickworks-service-ExternalSourceTtl":{"type":"number","format":"int32","description":"Cache TTL for connection response, in seconds"},"brickworks-service-ExternalSourceName":{"type":"string","description":"Human-readable name of the external resource","maxLength":255},"brickworks-service-ExternalSourceId":{"type":"string","description":"Unique ID of the external source definition","format":"uuid"},"brickworks-service-ExternalSourceDescription":{"type":"string","maxLength":255,"description":"Description of the external source"},"brickworks-service-ExternalSourceProperties":{"type":"object","x-class-name":"ExternalSourceProperties","x-interface-name-ts":"ExternalSourceProperties","description":"The details of the external source configuration","properties":{"sourceType":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceSourceType"},"url":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceUrl"},"method":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceMethod"},"headers":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceHeaders"},"params":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceParams"},"authType":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceAuthType"},"authId":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceAuthId"},"body":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceBody"},"bodySchema":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceBodySchema"}},"required":["sourceType","url","method"]},"brickworks-service-ExternalSourceSourceType":{"type":"string","x-class-name":"ExternalSourceType","x-interface-name-ts":"ExternalSourceType","enum":["http_source"]},"brickworks-service-ExternalSourceMethod":{"type":"string","description":"The HTTP method used in the external request. The `body` and `bodySchema` properties can only be used in POST requests.","enum":["post","get"]},"brickworks-service-ExternalSourceUrl":{"type":"string","description":"URL address of the resource, including the `https` protocol. May include Jinjava inserts.","example":"https://example.com/clients/{% customer email %}"},"brickworks-service-ExternalSourceHeaders":{"type":"object","x-class-name":"ExternalSourceHeaders","x-interface-name-ts":"ExternalSourceHeaders","description":"Headers added to the request","additionalProperties":{"type":"string","description":"Each key is the name of the header, and the value is the header's value."}},"brickworks-service-ExternalSourceParams":{"type":"object","x-class-name":"ExternalSourceParams","x-interface-name-ts":"ExternalSourceParams","description":"Query parameters added to the URL","additionalProperties":{"type":"string","description":"A key/value pair"}},"brickworks-service-ExternalSourceAuthType":{"type":"string","x-class-name":"ExternalSourceAuthType","x-interface-name-ts":"ExternalSourceAuthType","enum":["basic","api_key","custom"],"description":"The mode of authentication used by this external source"},"brickworks-service-ExternalSourceAuthId":{"type":"string","format":"uuid","description":"Unique identifier of a [connection](https://hub.synerise.com/docs/settings/tool/connections/) used by this external source."},"brickworks-service-ExternalSourceBody":{"type":"object","x-class-name":"ExternalSourceBody","x-interface-name-ts":"ExternalSourceBody","description":"The request body sent to the external source","additionalProperties":{"description":"JSON content. If you want to use JinJava in a value, use `bodySchema` to define which fields accept Jinjava."},"example":{"someString":"string","someObject":{"key":"{% customer email %}"},"dynamicField":"{% customer id %}"}},"brickworks-service-ExternalSourceBodySchema":{"type":"object","title":"External source body schema","x-class-name":"ExternalSourceBodySchema","x-interface-name-ts":"ExternalSourceBodySchema","description":"A schema which defines which fields in the request body have dynamic values inserted with Jinjava. Static parameters don't need to be listed in this schema.","properties":{"properties":{"description":"The properties in the request body. You only need to define dynamic values (jinjava strings), and if they are nested in an object, use the `object` schema to define that structure.\n","type":"object","additionalProperties":{"$ref":"#/components/schemas/brickworks-service-BodySchemaEntity"}},"type":{"type":"string","description":"Objects can include or other objects (recursive schema)","enum":["object"]},"subtype":{"$ref":"#/components/schemas/brickworks-service-KeyValueSubtype"},"additionalProperties":{"type":"boolean","description":"Defines if the object can include other properties than the one listed in the schema","enum":[true]}},"example":{"type":"object","subtype":"key_value","properties":{"someObject":{"type":"object","subtype":"key_value","properties":{"key":{"type":"string","subtype":"jinjava"}},"additionalProperties":true},"dynamicField":{"type":"string","subtype":"jinjava"}},"additionalProperties":true}},"brickworks-service-BodySchemaEntity":{"type":"object","x-class-name":"BodySchemaEntity","x-interface-name-ts":"BodySchemaEntity","description":"The object name corresponds to a key name in the request body.","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/brickworks-service-ExternalSourceBodySchema"},{"$ref":"#/components/schemas/brickworks-service-BodySchemaString"}],"discriminator":{"propertyName":"subtype","mapping":{"jinjava":"#/components/schemas/brickworks-service-BodySchemaString","key_value":"#/components/schemas/brickworks-service-ExternalSourceBodySchema"}}},"x-typescript-type":"{ [key: string]: BodySchemaEntity }"},"brickworks-service-BodySchemaString":{"type":"object","title":"String","x-class-name":"BodySchemaString","x-interface-name-ts":"BodySchemaString","properties":{"type":{"$ref":"#/components/schemas/brickworks-service-StringType"},"subtype":{"$ref":"#/components/schemas/brickworks-service-JinJavaSubtype"},"settings":{"$ref":"#/components/schemas/brickworks-service-JinJavaSettings"}}},"brickworks-service-ExternalSourceModel":{"type":"object","x-class-name":"ExternalSourceModel","x-interface-name-ts":"ExternalSourceModel","properties":{"id":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceId"},"name":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceName"},"description":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceDescription"},"properties":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceProperties"},"createdBy":{"$ref":"#/components/schemas/brickworks-service-CreatedBy"},"createdAt":{"$ref":"#/components/schemas/brickworks-service-CreatedAt"},"updatedBy":{"$ref":"#/components/schemas/brickworks-service-UpdatedBy"},"updatedAt":{"$ref":"#/components/schemas/brickworks-service-UpdatedAt"},"ttl":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceTtl"}},"required":["id","name","properties","createdBy","createdAt","updatedAt"]},"brickworks-service-UpdateExternalSourceRequest":{"type":"object","x-class-name":"UpdateExternalSourceRequest","x-interface-name-ts":"UpdateExternalSourceRequest","properties":{"name":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceName"},"description":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceDescription"},"properties":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceProperties"},"ttl":{"type":"number","format":"int32"}}},"brickworks-service-RecordVersionPagingResult":{"type":"object","x-class-name":"RecordVersionPagingResult","x-interface-name-ts":"RecordVersionPagingResult","required":["meta","data"],"properties":{"meta":{"$ref":"#/components/schemas/brickworks-service-Meta"},"data":{"type":"array","description":"Array of record versions","items":{"$ref":"#/components/schemas/brickworks-service-RecordVersion"}}}},"brickworks-service-RecordVersion":{"x-class-name":"RecordVersion","x-interface-name-ts":"RecordVersion","allOf":[{"type":"object","properties":{"versionId":{"format":"uuid","type":"string","description":"Unique identifier of a record version"}}},{"$ref":"#/components/schemas/brickworks-service-Record"}]},"brickworks-service-ExternalSourcePagingResult":{"type":"object","x-class-name":"ExternalSourcePagingResult","x-interface-name-ts":"ExternalSourcePagingResult","required":["meta","data"],"properties":{"meta":{"$ref":"#/components/schemas/brickworks-service-Meta"},"data":{"type":"array","description":"Array of external sources","items":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceSimplifiedView"}}}},"brickworks-service-ExternalSourceSimplifiedView":{"type":"object","x-class-name":"ExternalSourceSimplifiedView","x-interface-name-ts":"ExternalSourceSimplifiedView","properties":{"id":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceId"},"name":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceName"},"method":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceMethod"},"description":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceDescription"},"sourceType":{"$ref":"#/components/schemas/brickworks-service-ExternalSourceSourceType"},"createdBy":{"$ref":"#/components/schemas/brickworks-service-CreatedBy"},"createdAt":{"$ref":"#/components/schemas/brickworks-service-CreatedAt"},"updatedBy":{"$ref":"#/components/schemas/brickworks-service-UpdatedBy"},"updatedAt":{"$ref":"#/components/schemas/brickworks-service-UpdatedAt"}},"required":["id","name","createdBy","createdAt","updatedAt"]},"brickworks-service-AsyncRecordRequest":{"type":"object","x-class-name":"AsyncRecordRequest","x-interface-name-ts":"AsyncRecordRequest","description":"Async record request","required":["identifier","values"],"properties":{"identifier":{"type":"object","description":"Definition of a unique identifier of a record","properties":{"name":{"type":"string","description":"The name of the identifier. By default, `slug` and `id` are always available. You can also use a field that was configured as `unique`.\n\nIn this field, provide the current identifier. If you want to change the identifier with the request, send it in `values` (for unique fields) or `slug`.\n"},"value":{"description":"The value of the selected identifier (slug or a field that was configured as unique)","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"values":{"$ref":"#/components/schemas/brickworks-service-RecordValues"},"slug":{"$ref":"#/components/schemas/brickworks-service-RecordSlug"},"name":{"$ref":"#/components/schemas/brickworks-service-RecordName"}}},"brickworks-service-207ResponseBody":{"type":"array","x-class-name":"ResponseBody207","x-interface-name-ts":"ResponseBody207","items":{"type":"object","properties":{"identifier":{"type":"object","properties":{"name":{"type":"string","description":"The name of the identifier you used"},"value":{"type":"string","description":"The value of the identifier"}}},"errors":{"type":"array","description":"Errors that occurred for this record","items":{"$ref":"#/components/schemas/brickworks-service-ObjectsError"}}}}},"brickworks-service-ValidationConditions":{"type":"object","description":"Additional validation for the fields. To learn how to use them, see the [JSON Schema documentation](https://json-schema.org/understanding-json-schema/reference/conditionals#ifthenelse).","x-class-name":"ValidationConditions","x-interface-name-ts":"ValidationConditions","properties":{"if":{"$ref":"#/components/schemas/brickworks-service-ValidationStatement"},"then":{"$ref":"#/components/schemas/brickworks-service-ValidationStatement"},"else":{"$ref":"#/components/schemas/brickworks-service-ValidationStatement"}},"required":["if","then"]},"brickworks-service-ValidationStatement":{"type":"object","x-class-name":"ValidationStatement","x-interface-name-ts":"ValidationStatement","properties":{"required":{"type":"array","items":{"type":"string"}},"properties":{"additionalProperties":{"$ref":"#/components/schemas/brickworks-service-FieldCondition"}}},"required":["required","properties"]},"brickworks-service-FieldCondition":{"type":"object","x-class-name":"FieldCondition","x-interface-name-ts":"FieldCondition","properties":{"minItems":{"type":"number","format":"int32"},"maxItems":{"type":"number","format":"int32"},"uniqueItems":{"type":"boolean"},"minimum":{"type":"number","format":"int32"},"maximum":{"type":"number","format":"int32"},"pattern":{"type":"string"},"const":{"title":"FieldConditionConstant","x-class-name":"FieldConditionConstant","x-interface-name-ts":"FieldConditionConstant","nullable":true},"enum":{"type":"array","items":{"type":"string"}},"not":{"$ref":"#/components/schemas/brickworks-service-FieldCondition"}}},"brickworks-service-StringType":{"type":"string","title":"String type","x-class-name":"StringType","x-interface-name-ts":"StringType","enum":["string"]},"brickworks-service-IntegerType":{"type":"string","title":"IntegerType","x-class-name":"IntegerType","x-interface-name-ts":"IntegerType","enum":["integer"]},"brickworks-service-BooleanType":{"type":"string","title":"Boolean","x-class-name":"BooleanType","x-interface-name-ts":"BooleanType","enum":["boolean"]},"brickworks-service-NumberType":{"type":"string","title":"Number type","x-class-name":"NumberType","x-interface-name-ts":"NumberType","enum":["number"]},"brickworks-service-ObjectType":{"type":"string","title":"Object type","x-class-name":"ObjectType","x-interface-name-ts":"ObjectType","enum":["object"]},"brickworks-service-ArrayType":{"type":"string","title":"ArrayType","x-class-name":"ArrayType","x-interface-name-ts":"ArrayType","enum":["array"]},"brickworks-service-LambdaFunctionId":{"type":"string","format":"uuid","description":"Unique identifier of the lambda function, generated by the system. Can't be changed.\n\nThis identifier is common to all versions of the function and is used to reference the function in every endpoint.\n"},"brickworks-service-LogEntry":{"type":"object","properties":{"level":{"type":"string"},"message":{"type":"string"}},"required":["level","message"]},"brickworks-service-GatewayError":{"type":"object","x-class-name":"GatewayError","x-interface-name-ts":"GatewayError","properties":{"error":{"type":"string","description":"Summary of the error"},"status":{"type":"integer","format":"int32","description":"Status code"},"timestamp":{"type":"string","description":"Time when the message was sent"},"message":{"type":"string","description":"Description of the problem"}}},"business-profile-service-OrganizationDailyUsageReportRequest":{"type":"object","properties":{"from":{"type":"string","example":"2025-05-29","description":"First day to retrieve, in `YYYY-MM-DD` format"},"to":{"type":"string","example":"2025-05-30","description":"Last day to retrieve, in `YYYY-MM-DD` format"},"actions":{"type":"array","description":"You can limit the events added to the report. Without this parameter, all events are included.","items":{"type":"string","example":"page.visit"}},"bpGuids":{"type":"array","description":"You can limit the workspaces added to the report. Without this parameter, all workspaces in the organization are included.","items":{"type":"string","format":"uuid","example":"34eea35e-3ac4-44f4-95b5-fd00a3b45eff"}}},"required":["from","to"]},"business-profile-service-UserId":{"type":"integer","description":"Unique ID of a Synerise user"},"business-profile-service-WorkspaceName":{"type":"string","description":"Name of the workspace"},"business-profile-service-WorkspaceSubdomain":{"type":"string","description":"Subdomain of the workspace"},"business-profile-service-WorkspaceLogo":{"type":"string","description":"Logo of the workspace"},"business-profile-service-WorkspaceHash":{"type":"string","description":"Hash ID of the workspace"},"business-profile-service-WorkspaceGuid":{"type":"string","format":"uuid","description":"GUID of the workspace"},"business-profile-service-CreationDate":{"type":"integer","format":"int64","description":"Creation date"},"business-profile-service-LastUpdateTime":{"type":"integer","format":"int64","description":"Last update time"},"business-profile-service-OrganizationWorkspacesResponse":{"type":"object","properties":{"organizationGuid":{"$ref":"#/components/schemas/business-profile-service-WorkspaceGuid"},"workspaces":{"type":"array","items":{"$ref":"#/components/schemas/business-profile-service-BusinessProfileResponse"}}}},"business-profile-service-BusinessProfileResponse":{"type":"object","description":"List of workspaces","properties":{"name":{"$ref":"#/components/schemas/business-profile-service-WorkspaceName"},"subdomain":{"$ref":"#/components/schemas/business-profile-service-WorkspaceSubdomain"},"logo":{"$ref":"#/components/schemas/business-profile-service-WorkspaceLogo"},"hash":{"$ref":"#/components/schemas/business-profile-service-WorkspaceHash"},"guid":{"$ref":"#/components/schemas/business-profile-service-WorkspaceGuid"},"created":{"$ref":"#/components/schemas/business-profile-service-CreationDate"},"updated":{"$ref":"#/components/schemas/business-profile-service-LastUpdateTime"}}},"business-profile-service-BusinessProfileExtendedResponse":{"type":"object","properties":{"id":{"type":"number","format":"int64","description":"ID of the workspace"},"guid":{"$ref":"#/components/schemas/business-profile-service-WorkspaceGuid"},"organizationId":{"type":"number","format":"int64","description":"ID of the organization"},"organizationGuid":{"type":"string","format":"uuid","description":"GUID of the organization"},"name":{"$ref":"#/components/schemas/business-profile-service-WorkspaceName"},"subdomain":{"$ref":"#/components/schemas/business-profile-service-WorkspaceSubdomain"},"logo":{"$ref":"#/components/schemas/business-profile-service-WorkspaceLogo"},"hash":{"$ref":"#/components/schemas/business-profile-service-WorkspaceHash"},"created":{"$ref":"#/components/schemas/business-profile-service-CreationDate"},"updated":{"$ref":"#/components/schemas/business-profile-service-LastUpdateTime"},"ipRestriction":{"type":"string","enum":["OFF","PASSB","FAIL","ENFORCED"]},"mfaRestriction":{"type":"string","enum":["OFF","PASS","FAIL","ENFORCED"]},"tags":{"type":"array","items":{"type":"string"}},"favorite":{"type":"boolean"}}},"business-profile-service-BusinessProfileGroupSimpleResponse":{"type":"object","description":"The group that this workspace belongs to (if applicable)","properties":{"id":{"type":"string","format":"uuid","description":"ID of the group"},"name":{"type":"string","description":"Name of the group"},"profileIdentifier":{"type":"string","description":"Profile identifier (key) used in the group"},"createdAt":{"type":"string","format":"date-time","description":"Creation time"},"updatedAt":{"type":"string","format":"date-time","description":"Last update time"}}},"business-profile-service-BusinessProfileForOrganizationUserResponse":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/business-profile-service-UserId"},"name":{"$ref":"#/components/schemas/business-profile-service-WorkspaceName"},"subdomain":{"$ref":"#/components/schemas/business-profile-service-WorkspaceSubdomain"},"logo":{"$ref":"#/components/schemas/business-profile-service-WorkspaceLogo"},"hash":{"$ref":"#/components/schemas/business-profile-service-WorkspaceHash"},"guid":{"$ref":"#/components/schemas/business-profile-service-WorkspaceGuid"},"activeUsersCount":{"type":"integer","format":"int64","description":"The number of active users"},"created":{"$ref":"#/components/schemas/business-profile-service-CreationDate"},"updated":{"$ref":"#/components/schemas/business-profile-service-LastUpdateTime"},"canAccessWorkspace":{"type":"boolean","description":"`true` when the current user can access this workspace"},"businessProfileGroup":{"$ref":"#/components/schemas/business-profile-service-BusinessProfileGroupSimpleResponse"}}},"business-profile-service-BusinessProfileWithIdentifiersForOrganizationUserResponse":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/business-profile-service-UserId"},"name":{"$ref":"#/components/schemas/business-profile-service-WorkspaceName"},"subdomain":{"$ref":"#/components/schemas/business-profile-service-WorkspaceSubdomain"},"logo":{"$ref":"#/components/schemas/business-profile-service-WorkspaceLogo"},"hash":{"$ref":"#/components/schemas/business-profile-service-WorkspaceHash"},"guid":{"$ref":"#/components/schemas/business-profile-service-WorkspaceGuid"},"created":{"$ref":"#/components/schemas/business-profile-service-CreationDate"},"updated":{"$ref":"#/components/schemas/business-profile-service-LastUpdateTime"},"businessProfileGroup":{"$ref":"#/components/schemas/business-profile-service-BusinessProfileGroupSimpleResponse"},"identifiers":{"type":"array","description":"Identifiers (keys) used in the workspace","items":{"type":"string"}}}},"business-profile-service-StepStructure":{"type":"object","properties":{"state":{"type":"string","enum":["NEW,","SKIP","DONE"]},"steps":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/business-profile-service-StepStructure"}}}},"business-profile-service-UniversalListResponseMeta":{"type":"object","description":"Pagination data","properties":{"count":{"type":"integer","format":"int32","description":"Total number of items"},"limit":{"type":"integer","format":"int32","description":"Number of items per page"},"links":{"type":"array","description":"Links to other pages","items":{"$ref":"#/components/schemas/business-profile-service-UniversalListResponseMetaLink"}}}},"business-profile-service-UniversalListResponseMetaLink":{"type":"object","properties":{"rel":{"type":"string","description":"Type of page relation","enum":["first","next","prev"]},"url":{"type":"string","description":"URL of the page"}}},"business-profile-service-UniversalListBusinessProfilesResponse":{"type":"object","properties":{"data":{"type":"array","description":"List of workspaces","items":{"$ref":"#/components/schemas/business-profile-service-BusinessProfileExtendedResponse"}},"meta":{"$ref":"#/components/schemas/business-profile-service-UniversalListResponseMeta"}}},"business-profile-service-UniversalListBusinessProfilesForOrganizationUserResponse":{"type":"object","properties":{"data":{"type":"array","description":"A list of workspaces","items":{"$ref":"#/components/schemas/business-profile-service-BusinessProfileForOrganizationUserResponse"}},"meta":{"$ref":"#/components/schemas/business-profile-service-UniversalListResponseMeta"}}},"business-profile-service-UniversalListBusinessProfilesForOrganizationWithIdentifiersUserResponse":{"type":"object","properties":{"data":{"type":"array","description":"A list of workspaces","items":{"$ref":"#/components/schemas/business-profile-service-BusinessProfileWithIdentifiersForOrganizationUserResponse"}},"meta":{"$ref":"#/components/schemas/business-profile-service-UniversalListResponseMeta"}}},"business-profile-service-DailyUsageStats":{"type":"object","properties":{"dailyUsageStatistics":{"$ref":"#/components/schemas/business-profile-service-UsageStatsByDay"},"eventsTotal":{"$ref":"#/components/schemas/business-profile-service-EventsStats"},"totalAll":{"type":"integer","description":"The total number of all events in all requested days"},"totalOther":{"type":"integer","description":"The total number of all events in all requested days which were no included in the top 5 from `eventsTotal`"},"totalWeight":{"type":"number","format":"double","nullable":true,"description":"The total weight generated by weight-eligible actions across all requested days (fractional). Present only when the request's `actions` include at least one weight-eligible action; otherwise omitted."},"averageWeight":{"type":"number","format":"double","nullable":true,"description":"The average weight per weight-bearing event across the period (total weight divided by the total weight-event count, rounded to 2 decimal places). Present only when the request's `actions` include at least one weight-eligible action; otherwise omitted."}}},"business-profile-service-UsageStatsByDay":{"type":"object","description":"Statistics for individual days","properties":{"day":{"type":"string","format":"date","description":"Date of the data in this object"},"events":{"$ref":"#/components/schemas/business-profile-service-EventsStats"},"other":{"type":"integer","description":"The number of events which were not included in the top 5 from `events`"},"total":{"type":"integer","description":"The total number of events"},"totalWeight":{"type":"number","format":"double","nullable":true,"description":"The total weight generated by weight-eligible actions on this day (fractional). Present only when the request's `actions` include at least one weight-eligible action; otherwise omitted."},"weights":{"$ref":"#/components/schemas/business-profile-service-WeightsStats"}}},"business-profile-service-RetentionUsageStats":{"type":"object","properties":{"dailyUsageStatistics":{"$ref":"#/components/schemas/business-profile-service-UsageStatsByDay"},"eventsAverage":{"type":"object","description":"The average number of top 5 most popular events kept in the database, calculated from all the requested days.","additionalProperties":{"type":"integer","description":"The average number of events"}},"averageAll":{"type":"integer","description":"The average number of all events kept in the database on all the requested days."},"averageOther":{"type":"integer","description":"The average number of events kept in the databse on all the requested days, other than the top 5 events from `eventsAverage`"}}},"business-profile-service-EventsStats":{"type":"object","description":"The top 5 most popular event types. The keys in the object are action names.","additionalProperties":{"type":"integer","description":"The number of events"}},"business-profile-service-WeightsStats":{"type":"object","nullable":true,"description":"The weight generated per weight-eligible action (fractional). The keys in the object are action names. Present only when the request's `actions` include at least one weight-eligible action; otherwise omitted.","additionalProperties":{"type":"number","format":"double","description":"The weight generated by this action"}},"business-profile-service-AuthError":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/business-profile-service-ErrorStatus"},"error":{"$ref":"#/components/schemas/business-profile-service-ErrorCode"},"message":{"$ref":"#/components/schemas/business-profile-service-ErrorMessage"},"timestamp":{"$ref":"#/components/schemas/business-profile-service-ErrorTimestamp"}}},"business-profile-service-ErrorMessage":{"type":"string","description":"Description of the problem"},"business-profile-service-ErrorTimestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"business-profile-service-ErrorStatus":{"type":"integer","description":"HTTP status of the response"},"business-profile-service-ErrorCode":{"type":"string","description":"Synerise error code. See [error reference](https://developers.synerise.com/errors.html)."},"business-profile-service-ErrorErrorsArray":{"type":"array","description":"Details of the problems","items":{"type":"object","properties":{"errorCode":{"$ref":"#/components/schemas/business-profile-service-ErrorCode"},"message":{"$ref":"#/components/schemas/business-profile-service-ErrorMessage"},"details":{"type":"object","description":"Details of the problem, if applicable."},"source":{"type":"object","description":"Properties that caused a problem, if applicable.","properties":{"parameter":{"type":"string","description":"The name of the property that caused an error"}}}}}},"catalogs-itemKey":{"type":"string","description":"The value of the unique key of the item.\n\nSlashes (`/`) are not allowed in the value.\n\nIn the Synerise Portal, this value is saved under **Primary key**.\n","example":"sku1357"},"catalogs-enrichmentUpdateRequest":{"type":"object","properties":{"action":{"type":"string"},"paramKey":{"type":"string"},"enrichmentFields":{"type":"array","items":{"type":"string"}}}},"catalogs-enableFilteringRequest":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string"}}}},"catalogs-disableFilteringRequest":{"type":"object","properties":{"removeFilters":{"type":"boolean"}}},"catalogs-addItem":{"type":"object","required":["itemKey","value"],"properties":{"itemKey":{"$ref":"#/components/schemas/catalogs-itemKey"},"value":{"type":"object","description":"Properties of the item. Can be an empty object.","additionalProperties":{"type":"string","description":"Key:value data"},"example":{"itemCategory":"smartphone","itemColor":"blue"}}}},"catalogs-responseMeta":{"type":"object","description":"This object holds the metadata of the response.","properties":{"totalCount":{"type":"integer","description":"The total number of matching values (key-value pairs; array items; objects) in the database"},"requestTime":{"type":"string","description":"The processing time of the request","example":"0.11 [s]"}}},"catalogs-addBag":{"type":"object","properties":{"name":{"type":"string","description":"Catalog name"}}},"catalogs-primaryKey":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"}}},"catalogs-bag":{"type":"object","description":"This object holds the details of the catalog.","properties":{"id":{"type":"integer","description":"Catalog ID"},"name":{"type":"string","description":"Catalog name"},"businessProfileId":{"type":"integer","description":"ID of the Business Profile that contains this catalog"},"createdBy":{"$ref":"#/components/schemas/catalogs-Author"},"creationDate":{"format":"date-time","type":"string","description":"Creation date"},"modifiedBy":{"$ref":"#/components/schemas/catalogs-Author"},"lastModified":{"type":"string","format":"date-time","description":"Last modification date"},"primaryKey":{"$ref":"#/components/schemas/catalogs-primaryKey"},"mappings":{"type":"array","items":{"$ref":"#/components/schemas/catalogs-mappingResponse"}},"beforeFiltering":{"type":"boolean"},"fields":{"type":"array","items":{"type":"string"}}}},"catalogs-mappingResponse":{"type":"object","required":["bpActionParamKey","bagId","itemId","action","paramKey","enrichmentFields"],"properties":{"bpActionParamKey":{"type":"string"},"bagId":{"type":"integer","format":"int64"},"itemId":{"type":"integer","format":"int64"},"action":{"type":"string"},"paramKey":{"type":"string"},"enrichmentFields":{"type":"array","items":{"type":"string"}}}},"catalogs-deleteResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"ID of the catalog"},"result":{"type":"boolean","description":"`true` if the catalog was deleted successfully"}}},"catalogs-item":{"type":"object","description":"Details of the item","properties":{"bag":{"type":"object","description":"Metadata of the catalog that includes the entry","properties":{"id":{"type":"integer","format":"int64","description":"Catalog ID"},"name":{"type":"string","description":"Catalog name"},"businessProfileId":{"type":"integer","description":"ID of the Business Profile that contains this catalog"},"author":{"type":"string","description":"ID of the catalog's creator"},"lastModified":{"type":"string","format":"date-time","description":"Last modification date"},"creationDate":{"format":"date-time","type":"string","description":"Creation date"},"primaryKey":{"$ref":"#/components/schemas/catalogs-primaryKey"},"mappings":{"type":"array","items":{"$ref":"#/components/schemas/catalogs-mappingResponse"}}}},"itemKey":{"type":"string","description":"They unique value of the item key (for example, an SKU) that was used to upload this entry. This is the `key` query parameter used in [this endpoint](#operation/getItemByKey)."},"id":{"type":"integer","format":"int64","description":"ID of the entry. This is the `itemId` used in [this endpoint](#operation/getItem)."},"value":{"type":"string","description":"Contents of the entry","example":"{\"Name\":\"John\",\"Surname\":\"Doe\"}"},"creationDate":{"type":"string","description":"Creation date of the entry"},"lastModified":{"type":"string","description":"Last modified date of the entry"}}},"catalogs-eventData":{"type":"object","properties":{"action":{"type":"string","description":"The `action` field of the event","example":"transaction.charge"},"paramKey":{"type":"string","description":"The parameter in the event that corresponds to the catalog column with the unique identifiers","example":"sku"}}},"catalogs-mapper":{"type":"object","description":"Details of the mapping","properties":{"bpActionParamKey":{"type":"string","description":"The unique identifier of this mapping"},"bagId":{"type":"integer","description":"The catalog associated with this mapping"},"action":{"type":"string","description":"The `action` field of the event","example":"transaction.charge"},"paramKey":{"type":"string","description":"The parameter in the event that corresponds to the catalog column with the unique identifiers","example":"sku"},"enrichmentFields":{"type":"array","items":{"type":"string"},"description":"enrichment fields"}}},"catalogs-ErrorResponse":{"type":"object","properties":{"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Error summary"},"message":{"type":"string","description":"Error message"},"timestamp":{"type":"string","description":"Time when the error occurred"}}},"catalogs-Author":{"type":"object","description":"Data of user","properties":{"id":{"type":"integer","description":"Id of the user"},"name":{"type":"string","description":"Name of the user"},"iconUrl":{"type":"string","description":"URL of the user's avatar icon"}}},"crm-ClientDetails":{"type":"object","properties":{"base":{"type":"object","description":"The details of a Profile","additionalProperties":{"description":"The name of a parameter","type":"object","properties":{"label":{"type":"string","description":"A name for the parameter (can be a default parameter created by Synerise or a custom one)"},"value":{"description":"The value of the parameter"}}}},"tags":{"type":"array","description":"The Profile's tags","items":{"type":"string"}}}},"crm-CustomerCommon":{"type":"object","properties":{"uuid":{"type":"string","description":"UUID of the Profile\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n","example":"07243772-008a-42e1-ba37-c3807cebde8f"},"email":{"type":"string","description":"Profile's e-mail address\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n"},"firstname":{"type":"string","description":"Profile's first name"},"lastName":{"type":"string","description":"Profile's last name"},"custom_identify":{"type":"string","description":"A custom ID for the Profile\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n"},"company":{"type":"string","description":"Profile's company"},"phone":{"type":"string","description":"Profile's phone number\n\n**Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).\n"},"address":{"type":"string","description":"Profile's street address"},"birthdate":{"type":"string","format":"date","description":"Profile's date of birth. Must be a past date."},"city":{"type":"string","description":"Profile's city of residence"},"zipCode":{"type":"string","description":"Profile's zip code"},"province":{"type":"string","description":"Profile's province of residence"},"country_id":{"type":"string","description":"ID of the Profile's country of residence"},"countryCode":{"type":"string","description":"Code of Profile's country of residence","example":"PL"},"avatarUrl":{"type":"string","nullable":true,"description":"URL of the Profile's avatar picture"},"sex":{"type":"string","description":"Profile's sex.\n\n- 0: undefined\n- 1: female\n- 2: male\n- 3: other\n","enum":["0","1","2","3"]},"tags":{"type":"array","description":"Custom tags. They can be used, for example, to group Profiles.","items":{"type":"string"}},"additionalProperties":{"description":"Additional attributes, including custom attributes.\n\nThe following attributes are reserved for system use and can't be modified:\n<details><summary>Click to expand the list of reserved attributes</summary>\n<code>email</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br><code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br><code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br><code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br><code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br><code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br><code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br><code>confirmation_hash</code><br><code>ownerId</code><br><code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_city</code><br><code>geo_loc_country</code><br><code>geo_loc_as</code><br><code>geo_loc_country_code</code><br><code>geo_loc_isp</code><br><code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>geo_loc_org</code><br><code>geo_loc_query</code><br><code>geo_loc_region</code><br><code>geo_loc_region_name</code><br><code>geo_loc_status</code><br><code>geo_loc_timezone</code><br><code>geo_loc_zip</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>status</code>\n</details>\n"}}},"items-filter-all-Error":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"path":{"type":"string","description":"URL of the requested resource"},"requestId":{"type":"string","description":"ID of the request which resulted in the error"}},"required":["timestamp","status","message"]},"items-filter-all-ParserResult":{"type":"object","description":"Result of validating the IQL syntax and only the syntax - this result does not inform if the filter returns any results or if the used attributes are filterable.","properties":{"valid":{"type":"boolean","description":"True if IQL expression syntax is valid."},"message":{"type":"string","description":"Error message when IQL expression is not valid"},"parsedFilteringString":{"type":"string","description":"Parsed filtering string"}},"required":["valid","parsedFilteringString"]},"items-filter-all-EvaluationResult":{"type":"object","description":"Evaluation including data from the item catalog, configuration, and context items/profiles.","properties":{"resultSize":{"type":"integer","description":"How many items meet the conditions of the IQL filtering string in total"},"modifiedFilteringString":{"type":"string","description":"Filtering string after application of the filtering context. For example, `title != context.title` becomes `title != \"Synerise API Reference\"`"},"evaluationErrors":{"type":"array","description":"List of IQL evaluation errors","items":{"type":"object","properties":{"filter":{"type":"string","description":"Name of variable on which the filter is based"},"message":{"type":"string","description":"Error message"}},"required":["filter","message"]}}},"required":["resultSize"]},"items-filter-all-Extracts":{"type":"object","description":"Information about elements that were used anywhere in the filtering string. **Elements are listed only if they were valid.**","properties":{"clientExtracts":{"type":"object","description":"Attributes of the context profile","properties":{"attributeConstants":{"type":"array","description":"Profile attributes used in the query","items":{"type":"string"}},"segmentationsConstant":{"type":"array","description":"Segmentations used in the query","items":{"type":"string"}},"aggregateConstants":{"type":"array","description":"Aggregates used in the query","items":{"type":"string"}},"expressionConstants":{"type":"array","description":"Expressions used in the query","items":{"type":"string"}},"TagsConstant":{"type":"boolean","description":"True if context profile's tags were referenced in the query."}}},"contextConstants":{"type":"array","description":"Context elements used in the query","items":{"type":"string"}},"variables":{"type":"array","description":"Variables used in the query (for example pulled from the context)","items":{"type":"string"}}}},"items-filter-all-FilterValidateResponse":{"type":"object","properties":{"filteringString":{"$ref":"#/components/schemas/items-filter-all-FilteringString"},"contextItems":{"$ref":"#/components/schemas/items-filter-all-ContextItems"},"clientUUID":{"$ref":"#/components/schemas/items-filter-all-ClientUUID"},"parserResult":{"$ref":"#/components/schemas/items-filter-all-ParserResult"},"evaluationResult":{"$ref":"#/components/schemas/items-filter-all-EvaluationResult"},"extracts":{"$ref":"#/components/schemas/items-filter-all-Extracts"},"candidateItems":{"type":"array","description":"List of validated candidate items","items":{"type":"object","properties":{"itemId":{"type":"string","description":"ID of an item that was tested against the filtering string","example":"67890"},"valid":{"type":"boolean","description":"True if the item meets the conditions of the filtering string"}},"required":["itemId","valid"]}},"exampleItems":{"type":"array","items":{"type":"string"},"description":"Array of itemIds that meet the conditions of the filtering string. The size of this array can be controlled by the `exampleItems` query parameter."}},"required":["filteringString","parserResult"]},"items-filter-all-FilteringString":{"type":"string","description":"[IQL](https://help.synerise.com/developers/iql) filtering expression","example":"IF(\"abcd\" IN client.tags,discount == 0,discount > 0)"},"items-filter-all-ContextItems":{"type":"array","items":{"type":"string","example":"12345"},"description":"itemIds of the items which create the item context"},"items-filter-all-ClientUUID":{"type":"string","description":"UUID of the profile which creates the profile context","example":"68df2317-0edb-4cc9-8b39-5ab68325f891"},"items-filter-all-InventoryContext":{"description":"Inventory context used to evaluate inventory-related filters and boosting strategies.\nCan be either a single inventory context or a multi-inventory context (set of channel IDs per inventory).\n","oneOf":[{"$ref":"#/components/schemas/items-filter-all-SingleInventoryContext"},{"$ref":"#/components/schemas/items-filter-all-MultiInventoryContext"}]},"items-filter-all-SingleInventoryContext":{"type":"object","description":"Single inventory context.\n","properties":{"channelIds":{"type":"array","items":{"type":"string"},"description":"List of channel identifiers used to evaluate inventory-related filters and boosting strategies.\n"}},"required":["channelIds"]},"items-filter-all-MultiInventoryContext":{"type":"object","description":"Multi-inventory context where each inventory can have its own set of channel IDs.\n","properties":{"inventoryCatalogs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/items-filter-all-InventoryContextDefinition"},"description":"Map of inventory ID to inventory context definition. Each inventory can have its own set of channel IDs.\n"}},"required":["inventoryCatalogs"]},"items-filter-all-InventoryContextDefinition":{"type":"object","description":"Context definition for a specific inventory.\n","properties":{"channelIds":{"type":"array","items":{"type":"string"},"description":"List of channel identifiers for this specific inventory.\n"}}},"items-filter-all-CandidateItems":{"type":"array","items":{"type":"string","example":"67890"},"description":"Array of itemIds that will be tested against the IQL expression. You can use this with test items to verify that the query matches the items you expected."},"items-filter-all-ValidateItemsFilterRequestBody":{"description":"Request for performing IQL validation","type":"object","properties":{"filteringString":{"$ref":"#/components/schemas/items-filter-all-FilteringString"},"clientUUID":{"$ref":"#/components/schemas/items-filter-all-ClientUUID"},"contextItems":{"$ref":"#/components/schemas/items-filter-all-ContextItems"},"inventoryContext":{"$ref":"#/components/schemas/items-filter-all-InventoryContext"},"candidateItems":{"$ref":"#/components/schemas/items-filter-all-CandidateItems"}},"required":["filteringString"]},"items-search-Error":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"path":{"type":"string","description":"URL of the requested resource"}},"required":["timestamp","status","message"]},"items-search-ResultFacets":{"type":"object","description":"Facet value mappings","example":{"brand":{"X-brand":1,"Y-brand":3},"salePrice.value":{"max":201.99,"min":14.99}},"additionalProperties":{"description":"The type of facet, for example `category`","type":"object","additionalProperties":{"description":"The values for keys in this facet type, for example `\"Home Appliances>Fridges\": 12`","type":"integer"}}},"items-search-AutocompleteResponse":{"type":"object","title":"Item search","properties":{"data":{"$ref":"#/components/schemas/items-search-FoundItems"},"extras":{"type":"object","description":"Additional information","properties":{"filteredFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"allFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"customFilteredFacets":{"allOf":[{"type":"object","description":"Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests."},{"$ref":"#/components/schemas/items-search-ResultFacets"}]},"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationIdInResponse"},"searchId":{"$ref":"#/components/schemas/items-search-SearchIdInResponse"},"facetsOrdering":{"$ref":"#/components/schemas/items-search-FacetsOrderingResponse"},"suggestions":{"type":"array","description":"A list of search suggestions","items":{"$ref":"#/components/schemas/items-search-FullTextSuggestionSchema"}},"usedSuggestion":{"$ref":"#/components/schemas/items-search-UsedSuggestion"}}},"meta":{"$ref":"#/components/schemas/items-search-PaginationMeta"}}},"items-search-AutocompleteResponseWithExplanation":{"type":"object","title":"Item search","properties":{"data":{"$ref":"#/components/schemas/items-search-FoundItemsWithExplanation"},"extras":{"type":"object","description":"Additional information","properties":{"filteredFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"allFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"customFilteredFacets":{"allOf":[{"type":"object","description":"Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests."},{"$ref":"#/components/schemas/items-search-ResultFacets"}]},"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationIdInResponse"},"searchId":{"$ref":"#/components/schemas/items-search-SearchIdInResponse"},"facetsOrdering":{"$ref":"#/components/schemas/items-search-FacetsOrderingResponse"},"suggestions":{"type":"array","description":"A list of search suggestions","items":{"$ref":"#/components/schemas/items-search-FullTextSuggestionSchema"}},"usedSuggestion":{"$ref":"#/components/schemas/items-search-UsedSuggestion"},"explanation":{"$ref":"#/components/schemas/items-search-SearchExplanationWithRerankerExplanation"}}},"meta":{"$ref":"#/components/schemas/items-search-PaginationMeta"}}},"items-search-FullTextSearchResponse":{"type":"object","title":"Item search","properties":{"data":{"$ref":"#/components/schemas/items-search-FoundItems"},"extras":{"type":"object","description":"Additional information","properties":{"filteredFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"allFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"customFilteredFacets":{"allOf":[{"type":"object","description":"Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests."},{"$ref":"#/components/schemas/items-search-ResultFacets"}]},"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationIdInResponse"},"searchId":{"$ref":"#/components/schemas/items-search-SearchIdInResponse"},"facetsOrdering":{"$ref":"#/components/schemas/items-search-FacetsOrderingResponse"},"suggestions":{"type":"array","description":"A list of search suggestions","items":{"$ref":"#/components/schemas/items-search-FullTextSuggestionSchema"}},"usedSuggestion":{"$ref":"#/components/schemas/items-search-UsedSuggestion"}}},"meta":{"$ref":"#/components/schemas/items-search-PaginationMeta"}}},"items-search-FullTextSearchResponseWithExplanation":{"type":"object","title":"Item search","properties":{"data":{"$ref":"#/components/schemas/items-search-FoundItemsWithExplanation"},"extras":{"type":"object","description":"Additional information","properties":{"filteredFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"allFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"customFilteredFacets":{"allOf":[{"type":"object","description":"Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests."},{"$ref":"#/components/schemas/items-search-ResultFacets"}]},"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationIdInResponse"},"searchId":{"$ref":"#/components/schemas/items-search-SearchIdInResponse"},"facetsOrdering":{"$ref":"#/components/schemas/items-search-FacetsOrderingResponse"},"suggestions":{"type":"array","description":"A list of search suggestions","items":{"$ref":"#/components/schemas/items-search-FullTextSuggestionSchema"}},"usedSuggestion":{"$ref":"#/components/schemas/items-search-UsedSuggestion"},"explanation":{"$ref":"#/components/schemas/items-search-SearchExplanationWithRerankerExplanation"}}},"meta":{"$ref":"#/components/schemas/items-search-PaginationMeta"}}},"items-search-ListingResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/items-search-FoundItems"},"extras":{"type":"object","description":"Additional information","properties":{"filteredFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"allFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"customFilteredFacets":{"allOf":[{"type":"object","description":"Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests."},{"$ref":"#/components/schemas/items-search-ResultFacets"}]},"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationIdInResponse"},"searchId":{"$ref":"#/components/schemas/items-search-SearchIdInResponse"},"facetsOrdering":{"$ref":"#/components/schemas/items-search-FacetsOrderingResponse"}}},"meta":{"$ref":"#/components/schemas/items-search-PaginationMeta"}}},"items-search-ListingResponseWithExplanation":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/items-search-FoundItemsWithExplanation"},"extras":{"type":"object","description":"Additional information","properties":{"filteredFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"allFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"customFilteredFacets":{"allOf":[{"type":"object","description":"Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests."},{"$ref":"#/components/schemas/items-search-ResultFacets"}]},"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationIdInResponse"},"searchId":{"$ref":"#/components/schemas/items-search-SearchIdInResponse"},"facetsOrdering":{"$ref":"#/components/schemas/items-search-FacetsOrderingResponse"},"explanation":{"$ref":"#/components/schemas/items-search-Explanation"}}},"meta":{"$ref":"#/components/schemas/items-search-PaginationMeta"}}},"items-search-VisualSearchResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/items-search-FoundItems"},"extras":{"type":"object","description":"Additional information","properties":{"filteredFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"allFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"customFilteredFacets":{"allOf":[{"type":"object","description":"Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests."},{"$ref":"#/components/schemas/items-search-ResultFacets"}]},"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationIdInResponse"},"searchId":{"$ref":"#/components/schemas/items-search-SearchIdInResponse"},"facetsOrdering":{"$ref":"#/components/schemas/items-search-FacetsOrderingResponse"}}},"meta":{"$ref":"#/components/schemas/items-search-PaginationMeta"}}},"items-search-VisualSearchResponseWithExplanation":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/items-search-FoundItemsWithExplanation"},"extras":{"type":"object","description":"Additional information","properties":{"filteredFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"allFacets":{"$ref":"#/components/schemas/items-search-ResultFacets"},"customFilteredFacets":{"allOf":[{"type":"object","description":"Facets resulting from the `customFilteredFacets` setting. Only available in `POST` requests."},{"$ref":"#/components/schemas/items-search-ResultFacets"}]},"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationIdInResponse"},"searchId":{"$ref":"#/components/schemas/items-search-SearchIdInResponse"},"facetsOrdering":{"$ref":"#/components/schemas/items-search-FacetsOrderingResponse"},"explanation":{"$ref":"#/components/schemas/items-search-Explanation"}}},"meta":{"$ref":"#/components/schemas/items-search-PaginationMeta"}}},"items-search-UsedSuggestion":{"type":"object","description":"If the query did not return any matches, the AI engine tries to find an alternative similar query and use it for the search instead. If that happens, the `usedSuggestion` object contains information about that alternative query offered by the AI engine and used in the search.","allOf":[{"$ref":"#/components/schemas/items-search-FullTextSuggestionSchema"}]},"items-search-SuggestionResponse":{"type":"object","title":"Suggestion search","properties":{"data":{"type":"array","description":"A page of search query suggestions","items":{"type":"object","description":"A search suggestion","properties":{"suggestion":{"type":"string","description":"The suggested search phrase"}}}},"extras":{"type":"object","description":"Additional information","properties":{"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationIdInResponse"},"searchId":{"$ref":"#/components/schemas/items-search-SearchIdInResponse"},"facetsOrdering":{"$ref":"#/components/schemas/items-search-FacetsOrderingResponse"}}},"meta":{"$ref":"#/components/schemas/items-search-PaginationMeta"}}},"items-search-SuggestionResponseWithExplanation":{"type":"object","title":"Suggestion search","properties":{"data":{"type":"array","description":"A page of search query suggestions","items":{"type":"object","description":"A search suggestion","properties":{"_explanation":{"type":"object","description":"Explanation of the result","properties":{"origin":{"type":"array","description":"The type of suggestion","items":{"type":"string","enum":["Manual","Attribute","Event"]}},"popularityScore":{"type":"number","description":"Popularity of the suggestion"},"score":{"type":"number","description":"Score of the suggestion"}}},"suggestion":{"type":"string","description":"The suggested search phrase"}}}},"extras":{"type":"object","description":"Additional information","properties":{"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationIdInResponse"},"searchId":{"$ref":"#/components/schemas/items-search-SearchIdInResponse"},"facetsOrdering":{"$ref":"#/components/schemas/items-search-FacetsOrderingResponse"}}},"meta":{"$ref":"#/components/schemas/items-search-PaginationMeta"}}},"items-search-QueryClassificationResponse":{"type":"object","title":"Query classification","properties":{"predictedCategories":{"$ref":"#/components/schemas/items-search-QueryClassificationCategories"}}},"items-search-QueryClassificationConfig":{"type":"object","description":"Query classification configuration","properties":{"actions":{"type":"array","description":"Search result actions with a minimum reliability level","items":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/items-search-SearchResultAction"},"minReliabilityLevel":{"$ref":"#/components/schemas/items-search-ReliabilityLevel"}}}},"excludedPhrases":{"type":"array","description":"Phrases that will be excluded from query classification","items":{"type":"string"}},"excludedCategories":{"type":"array","description":"Categories that will be excluded from query classification","items":{"type":"string"}}}},"items-search-QueryClassificationCategories":{"type":"array","description":"A list of predicted categories and their scores","items":{"type":"object","properties":{"category":{"type":"string","description":"The predicted category."},"score":{"type":"number","description":"The score of the predicted category."},"ctr":{"type":"number","description":"The CTR of the predicted category.","format":"float"},"actions":{"type":"array","items":{"$ref":"#/components/schemas/items-search-SearchResultAction"}},"reliabilityLevel":{"$ref":"#/components/schemas/items-search-ReliabilityLevel"}}}},"items-search-SearchResultAction":{"type":"string","description":"The action to perform when the reliability level from `minReliabilityLevel` is reached.\n- `staticFilter` will apply a static filter to limit the search results to the predicted category.\n- `elasticFilter` will apply an elastic filter - if there are not enough results from the predicted category, the AI engine will pick items from other categories to meet the minimum number of results.\n- `boosting` will increase the scores of items from the predicted category.\n\nIf reliability levels are met for multiple actions, the priority is:\n1. static filter\n2. elastic filter\n3. boosting\n","enum":["staticFilter","elasticFilter","boosting"]},"items-search-ReliabilityLevel":{"type":"string","description":"The reliability level indicates how confident we are that a given prediction is the best choice.","enum":["certain","veryHigh","high","medium","low"]},"items-search-SearchableAttributesMatchResponse":{"type":"object","title":"Searchable attributes match","properties":{"query":{"type":"object","description":"Search query with tokens","properties":{"value":{"type":"string","description":"Search query"},"tokens":{"type":"array","description":"A list of search query tokens and their positions","items":{"$ref":"#/components/schemas/items-search-SearchQueryTokens"}}}},"attributes":{"$ref":"#/components/schemas/items-search-ExplainMatchSearchableAttributes"}}},"items-search-SearchQueryTokens":{"type":"object","title":"Search query tokens","properties":{"token":{"type":"string","description":"Search query token"},"positions":{"type":"array","description":"A list of query token positions","items":{"type":"object","properties":{"start":{"type":"number","description":"Start position"},"end":{"type":"number","description":"Start position"}}}}}},"items-search-ExplainMatchSearchableAttributes":{"type":"array","description":"A list of searchable attributes with value and matched tokens","items":{"type":"object","properties":{"attribute":{"type":"string","description":"Attribute name"},"value":{"description":"Attribute value","type":"string"},"tokens":{"type":"array","description":"A list of matched tokens","items":{"type":"object","properties":{"queryToken":{"type":"string","description":"Matched token"},"type":{"description":"Token type","type":"string","enum":["word","synonym"]},"start":{"type":"number","description":"Start position"},"end":{"type":"number","description":"Start position"}}}}}}},"items-search-PaginationMeta":{"type":"object","description":"Optional metadata, such as pagination. This is returned if the `includeMeta` parameter was set to true in the request.","properties":{"totalPages":{"type":"number","description":"The total number of pages"},"totalCount":{"type":"number","description":"The total number of search results"},"page":{"type":"number","description":"The current page"},"limit":{"type":"number","description":"The maximal number of items on a page"},"sortedBy":{"type":"string","description":"The column (attribute) that the campaigns were sorted by"},"ordering":{"type":"string","description":"Sorting order"},"code":{"type":"number","description":"HTTP response code"},"link":{"type":"array","description":"Links to neighboring pages, first page, and last page in pagination","items":{"type":"object","properties":{"url":{"description":"Page URL","type":"string"},"rel":{"type":"string","description":"Position of the linked page","enum":["first","next","prev","last"]}}}}}},"items-search-FoundItems":{"type":"array","description":"A page of matching items as objects. The parameters of each item's object depend on the configuration of displayable attributes.","items":{"type":"object","properties":{"_promotedByRules":{"type":"array","items":{"type":"integer","description":"Rule id"},"description":"List of applied rules that had an effect in promoting this item. This field exists if and only if the item was promoted."}},"additionalProperties":{"description":"The names and value types of the item's properties depend on the configuration."},"example":{"itemName":"TV","itemId":87257843345,"_promotedByRules":[475,477]}}},"items-search-FoundItemsWithExplanation":{"type":"array","description":"A page of matching items as objects with explanation included. The parameters of each item's object depend on the configuration of displayable attributes.","items":{"type":"object","properties":{"_promotedByRules":{"type":"array","items":{"type":"integer","description":"Rule id"},"description":"List of applied rules that had an effect in promoting this item. This field exists if and only if the item was promoted."},"_explanation":{"$ref":"#/components/schemas/items-search-PerItemExplanation"}},"additionalProperties":{"description":"The names and value types of the item's properties depend on the configuration."},"example":{"itemName":"TV","itemId":87257843345,"_promotedByRules":[475,477]}}},"items-search-FullTextSuggestionSchema":{"type":"object","description":"If the query from the request doesn't return any matches (for example due to a spelling error in the query), the AI engine may suggest a similar query and use it instead. This object is included in the response only if that mechanism was triggered.","properties":{"text":{"type":"string","description":"The suggested text query"},"highlighted":{"type":"string","description":"The suggested text query with the HTML emphasis tag added"},"score":{"type":"number","description":"Estimated accuracy of the suggestion. `1.0` means 100%.","format":"float","maximum":1}}},"items-search-PaginationSortBy":{"type":"string","description":"<span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.\n\nName of the attribute by which the data will be sorted.\n"},"items-search-PaginationOrdering":{"type":"string","default":"asc","enum":["desc","asc"],"description":"Sorting order"},"items-search-PaginationPage":{"type":"integer","format":"int32","description":"Page number to return for pagination. The first page has the index `1`."},"items-search-PaginationLimit":{"type":"integer","format":"int32","example":10,"default":20,"maximum":500,"minimum":0,"description":"The number of items to return per page"},"items-search-PaginationIncludeMeta":{"type":"boolean","description":"\nWhen `true`, pagination metadata is included in the response body.\n\nWhen `false`, the data is included in the response headers:\n\n- Link: links to neighbors, first, and last pages in pagination.\n\n- X-Pagination-Total-Count: total number of items on all pages\n\n- X-Pagination-Total-Pages: total number of pages\n\n- X-Pagination-Page: current page\n\n- X-Pagination-Limit: maximum number of items on a page\n\n- X-Pagination-Sorted-By: parameter that the items were sorted by\n\n- X-Pagination-Ordering: sorting direction\n"},"items-search-Context":{"type":"array","description":"List of context strings for a search query","example":["mobile","listing"],"items":{"type":"string"}},"items-search-DisplayAttributes":{"type":"array","description":"List of ad hoc attributes that will be returned for each found item","example":["title","price"],"items":{"type":"string"}},"items-search-SearchQuery":{"type":"string","description":"Query text to use in the search"},"items-search-ImageUrl":{"type":"string","description":"URL of the image to be used in the visual search"},"items-search-ClientUUID":{"type":"string","description":"UUID of the profile for which the search is performed"},"items-search-CorrelationId":{"type":"string","description":"Correlation ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.\n\nDo not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.\n"},"items-search-SearchId":{"type":"string","deprecated":true,"description":"**DEPRECATED - use correlationId instead**\n\nSearch ID for pagination. If a search with the ID was performed recently (last 10 minutes), the cached results will be used.\n\nDo not send this if sortBy/filters/sorting order, etc. have changed - the cached results may have different order or may match different filters.\n"},"items-search-CorrelationIdInResponse":{"type":"string","description":"This ID is used:\n- for search result pagination\n- as `correlationId` of the search event in events such as `items.search.click`\n\nSearch results are cached for 10 minutes.\n\nThe cached value will be used if the ID is provided in subsequent calls. This makes search faster and eliminates personalization non-determinism.\n"},"items-search-SearchIdInResponse":{"type":"string","deprecated":true,"description":"**DEPRECATED - use correlationId instead**\n\nThis ID is used:\n- for search result pagination\n- as `searchId` of the search event in events such as `items.search.click`\n\nSearch results are cached for 10 minutes.\n\nThe cached value will be used if the ID is provided in subsequent calls. This makes search faster and eliminates personalization non-determinism.\n"},"items-search-SortByMetric":{"type":"string","enum":["TransactionsPopularity","PageVisitsPopularity"],"description":"<span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.\n\nName of the metric by which the data will be sorted.\n"},"items-search-SortByGeoPoint":{"type":"string","example":"34.052235,-118.243685","description":"<span style='color:red'><strong>IMPORTANT:</strong></span> Sorting disables boosting, elastic filters, and promoting search results.\n\nGeo-point (`{latitude},{longitude}`) for data sorting. Results are sorted by distance from this point. `ordering: asc` means \"closest first\".'\n"},"items-search-FilterGeoPoints":{"type":"array","example":["34.052235,-118.243685","15.0,65.0"],"items":{"type":"string"},"description":"The definition of a geographical area to filter by.\n\nGiven one geo-point, the results will be limited to a radius around a point. To override the default radius (1000 meters), provide the `filterAroundRadius` parameter.\n**Example input:** `[\"34.052235,-118.243685\"]`\n\nGiven two geo-points, the results will be limited to a rectangular area.\n**Example input:** `[\"50,-100\", \"25,150\"]`\n\nGiven three or more geo-points, the results will be limited to a polygonal area.\n**Example input:** `[\"50,0\", \"40,20\", \"-20,10\"]`\n"},"items-search-FilterAroundRadius":{"type":"integer","format":"int32","example":2000,"default":1000,"description":"Radius in meters to be used when filtering using geo-location. Can only be used when filtering by a single geo-point."},"items-search-FilterAnchor":{"type":"string","example":"0.2,0.8","description":"Anchor (`{width},{height}`) by which the visual results data will be filtered.\n`{width},{height}` correspond to normalized image coordinates, i.e. they are in range [0,1].\nAnchor (0,0) corresponds to the top-left pixel of an image.\n"},"items-search-Filters":{"type":"string","description":"IQL query string. For details, see the [Help Center](https://help.synerise.com/developers/iql/)."},"items-search-Facets":{"type":"array","description":"A list of attributes for which facets will be returned.\n- A single `*` value matches all facetable attributes.\n- A single `auto` value enables automatic facet selection based on the result set — the system picks the most relevant facets using the index's `dynamicFacets` configuration.\n\nTo determine which groups of facets should be returned, use the `includeFacets` parameter.\n","items":{"type":"string"}},"items-search-CustomFilteredFacets":{"type":"object","description":"A key-value map that takes attributes as keys and IQL query strings as values.\n\nFor each key a facet is returned that includes only the items filtered by the provided IQL query string.\n","additionalProperties":{"name":"value","$ref":"#/components/schemas/items-search-Filters"},"example":{"brand":"price > 100","price":"brand == foo"}},"items-search-IncludeFacets":{"type":"string","default":"filtered","enum":["all","filtered","unfiltered","none"],"description":"Determines which groups of facets will be returned: both filtered and unfiltered; just filtered; just unfiltered; or no group at at all.\n\nTo determine which attributes should be returned as facets in each group, use the `facets` and `customFilteredFacets` parameters.\n"},"items-search-FacetsOrdering":{"type":"string","enum":["coverage","name"],"description":"Controls the ordering of facets in the response.  \nWhen `facets=auto`, the default ordering is by coverage (most relevant facets first).  \nWhen facets are specified explicitly, the default ordering is by name.  \nWhen two facets have equal coverage, ties are resolved by name.\n"},"items-search-FacetsOrderingResponse":{"type":"array","description":"An ordered list of facet attribute names indicating the display order of facets in the response.\nWhen `facets=auto`, facets are ordered by coverage (most relevant first) unless `facetsOrderBy=name` is specified.\nWhen facets are specified explicitly, the ordering is by name.\nEmpty when no facets are requested.\n\nMatching query rules can override the resulting set and order via two consequences:\n- `pinFacets` forces specific facets into the response, optionally at a specific 1-based slot.\n  Pinned facets bypass the coverage threshold in `facets=auto`.\n- `hideFacets` removes specific facets from the response, also stripping them from\n  `customFilteredFacets`. Hide takes precedence over pin and over explicit `facets=[...]`.\n\nThe corresponding facet values appear in `filteredFacets`, `allFacets`, and `customFilteredFacets`\nonly for attributes present in this list.\n","items":{"type":"string"},"example":["brand","color","size","price"]},"items-search-FacetsSize":{"type":"integer","default":2000,"minimum":1,"maximum":10000,"description":"Determines how many items will be used for facets aggregation.\n"},"items-search-MaxValuesPerFacet":{"type":"integer","default":50,"minimum":1,"maximum":1000,"description":"Determines how many values will be retrieved per facet.\n"},"items-search-CaseSensitiveFacetValues":{"type":"boolean","default":false,"description":"Specifies whether facets aggregation should be case sensitive.\n"},"items-search-FilterableAttributesValues":{"type":"object","additionalProperties":{"type":"array","description":"The name of the array is the attribute name. The values in the array are the possible values of that attribute.","items":{"type":"string"}},"example":{"brand":["foo","bar"],"color":["red","green","blue"]}},"items-search-DistinctFilterSearch":{"type":"object","description":"Distinct filters regulate how many items with the same value of a particular attribute can be returned.","properties":{"attribute":{"type":"string","description":"Name of the attribute to be used for distinct filter"},"maxNumItems":{"type":"integer","description":"Maximum number of items to be returned per each distinct attribute value","minimum":1},"levelRangeModifier":{"type":"integer","description":"Level of the category, if the category attribute was used for distinct filter","minimum":0}},"required":["attribute","maxNumItems"]},"items-search-Personalize":{"type":"boolean","description":"If set to `false`, the search result is not personalized.","default":true},"items-search-IgnoreQueryRules":{"type":"boolean","description":"If set to `true`, query rules are not applied.","default":false},"items-search-ExcludeQueryRules":{"type":"array","example":[2,5],"items":{"type":"integer"},"description":"List of query rules that will not be applied."},"items-search-DisableQueryClassification":{"type":"boolean","description":"If set to `true`, query classification is not applied.","default":false},"items-search-DisableDynamicReranker":{"type":"boolean","description":"If set to `true`, q dynamic reranker is not applied.","default":false},"items-search-CrossWorkspaceMode":{"type":"object","description":"Cross-workspace personalization mode. When provided, overrides the index configuration setting.","properties":{"enabled":{"type":"boolean","description":"Whether cross-workspace personalization is enabled."}},"required":["enabled"]},"items-search-ListingRequest":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/items-search-PaginationPage"},"limit":{"$ref":"#/components/schemas/items-search-PaginationLimit"},"sortBy":{"$ref":"#/components/schemas/items-search-PaginationSortBy"},"ordering":{"$ref":"#/components/schemas/items-search-PaginationOrdering"},"includeMeta":{"$ref":"#/components/schemas/items-search-PaginationIncludeMeta"},"clientUUID":{"$ref":"#/components/schemas/items-search-ClientUUID"},"personalize":{"$ref":"#/components/schemas/items-search-Personalize"},"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationId"},"searchId":{"$ref":"#/components/schemas/items-search-SearchId"},"sortByMetric":{"$ref":"#/components/schemas/items-search-SortByMetric"},"sortByGeoPoints":{"$ref":"#/components/schemas/items-search-SortByGeoPoint"},"filterGeoPoints":{"$ref":"#/components/schemas/items-search-FilterGeoPoints"},"filterAroundRadius":{"$ref":"#/components/schemas/items-search-FilterAroundRadius"},"filters":{"$ref":"#/components/schemas/items-search-Filters"},"facets":{"$ref":"#/components/schemas/items-search-Facets"},"customFilteredFacets":{"$ref":"#/components/schemas/items-search-CustomFilteredFacets"},"facetsSize":{"$ref":"#/components/schemas/items-search-FacetsSize"},"maxValuesPerFacet":{"$ref":"#/components/schemas/items-search-MaxValuesPerFacet"},"caseSensitiveFacetValues":{"$ref":"#/components/schemas/items-search-CaseSensitiveFacetValues"},"includeFacets":{"$ref":"#/components/schemas/items-search-IncludeFacets"},"facetsOrderBy":{"$ref":"#/components/schemas/items-search-FacetsOrdering"},"context":{"$ref":"#/components/schemas/items-search-Context"},"displayAttributes":{"$ref":"#/components/schemas/items-search-DisplayAttributes"},"distinctFilter":{"$ref":"#/components/schemas/items-search-DistinctFilterSearch"},"ignoreQueryRules":{"$ref":"#/components/schemas/items-search-IgnoreQueryRules"},"excludeQueryRules":{"$ref":"#/components/schemas/items-search-ExcludeQueryRules"},"params":{"$ref":"#/components/schemas/items-search-Params"}}},"items-search-FullTextSearchRequest":{"type":"object","properties":{"query":{"$ref":"#/components/schemas/items-search-SearchQuery"},"page":{"$ref":"#/components/schemas/items-search-PaginationPage"},"limit":{"$ref":"#/components/schemas/items-search-PaginationLimit"},"sortBy":{"$ref":"#/components/schemas/items-search-PaginationSortBy"},"ordering":{"$ref":"#/components/schemas/items-search-PaginationOrdering"},"includeMeta":{"$ref":"#/components/schemas/items-search-PaginationIncludeMeta"},"clientUUID":{"$ref":"#/components/schemas/items-search-ClientUUID"},"personalize":{"$ref":"#/components/schemas/items-search-Personalize"},"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationId"},"searchId":{"$ref":"#/components/schemas/items-search-SearchId"},"sortByMetric":{"$ref":"#/components/schemas/items-search-SortByMetric"},"sortByGeoPoints":{"$ref":"#/components/schemas/items-search-SortByGeoPoint"},"filterGeoPoints":{"$ref":"#/components/schemas/items-search-FilterGeoPoints"},"filterAroundRadius":{"$ref":"#/components/schemas/items-search-FilterAroundRadius"},"filters":{"$ref":"#/components/schemas/items-search-Filters"},"facets":{"$ref":"#/components/schemas/items-search-Facets"},"customFilteredFacets":{"$ref":"#/components/schemas/items-search-CustomFilteredFacets"},"facetsSize":{"$ref":"#/components/schemas/items-search-FacetsSize"},"maxValuesPerFacet":{"$ref":"#/components/schemas/items-search-MaxValuesPerFacet"},"caseSensitiveFacetValues":{"$ref":"#/components/schemas/items-search-CaseSensitiveFacetValues"},"includeFacets":{"$ref":"#/components/schemas/items-search-IncludeFacets"},"facetsOrderBy":{"$ref":"#/components/schemas/items-search-FacetsOrdering"},"context":{"$ref":"#/components/schemas/items-search-Context"},"displayAttributes":{"$ref":"#/components/schemas/items-search-DisplayAttributes"},"distinctFilter":{"$ref":"#/components/schemas/items-search-DistinctFilterSearch"},"ignoreQueryRules":{"$ref":"#/components/schemas/items-search-IgnoreQueryRules"},"excludeQueryRules":{"$ref":"#/components/schemas/items-search-ExcludeQueryRules"},"params":{"$ref":"#/components/schemas/items-search-Params"},"disableQueryClassification":{"$ref":"#/components/schemas/items-search-DisableQueryClassification"},"disableDynamicReranker":{"$ref":"#/components/schemas/items-search-DisableDynamicReranker"}},"required":["query"]},"items-search-AutocompleteRequest":{"type":"object","properties":{"query":{"$ref":"#/components/schemas/items-search-SearchQuery"},"page":{"$ref":"#/components/schemas/items-search-PaginationPage"},"limit":{"$ref":"#/components/schemas/items-search-PaginationLimit"},"sortBy":{"$ref":"#/components/schemas/items-search-PaginationSortBy"},"ordering":{"$ref":"#/components/schemas/items-search-PaginationOrdering"},"includeMeta":{"$ref":"#/components/schemas/items-search-PaginationIncludeMeta"},"clientUUID":{"$ref":"#/components/schemas/items-search-ClientUUID"},"sortByMetric":{"$ref":"#/components/schemas/items-search-SortByMetric"},"sortByGeoPoints":{"$ref":"#/components/schemas/items-search-SortByGeoPoint"},"filterGeoPoints":{"$ref":"#/components/schemas/items-search-FilterGeoPoints"},"filterAroundRadius":{"$ref":"#/components/schemas/items-search-FilterAroundRadius"},"filters":{"$ref":"#/components/schemas/items-search-Filters"},"facets":{"$ref":"#/components/schemas/items-search-Facets"},"customFilteredFacets":{"$ref":"#/components/schemas/items-search-CustomFilteredFacets"},"facetsSize":{"$ref":"#/components/schemas/items-search-FacetsSize"},"maxValuesPerFacet":{"$ref":"#/components/schemas/items-search-MaxValuesPerFacet"},"caseSensitiveFacetValues":{"$ref":"#/components/schemas/items-search-CaseSensitiveFacetValues"},"includeFacets":{"$ref":"#/components/schemas/items-search-IncludeFacets"},"facetsOrderBy":{"$ref":"#/components/schemas/items-search-FacetsOrdering"},"context":{"$ref":"#/components/schemas/items-search-Context"},"displayAttributes":{"$ref":"#/components/schemas/items-search-DisplayAttributes"},"distinctFilter":{"$ref":"#/components/schemas/items-search-DistinctFilterSearch"},"ignoreQueryRules":{"$ref":"#/components/schemas/items-search-IgnoreQueryRules"},"excludeQueryRules":{"$ref":"#/components/schemas/items-search-ExcludeQueryRules"},"params":{"$ref":"#/components/schemas/items-search-Params"},"disableQueryClassification":{"$ref":"#/components/schemas/items-search-DisableQueryClassification"},"disableDynamicReranker":{"$ref":"#/components/schemas/items-search-DisableDynamicReranker"}},"required":["query"]},"items-search-VisualSearchRequest":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/items-search-ImageUrl"},"page":{"$ref":"#/components/schemas/items-search-PaginationPage"},"limit":{"$ref":"#/components/schemas/items-search-PaginationLimit"},"sortBy":{"$ref":"#/components/schemas/items-search-PaginationSortBy"},"ordering":{"$ref":"#/components/schemas/items-search-PaginationOrdering"},"includeMeta":{"$ref":"#/components/schemas/items-search-PaginationIncludeMeta"},"clientUUID":{"$ref":"#/components/schemas/items-search-ClientUUID"},"personalize":{"$ref":"#/components/schemas/items-search-Personalize"},"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationId"},"searchId":{"$ref":"#/components/schemas/items-search-SearchId"},"sortByMetric":{"$ref":"#/components/schemas/items-search-SortByMetric"},"sortByGeoPoints":{"$ref":"#/components/schemas/items-search-SortByGeoPoint"},"filterGeoPoints":{"$ref":"#/components/schemas/items-search-FilterGeoPoints"},"filterAroundRadius":{"$ref":"#/components/schemas/items-search-FilterAroundRadius"},"filterAnchor":{"$ref":"#/components/schemas/items-search-FilterAnchor"},"filters":{"$ref":"#/components/schemas/items-search-Filters"},"facets":{"$ref":"#/components/schemas/items-search-Facets"},"customFilteredFacets":{"$ref":"#/components/schemas/items-search-CustomFilteredFacets"},"facetsSize":{"$ref":"#/components/schemas/items-search-FacetsSize"},"maxValuesPerFacet":{"$ref":"#/components/schemas/items-search-MaxValuesPerFacet"},"caseSensitiveFacetValues":{"$ref":"#/components/schemas/items-search-CaseSensitiveFacetValues"},"includeFacets":{"$ref":"#/components/schemas/items-search-IncludeFacets"},"facetsOrderBy":{"$ref":"#/components/schemas/items-search-FacetsOrdering"},"context":{"$ref":"#/components/schemas/items-search-Context"},"displayAttributes":{"$ref":"#/components/schemas/items-search-DisplayAttributes"},"ignoreQueryRules":{"$ref":"#/components/schemas/items-search-IgnoreQueryRules"},"excludeQueryRules":{"$ref":"#/components/schemas/items-search-ExcludeQueryRules"},"params":{"$ref":"#/components/schemas/items-search-Params"}},"required":["url"]},"items-search-Params":{"type":"object","example":{"source":"mobile"},"description":"Extra parameters that will be added to the `item.search` event. The total size must not exceed 500 bytes.","additionalProperties":true},"items-search-Explanation":{"type":"object","description":"Explanation for performed search.","properties":{"rulesConsequences":{"$ref":"#/components/schemas/items-search-RulesConsequencesExplanation"},"sortDetails":{"oneOf":[{"$ref":"#/components/schemas/items-search-SortedByMetric"},{"$ref":"#/components/schemas/items-search-SortedByAttribute"},{"$ref":"#/components/schemas/items-search-SortedByGeoPoint"}],"description":"Applied sorting details."},"query":{"$ref":"#/components/schemas/items-search-FinalQuery"},"personalized":{"type":"boolean","description":"Indicates whether the search results were personalized."},"promotedItemsCount":{"type":"integer","description":"Promoted items count."},"wasFallbackMatchingUsed":{"type":"boolean","description":"`true` if fallback matching was used."},"facetSelectionExplanation":{"$ref":"#/components/schemas/items-search-FacetSelectionExplanation"}}},"items-search-FacetSelectionExplanation":{"type":"object","description":"Explanation of automatic facet selection. Only present when `facets=auto` is used on an `/explain` endpoint.\nContains the raw coverage data from the result set that was used to select and rank facets.\nTo compute coverage percentage, divide each value by the response's `total` field.\n","properties":{"facetCoverage":{"type":"object","description":"Map of facetable attribute names to the number of results that have a value for that attribute.\nIncludes all candidate facets (not just the ones that were returned in the item's data), so you can see what was considered and why some were excluded by `maxFacets`.\n","additionalProperties":{"type":"integer"},"example":{"brand":4800,"color":4500,"price":4900,"size":3200,"material":400}}}},"items-search-SearchExplanationWithRerankerExplanation":{"allOf":[{"$ref":"#/components/schemas/items-search-Explanation"},{"type":"object","properties":{"reranker":{"$ref":"#/components/schemas/items-search-RerankerExplanation"}}}]},"items-search-RulesConsequencesExplanation":{"type":"object","description":"Applied rules consequences.","properties":{"query":{"$ref":"#/components/schemas/items-search-TransformedQuery"},"hiddenHits":{"type":"array","items":{"$ref":"#/components/schemas/items-search-HideHit"}},"filters":{"type":"array","items":{"$ref":"#/components/schemas/items-search-ExplanationFilters"}},"boostFilters":{"type":"array","items":{"$ref":"#/components/schemas/items-search-ExplanationBoostFilters"}},"returnNoData":{"$ref":"#/components/schemas/items-search-ReturnNoData"},"pinFacets":{"type":"array","description":"Per-rule pin facet consequences contributing to the final `facetsOrdering`.\nReflects what the rules engine emitted; the contributing rule ids are also present in `appliedRules`.\n","items":{"$ref":"#/components/schemas/items-search-ExplanationPinFacet"}},"hideFacets":{"type":"array","description":"Per-attribute hide facet consequences contributing to the final `facetsOrdering`.\nEach entry lists every rule that hid that attribute.\n","items":{"$ref":"#/components/schemas/items-search-ExplanationHideFacet"}}}},"items-search-ExplanationPinFacet":{"type":"object","description":"A single pin-facet consequence emitted by a matched query rule.","properties":{"attribute":{"type":"string","description":"Name of the pinned facet attribute.","example":"size"},"position":{"type":"integer","minimum":1,"maximum":100,"description":"1-based slot the rule requested. Omitted when the rule pinned the attribute without a position.\n","example":1},"ruleId":{"type":"integer","description":"Id of the query rule that emitted this pin."}}},"items-search-ExplanationHideFacet":{"type":"object","description":"A single hide-facet consequence aggregated across all rules that hid the same attribute.","properties":{"attribute":{"type":"string","description":"Name of the hidden facet attribute.","example":"material"},"ruleIds":{"type":"array","description":"Ids of every query rule that hid this attribute.","items":{"type":"integer"}}}},"items-search-RerankerExplanation":{"type":"object","properties":{"queryClassificationApplied":{"type":"boolean","description":"`true` if query classification was applied."},"dynamicRerankerApplied":{"type":"boolean","description":"`true` if dynamic reranker was applied."},"queryClassificationResult":{"$ref":"#/components/schemas/items-search-QueryClassificationCategories"}}},"items-search-TransformedQuery":{"type":"object","description":"Query changes applied due to query rules.","properties":{"originalQuery":{"type":"string","description":"Query before applying query rules."},"finalQuery":{"type":"string","description":"Query after applying query rules."},"modifications":{"type":"array","items":{"$ref":"#/components/schemas/items-search-QueryModification"}}}},"items-search-QueryModification":{"type":"object","description":"Describes a change in query.","properties":{"slice":{"description":"Query slice that was modified.","allOf":[{"$ref":"#/components/schemas/items-search-QuerySlice"}]},"transformedSlice":{"description":"Resulting query slice. Not present if the modification only removes words.","allOf":[{"$ref":"#/components/schemas/items-search-QuerySlice"}]},"ruleId":{"type":"integer","description":"Id of the query rule which caused this change."}}},"items-search-QuerySlice":{"type":"object","description":"Describes a slice of query.","properties":{"from":{"type":"integer","description":"Number of the first word (zero-indexed, inclusive)."},"to":{"type":"integer","description":"Number of the last word (zero-indexed, inclusive)."}}},"items-search-ExplanationFilters":{"type":"object","description":"Used filter.","properties":{"filters":{"$ref":"#/components/schemas/items-search-QueryRuleFilters"},"ruleId":{"type":"integer","description":"Id of the query rule from which the filter come."}}},"items-search-ExplanationBoostFilters":{"type":"object","description":"Used boost filter.","properties":{"filters":{"$ref":"#/components/schemas/items-search-QueryRuleFilters"},"weight":{"type":"number","description":"Weight of the filter."},"ruleId":{"type":"integer","description":"Id of the query rule from which the filter come."}}},"items-search-QueryRuleFilters":{"type":"object","description":"Filters from query rules.","properties":{"textFilters":{"type":"array","description":"Text-type filters","items":{"type":"object","properties":{"attribute":{"type":"string","description":"Attribute to be filtered"},"mode":{"type":"string","description":"Information whether to include or exclude filtered results.\n\n- `include`: includes filtered results\n- `exclude`: excludes filtered results\n","enum":["include","exclude"],"example":"include"},"values":{"type":"array","description":"Values to be used during filtering.","example":["A-Brand","B-Brand"],"items":{"type":"string"}}}}},"rangeFilters":{"type":"array","description":"Range-type filters","items":{"type":"object","properties":{"attribute":{"type":"string","description":"Attribute to be filtered","example":"price"},"operator":{"type":"string","description":"Operator to be used during filtering.\n\n- `gt`: greater than\n- `gte`: greater or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `eq`/`neq`: equal/not equal\n","enum":["gt","gte","lt","lte","eq","neq"]},"value":{"description":"Value to use during filtering","type":"number","example":19.99}}}}}},"items-search-ReturnNoData":{"type":"object","description":"Indicates if no data consequence is activated.","properties":{"enabled":{"type":"boolean","description":"Indicates if the consequence is enabled."},"ruleIds":{"type":"array","description":"Ids of the query rules which activated the consequence.","items":{"type":"integer"}}}},"items-search-HideHit":{"type":"object","properties":{"id":{"type":"string","description":"Hidden item item."},"ruleIds":{"type":"array","description":"Ids of query rules which caused the item to be hidden.","items":{"type":"integer"}}}},"items-search-SortedByMetric":{"type":"object","properties":{"metric":{"type":"string","description":"Metric used to sort the items.","enum":["TransactionsPopularity","PageVisitsPopularity"]},"ordering":{"type":"string","description":"Applied ordering.","enum":["asc","desc"]}}},"items-search-SortedByAttribute":{"type":"object","properties":{"attribute":{"type":"string","description":"Name of the attribute used to sort the items."},"ordering":{"type":"string","description":"Applied ordering.","enum":["asc","desc"]},"ruleId":{"type":"integer","description":"Id of a query rule that set the sort, if applicable."}}},"items-search-SortedByGeoPoint":{"type":"object","properties":{"point":{"type":"string","description":"Point used to sort the items.","example":"34.052235,-118.243685"},"ordering":{"type":"string","description":"Applied ordering.","enum":["asc","desc"]}}},"items-search-FinalQuery":{"type":"object","properties":{"finalQuery":{"type":"string","description":"Query that was ultimately used to perform the search."},"synonyms":{"type":"array","description":"Used synonyms.","items":{"type":"object","properties":{"word":{"type":"string","description":"Phrase that the synonyms relate to."},"synonyms":{"type":"array","description":"List of the synonyms.","items":{"type":"string"}}}}}}},"items-search-PerItemExplanation":{"type":"object","description":"Explanation of the scoring of this item","properties":{"extendedScoreFactors":{"$ref":"#/components/schemas/items-search-ExtendedScores"},"scoreFactors":{"$ref":"#/components/schemas/items-search-ScoreFactors"},"score":{"type":"number","description":"Final score."},"matchedElasticFilter":{"type":"boolean","description":"Indicates if the item was matched by an elastic filter."},"sortValue":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Value used to sort the items, if applicable."}}},"items-search-ScoreFactors":{"type":"object","description":"Influence of historical data and behavioral analysis.","properties":{"pageVisitsPopularity":{"type":"number","description":"Normalized page views popularity."},"transactionsPopularity":{"type":"number","description":"Normalized transactions popularity."},"personalization":{"type":"number","description":"Normalized value of personalization coefficient, if applicable."},"pageVisitsInfluence":{"type":"number","description":"Page views impact on score."},"transactionsInfluence":{"type":"number","description":"Purchases impact on score."},"personalizationInfluence":{"type":"number","description":"Personalization impact on score, if applicable."}}},"items-search-ExtendedScores":{"type":"object","description":"Extended score factors. Only included if it is possible to gather them.","properties":{"attributes":{"type":"object","description":"Attribute values which influenced the score.  \nThis object is separated into low/medium/high importance values (corresponding to attribute importance configuration in the search index configuration).  \nFor each type, `token` is the search query (may be modified by query rules, suggestions, etc.) that matched an attribute or attributes of that importance.  \n","properties":{"low":{"description":"Low importance attributes score.","allOf":[{"$ref":"#/components/schemas/items-search-TokenWithScore"}]},"medium":{"description":"Medium importance attributes score.","allOf":[{"$ref":"#/components/schemas/items-search-TokenWithScore"}]},"high":{"description":"High importance attributes score.","allOf":[{"$ref":"#/components/schemas/items-search-TokenWithScore"}]}}},"boostFilters":{"type":"array","description":"Matched boost filters.","items":{"type":"object","properties":{"filters":{"$ref":"#/components/schemas/items-search-QueryRuleFilters"},"weight":{"type":"number","description":"Weight of the filter."}}}}}},"items-search-TokenWithScore":{"type":"object","description":"Token with its corresponding score.","properties":{"token":{"type":"string","description":"Token value."},"score":{"type":"number","description":"Score of the token."}}},"items-search-config-Error":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"path":{"type":"string","description":"URL of the requested resource"}},"required":["timestamp","status","message"]},"items-search-config-SupportedLanguages":{"type":"object","description":"Supported search languages as ISO 639-1 codes","example":{"pl":"Polish","ro":"Romanian","ru":"Russian"},"additionalProperties":{"type":"string","description":"Human-readable label for the ISO code"}},"items-search-config-PaginatedSearchConfigsSchema":{"type":"object","properties":{"data":{"type":"array","description":"A list of indices' configurations","items":{"$ref":"#/components/schemas/items-search-config-SearchConfigSchema"}},"meta":{"$ref":"#/components/schemas/items-search-config-PaginationMeta"},"extras":{"$ref":"#/components/schemas/items-search-config-IndicesLimitsSchema"}}},"items-search-config-IndicesLimitsSchema":{"type":"object","description":"Search-indices limit info for the requesting business profile","required":["indexLimit","indexLimitReached"],"properties":{"indexLimit":{"type":"integer","description":"Maximum number of search indices allowed for this business profile (capped by hard limit)"},"indexLimitReached":{"type":"boolean","description":"True if the current number of search indices is at or above indexLimit"}}},"items-search-config-PaginationMeta":{"type":"object","description":"Optional pagination metadata (sent if `\"includeMeta\": true`)","properties":{"totalPages":{"type":"number","description":"The total number of pages"},"totalCount":{"type":"number","description":"The total number of campaigns"},"page":{"type":"number","description":"The current page"},"limit":{"type":"number","description":"The maximal number of items on a page"},"sortedBy":{"type":"string","description":"The column (attribute) that the campaigns were sorted by"},"ordering":{"type":"string","description":"Sorting order"},"code":{"type":"number","description":"HTTP response code"},"link":{"type":"array","description":"Links to neighboring pages, first page, and last page in pagination","items":{"type":"object","properties":{"url":{"description":"Page URL","type":"string"},"rel":{"type":"string","description":"Position of the linked page","enum":["first","next","prev","last"]}}}}}},"items-search-config-SearchConfigSchema":{"type":"object","description":"Details of a single index","properties":{"indexId":{"$ref":"#/components/schemas/items-search-config-IndexIdSchema"},"indexName":{"$ref":"#/components/schemas/items-search-config-IndexNameSchema"},"description":{"$ref":"#/components/schemas/items-search-config-IndexDescriptionSchema"},"itemsCatalogId":{"$ref":"#/components/schemas/items-search-config-ItemsCatalogIdSchema"},"language":{"$ref":"#/components/schemas/items-search-config-LanguageSchema"},"enabled":{"$ref":"#/components/schemas/items-search-config-EnabledSchema"},"ignoreUnavailableItems":{"$ref":"#/components/schemas/items-search-config-IgnoreUnavailableItemsSchema"},"scoring":{"$ref":"#/components/schemas/items-search-config-ScoringSchema"},"suggestions":{"$ref":"#/components/schemas/items-search-config-Suggestions"},"tokenizer":{"$ref":"#/components/schemas/items-search-config-Tokenizer"},"analyzers":{"$ref":"#/components/schemas/items-search-config-Analyzers"},"attributesWithoutPrefixSearch":{"$ref":"#/components/schemas/items-search-config-AttributesWithoutPrefixSearchSchema"},"attributesWithoutTypoTolerance":{"$ref":"#/components/schemas/items-search-config-AttributesWithoutTypoToleranceSchema"},"valuesWithoutTypoTolerance":{"$ref":"#/components/schemas/items-search-config-ValuesWithoutTypoToleranceSchema"},"typoToleranceOnNumericValues":{"$ref":"#/components/schemas/items-search-config-TypoToleranceOnNumericValuesSchema"},"searchableAttributes":{"$ref":"#/components/schemas/items-search-config-SearchableAttributesSchema"},"displayableAttributes":{"$ref":"#/components/schemas/items-search-config-DisplayableAttributesSchema"},"facetableAttributes":{"$ref":"#/components/schemas/items-search-config-FacetableAttributesSchema"},"filterableAttributes":{"$ref":"#/components/schemas/items-search-config-FilterableAttributesSchema"},"sortableAttributes":{"$ref":"#/components/schemas/items-search-config-SortableAttributesSchema"},"distinctFilterAttributes":{"$ref":"#/components/schemas/items-search-config-DistinctFilterAttributesSchema"},"recentSearches":{"$ref":"#/components/schemas/items-search-config-RecentSearchesConfig"},"reranking":{"$ref":"#/components/schemas/items-search-config-RerankingSchema"},"optimization":{"$ref":"#/components/schemas/items-search-config-OptimizationSchema"},"dynamicSynonyms":{"$ref":"#/components/schemas/items-search-config-DynamicSynonymsConfigurationSchema"},"dynamicFacets":{"$ref":"#/components/schemas/items-search-config-DynamicFacetsSchema"},"geoSearch":{"$ref":"#/components/schemas/items-search-config-GeoSearchSchema"},"queryRules":{"$ref":"#/components/schemas/items-search-config-QueryRulesSchema"},"updatedAt":{"$ref":"#/components/schemas/items-search-config-UpdatedAtSchema"},"createdAt":{"$ref":"#/components/schemas/items-search-config-CreatedAtSchema"}}},"items-search-config-IndexIdSchema":{"type":"string","description":"ID of the index"},"items-search-config-IndexNameSchema":{"type":"string","description":"Human-friendly name of the index"},"items-search-config-IndexDescriptionSchema":{"type":"string","description":"Description of the index"},"items-search-config-IndexStateSchema":{"type":"string","enum":["NotReady","ReadyUpToDate","ReadyNotUpToDate"],"description":"State of the index"},"items-search-config-ItemsCatalogIdSchema":{"type":"string","description":"ID of the item catalog from which the index will be created"},"items-search-config-LanguageSchema":{"type":"string","description":"Search language as ISO 639-1 code"},"items-search-config-EnabledSchema":{"type":"boolean","description":"When `true`, the index is enabled and can be queried."},"items-search-config-IgnoreUnavailableItemsSchema":{"type":"boolean","description":"When `true`, unavailable items are not indexed, which makes the search run faster.","default":true},"items-search-config-ScoringSchema":{"description":"Item scoring settings that affect the presentation order of the results.\n\n`0` means the lowest importance of a parameter, `1` is the highest importance.\n","type":"object","properties":{"pageVisitsPopularity":{"description":"The importance of how often the item page is visited","type":"number","format":"float","default":0,"minimum":0,"maximum":1},"transactionsPopularity":{"description":"The importance of how often the item is included in transactions","type":"number","format":"float","default":0,"minimum":0,"maximum":1},"personalized":{"description":"The importance of how relevant a item is to a profile according to the AI model","type":"number","format":"float","default":0,"minimum":0,"maximum":1},"tieBreaker":{"description":"The importance of lesser phrase matches","type":"number","format":"float","default":0,"minimum":0,"maximum":1},"matching":{"$ref":"#/components/schemas/items-search-config-Matching"},"fallbackMatching":{"$ref":"#/components/schemas/items-search-config-FallbackMatching"},"similarity":{"$ref":"#/components/schemas/items-search-config-Similarity"},"crossWorkspaceMode":{"$ref":"#/components/schemas/items-search-config-CrossWorkspaceModeSchema"}}},"items-search-config-CrossWorkspaceModeSchema":{"description":"Cross workspace mode configuration","type":"object","required":["enabled"],"properties":{"enabled":{"description":"When `true`, cross workspace search personalization mode is enabled","type":"boolean"}}},"items-search-config-Matching":{"description":"Controls how many clauses should be present in query","oneOf":[{"$ref":"#/components/schemas/items-search-config-MinimumMatching"},{"$ref":"#/components/schemas/items-search-config-MaximumNotMatching"},{"$ref":"#/components/schemas/items-search-config-AnyMatching"},{"$ref":"#/components/schemas/items-search-config-AllMatching"},{"$ref":"#/components/schemas/items-search-config-AdaptiveMatching"}]},"items-search-config-FallbackMatching":{"description":"Backup matching mode used in cases where the main matching mode\n(specified in `matching` parameter) does not provide enough results (at least 5)\n","oneOf":[{"$ref":"#/components/schemas/items-search-config-MinimumMatching"},{"$ref":"#/components/schemas/items-search-config-MaximumNotMatching"},{"$ref":"#/components/schemas/items-search-config-AnyMatching"},{"$ref":"#/components/schemas/items-search-config-AdaptiveMatching"}]},"items-search-config-MinimumMatching":{"type":"object","description":"Indicates number of mandatory clauses","properties":{"type":{"type":"string","enum":["MinimumMatching"]},"value":{"type":"integer","minimum":1}}},"items-search-config-MaximumNotMatching":{"type":"object","description":"Indicates number of optional clauses","properties":{"type":{"type":"string","enum":["MaximumNotMatching"]},"value":{"type":"integer","minimum":1}}},"items-search-config-AnyMatching":{"type":"object","description":"Any of clauses should match","properties":{"type":{"type":"string","enum":["AnyMatching"]}}},"items-search-config-AllMatching":{"type":"object","description":"All clauses should match","properties":{"type":{"type":"string","enum":["AllMatching"]}}},"items-search-config-AdaptiveMatching":{"type":"object","description":"Matching that works differently depending on the number of terms in the search query.\n","properties":{"type":{"type":"string","enum":["AdaptiveMatching"]},"termsToMatch":{"type":"number","format":"float","minimum":0,"exclusiveMinimum":true,"maximum":1,"exclusiveMaximum":true,"description":"Indicates the percentage of all query terms that should be matched.\nThis matching is done using MinimumMatching with the value set to:\n`termsToMatch * n`, where n is a number of all terms in the search query.\n**If you define termsToMatch, you can't define termsToSubtract.**\n"},"termsToSubtract":{"type":"integer","minimum":1,"default":1,"description":"Indicates a fixed number that should be subtracted from\nthe number of query terms that should match. This matching is done using\nMinimumMatching with the value set to `n - termsToSubtract`, where n is\na number of all terms in the search query.\n**If you define termsToSubtract, you can't define termsToMatch.**\n"},"termsToActivate":{"type":"integer","minimum":1,"default":3,"description":"Indicates how long (number of words) a search query must be to activate this mechanism.\nAll queries that are shorter than termsToActivate will use AllMatching.\n"}}},"items-search-config-Similarity":{"description":"Defines how matching documents are scored","oneOf":[{"$ref":"#/components/schemas/items-search-config-BM25Similarity"},{"$ref":"#/components/schemas/items-search-config-IDFSimilarity"}]},"items-search-config-BM25Similarity":{"type":"object","description":"Enhanced TF-IDF scoring model","properties":{"type":{"type":"string","enum":["BM25"]},"k1":{"type":"number","description":"Controls non-linear term frequency normalization (saturation)","format":"float","default":1.2,"minimum":0,"maximum":10},"b":{"type":"number","description":"Controls to what degree document length normalizes tf values","format":"float","default":0.75,"minimum":0,"maximum":1}}},"items-search-config-IDFSimilarity":{"type":"object","description":"Term frequency-inverse document frequency scoring model","properties":{"type":{"type":"string","enum":["IDF"]}}},"items-search-config-Tokenizer":{"description":"Used for tokenizing full text into individual words","oneOf":[{"$ref":"#/components/schemas/items-search-config-WhitespaceTokenizer"},{"$ref":"#/components/schemas/items-search-config-StandardTokenizer"},{"$ref":"#/components/schemas/items-search-config-PatternTokenizer"}]},"items-search-config-WhitespaceTokenizer":{"type":"object","description":"The whitespace tokenizer divides text into terms whenever it encounters any whitespace character","properties":{"type":{"type":"string","enum":["Whitespace"]}}},"items-search-config-StandardTokenizer":{"type":"object","description":"The standard tokenizer divides text into terms on word boundaries","properties":{"type":{"type":"string","enum":["Standard"]}}},"items-search-config-PatternTokenizer":{"type":"object","description":"The pattern tokenizer uses a regular expression to either split text into terms whenever it matches a word separator","properties":{"type":{"type":"string","enum":["Pattern"]},"pattern":{"type":"string","example":"[.,;]"}}},"items-search-config-Analyzers":{"type":"object","description":"Controls analyzer settings.","required":["autocomplete"],"properties":{"autocomplete":{"type":"string","description":"The completion method used.","enum":["Ngram","EdgeNgram","NgramWithSynonyms","EdgeNgramWithSynonyms","DefaultWithSynonyms"]}}},"items-search-config-Suggestions":{"type":"object","description":"Controls manner in which suggestions are generated","properties":{"smoothingModel":{"type":"string","description":"Controls balance weight between infrequent grams and frequent grams","enum":["Popularity","Accuracy"]},"gramSize":{"type":"integer","description":"Describes max size of the n-grams in the field","default":3,"minimum":1,"maximum":10},"maxErrors":{"type":"integer","description":"Maximum number of errors for terms to be considered as misspelling in order to for a correction","default":2,"minimum":1,"maximum":5},"minWordLength":{"type":"integer","description":"The minimum length a suggest text term must have in order to be included","default":4,"minimum":1},"useAlways":{"type":"boolean","description":"Controls is suggestions are used only if no documents match, or always","default":false}}},"items-search-config-QueryRulesSchema":{"description":"Configuration for custom behavior of query rules at the index level.","type":"object","properties":{"consequencesJoinOperators":{"type":"object","description":"Defines how filter consequences from multiple query rules are logically combined.\nThis setting determines whether those filters are joined using the AND or OR operator.\n","properties":{"standardFilters":{"type":"string","description":"Logical operator used to combine standard filters defined in the consequences of multiple query rules.\nIf not specified, the default operator is OR.\n","enum":["AND","OR"],"default":"OR"},"elasticFilters":{"type":"string","description":"Logical operator used to combine elastic filters defined in the consequences of multiple query rules.\nIf not specified, the default operator is OR.\n","enum":["AND","OR"],"default":"OR"}}}}},"items-search-config-SearchableAttributesSchema":{"description":"The attributes that are taken into account as full text search terms\n","type":"object","properties":{"fullText":{"type":"array","description":"The least important parameters","example":["brand","color","promotion.type"],"items":{"type":"string"}},"fullTextBoosted":{"type":"array","description":"Medium-importance parameters","example":["brand","color","promotion.type"],"items":{"type":"string"}},"fullTextStronglyBoosted":{"type":"array","description":"The most important parameters","example":["brand","color","promotion.type"],"items":{"type":"string"}}}},"items-search-config-DisplayableAttributesSchema":{"description":"Attributes shown in the search results","example":["brand","color","promotion.type"],"type":"array","items":{"type":"string"}},"items-search-config-AttributesWithoutPrefixSearchSchema":{"type":"array","description":"Searchable attributes which will not be used in a prefix search","example":["brand","color","promotion.type"],"items":{"type":"string"}},"items-search-config-AttributesWithoutTypoToleranceSchema":{"type":"array","description":"Searchable attributes for which typo tolerance is off","example":["itemId","link"],"items":{"type":"string"}},"items-search-config-ValuesWithoutTypoToleranceSchema":{"type":"array","description":"Attributes values for which typo tolerance is off","example":["Nike","blue","74997"],"items":{"type":"string"}},"items-search-config-TypoToleranceOnNumericValuesSchema":{"type":"boolean","description":"When `true`, typo tolerance is active on numbers","default":true},"items-search-config-FacetableAttributesSchema":{"description":"Attributes for which facets are returned in the search response. By default, all facetable attributes are also filterable and sortable.","type":"object","properties":{"range":{"$ref":"#/components/schemas/items-search-config-RangeAttributesSchema"},"text":{"$ref":"#/components/schemas/items-search-config-TextAttributesSchema"},"datetime":{"$ref":"#/components/schemas/items-search-config-DatetimeAttributesSchema"}}},"items-search-config-FilterableAttributesSchema":{"description":"Attributes for which filters can be used","type":"object","properties":{"range":{"$ref":"#/components/schemas/items-search-config-RangeAttributesSchema"},"text":{"$ref":"#/components/schemas/items-search-config-TextAttributesSchema"},"datetime":{"$ref":"#/components/schemas/items-search-config-DatetimeAttributesSchema"}}},"items-search-config-SortableAttributesSchema":{"description":"Attributes using which search results can be sorted","type":"object","properties":{"range":{"$ref":"#/components/schemas/items-search-config-RangeAttributesSchema"},"text":{"$ref":"#/components/schemas/items-search-config-TextAttributesSchema"},"datetime":{"$ref":"#/components/schemas/items-search-config-DatetimeAttributesSchema"}}},"items-search-config-DistinctFilterAttributesSchema":{"description":"Attributes for which distinct can be used","type":"object","properties":{"range":{"$ref":"#/components/schemas/items-search-config-RangeAttributesSchema"},"text":{"$ref":"#/components/schemas/items-search-config-TextAttributesSchema"},"datetime":{"$ref":"#/components/schemas/items-search-config-DatetimeAttributesSchema"}}},"items-search-config-RangeAttributesSchema":{"type":"array","description":"Array of range attributes","example":["age","customScore.value","salePrice.value"],"default":[],"items":{"type":"string"}},"items-search-config-TextAttributesSchema":{"type":"array","description":"Array of text attributes","example":["brand","color","promotion.type"],"default":[],"items":{"type":"string"}},"items-search-config-DatetimeAttributesSchema":{"type":"array","description":"Array of datetime attributes","example":["created","attributes.modifiedAt"],"default":[],"items":{"type":"string"}},"items-search-config-IndexStateResponseSchema":{"type":"object","description":"State of a single index","properties":{"indexId":{"$ref":"#/components/schemas/items-search-config-IndexIdSchema"},"state":{"$ref":"#/components/schemas/items-search-config-IndexStateSchema"},"lastConfigChange":{"$ref":"#/components/schemas/items-search-config-UpdatedAtSchema"},"errorReason":{"type":"string","description":"Reason why index was not rebuild successfully"},"log":{"type":"string","description":"Error log with additional information"}}},"items-search-config-GetSuggestionIndicesResponseSchema":{"type":"object","properties":{"data":{"type":"array","description":"An array of suggestion indices","items":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexSchema"}},"meta":{"$ref":"#/components/schemas/items-search-config-PaginationMeta"}}},"items-search-config-SuggestionIndexSchema":{"type":"object","properties":{"indexId":{"$ref":"#/components/schemas/items-search-config-IndexIdSchema"},"indexName":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexNameSchema"},"description":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexDescriptionSchema"},"author":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexAuthorSchema"},"enabled":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexEnabledSchema"},"sources":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexSourcesSchema"},"denylist":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexDenylistSchema"},"updatedAt":{"$ref":"#/components/schemas/items-search-config-UpdatedAtSchema"},"createdAt":{"$ref":"#/components/schemas/items-search-config-CreatedAtSchema"}}},"items-search-config-SuggestionIndexNameSchema":{"type":"string","description":"Name of the suggestion index"},"items-search-config-SuggestionIndexDescriptionSchema":{"type":"string","description":"Description of the suggestion index"},"items-search-config-SuggestionIndexAuthorSchema":{"type":"integer","description":"ID of the user who created the suggestion index"},"items-search-config-SuggestionIndexEnabledSchema":{"type":"boolean","description":"When `true`, index is enabled and can be queried."},"items-search-config-UpdatedAtSchema":{"type":"string","format":"date-time","description":"Last update time in YYYY-MM-DDThh:mm:ssZ format (ISO 8601, UTC)"},"items-search-config-CreatedAtSchema":{"type":"string","format":"date-time","description":"Creation time in YYYY-MM-DDThh:mm:ssZ format (ISO 8601, UTC)"},"items-search-config-SuggestionIndexSourcesSchema":{"type":"object","description":"Sources for the suggestions","properties":{"indices":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexSourceIndicesSchema"},"external":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexExternalSchema"},"generate":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexGenerateSchema"}}},"items-search-config-SuggestionIndexSourceIndicesSchema":{"type":"array","description":"A list of search indices","items":{"type":"object","properties":{"indexId":{"$ref":"#/components/schemas/items-search-config-IndexIdSchema"},"minPopularity":{"type":"integer","description":"Minimum popularity of a query to be used as a suggestion","default":5},"minHits":{"type":"integer","description":"Minimum search hits of a query to be used as a suggestion","default":1},"minLetters":{"type":"integer","description":"Minimum required number of letters for a suggestion to remain","default":2},"daysInterval":{"type":"integer","description":"Suggestions will be created from search statistics from last `daysInterval` days","default":30},"validate":{"type":"boolean","description":"When `true`, the suggestions presence in searchable attributes is verified","default":false}},"required":["indexId"]}},"items-search-config-SuggestionIndexExternalSchema":{"type":"array","description":"An array of external queries that can be used as suggestions","items":{"type":"object","properties":{"query":{"type":"string","description":"External query to be used as a suggestion"},"count":{"type":"integer","description":"Hits of the external query - used to create the weight of the suggested query."}},"required":["query","count"]}},"items-search-config-SuggestionIndexGenerateSchema":{"type":"array","description":"A group of attributes to use for generating suggestions.\n\nIf the group consists of single facet, all values of the facet are used as suggestions.\n\nIf the group consists of more than one facet, all combinations of the facets' values are used.\n\n**Example 1:**\n- Given the `[\"brand\"]` group, the generated suggestions are: `[\"apple\", \"samsung\", \"nokia\"]`\n\n- Given the `[\"color\"]` group, the generated suggestions are: `[\"red\", \"blue\"]`\n\n**Example 2:**\n\nGiven the `[\"color\", \"brand\"]` group, the generated suggestions are:<br/>\n`[\"red apple\", \"red samsung\", \"red nokia\", \"blue apple\", \"blue samsung\", \"blue nokia\"]`\n","items":{"type":"object","properties":{"itemsCatalogId":{"type":"string","description":"Id of a catalog from which attributes will be taken"},"attributes":{"type":"array","items":{"type":"string"}}}}},"items-search-config-SuggestionIndexDenylistSchema":{"type":"array","description":"Suggestions that will be ignored and *not* shown","items":{"type":"object","properties":{"pattern":{"type":"string","description":"Pattern (text) to be used while denylisting suggestions. If the suggestion matches the pattern in a way defined by `matchingType`, it's not shown."},"matchingType":{"type":"string","description":"\n<span style=\"color:red\"><strong>IMPORTANT</strong></span>: All patterns are case-**in**sensitive, including regex.\n\n- Using Phrase matching, the suggestion must match the whole pattern exactly.\n\n- Using FullWord matching, any word of the suggestion must exactly match the pattern.\n\n- Using PartialWord matching, any word of the suggestion must partially match the pattern.\n\n- Using RegularExpression matching, the pattern is treated as a regular expression and must match the suggestion.\n","enum":["Phrase","FullWord","PartialWord","RegularExpression"],"example":"Phrase"}}}},"items-search-config-RecentSearchesConfig":{"type":"object","description":"Recent searches configuration","properties":{"windowSize":{"description":"Amount of recent searches items to be returned","type":"integer","example":100},"timeSpan":{"type":"object","description":"Defines period for which recent searches are to be returned","properties":{"type":{"description":"One of the following time units","type":"string","enum":["YEARS","MONTHS","WEEKS","DAYS","HOURS","MINUTES","SECONDS"],"example":"DAYS"},"value":{"description":"Value corresponding with the time unit","type":"integer","example":30}}}}},"items-search-config-DynamicSynonymsConfigurationSchema":{"type":"object","description":"Dynamic synonyms configuration","required":["enabled","workflowIntervalDays"],"properties":{"enabled":{"type":"boolean","description":"When `true`, dynamic synonyms are enabled"},"workflowIntervalDays":{"type":"integer","description":"Interval in days between synonym workflow runs","minimum":7,"maximum":31,"example":14},"coldStart":{"type":"boolean","description":"Enables cold start mode for dynamic synonyms. Once enabled, it cannot be disabled. When enabled for the first time, a cold-start-agent resource is created with NOT READY state.","default":false,"example":false},"autoAcceptThreshold":{"type":"number","format":"float","description":"Threshold for automatic synonym acceptance. Must be in [0, 1] range.","minimum":0,"maximum":1,"example":0.8}}},"items-search-config-DynamicFacetsSchema":{"type":"object","description":"Dynamic facets configuration","required":["enabled","maxFacets"],"properties":{"enabled":{"type":"boolean","description":"When `true`, dynamic facets are enabled."},"maxFacets":{"type":"integer","description":"Maximum number of dynamic facets to return. Must be non-negative.","minimum":0,"example":10},"minCoverageThreshold":{"type":"number","format":"float","description":"Minimum coverage threshold for a facet to be included. Must be in [0, 1] range. \nCoverage is `M/N`, where:\n- `M` is the number of occurrences of a facet in the search results.\n- `N` is the total number of results.\nHigher coverage values mean that a facet is more relevant.\n","minimum":0,"maximum":1,"example":0.1},"objective":{"type":"string","description":"Objective used to select dynamic facets.","enum":["coverage","popularity"],"example":"coverage"}}},"items-search-config-RerankingSchema":{"type":"object","description":"Reranking configuration","properties":{"dynamicReranker":{"$ref":"#/components/schemas/items-search-config-DynamicRerankerSchema"},"queryClassification":{"$ref":"#/components/schemas/items-search-config-QueryClassificationSchema"}}},"items-search-config-OptimizationSchema":{"type":"object","description":"Configuration for the search weight optimizer","properties":{"enabled":{"type":"boolean","description":"Gate for the optimization feature. items-search applies `optimizedWeights` (via `target` or a query-rule target) only when `true`."},"target":{"$ref":"#/components/schemas/items-search-config-OptimizationTarget"},"optimizedWeights":{"type":"object","description":"Per-target optimization weight configuration, keyed by optimization target (ctr, cr, revenue, ndcg, margin)","additionalProperties":{"$ref":"#/components/schemas/items-search-config-OptimizationWeightsValue"}}}},"items-search-config-GeoSearchSchema":{"type":"object","description":"Geo search configuration","properties":{"geoSearchableAttribute":{"type":"string","description":"Attribute that contains the geolocation of the product.\nThe attribute's value must be one of the following types:\n- JSON object with `lat` and `lon` properties\n- JSON array of objects containing `lat` and `lon` properties\n- JSON string of format `latitude,longitude`\n- JSON array of strings of format `latitude,longitude`\n"}}},"items-search-config-DynamicRerankerSchema":{"type":"object","description":"Dynamic reranker configuration","required":["enabled","numberOfItems"],"properties":{"enabled":{"type":"boolean","description":"When `true`, the dynamic reranker is enabled"},"filter":{"type":"string","description":"Only items that meet this filter will be considered by the reranker"},"numberOfItems":{"type":"integer","description":"Number of items that can be reranked in search results","minimum":1,"maximum":50},"minNumberOfEvents":{"type":"integer","description":"If present, items with fewer events than this value will be filtered out from reranking."}}},"items-search-config-QueryClassificationSchema":{"type":"object","description":"Query classification configuration","properties":{"enabled":{"type":"boolean","description":"When `true`, the query classification is enabled."},"actions":{"type":"array","description":"Search result actions with a minimum reliability level","items":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/items-search-config-SearchResultAction"},"minReliabilityLevel":{"$ref":"#/components/schemas/items-search-config-ReliabilityLevel"}}}},"excludedPhrases":{"type":"array","description":"Phrases that will be excluded from query classification","items":{"type":"string"}},"excludedCategories":{"type":"array","description":"Categories that will be excluded from query classification","items":{"type":"string"}}}},"items-search-config-OptimizationTarget":{"type":"string","description":"The optimization target for the weight optimizer. Specifies which metric to optimize for.\n- `ctr` — Click-through rate\n- `cr` — Conversion rate\n- `revenue` — Revenue\n- `ndcg` — Normalized Discounted Cumulative Gain\n- `margin` — Margin\n","enum":["ctr","cr","revenue","ndcg","margin"]},"items-search-config-BaseWeights":{"type":"object","description":"Base weight configuration for optimization","properties":{"personalized":{"type":"number","format":"float","description":"Weight for personalization factor","minimum":0,"maximum":5},"transactionsPopularity":{"type":"number","format":"float","description":"Weight for transactions popularity","minimum":0,"maximum":5},"pageVisitsPopularity":{"type":"number","format":"float","description":"Weight for page visits popularity","minimum":0,"maximum":5},"transactions7DaysPopularity":{"type":"number","format":"float","description":"Weight for transactions popularity in the last 7 days","minimum":0,"maximum":5},"pageVisits7DaysPopularity":{"type":"number","format":"float","description":"Weight for page visits popularity in the last 7 days","minimum":0,"maximum":5},"revenueBoost":{"type":"number","format":"float","description":"Weight for revenue boost factor","minimum":0,"maximum":5},"conversionRateBoost":{"type":"number","format":"float","description":"Weight for conversion rate boost factor","minimum":0,"maximum":5}}},"items-search-config-DrrWeights":{"type":"object","description":"Dynamic Reranker (DRR) weight configuration for optimization","properties":{"searchDRRWeight":{"type":"number","format":"float","description":"Weight for search DRR signal","minimum":0,"maximum":5},"listingDRRWeight":{"type":"number","format":"float","description":"Weight for listing DRR signal","minimum":0,"maximum":5},"clickWeight":{"type":"number","format":"float","description":"Weight for click signal","minimum":0,"maximum":5},"buyWeight":{"type":"number","format":"float","description":"Weight for buy signal","minimum":0,"maximum":5},"revenueWeight":{"type":"number","format":"float","description":"Weight for revenue signal","minimum":0,"maximum":5}}},"items-search-config-OptimizationWeightsValue":{"type":"object","description":"Optimization weights for a specific target, containing optional base and DRR weights","properties":{"baseWeights":{"$ref":"#/components/schemas/items-search-config-BaseWeights"},"drrWeights":{"$ref":"#/components/schemas/items-search-config-DrrWeights"}}},"items-search-config-SearchResultAction":{"type":"string","description":"The action to perform when the reliability level from `minReliabilityLevel` is reached.\n- `staticFilter` will apply a static filter to limit the search results to the predicted category.\n- `elasticFilter` will apply an elastic filter - if there are not enough results from the predicted category, the AI engine will pick items from other categories to meet the minimum number of results.\n- `boosting` will increase the scores of items from the predicted category.\n\nIf reliability levels are met for multiple actions, the priority is:\n1. static filter\n2. elastic filter\n3. boosting\n","enum":["staticFilter","elasticFilter","boosting"]},"items-search-config-ReliabilityLevel":{"type":"string","description":"For each type of action, you can specify the minimum level required to trigger that action. A reliability level indicates how confident we are that a given prediction is the best choice.\n","enum":["certain","veryHigh","high","medium","low"]},"items-search-recent-Error":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"path":{"type":"string","description":"URL of the requested resource"}},"required":["timestamp","status","message"]},"items-search-recent-DeletedSearch":{"type":"object","properties":{"query":{"type":"string","description":"Deleted search query. Required if `match` field is set to `query`."},"match":{"type":"string","description":"Tells how to match this deleted search on recent searches.\n\n- `query`: matches only recent searches with provided query\n- `all`: matches all recent searches\n","default":"query"},"timestamp":{"type":"string","format":"date-time","description":"Time when the search was deleted. If not present current time is taken."}}},"metrics-Error":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"path":{"type":"string","description":"URL of the requested resource"}},"required":["timestamp","status","message"]},"metrics-AvailableMetrics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Metric identifier"},"description":{"type":"string","description":"Metric description"}}}},"metrics-AvailableMetricsIds":{"type":"array","items":{"type":"string"}},"morph-RunId":{"type":"string","format":"uuid","description":"`journeyId` of the last Automation run"},"morph-StartTime":{"description":"Time when the journey started","type":"string","format":"date-time","example":"2023-09-05T14:07:44.264Z"},"morph-JobStatus":{"type":"string","description":"High-level status of the job. If a given type of job doesn't exist in a workflow (for example, `transformData` in a workflow without any Data Transformation nodes), the status is `Pending`.","enum":["Pending","InProgress","Finished","Failed","Warning"],"example":"Pending"},"morph-HttpErrorDetails":{"type":"object","required":["error","status"],"properties":{"error":{"type":"string","description":"Summary of the error"},"status":{"type":"integer","format":"int32","description":"Status code"},"timestamp":{"type":"string","description":"Time when the error occurred"},"message":{"type":"string","description":"Description of the problem. If an error code is included, check the [API Error Reference](https://developers.synerise.com/errors.html) for details."}}},"morph-SyneriseServiceError":{"type":"object","description":"Standard Synerise error format","required":["httpStatus","errorCode","message","timestamp"],"properties":{"httpStatus":{"type":"integer","format":"int32","description":"HTTP status code of the response"},"errorCode":{"type":"string","description":"Synerise internal error code. Check the [API Error Reference](https://developers.synerise.com/errors.html) for details.","example":"ERR-001"},"message":{"type":"string","description":"Description of the problem"},"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"help":{"type":"string","nullable":true,"description":"Link to documentation related to the error"},"traceId":{"type":"string","nullable":true,"description":"Correlation identifier of the failed request"},"errors":{"type":"array","description":"Nested errors with details","items":{"$ref":"#/components/schemas/morph-SyneriseServiceError"}},"source":{"type":"object","nullable":true,"description":"Source of the error"},"details":{"type":"object","nullable":true,"description":"Additional error details"},"field":{"type":"string","nullable":true,"description":"Request field the error relates to"}}},"morph-LogsForStage":{"type":"object","required":["status","logs","logsSize"],"properties":{"status":{"$ref":"#/components/schemas/morph-JobStatus"},"runDate":{"type":"string","description":"Time when this job started","example":"2022-01-31T12:37:25.109Z"},"logs":{"type":"array","description":"An array of log lines","items":{"type":"string","example":"2022-01-31T12:37:25.109412Z INFO Job finished with success!"}},"logsSize":{"type":"number","description":"The number of returned log lines"},"failedRecordsFileId":{"type":"string","format":"uuid","description":"UUID of the input file that couldn't be processed"},"successCount":{"type":"integer","description":"Number of rows successfully processed by the job"},"failureCount":{"type":"integer","description":"Number of rows that failed during processing by the job"}}},"morph-AutomationLogsResponse":{"description":"Logs for each stage in the workflow","type":"object","properties":{"importData":{"description":"Logs for pulling data into the workflow","allOf":[{"$ref":"#/components/schemas/morph-LogsForStage"}]},"transformData":{"description":"Logs for Data Transformation processing","allOf":[{"$ref":"#/components/schemas/morph-LogsForStage"}]},"exportData":{"description":"Logs for pushing data from the workflow","allOf":[{"$ref":"#/components/schemas/morph-LogsForStage"}]}}},"morph-DtDiagramLastRunResponse":{"type":"object","required":["startTime","pipelineResponse","overallRunStatus"],"properties":{"startTime":{"$ref":"#/components/schemas/morph-StartTime"},"runId":{"$ref":"#/components/schemas/morph-RunId"},"pipelineResponse":{"$ref":"#/components/schemas/morph-AutomationLogsResponse"},"overallRunStatus":{"$ref":"#/components/schemas/morph-JobStatus"}}},"morph-NewProfileExport":{"type":"object","required":["name","fields","agreementFilter","segmentationHash","excludedIds"],"properties":{"name":{"type":"string","description":"Name of the export, visible at [https://app.synerise.com/assets/](https://app.synerise.com/assets/exports)"},"fields":{"type":"array","example":["id","attr1","attr2"],"minItems":1,"items":{"type":"string"},"description":"Profile attributes to export.\n\n**The first attribute in this array MUST BE `id`**\n"},"agreementFilter":{"type":"string","enum":["NONE","EMAIL","WEB_PUSH","PUSH","SMS","RECOGNIZED","ANONYMOUS"],"description":"You can filter the profiles by their marketing agreement. `NONE` means no filter."},"segmentationHash":{"type":"string","format":"uuid","description":"UUID of the segmentation which defines the profiles to export. The segmentation conditions are checked at the time of sending the \"create and run export\" request."},"tags":{"type":"array","description":"Profile tags to check for an exported profile. In the results, the tag name is the key and the value is \"true\" (string) if the tag is assigned to a given profile, otherwise it's \"false\".","items":{"type":"string"}},"expressions":{"type":"array","description":"UUIDs of expressions to check for an exported profile. In the results, the name of the expression is the key and the value is the result of the expression.","items":{"type":"string","format":"uuid"}},"aggregates":{"type":"array","description":"UUIDs of aggregates to check for an exported profile. In the results, the name of the aggregate is the key and the value is the result of the aggregate.","items":{"type":"string","format":"uuid"}},"segmentations":{"type":"array","description":"UUIDs of segmentations to check for an exported profile. In the results, the name of the segmentation is the key and the value is \"true\" (string) if the profile belongs to the segmentation, otherwise it's \"false\".","items":{"type":"string","format":"uuid"}},"excludedIds":{"type":"array","minItems":0,"items":{"type":"number"},"description":"List of clientIds to exclude from the exported data"}}},"morph-ExportResponse":{"type":"object","required":["taskId","columnOrder","estimatedCount"],"properties":{"taskId":{"type":"string","format":"uuid","description":"ID of the submitted task. Save this ID to be able to retrieve the data."},"columnOrder":{"type":"array","description":"Fields included in the export","items":{"type":"string","description":"Name of an exported attribute/tag/analysis"}},"estimatedCount":{"type":"number","description":"Estimated number of profiles in the exported segment"}}},"notes-service-NoteRequest":{"type":"object","description":"The content of the note","properties":{"subject":{"type":"string","description":"The title of the note","example":"Note 1"},"body":{"type":"string","description":"Text of the note","example":"<h1>NOTE 1</h1>\\n<p>Some text</p>\\n<ul>\\n<li>1</li>\\n<li>2</li>\\n<li>3</li>\\n</ul>\\n<blockquote>Lorem ipsum in quote</blockquote>\\n<p><strong>Lorem ipsum in bold</strong></p>\\n"}}},"notes-service-NoteResponse":{"type":"object","description":"The content and metadata of the note","properties":{"body":{"type":"string","description":"Text of the note","example":"<h1>NOTE 1</h1>\\n<p>Some text</p>\\n<ul>\\n<li>1</li>\\n<li>2</li>\\n<li>3</li>\\n</ul>\\n<blockquote>Lorem ipsum in quote</blockquote>\\n<p><strong>Lorem ipsum in bold</strong></p>\\n"},"created":{"type":"string","format":"date-time","description":"Creation time","example":"2019-08-01T08:03:31.556Z"},"createdBy":{"type":"string","description":"ID of the Synerise User who created the note","example":"example@example.com"},"id":{"type":"string","description":"UUID of the note","example":"69b0e925-086a-4964-b8dc-4c9e58213cf5"},"subject":{"type":"string","description":"The title of the note","example":"Note 1"},"updated":{"type":"string","format":"date-time","description":"Last update time","example":"2019-08-01T08:03:38.556Z"},"updatedBy":{"type":"string","description":"ID of the last user who updated the note","example":"example@example.com"},"userId":{"type":"integer","format":"int64","description":"Numerical ID of the last user who updated the note","example":11405}}},"optimizer-manager-ErrorV2":{"type":"object","properties":{"error":{"type":"string","description":"Description of the error"},"errorCode":{"type":"string","description":"Synerise error code. See [Error Code Reference](https://developers.synerise.com/errors.html)."},"help":{"type":"string","description":"Link to the error reference page for this error"},"httpStatus":{"type":"integer","description":"HTTP code of the error"},"message":{"type":"string","description":"Description of the error"},"path":{"type":"string","description":"Path of the resource which returned the error"},"requestId":{"type":"string","description":"Unique request ID"},"status":{"type":"integer","description":"Internal code for troubleshooting"},"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"traceId":{"type":"string","description":"Trace ID for troubleshooting"}}},"optimizer-manager-Error":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"path":{"type":"string","description":"URL of the requested resource"}},"required":["timestamp","status","message"]},"optimizer-manager-VariantsAllocationMethod":{"type":"string","enum":["Manual"],"description":"The variant allocation method. Currently, only `Manual` is available."},"optimizer-manager-ExperimentStatus":{"type":"string","enum":["NotStarted","Running","Paused","Finished"],"description":"Current status of the experiment. A finished experiment cannot be started again."},"optimizer-manager-ExperimentCreateOrUpdateRequestV2":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/optimizer-manager-ExperimentName"},"description":{"$ref":"#/components/schemas/optimizer-manager-ExperimentDescription"},"experimentKind":{"$ref":"#/components/schemas/optimizer-manager-ExperimentKind"},"variantsAllocationMethod":{"$ref":"#/components/schemas/optimizer-manager-VariantsAllocationMethod"},"variants":{"type":"array","description":"An array of experiment variants","items":{"$ref":"#/components/schemas/optimizer-manager-ExperimentVariantCreateOrUpdateV2"}}},"required":["name","experimentKind","variantsAllocationMethod","variants"]},"optimizer-manager-ExperimentV2Seq":{"type":"array","items":{"$ref":"#/components/schemas/optimizer-manager-ExperimentDetailsResponseV2"}},"optimizer-manager-ExperimentDetailsResponseV2":{"type":"object","properties":{"experimentId":{"$ref":"#/components/schemas/optimizer-manager-ExperimentId"},"name":{"$ref":"#/components/schemas/optimizer-manager-ExperimentName"},"author":{"$ref":"#/components/schemas/optimizer-manager-ExperimentAuthor"},"description":{"$ref":"#/components/schemas/optimizer-manager-ExperimentDescription"},"experimentKind":{"$ref":"#/components/schemas/optimizer-manager-ExperimentKind"},"variantsAllocationMethod":{"$ref":"#/components/schemas/optimizer-manager-VariantsAllocationMethod"},"status":{"$ref":"#/components/schemas/optimizer-manager-ExperimentStatus"},"startedAt":{"$ref":"#/components/schemas/optimizer-manager-ExperimentStartedAt"},"stoppedAt":{"$ref":"#/components/schemas/optimizer-manager-ExperimentStoppedAt"},"createdAt":{"$ref":"#/components/schemas/optimizer-manager-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/optimizer-manager-UpdatedAt"},"variants":{"type":"array","description":"An array of variants","items":{"$ref":"#/components/schemas/optimizer-manager-VariantV2"}}},"required":["experimentId","name","experimentKind","variantsAllocationMethod","status","createdAt","variants","goals"]},"optimizer-manager-ExperimentVariantCreateOrUpdateV2":{"type":"object","properties":{"externalId":{"$ref":"#/components/schemas/optimizer-manager-ExternalId"},"name":{"$ref":"#/components/schemas/optimizer-manager-VariantName"},"weight":{"$ref":"#/components/schemas/optimizer-manager-VariantWeight"},"metadata":{"$ref":"#/components/schemas/optimizer-manager-VariantMetadata"},"isBaseline":{"$ref":"#/components/schemas/optimizer-manager-VariantIsBaseline"}},"required":["externalId","weight"]},"optimizer-manager-VariantName":{"type":"string","description":"Variant name"},"optimizer-manager-ExternalId":{"type":"string","description":"Identifier of the resource to request with this variant.\n\n- For recommendations, this is the recommendation campaign ID.\n- For items/suggestion search, this is the search/suggestion index ID.\n"},"optimizer-manager-VariantWeight":{"type":"integer","maximum":10000,"description":"Importance of the variant. Higher value means higher importance.  \nThe total weight of all variants must be <= 10000.\n"},"optimizer-manager-VariantMetadata":{"type":"string","description":"Additional data"},"optimizer-manager-VariantIsBaseline":{"type":"boolean","description":"`true` if this is the baseline variant. When making a search/recommendation request, you will use the ID of the baseline index/recommendation and then the system will return a result from one of the variants."},"optimizer-manager-VariantId":{"type":"integer","description":"ID of the variant"},"optimizer-manager-VariantV2":{"type":"object","properties":{"variantId":{"$ref":"#/components/schemas/optimizer-manager-VariantId"},"externalId":{"$ref":"#/components/schemas/optimizer-manager-ExternalId"},"name":{"$ref":"#/components/schemas/optimizer-manager-VariantName"},"weight":{"$ref":"#/components/schemas/optimizer-manager-VariantWeight"},"metadata":{"$ref":"#/components/schemas/optimizer-manager-VariantMetadata"},"isBaseline":{"$ref":"#/components/schemas/optimizer-manager-VariantIsBaseline"}},"required":["variantId","externalId","weight"]},"optimizer-manager-ExperimentId":{"type":"integer","description":"ID of the experiment"},"optimizer-manager-ExperimentName":{"type":"string","description":"Experiment name"},"optimizer-manager-ExperimentAuthor":{"type":"integer","description":"Author of the experiment"},"optimizer-manager-ExperimentDescription":{"type":"string","description":"Experiment description"},"optimizer-manager-ExperimentKind":{"type":"string","description":"The type of the experiment","enum":["ITEMS_SEARCH","RECOMMENDATION_CAMPAIGN"]},"optimizer-manager-ExperimentStartedAt":{"type":"string","format":"date-time","description":"Time when the experiment was started"},"optimizer-manager-ExperimentStoppedAt":{"type":"string","format":"date-time","description":"Time when the experiment was stopped"},"optimizer-manager-CreatedAt":{"type":"string","format":"date-time","description":"Creation time"},"optimizer-manager-UpdatedAt":{"type":"string","format":"date-time","description":"Last update time"},"promotions-SuccessfulBatchDeleteData":{"title":"Delete","type":"array","minLength":0,"description":"Promotions correctly added to queue for deletion.","items":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/promotions-promotionCode"}}}},"promotions-SuccessfulBatchImportData":{"title":"Import","type":"array","minLength":0,"description":"Promotions with correct data, queued for import. If `discountMode` wasn't included in the request, it's set to `STATIC`. Other properties are only included if they were added to the request.","items":{"$ref":"#/components/schemas/promotions-promotionImportData"}},"promotions-PromotionImportBatchRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/promotions-promotionImportData"},"minItems":1,"maxItems":1000,"description":"Array of promotion objects to import (upsert)"},"extra":{"type":"object","description":"Import metadata","nullable":true,"properties":{"importHash":{"type":"string","description":"Import identifier for troubleshooting","maxLength":255,"nullable":true}}}}},"promotions-PromotionDeleteItem":{"type":"object","description":"Item accepted by the batch delete endpoint. The promotion is identified by its code.","required":["code"],"properties":{"code":{"$ref":"#/components/schemas/promotions-promotionCode"}}},"promotions-PromotionDeleteBatchRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/promotions-PromotionDeleteItem"},"minItems":1,"maxItems":1000,"description":"Array of objects with promotion code to delete"},"extra":{"type":"object","nullable":true,"description":"Additional metadata","properties":{"importHash":{"type":"string","description":"Import identifier for troubleshooting","maxLength":255,"nullable":true}}}}},"promotions-PromotionImportBatchDeleteAcceptedResponse":{"type":"object","properties":{"data":{"type":"array","description":"Array of promotions queued for deletion","items":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/promotions-promotionCode"}}}}}},"promotions-PromotionImportBatchAcceptedResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/promotions-SuccessfulBatchImportData"}}},"promotions-PromotionImportBatchPartialErrorResponse":{"type":"object","properties":{"httpStatus":{"allOf":[{"$ref":"#/components/schemas/promotions-ErrorV2HttpStatus"},{"example":207}]},"errorCode":{"$ref":"#/components/schemas/promotions-ErrorV2Code"},"message":{"$ref":"#/components/schemas/promotions-ErrorV2Message"},"help":{"type":"string","nullable":true,"description":"Currently unused"},"data":{"anyOf":[{"$ref":"#/components/schemas/promotions-SuccessfulBatchDeleteData"},{"$ref":"#/components/schemas/promotions-SuccessfulBatchImportData"}]},"errors":{"type":"array","description":"Per-item failures. The position in the original `data[]` array is reported via `source.index`.","items":{"type":"object","properties":{"source":{"type":"object","description":"Information about the property that caused the problem","properties":{"index":{"type":"integer","description":"Zero-based index of the failing item in the request `data[]` array."}}},"errorCode":{"$ref":"#/components/schemas/promotions-ErrorV2Code"},"message":{"$ref":"#/components/schemas/promotions-ErrorV2Message"},"help":{"type":"string","nullable":true,"description":"Currently unused"},"httpStatus":{"$ref":"#/components/schemas/promotions-ErrorV2HttpStatus"},"errors":{"type":"array","nullable":true,"description":"Per-field validation failures for this item. Present when the failure is a Joi body validation error (`errorCode: ERR-042`). Joi runs with `abortEarly: false`, so a single item may report multiple field violations.","items":{"type":"object","properties":{"source":{"type":"object","properties":{"pointer":{"type":"string","description":"JSON Pointer (RFC 6901) into the failing item, e.g. `/code`, `/discountModeDetails/steps/0/usageThreshold`."}}},"errorCode":{"$ref":"#/components/schemas/promotions-ErrorV2Code"},"message":{"type":"string","description":"Original Joi message for the field."},"help":{"type":"string","nullable":true,"description":"Currently unused"},"httpStatus":{"$ref":"#/components/schemas/promotions-ErrorV2HttpStatus"}}}}}}}}},"promotions-promotionUuid":{"type":"string","description":"Unique UUIDv4."},"promotions-promotionCode":{"type":"string","maxLength":64,"description":"Unique code"},"promotions-promotionVisibility":{"type":"string","description":"Profile-oriented status of the promotion.","enum":["DRAFT","PUBLISH","HIDDEN"],"default":"DRAFT"},"promotions-promotionType":{"type":"string","description":"Promotion type","enum":["MEMBERS_ONLY","HANDBILL","CUSTOM","GENERAL"],"default":"GENERAL"},"promotions-promotionRedeemLimitPerClient":{"type":"integer","description":"Limit how many times a Profile can redeem this promotion.","default":0,"minimum":0,"maximum":32767,"nullable":true},"promotions-promotionRedeemQuantity":{"type":"integer","nullable":true,"description":"How many times per activation a multibuy promotion can be redeemed","minimum":0,"maximum":8388607},"promotions-promotionRedeemLimitGlobal":{"type":"integer","deprecated":true,"format":"int32","description":"Limit the total of redemptions by all Profiles","default":0,"minimum":0,"maximum":2147483647,"nullable":true},"promotions-activationLimitGlobalType":{"type":"string","nullable":true,"default":"LIFETIME","description":"Promotion activation limit type\n* `LIFETIME` – No additional configuration required. The limit applies to the entire lifespan of the promotion. * `RELATIVE` – Requires specifying a relative time window (number of minutes from the current time).","enum":["RELATIVE","LIFETIME"]},"promotions-activationLimitGlobalLimit":{"type":"integer","format":"int32","description":"Limit the total of activations by all Profiles within given time unit.","minimum":1,"maximum":2147483647,"nullable":true},"promotions-activationLimitGlobalCounter":{"type":"integer","format":"int32","description":"Counter of the total of activations by all Profiles within given time unit.","nullable":true},"promotions-activationLimitGlobalRelativeMinutes":{"type":"integer","format":"int32","nullable":true,"default":null,"minimum":1,"maximum":527040,"description":"Used only when `type` is `RELATIVE`. Defines how many minutes back from the current time the limit applies."},"promotions-activationLimitGlobalReached":{"type":"boolean","nullable":true,"default":null,"description":"Indicator to inform that limit is reached."},"promotions-promotionRedeemType":{"type":"string","description":"Promotion redemption type","enum":["FULL","PARTIAL"]},"promotions-promotionAutoRedeem":{"type":"boolean","nullable":true,"description":"If true, the promotion is automatically redeemed on activation."},"promotions-promotionCatalogItemsDetails":{"type":"object","description":"Catalog items definition details","required":["catalog","catalogItemType"],"nullable":true,"properties":{"catalog":{"$ref":"#/components/schemas/promotions-promotionCatalog"},"catalogItemType":{"$ref":"#/components/schemas/promotions-promotionCatalogItemType"},"catalogIndexItems":{"$ref":"#/components/schemas/promotions-promotionCatalogIndexItems"},"catalogFilterIds":{"$ref":"#/components/schemas/promotions-promotionCatalogFilterIds"},"catalogFilterQuery":{"$ref":"#/components/schemas/promotions-promotionCatalogQuery"}}},"promotions-promotionDetails":{"type":"object","description":"Promotion details","nullable":true,"properties":{"discountType":{"$ref":"#/components/schemas/promotions-promotionDiscountTypeDetails"},"cashbackSettings":{"$ref":"#/components/schemas/promotions-cashbackSettings"}}},"promotions-promotionDiscountTypeDetailsOuterScope":{"type":"boolean","description":"This defines whether a defined promotion trigger for discount is based on different item scope.\nWhen set to\n  * `false` it means items are from the same scope,\n  * `true` it means items are from outer scope and `requiredItems` should be defined.\n","default":false,"example":true},"promotions-promotionDiscountTypeDetailsName":{"type":"string","enum":["BOGO"],"default":"BOGO"},"promotions-promotionDiscountTypeDetailsRequiredItemsCount":{"description":"Number of items that should be purchased to meet the promotion condition.","type":"integer","format":"int32","example":2},"promotions-promotionDiscountTypeDetailsDiscountedItemsCount":{"description":"Number of items to apply the discount to.","type":"integer","format":"int32","example":1},"promotions-promotionDiscountTypeDetails":{"type":"object","description":"Details that apply for specific discount type.","required":["name","outerScope","requiredItemsCount","discountedItemsCount"],"properties":{"name":{"$ref":"#/components/schemas/promotions-promotionDiscountTypeDetailsName"},"outerScope":{"$ref":"#/components/schemas/promotions-promotionDiscountTypeDetailsOuterScope"},"requiredItemsCount":{"$ref":"#/components/schemas/promotions-promotionDiscountTypeDetailsRequiredItemsCount"},"requiredItems":{"$ref":"#/components/schemas/promotions-promotionCatalogItemsDetails"},"discountedItemsCount":{"$ref":"#/components/schemas/promotions-promotionDiscountTypeDetailsDiscountedItemsCount"}}},"promotions-promotionDiscountTypeDetailsShort":{"type":"object","description":"Details that apply for specific discount type","required":["name","outerScope","requiredItemsCount","discountedItemsCount"],"properties":{"name":{"$ref":"#/components/schemas/promotions-promotionDiscountTypeDetailsName"},"outerScope":{"$ref":"#/components/schemas/promotions-promotionDiscountTypeDetailsOuterScope"},"requiredItemsCount":{"$ref":"#/components/schemas/promotions-promotionDiscountTypeDetailsRequiredItemsCount"},"discountedItemsCount":{"$ref":"#/components/schemas/promotions-promotionDiscountTypeDetailsDiscountedItemsCount"}}},"promotions-promotionDetailsShort":{"type":"object","description":"Promotion details","required":["discountType"],"nullable":true,"properties":{"discountType":{"$ref":"#/components/schemas/promotions-promotionDiscountTypeDetailsShort"}}},"promotions-promotionDiscountType":{"type":"string","description":"The type of discount","enum":["PERCENT","POINTS","AMOUNT","NONE","MULTIBUY","2_FOR_1","EXACT_PRICE","DIGITAL_CASHBACK"],"default":"NONE"},"promotions-promotionDiscountValue":{"type":"number","description":"How much discount to apply","default":0,"minimum":0,"maximum":100},"promotions-promotionDiscountMode":{"type":"string","description":"Promotion discount mode","enum":["STATIC","STEP"],"default":"STATIC"},"promotions-promotionDiscountModeDetails":{"type":"object","properties":{"steps":{"type":"array","nullable":false,"minItems":1,"maxItems":5,"items":{"required":["discountValue","usageThreshold"],"type":"object","properties":{"discountValue":{"description":"Discount value in given step","type":"number"},"usageThreshold":{"description":"Threshold after current step would apply","type":"number"}}}},"discountUsageTrigger":{"type":"string","enum":["TRANSACTION","REDEEM"],"nullable":false,"description":"Describe after what action new steps would be applied"}},"nullable":true,"description":"Applies only when `\"discountMode\": \"STEP\"`."},"promotions-promotionPreDiscountValue":{"type":"number","minimum":0,"nullable":true,"default":0,"description":"In single-item promotions, this is the price of the item before the discount. This is in regular units of currency. For example, if the currency is USD and `preDiscountValue` is set to 1.2, the price before discount is 1 dollar and 20 cents."},"promotions-promotionRequirePoints":{"type":"number","nullable":true,"format":"int32","description":"How many loyalty points are needed to activate the promotion"},"promotions-promotionHeaderName":{"type":"string","maxLength":255,"description":"Name displayed in Synerise Web UI"},"promotions-promotionHeaderDescription":{"type":"string","maxLength":255,"description":"Description displayed in Synerise Web UI","nullable":true},"promotions-promotionName":{"type":"string","maxLength":255,"description":"Promotion name displayed to viewers"},"promotions-promotionHeadline":{"type":"string","nullable":true,"description":"Promotion headline displayed to viewers"},"promotions-promotionDescription":{"type":"string","maxLength":2048,"nullable":true,"description":"Details of the promotion displayed to viewers"},"promotions-promotionImages":{"type":"array","nullable":true,"items":{"required":["url","type"],"type":"object","properties":{"url":{"description":"Image or thumbnail source. Must be an absolute HTTP/HTTPS URL.","type":"string","format":"uri","example":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png"},"type":{"type":"string","enum":["image","thumbnail"]}}},"description":"Images and thumbnails for the promotion"},"promotions-promotionTags":{"description":"An array of tags.\n\n**IMPORTANT:** To be able to use a tag for promotions, you must first assign the tag to a directory with `\"type\":\"promotion\"`. If the directory type does not exist, create it using [this endpoint](https://developers.synerise.com/AssetManagement/AssetManagement.html#operation/createDirectoryType). Then create a directory of that type and assign tags to it.\n","type":"array","items":{"type":"object","properties":{"hash":{"type":"string","description":"Hash ID of the tag","example":"6f54671d-157f-4c4e-a577-11fac3111293"}}},"nullable":true},"promotions-promotionStartAt":{"type":"string","nullable":true,"format":"date-time","description":"Time when the promotion becomes available. Defaults to current time."},"promotions-promotionExpireAt":{"type":"string","nullable":true,"format":"date-time","description":"Time when the promotion ends for all profiles. Defaults to current time. Has to be greater than startAt"},"promotions-promotionDisplayFrom":{"type":"string","nullable":true,"description":"Time when the promotion becomes displayable. Defaults to null."},"promotions-promotionDisplayTo":{"type":"string","nullable":true,"description":"Time when the promotion stops being displayed for users. Defaults to null. Has to be greater than displayFrom."},"promotions-promotionLastingTime":{"type":"integer","format":"int32","nullable":true,"description":"Duration of the promotion in seconds. This countdown starts when the profile activates a promotion and is individual for each profile.","default":0},"promotions-promotionParams":{"type":"object","description":"A JSON object with any custom parameters of type string, object, array.","nullable":true,"additionalProperties":true},"promotions-promotionItemScope":{"type":"string","description":"The scope of of the promotion.\n* LINE_ITEM is a promotion used for certain items in the basket\n* BASKET is a promotion that applies to the entire basket","enum":["LINE_ITEM","BASKET"],"default":"LINE_ITEM"},"promotions-promotionMinBasket":{"type":"number","nullable":true,"default":null,"minimum":0,"description":"Minimal basket value required to trigger the application of the promotion. This is the basket value after calculating other promotions that apply to the items in the basket. \n\n`minBasketValue` must be lower than `maxBasketValue`.\n"},"promotions-promotionMaxBasket":{"type":"number","nullable":true,"default":null,"minimum":0,"description":"\nThe maximum basket value to apply the promotion to. Any amount above the maximum is not discounted. This is the basket value after calculating other promotions that apply to the items in the basket.\n\n`maxBasketValue` must be greater than `minBasketValue`\n\n**Example:**<br/>\nThe maximum basket value is set to 500 USD. The discount is 10%. A basket's total is 700 USD. The discount is 50 USD.\n"},"promotions-voucherCode":{"type":"string","description":"Voucher code","example":"6f54671d-157f-4c4e-a577-11fac3111293"},"promotions-voucherStatus":{"type":"string","description":"Status of the voucher","example":"ASSIGNED","enum":["ASSIGNED","REDEEMED","CANCELED"]},"promotions-voucherAutoGenerated":{"type":"boolean","example":false,"description":"`true` if the voucher was generated by an algorithm"},"promotions-voucherLastingAt":{"type":"string","nullable":true,"example":"2026-01-01","format":"date-time","description":"Time when the voucher expires."},"promotions-voucherRedeemedAt":{"type":"string","nullable":true,"example":null,"format":"date-time","description":"Time when the voucher was redeemed."},"promotions-voucherAssignedAt":{"type":"string","nullable":true,"example":"2025-01-01","format":"date-time","description":"Time when the voucher was assigned."},"promotions-Voucher":{"type":"object","required":["code","status","autoGenerated","lastingAt","redeemedAt","assignedAt"],"properties":{"code":{"$ref":"#/components/schemas/promotions-voucherCode"},"status":{"$ref":"#/components/schemas/promotions-voucherStatus"},"autoGenerated":{"$ref":"#/components/schemas/promotions-voucherAutoGenerated"},"lastingAt":{"$ref":"#/components/schemas/promotions-voucherLastingAt"},"redeemedAt":{"$ref":"#/components/schemas/promotions-voucherRedeemedAt"},"assignedAt":{"$ref":"#/components/schemas/promotions-voucherAssignedAt"}}},"promotions-VoucherList":{"type":"array","description":"Vouchers redeemed succesfully","items":{"$ref":"#/components/schemas/promotions-Voucher"}},"promotions-promotionCatalog":{"type":"string","description":"ID of the item catalog that the promotion applies to","nullable":true,"example":"221"},"promotions-promotionCatalogItemType":{"type":"string","enum":["ALL","SELECTED","FILTERED","QUERY"],"description":"\n- If set to \"ALL\", define the catalog in the `catalog` field and set `catalogIndexItems` to null.\n\n- If set to \"SELECTED\", define the catalog in the `catalog` field and provide a list of catalog items in `catalogIndexItems`.\n\n- If set to \"FILTERED\", define the catalog in the `catalog` field and provide a list of catalog filter ids in `catalogFilterIds`.\n\n- If set to \"QUERY\", define the catalog in the `catalog` field and provide an inline RSQL expression in `catalogFilterQuery`.\n","default":"ALL","example":"FILTERED"},"promotions-promotionCatalogIndexItems":{"type":"array","items":{"type":"string"},"description":"\n'An array of items from the catalog to be included in the promotion if `catalogItemType` is set to `SELECTED`.\n\n\nIf `catalogItemType` is set to `ALL`, set `catalogIndexItems` to null.'\n","nullable":true,"example":[]},"promotions-promotionCatalogFilterIds":{"type":"array","items":{"type":"string"},"description":"\n'An array of catalog filter IDs to be executed to fetch catalog items if `catalogItemType` is set to `FILTERED`.\n\n\nIf `catalogItemType` is set to `ALL`, set `catalogFilterIds` to null.'\n","nullable":true,"example":["f978b20f-7156-40ed-99c2-3af62b76af12"]},"promotions-promotionCatalogQuery":{"type":"string","maxLength":1024,"description":"\n'An inline RSQL expression resolved by Catalogs into the matching catalog items if `catalogItemType` is set to `QUERY`.\n\nRequired (and `catalog` must be defined) when `catalogItemType` is `QUERY`; otherwise set to null.'\n","nullable":true,"example":"color==green;price=lt=100"},"promotions-promotionExcludeCatalog":{"type":"string","description":"ID of the item catalog that the promotion should exclude","nullable":true,"example":["311"]},"promotions-promotionExcludeCatalogItemType":{"type":"string","enum":["ALL","SELECTED","FILTERED","QUERY"],"description":"\n- If set to \"ALL\", define the catalog in the `excludeCatalog` field and set `excludeCatalogIndexItems` to null.\n\n- If set to \"SELECTED\", define the catalog in the `excludeCatalog` field and provide a list of catalog items in `excludeCatalogIndexItems`.\n\n- If set to \"FILTERED\", define the catalog in the `excludeCatalog` field and provide a list of catalog filter ids in `excludeCatalogFilterIds`.\n\n- If set to \"QUERY\", define the catalog in the `excludeCatalog` field and provide an inline RSQL expression in `excludeCatalogFilterQuery`.\n","default":"ALL","example":"SELECTED"},"promotions-promotionExcludeCatalogIndexItems":{"type":"array","items":{"type":"string"},"description":"\n'An array of items from the catalog to be excluded in the promotion if `excludeCatalogItemType` is set to `SELECTED`.\n\n\nIf `excludeCatalogItemType` is set to `ALL`, set `excludeCatalogIndexItems` to null.'\n","nullable":true,"example":["29727276"]},"promotions-promotionExcludeCatalogFilterIds":{"type":"array","items":{"type":"string"},"description":"\n'An array of catalog filter IDs to be executed to fetch catalog items to exclude if `excludeCatalogItemType` is set to `FILTERED`.\n\n\nIf `excludeCatalogItemType` is set to `ALL`, set `excludeCatalogFilterIds` to null.'\n","nullable":true,"example":[]},"promotions-promotionExcludeCatalogQuery":{"type":"string","maxLength":1024,"description":"\n'An inline RSQL expression resolved by Catalogs into the catalog items to exclude if `excludeCatalogItemType` is set to `QUERY`.\n\nRequired (and `excludeCatalog` must be defined) when `excludeCatalogItemType` is `QUERY`; otherwise set to null.'\n","nullable":true,"example":"brand==acme"},"promotions-promotionStoreCatalog":{"type":"string","description":"ID of the store catalog that the promotion applies to","nullable":true,"minLength":1,"maxLength":255},"promotions-promotionStoreItemType":{"type":"string","enum":["ALL","SELECTED"],"description":"Defines if the promotion is available for the entire store catalog or only certain stores (listed in `storeIds`).","default":"ALL"},"promotions-promotionStoreIds":{"type":"array","items":{"type":"string"},"description":"An array of stores from the store catalog where the promotion is available if `storeItemType` is set to `SELECTED`","nullable":true},"promotions-promotionTargetType":{"type":"string","description":"If this field is set to \"SEGMENT\", you must provide a list of segments in `targetSegment`.","default":"ALL","enum":["ALL","SEGMENT"]},"promotions-promotionTargetSegment":{"type":"array","nullable":true,"description":"This field applies only when `targetType` is set to \"SEGMENT\".","items":{"type":"string","description":"ID of the segmentation of profiles that can redeem this promotion"}},"promotions-promotionPrice":{"description":"In single-item promotions, this is the price of the item in the smallest unit of currency. For example, if the currency is USD and `price` is 120, the price is 1 dollar and 20 cents.","type":"integer","default":0,"minimum":0,"maximum":2147483647},"promotions-promotionPriority":{"description":"Defines the promotion's priority, used both for display order and to order candidate promotions when they are selected during handbill and checkout assignment. Values are ordered ascending, so a lower number means a higher priority and `1` is the highest. When the per-slot read limit or the AI request cap truncates the candidate list, the higher-priority (lower-numbered) promotions are the ones kept. Promotions that share the same priority have no further guaranteed ordering between them, so when a truncation boundary falls inside a group of equal priority it is not defined which of them are kept — assign distinct priorities to the promotions that must always win.","type":"integer","minimum":1,"maximum":500,"default":250},"promotions-promotionMetric":{"nullable":true,"type":"string","maxLength":64,"description":"Currently unused"},"promotions-assignmentStatus":{"type":"string","description":"Profile-oriented status of the promotion.","enum":["ASSIGNED","ACTIVE","REDEEMED"]},"promotions-assignmentCurrentRedeemedQuantity":{"type":"integer","description":"Current redeem quantity for the Profile."},"promotions-assignmentCurrentRedeemedLimit":{"type":"integer","description":"Current redeem limit for the Profile."},"promotions-assignmentActivationCounter":{"type":"integer","description":"Number of promotion activation"},"promotions-assignmentPossibleRedeems":{"type":"integer","description":"Number of available redeems left"},"promotions-assignmentAssignedAt":{"type":"string","nullable":true,"format":"date-time","description":"Time when promotion becomes active for the Profile."},"promotions-assignmentLastingAt":{"type":"string","nullable":true,"format":"date-time","description":"Time when promotion becomes expire for the Profile."},"promotions-promotionDataDelete":{"type":"object","required":["value"],"properties":{"value":{"type":"string","description":"Code of the promotion to delete"}}},"promotions-promotionDataCreateOrUpdate":{"type":"object","properties":{"uuid":{"$ref":"#/components/schemas/promotions-promotionUuid"},"code":{"$ref":"#/components/schemas/promotions-promotionCode"},"visibilityStatus":{"$ref":"#/components/schemas/promotions-promotionVisibility"},"type":{"$ref":"#/components/schemas/promotions-promotionType"},"redeemLimitPerClient":{"$ref":"#/components/schemas/promotions-promotionRedeemLimitPerClient"},"redeemQuantityPerActivation":{"$ref":"#/components/schemas/promotions-promotionRedeemQuantity"},"redeemLimitGlobal":{"$ref":"#/components/schemas/promotions-promotionRedeemLimitGlobal"},"redeemType":{"$ref":"#/components/schemas/promotions-promotionRedeemType"},"discountType":{"$ref":"#/components/schemas/promotions-promotionDiscountType"},"details":{"$ref":"#/components/schemas/promotions-promotionDetails"},"discountValue":{"$ref":"#/components/schemas/promotions-promotionDiscountValue"},"discountMode":{"$ref":"#/components/schemas/promotions-promotionDiscountMode"},"discountModeDetails":{"$ref":"#/components/schemas/promotions-promotionDiscountModeDetails"},"preDiscountValue":{"$ref":"#/components/schemas/promotions-promotionPreDiscountValue"},"requireRedeemedPoints":{"$ref":"#/components/schemas/promotions-promotionRequirePoints"},"headerName":{"$ref":"#/components/schemas/promotions-promotionHeaderName"},"headerDescription":{"$ref":"#/components/schemas/promotions-promotionHeaderDescription"},"name":{"$ref":"#/components/schemas/promotions-promotionName"},"headline":{"$ref":"#/components/schemas/promotions-promotionHeadline"},"description":{"$ref":"#/components/schemas/promotions-promotionDescription"},"images":{"$ref":"#/components/schemas/promotions-promotionImages"},"tags":{"$ref":"#/components/schemas/promotions-promotionTags"},"startAt":{"$ref":"#/components/schemas/promotions-promotionStartAt"},"expireAt":{"$ref":"#/components/schemas/promotions-promotionExpireAt"},"displayFrom":{"$ref":"#/components/schemas/promotions-promotionDisplayFrom"},"displayTo":{"$ref":"#/components/schemas/promotions-promotionDisplayTo"},"lastingTime":{"$ref":"#/components/schemas/promotions-promotionLastingTime"},"params":{"$ref":"#/components/schemas/promotions-promotionParams"},"itemScope":{"$ref":"#/components/schemas/promotions-promotionItemScope"},"minBasketValue":{"$ref":"#/components/schemas/promotions-promotionMinBasket"},"maxBasketValue":{"$ref":"#/components/schemas/promotions-promotionMaxBasket"},"catalog":{"$ref":"#/components/schemas/promotions-promotionCatalog"},"catalogItemType":{"$ref":"#/components/schemas/promotions-promotionCatalogItemType"},"catalogIndexItems":{"$ref":"#/components/schemas/promotions-promotionCatalogIndexItems"},"catalogFilterIds":{"$ref":"#/components/schemas/promotions-promotionCatalogFilterIds"},"catalogFilterQuery":{"$ref":"#/components/schemas/promotions-promotionCatalogQuery"},"excludeCatalog":{"$ref":"#/components/schemas/promotions-promotionExcludeCatalog"},"excludeCatalogItemType":{"$ref":"#/components/schemas/promotions-promotionExcludeCatalogItemType"},"excludeCatalogIndexItems":{"$ref":"#/components/schemas/promotions-promotionExcludeCatalogIndexItems"},"excludeCatalogFilterIds":{"$ref":"#/components/schemas/promotions-promotionExcludeCatalogFilterIds"},"excludeCatalogFilterQuery":{"$ref":"#/components/schemas/promotions-promotionExcludeCatalogQuery"},"storeCatalog":{"$ref":"#/components/schemas/promotions-promotionStoreCatalog"},"storeItemType":{"$ref":"#/components/schemas/promotions-promotionStoreItemType"},"storeIds":{"$ref":"#/components/schemas/promotions-promotionStoreIds"},"targetType":{"$ref":"#/components/schemas/promotions-promotionTargetType"},"targetSegment":{"$ref":"#/components/schemas/promotions-promotionTargetSegment"},"price":{"$ref":"#/components/schemas/promotions-promotionPrice"},"priority":{"$ref":"#/components/schemas/promotions-promotionPriority"},"voucherPool":{"$ref":"#/components/schemas/promotions-VoucherPool"},"importHash":{"$ref":"#/components/schemas/promotions-promotionImportHash"}}},"promotions-promotionImportHeadline":{"type":"string","nullable":true,"maxLength":255,"description":"Promotion headline displayed to viewers (import limit — 255 chars)."},"promotions-promotionImportCatalog":{"type":"string","nullable":true,"maxLength":255,"description":"ID of the item catalog targeted by the promotion (import limit — 255 chars). Required when `catalogItemType` is `SELECTED` or `FILTERED`."},"promotions-promotionImportExcludeCatalog":{"type":"string","nullable":true,"maxLength":255,"description":"ID of the item catalog excluded from the promotion (import limit — 255 chars). Required when `excludeCatalogItemType` is `SELECTED` or `FILTERED`."},"promotions-promotionImportStoreCatalog":{"type":"string","nullable":true,"minLength":1,"maxLength":255,"description":"ID of the store catalog that the promotion applies to (import limit — 255 chars)."},"promotions-promotionImportCatalogIndexItems":{"type":"array","items":{"type":"string"},"nullable":true,"maxItems":50,"description":"Catalog items included in the promotion (import limit — 50 entries). Requires `catalog` to be defined."},"promotions-promotionImportCatalogFilterIds":{"type":"array","items":{"type":"string"},"nullable":true,"maxItems":5,"description":"Catalog filter IDs for FILTERED targeting (import limit — 5 entries). Requires `catalog` to be defined."},"promotions-promotionImportExcludeCatalogIndexItems":{"type":"array","items":{"type":"string"},"nullable":true,"maxItems":50,"description":"Catalog items excluded from the promotion (import limit — 50 entries). Requires `excludeCatalog` to be defined."},"promotions-promotionImportExcludeCatalogFilterIds":{"type":"array","items":{"type":"string"},"nullable":true,"maxItems":5,"description":"Catalog filter IDs for FILTERED exclusion (import limit — 5 entries). Requires `excludeCatalog` to be defined."},"promotions-promotionImportDiscountModeDetails":{"type":"object","nullable":true,"description":"Step discount configuration (import limit — up to 5 steps).","required":["discountUsageTrigger"],"properties":{"steps":{"type":"array","minItems":1,"maxItems":5,"items":{"required":["discountValue","usageThreshold"],"type":"object","properties":{"discountValue":{"type":"number","description":"Discount value in given step."},"usageThreshold":{"type":"number","description":"Threshold after current step would apply."}}}},"discountUsageTrigger":{"type":"string","enum":["TRANSACTION","REDEEM"],"description":"Describe after what action new steps would be applied."}}},"promotions-promotionImportTags":{"description":"An array of tags (import limit — 20 entries).\n\n**IMPORTANT:** To be able to use a tag for promotions, you must first assign the tag to a directory with `\"type\":\"promotion\"`. If the directory type does not exist, create it using [this endpoint](https://developers.synerise.com/AssetManagement/AssetManagement.html#operation/createDirectoryType). Then create a directory of that type and assign tags to it.\n","type":"array","maxItems":20,"items":{"type":"object","properties":{"hash":{"type":"string","description":"Hash ID of the tag","example":"6f54671d-157f-4c4e-a577-11fac3111293"}}},"nullable":true},"promotions-promotionImportStoreIds":{"type":"array","maxItems":500,"items":{"type":"string"},"description":"An array of stores from the store catalog where the promotion is available if `storeItemType` is set to `SELECTED` (import limit — 500 entries).","nullable":true},"promotions-promotionImportTargetSegment":{"type":"array","maxItems":10,"nullable":true,"description":"This field applies only when `targetType` is set to \"SEGMENT\" (import limit — 10 entries).","items":{"type":"string","description":"ID of the segmentation of profiles that can redeem this promotion"}},"promotions-promotionImportImages":{"type":"array","maxItems":8,"nullable":true,"items":{"required":["url","type"],"type":"object","properties":{"url":{"description":"Image or thumbnail source","type":"string","example":"https://www.snrcdn.net/upload/f2afa4d4d7af216196047d1f7f0613f22a50a8c8/default/origin/1537188683527-el-ipadpro.png"},"type":{"type":"string","enum":["image","thumbnail"]}}},"description":"Images and thumbnails for the promotion (import limit — 8 entries)."},"promotions-promotionImportParams":{"type":"object","description":"A JSON object with any custom parameters of type string, object, array.\n\nImport limit — serialized JSON must not exceed 128 KB (131072 bytes).\n","nullable":true,"additionalProperties":true},"promotions-promotionImportDetails":{"type":"object","description":"Promotion details.\n\nImport limit — serialized JSON must not exceed 128 KB (131072 bytes).\n","nullable":true,"properties":{"discountType":{"$ref":"#/components/schemas/promotions-promotionDiscountTypeDetails"},"cashbackSettings":{"$ref":"#/components/schemas/promotions-cashbackSettings"}}},"promotions-promotionImportData":{"type":"object","description":"Promotion payload accepted by the batch import endpoint. Applies SPD-2026-03 limits.\n\nCross-field validation (items violating these rules are rejected as `PromotionImportStatus` with `status: FAILED` on the `promotions-changes` topic):\n  - `name` and `headerName` MUST be non-empty when `visibilityStatus` is `HIDDEN` or `PUBLISH`.\n  - `catalog` is REQUIRED when `catalogItemType` is `SELECTED` or `FILTERED`.\n  - `excludeCatalog` is REQUIRED when `excludeCatalogItemType` is `SELECTED` or `FILTERED`.\n  - When `details.discountType.name` is `BOGO` and `itemScope` is `LINE_ITEM`, `discountType` MUST be one of `PERCENT`, `AMOUNT`, `EXACT_PRICE`, `DIGITAL_CASHBACK`.\n  - `expireAt` MUST be greater than `startAt`; `displayTo` MUST be greater than `displayFrom`; `maxBasketValue` MUST be greater than `minBasketValue`.\n","anyOf":[{"required":["uuid"]},{"required":["code"]}],"properties":{"uuid":{"$ref":"#/components/schemas/promotions-promotionUuid"},"code":{"$ref":"#/components/schemas/promotions-promotionCode"},"visibilityStatus":{"$ref":"#/components/schemas/promotions-promotionVisibility"},"type":{"$ref":"#/components/schemas/promotions-promotionType"},"redeemLimitPerClient":{"$ref":"#/components/schemas/promotions-promotionRedeemLimitPerClient"},"redeemQuantityPerActivation":{"$ref":"#/components/schemas/promotions-promotionRedeemQuantity"},"redeemLimitGlobal":{"$ref":"#/components/schemas/promotions-promotionRedeemLimitGlobal"},"redeemType":{"$ref":"#/components/schemas/promotions-promotionRedeemType"},"autoRedeem":{"$ref":"#/components/schemas/promotions-promotionAutoRedeem"},"activationLimitGlobalType":{"$ref":"#/components/schemas/promotions-activationLimitGlobalType"},"activationLimitGlobalLimit":{"$ref":"#/components/schemas/promotions-activationLimitGlobalLimit"},"activationLimitGlobalRelativeMinutes":{"$ref":"#/components/schemas/promotions-activationLimitGlobalRelativeMinutes"},"discountType":{"$ref":"#/components/schemas/promotions-promotionDiscountType"},"details":{"$ref":"#/components/schemas/promotions-promotionImportDetails"},"discountValue":{"$ref":"#/components/schemas/promotions-promotionDiscountValue"},"discountMode":{"$ref":"#/components/schemas/promotions-promotionDiscountMode"},"discountModeDetails":{"$ref":"#/components/schemas/promotions-promotionImportDiscountModeDetails"},"preDiscountValue":{"$ref":"#/components/schemas/promotions-promotionPreDiscountValue"},"requireRedeemedPoints":{"$ref":"#/components/schemas/promotions-promotionRequirePoints"},"headerName":{"$ref":"#/components/schemas/promotions-promotionHeaderName"},"headerDescription":{"$ref":"#/components/schemas/promotions-promotionHeaderDescription"},"name":{"$ref":"#/components/schemas/promotions-promotionName"},"headline":{"$ref":"#/components/schemas/promotions-promotionImportHeadline"},"description":{"$ref":"#/components/schemas/promotions-promotionDescription"},"images":{"$ref":"#/components/schemas/promotions-promotionImportImages"},"tags":{"$ref":"#/components/schemas/promotions-promotionImportTags"},"metric":{"$ref":"#/components/schemas/promotions-promotionMetric"},"startAt":{"$ref":"#/components/schemas/promotions-promotionStartAt"},"expireAt":{"$ref":"#/components/schemas/promotions-promotionExpireAt"},"displayFrom":{"$ref":"#/components/schemas/promotions-promotionDisplayFrom"},"displayTo":{"$ref":"#/components/schemas/promotions-promotionDisplayTo"},"lastingTime":{"$ref":"#/components/schemas/promotions-promotionLastingTime"},"params":{"$ref":"#/components/schemas/promotions-promotionImportParams"},"itemScope":{"$ref":"#/components/schemas/promotions-promotionItemScope"},"minBasketValue":{"$ref":"#/components/schemas/promotions-promotionMinBasket"},"maxBasketValue":{"$ref":"#/components/schemas/promotions-promotionMaxBasket"},"catalog":{"$ref":"#/components/schemas/promotions-promotionImportCatalog"},"catalogItemType":{"$ref":"#/components/schemas/promotions-promotionCatalogItemType"},"catalogIndexItems":{"$ref":"#/components/schemas/promotions-promotionImportCatalogIndexItems"},"catalogFilterIds":{"$ref":"#/components/schemas/promotions-promotionImportCatalogFilterIds"},"catalogFilterQuery":{"$ref":"#/components/schemas/promotions-promotionCatalogQuery"},"excludeCatalog":{"$ref":"#/components/schemas/promotions-promotionImportExcludeCatalog"},"excludeCatalogItemType":{"$ref":"#/components/schemas/promotions-promotionExcludeCatalogItemType"},"excludeCatalogIndexItems":{"$ref":"#/components/schemas/promotions-promotionImportExcludeCatalogIndexItems"},"excludeCatalogFilterIds":{"$ref":"#/components/schemas/promotions-promotionImportExcludeCatalogFilterIds"},"excludeCatalogFilterQuery":{"$ref":"#/components/schemas/promotions-promotionExcludeCatalogQuery"},"storeCatalog":{"$ref":"#/components/schemas/promotions-promotionImportStoreCatalog"},"storeItemType":{"$ref":"#/components/schemas/promotions-promotionStoreItemType"},"storeIds":{"$ref":"#/components/schemas/promotions-promotionImportStoreIds"},"targetType":{"$ref":"#/components/schemas/promotions-promotionTargetType"},"targetSegment":{"$ref":"#/components/schemas/promotions-promotionImportTargetSegment"},"price":{"$ref":"#/components/schemas/promotions-promotionPrice"},"priority":{"$ref":"#/components/schemas/promotions-promotionPriority"},"voucherPool":{"$ref":"#/components/schemas/promotions-VoucherPool"}}},"promotions-promotionDataCreate":{"type":"object","description":"Details of a promotion","properties":{"visibilityStatus":{"$ref":"#/components/schemas/promotions-promotionVisibility"},"type":{"$ref":"#/components/schemas/promotions-promotionType"},"redeemLimitPerClient":{"$ref":"#/components/schemas/promotions-promotionRedeemLimitPerClient"},"redeemQuantityPerActivation":{"$ref":"#/components/schemas/promotions-promotionRedeemQuantity"},"redeemLimitGlobal":{"$ref":"#/components/schemas/promotions-promotionRedeemLimitGlobal"},"redeemType":{"$ref":"#/components/schemas/promotions-promotionRedeemType"},"details":{"$ref":"#/components/schemas/promotions-promotionDetails"},"discountType":{"$ref":"#/components/schemas/promotions-promotionDiscountType"},"discountValue":{"$ref":"#/components/schemas/promotions-promotionDiscountValue"},"discountMode":{"$ref":"#/components/schemas/promotions-promotionDiscountMode"},"discountModeDetails":{"$ref":"#/components/schemas/promotions-promotionDiscountModeDetails"},"preDiscountValue":{"$ref":"#/components/schemas/promotions-promotionPreDiscountValue"},"requireRedeemedPoints":{"$ref":"#/components/schemas/promotions-promotionRequirePoints"},"headerName":{"$ref":"#/components/schemas/promotions-promotionHeaderName"},"headerDescription":{"$ref":"#/components/schemas/promotions-promotionHeaderDescription"},"name":{"$ref":"#/components/schemas/promotions-promotionName"},"headline":{"$ref":"#/components/schemas/promotions-promotionHeadline"},"description":{"$ref":"#/components/schemas/promotions-promotionDescription"},"images":{"$ref":"#/components/schemas/promotions-promotionImages"},"tags":{"$ref":"#/components/schemas/promotions-promotionTags"},"startAt":{"$ref":"#/components/schemas/promotions-promotionStartAt"},"expireAt":{"$ref":"#/components/schemas/promotions-promotionExpireAt"},"displayFrom":{"$ref":"#/components/schemas/promotions-promotionDisplayFrom"},"displayTo":{"$ref":"#/components/schemas/promotions-promotionDisplayTo"},"lastingTime":{"$ref":"#/components/schemas/promotions-promotionLastingTime"},"params":{"$ref":"#/components/schemas/promotions-promotionParams"},"itemScope":{"$ref":"#/components/schemas/promotions-promotionItemScope"},"minBasketValue":{"$ref":"#/components/schemas/promotions-promotionMinBasket"},"maxBasketValue":{"$ref":"#/components/schemas/promotions-promotionMaxBasket"},"catalog":{"$ref":"#/components/schemas/promotions-promotionCatalog"},"catalogItemType":{"$ref":"#/components/schemas/promotions-promotionCatalogItemType"},"catalogIndexItems":{"$ref":"#/components/schemas/promotions-promotionCatalogIndexItems"},"catalogFilterIds":{"$ref":"#/components/schemas/promotions-promotionCatalogFilterIds"},"catalogFilterQuery":{"$ref":"#/components/schemas/promotions-promotionCatalogQuery"},"excludeCatalog":{"$ref":"#/components/schemas/promotions-promotionExcludeCatalog"},"excludeCatalogItemType":{"$ref":"#/components/schemas/promotions-promotionExcludeCatalogItemType"},"excludeCatalogIndexItems":{"$ref":"#/components/schemas/promotions-promotionExcludeCatalogIndexItems"},"excludeCatalogFilterIds":{"$ref":"#/components/schemas/promotions-promotionExcludeCatalogFilterIds"},"excludeCatalogFilterQuery":{"$ref":"#/components/schemas/promotions-promotionExcludeCatalogQuery"},"activationLimitGlobalType":{"$ref":"#/components/schemas/promotions-activationLimitGlobalType"},"activationLimitGlobalLimit":{"$ref":"#/components/schemas/promotions-activationLimitGlobalLimit"},"activationLimitGlobalRelativeMinutes":{"$ref":"#/components/schemas/promotions-activationLimitGlobalRelativeMinutes"},"storeCatalog":{"$ref":"#/components/schemas/promotions-promotionStoreCatalog"},"storeItemType":{"$ref":"#/components/schemas/promotions-promotionStoreItemType"},"storeIds":{"$ref":"#/components/schemas/promotions-promotionStoreIds"},"targetType":{"$ref":"#/components/schemas/promotions-promotionTargetType"},"targetSegment":{"$ref":"#/components/schemas/promotions-promotionTargetSegment"},"price":{"$ref":"#/components/schemas/promotions-promotionPrice"},"priority":{"$ref":"#/components/schemas/promotions-promotionPriority"},"voucherPool":{"$ref":"#/components/schemas/promotions-VoucherPool"},"importHash":{"$ref":"#/components/schemas/promotions-promotionImportHash"}}},"promotions-promotionDataResponse":{"type":"object","description":"Details of the promotion","properties":{"uuid":{"$ref":"#/components/schemas/promotions-promotionUuid"},"code":{"$ref":"#/components/schemas/promotions-promotionCode"},"status":{"$ref":"#/components/schemas/promotions-promotionVisibility"},"type":{"$ref":"#/components/schemas/promotions-promotionType"},"redeemLimitPerClient":{"$ref":"#/components/schemas/promotions-promotionRedeemLimitPerClient"},"redeemQuantityPerActivation":{"$ref":"#/components/schemas/promotions-promotionRedeemQuantity"},"redeemLimitGlobal":{"$ref":"#/components/schemas/promotions-promotionRedeemLimitGlobal"},"activationLimitGlobalType":{"$ref":"#/components/schemas/promotions-activationLimitGlobalType"},"activationLimitGlobalLimit":{"$ref":"#/components/schemas/promotions-activationLimitGlobalLimit"},"activationLimitGlobalCounter":{"$ref":"#/components/schemas/promotions-activationLimitGlobalCounter"},"activationLimitGlobalRelativeMinutes":{"$ref":"#/components/schemas/promotions-activationLimitGlobalRelativeMinutes"},"activationLimitGlobalReached":{"$ref":"#/components/schemas/promotions-activationLimitGlobalReached"},"redeemType":{"$ref":"#/components/schemas/promotions-promotionRedeemType"},"discountType":{"$ref":"#/components/schemas/promotions-promotionDiscountType"},"details":{"$ref":"#/components/schemas/promotions-promotionDetails"},"discountValue":{"$ref":"#/components/schemas/promotions-promotionDiscountValue"},"discountMode":{"$ref":"#/components/schemas/promotions-promotionDiscountMode"},"discountModeDetails":{"$ref":"#/components/schemas/promotions-promotionDiscountModeDetails"},"preDiscountValue":{"$ref":"#/components/schemas/promotions-promotionPreDiscountValue"},"requireRedeemedPoints":{"$ref":"#/components/schemas/promotions-promotionRequirePoints"},"headerName":{"$ref":"#/components/schemas/promotions-promotionHeaderName"},"headerDescription":{"$ref":"#/components/schemas/promotions-promotionHeaderDescription"},"name":{"$ref":"#/components/schemas/promotions-promotionName"},"headline":{"$ref":"#/components/schemas/promotions-promotionHeadline"},"description":{"$ref":"#/components/schemas/promotions-promotionDescription"},"images":{"$ref":"#/components/schemas/promotions-promotionImages"},"tags":{"$ref":"#/components/schemas/promotions-promotionTags"},"createdAt":{"$ref":"#/components/schemas/promotions-objectCreatedAt"},"startAt":{"$ref":"#/components/schemas/promotions-promotionStartAt"},"expireAt":{"$ref":"#/components/schemas/promotions-promotionExpireAt"},"displayFrom":{"$ref":"#/components/schemas/promotions-promotionDisplayFrom"},"displayTo":{"$ref":"#/components/schemas/promotions-promotionDisplayTo"},"lastingTime":{"$ref":"#/components/schemas/promotions-promotionLastingTime"},"params":{"$ref":"#/components/schemas/promotions-promotionParams"},"itemScope":{"$ref":"#/components/schemas/promotions-promotionItemScope"},"minBasketValue":{"$ref":"#/components/schemas/promotions-promotionMinBasket"},"maxBasketValue":{"$ref":"#/components/schemas/promotions-promotionMaxBasket"},"catalog":{"$ref":"#/components/schemas/promotions-promotionCatalog"},"catalogItemType":{"$ref":"#/components/schemas/promotions-promotionCatalogItemType"},"catalogIndexItems":{"$ref":"#/components/schemas/promotions-promotionCatalogIndexItems"},"catalogFilterIds":{"$ref":"#/components/schemas/promotions-promotionCatalogFilterIds"},"catalogFilterQuery":{"$ref":"#/components/schemas/promotions-promotionCatalogQuery"},"storeCatalog":{"$ref":"#/components/schemas/promotions-promotionStoreCatalog"},"storeItemType":{"$ref":"#/components/schemas/promotions-promotionStoreItemType"},"storeIds":{"$ref":"#/components/schemas/promotions-promotionStoreIds"},"targetType":{"$ref":"#/components/schemas/promotions-promotionTargetType"},"targetSegment":{"$ref":"#/components/schemas/promotions-promotionTargetSegment"},"price":{"$ref":"#/components/schemas/promotions-promotionPrice"},"priority":{"$ref":"#/components/schemas/promotions-promotionPriority"},"metric":{"$ref":"#/components/schemas/promotions-promotionMetric"},"importHash":{"$ref":"#/components/schemas/promotions-promotionImportHash"}}},"promotions-promotionClientPossibleToRedeemResponse":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/promotions-promotionCode"},"possibleRedeems":{"$ref":"#/components/schemas/promotions-assignmentPossibleRedeems"},"lastingAt":{"$ref":"#/components/schemas/promotions-assignmentLastingAt"}}},"promotions-promotionClientDataResponse":{"type":"object","description":"Details of a promotion","properties":{"uuid":{"$ref":"#/components/schemas/promotions-promotionUuid"},"code":{"$ref":"#/components/schemas/promotions-promotionCode"},"status":{"$ref":"#/components/schemas/promotions-assignmentStatus"},"type":{"$ref":"#/components/schemas/promotions-promotionType"},"redeemLimitPerClient":{"$ref":"#/components/schemas/promotions-promotionRedeemLimitPerClient"},"redeemQuantityPerActivation":{"$ref":"#/components/schemas/promotions-promotionRedeemQuantity"},"currentRedeemedQuantity":{"$ref":"#/components/schemas/promotions-assignmentCurrentRedeemedQuantity"},"currentRedeemedLimit":{"$ref":"#/components/schemas/promotions-assignmentCurrentRedeemedLimit"},"activationCounter":{"$ref":"#/components/schemas/promotions-assignmentActivationCounter"},"possibleRedeems":{"$ref":"#/components/schemas/promotions-assignmentPossibleRedeems"},"details":{"$ref":"#/components/schemas/promotions-promotionDetailsShort"},"discountType":{"$ref":"#/components/schemas/promotions-promotionDiscountType"},"discountValue":{"$ref":"#/components/schemas/promotions-promotionDiscountValue"},"discountMode":{"$ref":"#/components/schemas/promotions-promotionDiscountMode"},"discountModeDetails":{"$ref":"#/components/schemas/promotions-promotionDiscountModeDetails"},"requireRedeemedPoints":{"$ref":"#/components/schemas/promotions-promotionRequirePoints"},"name":{"$ref":"#/components/schemas/promotions-promotionName"},"headline":{"$ref":"#/components/schemas/promotions-promotionHeadline"},"description":{"$ref":"#/components/schemas/promotions-promotionDescription"},"images":{"$ref":"#/components/schemas/promotions-promotionImages"},"tags":{"$ref":"#/components/schemas/promotions-promotionTags"},"startAt":{"$ref":"#/components/schemas/promotions-promotionStartAt"},"expireAt":{"$ref":"#/components/schemas/promotions-promotionExpireAt"},"displayFrom":{"$ref":"#/components/schemas/promotions-promotionDisplayFrom"},"displayTo":{"$ref":"#/components/schemas/promotions-promotionDisplayTo"},"assignedAt":{"$ref":"#/components/schemas/promotions-assignmentAssignedAt"},"lastingTime":{"$ref":"#/components/schemas/promotions-promotionLastingTime"},"lastingAt":{"$ref":"#/components/schemas/promotions-assignmentLastingAt"},"params":{"$ref":"#/components/schemas/promotions-promotionParams"},"catalogIndexItems":{"$ref":"#/components/schemas/promotions-promotionCatalogIndexItems"},"price":{"$ref":"#/components/schemas/promotions-promotionPrice"},"priority":{"$ref":"#/components/schemas/promotions-promotionPriority"},"itemScope":{"$ref":"#/components/schemas/promotions-promotionItemScope"},"minBasketValue":{"$ref":"#/components/schemas/promotions-promotionMinBasket"},"maxBasketValue":{"$ref":"#/components/schemas/promotions-promotionMaxBasket"},"vouchers":{"$ref":"#/components/schemas/promotions-VoucherList"}}},"promotions-saleSettings":{"type":"object","nullable":true,"description":"Settings for sales","properties":{"discountSourceType":{"$ref":"#/components/schemas/promotions-discountSourceType"},"clientIdCardType":{"$ref":"#/components/schemas/promotions-clientIdCardType"},"handbillCheckout":{"$ref":"#/components/schemas/promotions-handbillCheckout"},"priceValueBaseStrategy":{"$ref":"#/components/schemas/promotions-priceValueBaseStrategy"},"combineBasketDiscounts":{"$ref":"#/components/schemas/promotions-combineBasketDiscounts"},"discountOrder":{"$ref":"#/components/schemas/promotions-discountOrder"},"returnFields":{"$ref":"#/components/schemas/promotions-returnFields"}}},"promotions-lockSettings":{"type":"object","nullable":true,"description":"Settings for locks","required":["lockPromotionRequestByIdentifier"],"properties":{"promotionRequestedLockTtl":{"$ref":"#/components/schemas/promotions-promotionRequestedLockTtl"},"processSalePromotionActivationLockWaitTime":{"$ref":"#/components/schemas/promotions-processSalePromotionActivationLockWaitTime"},"lockPromotionRequestByIdentifier":{"$ref":"#/components/schemas/promotions-lockPromotionRequestByIdentifier"}}},"promotions-promotionLastingOnly":{"description":"When set to `true`, filters to promotions that are currently active and those that were not yet activated.","type":"boolean","nullable":true,"default":true},"promotions-restorePointsOnProfileDeactivation":{"type":"boolean","description":"When set to `true` and you use the method which [deactivates all promotions for a profile](#operation/deactivateAllPromotions), the points taken for activation of the promotion will be restored.","nullable":true,"default":true},"promotions-allowRedeemCompletionWhenBlocked":{"type":"boolean","description":"When set to `true`, the profile can complete the redemption of promotions that had been activated before a lock was put on that profile.","nullable":true,"default":false},"promotions-promotionRequestedLockTtl":{"type":"number","description":"The time in seconds for which promotion deactivation will be blocked after a POS request.","default":60},"promotions-processSalePromotionActivationLockWaitTime":{"type":"number","description":"The time in seconds that the system will wait and retry to acquire a promotion activation lock during the process sale operation."},"promotions-lockPromotionRequestByIdentifier":{"type":"boolean","description":"Indicates if POS should provide the `lockIdentifier`, which puts a lock on promotion fetching the promotion list. This identifier can be sent when using the [Get Profile promotions by a custom filter](#operation/GetClientPromotionsByACustomFilter) endpoint.","nullable":false},"promotions-promotionPresentOnly":{"description":"When set to `false`, expired promotions are included in the response.","type":"boolean","nullable":true,"default":true},"promotions-promotionDisplayableOnly":{"description":"When set to `true`, filters to promotions that are currently configured to be displayed (by `displayFrom` and `displayTo` dates).","type":"boolean","nullable":true,"default":true},"promotions-promotionCheckExistsInTarget":{"nullable":true,"type":"boolean","default":true,"description":"When set to `true`, the profile must exist within the target segmentation."},"promotions-promotionStatusArray":{"type":"array","description":"Promotion filter by assignment status","nullable":true,"items":{"$ref":"#/components/schemas/promotions-assignmentStatus"}},"promotions-promotionTargetArray":{"type":"array","description":"Promotion filter by target type","nullable":true,"items":{"$ref":"#/components/schemas/promotions-promotionTargetType"}},"promotions-promotionTagArray":{"type":"array","description":"Promotion filter by promotion tags","nullable":true,"items":{"type":"string"}},"promotions-promotionListWhere":{"type":"object","description":"Promotion filter","properties":{"excludeIds":{"type":"array","description":"IDs of promotions to exclude from the list","nullable":true,"items":{"type":"integer","example":3}},"handbillPromotionIds":{"type":"array","description":"Handbill promotion IDs to include","nullable":true,"items":{"type":"integer","example":3}},"visibilityStatus":{"type":"array","description":"Filter by visibility status","nullable":true,"items":{"$ref":"#/components/schemas/promotions-promotionVisibility"}},"status":{"$ref":"#/components/schemas/promotions-promotionStatusArray"},"statusByType":{"type":"object","description":"Filter by a combination of promotion type and status","properties":{"GENERAL":{"$ref":"#/components/schemas/promotions-promotionStatusArray"},"CUSTOM":{"$ref":"#/components/schemas/promotions-promotionStatusArray"},"MEMBERS_ONLY":{"$ref":"#/components/schemas/promotions-promotionStatusArray"},"HANDBILL":{"$ref":"#/components/schemas/promotions-promotionStatusArray"}}},"target":{"$ref":"#/components/schemas/promotions-promotionTargetArray"},"targetByType":{"type":"object","description":"Filter by a combination of promotion type and target","properties":{"GENERAL":{"$ref":"#/components/schemas/promotions-promotionTargetArray"},"CUSTOM":{"$ref":"#/components/schemas/promotions-promotionTargetArray"},"MEMBERS_ONLY":{"$ref":"#/components/schemas/promotions-promotionTargetArray"},"HANDBILL":{"$ref":"#/components/schemas/promotions-promotionTargetArray"}}},"type":{"type":"array","description":"Filter by promotion type","nullable":true,"items":{"$ref":"#/components/schemas/promotions-promotionType"}},"presentOnly":{"$ref":"#/components/schemas/promotions-promotionPresentOnly"},"lastingOnly":{"$ref":"#/components/schemas/promotions-promotionLastingOnly"},"displayableOnly":{"$ref":"#/components/schemas/promotions-promotionDisplayableOnly"},"checkExistsInTarget":{"$ref":"#/components/schemas/promotions-promotionCheckExistsInTarget"},"tagNames":{"$ref":"#/components/schemas/promotions-promotionTagArray"}}},"promotions-promotionListSort":{"type":"object","nullable":true,"description":"Promotion sorting settings","properties":{"forDBQuery":{"type":"array","description":"Sorting options for database queries (sort all promotions matched by the filter)","items":{"type":"object","properties":{"field":{"type":"string","description":"Field name to sort by","enum":["headerName","name","code","startAt","createdAt","updatedAt","expireAt","requireRedeemedPoints","type","priority","status"]},"direction":{"type":"string","description":"Sorting direction","enum":["asc","desc"]}}}}}},"promotions-promotionListFields":{"type":"array","description":"Fields to be returned in the promotion object","nullable":true,"items":{"type":"string"}},"promotions-promotionListLimit":{"type":"number","description":"The number of items to return per page"},"promotions-promotionListPage":{"type":"number","description":"Page number to return for pagination. The first page has the index `1`."},"promotions-promotionListLimitSetValues":{"type":"object","deprecated":true,"description":"Set values on promotions when returning list to profile"},"promotions-promotionsListFilter":{"type":"object","properties":{"setFieldsValues":{"$ref":"#/components/schemas/promotions-promotionListLimitSetValues"},"where":{"$ref":"#/components/schemas/promotions-promotionListWhere"},"fields":{"$ref":"#/components/schemas/promotions-promotionListFields"},"sort":{"$ref":"#/components/schemas/promotions-promotionListSort"},"page":{"$ref":"#/components/schemas/promotions-promotionListPage"},"limit":{"$ref":"#/components/schemas/promotions-promotionListLimit"}}},"promotions-promotionListSettings":{"type":"object","nullable":true,"description":"Filter for promotions in [`/promotion/get-for-client-by-custom-settings/{identifierType}/{identifierValue}`](#operation/GetClientPromotionsByACustomFilter) method","allOf":[{"$ref":"#/components/schemas/promotions-promotionsListFilter"}]},"promotions-promotionAssignmentSettings":{"type":"object","nullable":true,"description":"Filter for promotions in [`/promotion/get-for-client/{identifierType}/{identifierValue}/handbill/{handbillUuid}`](#operation/getAssignHandbillForClient_GET) method","allOf":[{"$ref":"#/components/schemas/promotions-promotionsListFilter"}]},"promotions-expression":{"type":"string","nullable":true,"format":"uuid","description":"Expression UUID which will be used to count the balance of loyalty points in the promotion activation endpoint."},"promotions-blockTag":{"type":"string","description":"Tag name which marks a profile as blocked. Blocked profiles do not receive promotions in POS methods and are not allowed to activate new promotions.","nullable":true,"example":"BLOCKED"},"promotions-codePrefix":{"type":"string","description":"Prefix which will be added to promotion code, when `enableCodeGeneration` is set to true","nullable":true,"example":"SYN"},"promotions-enableCodeGeneration":{"type":"boolean","description":"Flag which indicates if promotion code should be generated as ordinal number prefixed with prefix defined in `codePrefix`","nullable":true,"example":true},"promotions-handbillUuidsForCheckout":{"type":"array","description":"Handbill UUIDs to use for checkout couponing","nullable":true,"items":{"type":"string","format":"uuid"}},"promotions-codeGeneration":{"type":"object","description":"Checkout code generation options","nullable":true,"properties":{"prefix":{"type":"string","description":"Prefix added to each code"},"length":{"type":"integer","default":36,"description":"Length of the random code to generate"},"crc":{"type":"boolean","description":"When `true`, a CRC string is added to the end of the code"}}},"promotions-checkoutSettings":{"type":"object","description":"Handbill checkout settings","nullable":true,"properties":{"handbillUuidsForCheckout":{"$ref":"#/components/schemas/promotions-handbillUuidsForCheckout"},"codeGeneration":{"$ref":"#/components/schemas/promotions-codeGeneration"}}},"promotions-pointsExpression":{"type":"string","format":"uuid","description":"UUID of expression that defines how the points should be calculated when evaluating sender points balance","example":"2395fc33-f2f0-420c-8e7b-0ac63c3454de"},"promotions-pointsSenderSegments":{"type":"array","nullable":true,"description":"IDs of the Profile segmentations that can participate in point transfers as senders","items":{"type":"string"}},"promotions-pointsRecipientSegments":{"type":"array","nullable":true,"description":"IDs of the Profile segmentations that can participate in point transfers as recipients","items":{"type":"string"}},"promotions-pointsRecipient":{"type":"object","description":"Point recipient settings","properties":{"segments":{"$ref":"#/components/schemas/promotions-pointsRecipientSegments"}}},"promotions-pointsSender":{"type":"object","description":"Point sender settings","properties":{"segments":{"$ref":"#/components/schemas/promotions-pointsSenderSegments"}}},"promotions-transferSettings":{"type":"array","minItems":1,"maxItems":1,"description":"Settings for point transfers","items":{"type":"object","properties":{"expression":{"$ref":"#/components/schemas/promotions-pointsExpression"},"recipient":{"$ref":"#/components/schemas/promotions-pointsRecipient"},"sender":{"$ref":"#/components/schemas/promotions-pointsSender"}}}},"promotions-cashbackSettingsLimit":{"type":"object","nullable":true,"description":"Defines the limits on cashback usage","properties":{"minPoints":{"type":"integer","nullable":true,"minimum":1,"description":"The minimum number of points required to spend for cashback. If null - there is no limit defined.","example":10},"maxPoints":{"type":"integer","nullable":true,"minimum":1,"description":"The maximum number of points allowed to spend for cashback. If null - there is no limit defined.","example":1000},"maxTransactionAmount":{"type":"number","nullable":true,"minimum":0.01,"description":"Maximum amount in local currency to redeem in a transaction. If null - there is no limit defined.","example":20},"maxTransactionPercentage":{"type":"number","nullable":true,"description":"Defines how much (in percent) of the total transaction amount can be treated as cashback. If null - there is no limit defined.","example":50,"minimum":0.01,"maximum":100}}},"promotions-cashbackSettings":{"type":"object","description":"Settings for cashback mechanism","nullable":true,"required":["exchangeRate"],"properties":{"exchangeRate":{"type":"number","minimum":0.0001,"description":"Defines how much currency corresponds to one point. For example, if the currency is PLN and exchangeRate is 2, then 1 point equals 2 PLN."},"limits":{"$ref":"#/components/schemas/promotions-cashbackSettingsLimit"}}},"promotions-promotionError":{"type":"object","description":"Details of errors that occurred during promotion activation","properties":{"key":{"type":"string","description":"Type of promotion identifier","enum":["uuid","code"]},"value":{"type":"string","description":"Value of the selected identifier"},"error":{"$ref":"#/components/schemas/promotions-PromotionActivationErrorSchema"}}},"promotions-discountSourceType":{"type":"integer","nullable":true,"description":"The type which is assigned to discounts to differentiate which ones come from Synerise when using the Process Basket/Checkout endpoints.","example":0},"promotions-clientIdCardType":{"type":"integer","nullable":true,"description":"The type of card which is used for extracting profile identification data","example":0},"promotions-handbillCheckout":{"type":"string","format":"uuid","nullable":true,"description":"UUID of the Handbill which is used to generate promotions in the Process Checkout endpoints"},"promotions-combineBasketDiscounts":{"type":"boolean","description":"If `true`, basket discounts are combined.","default":false},"promotions-discountOrder":{"type":"object","description":"Discount order settings","properties":{"strategy":{"$ref":"#/components/schemas/promotions-discountOrderStrategy"},"direction":{"$ref":"#/components/schemas/promotions-discountOrderDirection"}}},"promotions-discountOrderStrategy":{"type":"string","description":"The strategy defines the order of applying discounts. The direction is set in `direction`.","default":"DISCOUNT_VALUE","enum":["DISCOUNT_VALUE","PRIORITY"]},"promotions-discountOrderDirection":{"type":"string","description":"Direction of the discount order within the strategy selected in `strategy`.","default":"desc","enum":["asc","desc"]},"promotions-priceValueBaseStrategy":{"type":"string","default":"MUTABLE","description":"\nThis strategy defines how basket discount values are calculated in the Process Basket endpoints.\n\n- If the CONSTANT strategy is chosen, the discounts are always calculated based on the evidPrice of the item.\n- If the MUTABLE strategy is chosen, the price of an item is updated after each promotion assignment and it is treated as a base for calculating the discounts that follow.\n\n**Example:** One basket with two promotions (20%, 30%) and one item with a price of 1.00.\n\n- When the CONSTANT strategy is chosen, the discounts are always subtracted from evidPrice=1.00, so the effective discounts are 0.20 and 0.30. The final price is 0.50.\n- When the MUTABLE strategy is chosen, the discounts are calculated using the updated item price, so applying them in order (20%, 30%) is done in the following way:\n  1. `20% of 1.00 = 0.20, *updated price* = 0.80`\n  2. `30% of *updated price* = 30% * 0.80 = 0.24`\n  3. The final price is `1.00 - 0.20 - 0.24 = 0.56`\n\n  To define the order of applying promotions, use the `discountOrder` object.\n","enum":["CONSTANT","MUTABLE"]},"promotions-returnFields":{"type":"array","items":{"type":"string"},"description":"An array of promotion fields which should be returned in the Process Basket endpoints in the `transactionItems.grantedDiscounts` object."},"promotions-discountSource":{"type":"object","description":"Source of the discount","required":["type","id"],"properties":{"type":{"type":"integer","description":"\nBy default:\n\n- `1` for promotions from your own database\n\n- `2` for promotions from your Synerise Workspace\n"},"id":{"type":"string","description":"ID of the promotion in the source domain, for example a promotion code"}}},"promotions-HTTP200withMessage":{"type":"object","properties":{"message":{"type":"string","description":"Short summary of the response"}}},"promotions-PromotionCreateUpdateDeleteRes":{"type":"object","properties":{"message":{"type":"string","description":"Short summary of the response"},"data":{"$ref":"#/components/schemas/promotions-promotionDataResponse"}}},"promotions-Viewpromotiondetails-HTTP200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/promotions-promotionDataResponse"}}},"promotions-BatchErrorItems":{"type":"array","description":"A list of redemption errors","items":{"$ref":"#/components/schemas/promotions-BatchError"}},"promotions-ErrorSchema":{"type":"object","description":"Error details","properties":{"errorCode":{"allOf":[{"$ref":"#/components/schemas/promotions-ErrorV2Code"},{"example":"VLD-080"}]},"message":{"allOf":[{"$ref":"#/components/schemas/promotions-ErrorV2Message"},{"example":"String fails to match the required pattern"}]},"source":{"type":"object","description":"The entity which caused a problem","properties":{"pointer":{"type":"string","description":"Pointer to the wrong element"}}}}},"promotions-BatchError":{"type":"object","description":"Error that occurred and data source index","properties":{"source":{"type":"object","description":"Identifier of the item which caused the error","properties":{"index":{"type":"integer","example":1,"description":"Index of an item which failed"}}},"errorCode":{"allOf":[{"$ref":"#/components/schemas/promotions-ErrorV2Code"},{"example":"ERR-002"}]},"message":{"allOf":[{"$ref":"#/components/schemas/promotions-ErrorV2Message"},{"example":"Invalid data"}]},"httpStatus":{"allOf":[{"$ref":"#/components/schemas/promotions-ErrorV2HttpStatus"},{"example":404}]},"help":{"type":"string","nullable":true,"description":"Currently unused"},"details":{"type":"object","nullable":true,"description":"Additional error context, for example the identifier of the entity that caused the failure"},"errors":{"type":"array","description":"Error details","items":{"$ref":"#/components/schemas/promotions-ErrorSchema"}}}},"promotions-VouchersListWithErrors":{"type":"object","description":"List of errors","properties":{"httpStatus":{"allOf":[{"$ref":"#/components/schemas/promotions-ErrorV2HttpStatus"},{"default":207,"example":207}]},"traceId":{"type":"string","description":"Trace ID for troubleshooting","example":"c72d530fd1b813ae"},"timestamp":{"type":"string","format":"date-timed","description":"Time when the error occurred","example":"2021-12-28T08:27:54.549Z"},"errorCode":{"allOf":[{"$ref":"#/components/schemas/promotions-ErrorV2Code"},{"default":"ERR-003"}]},"message":{"allOf":[{"$ref":"#/components/schemas/promotions-ErrorV2Message"},{"default":"Batch operation failed"}]},"errors":{"$ref":"#/components/schemas/promotions-BatchErrorItems"},"data":{"$ref":"#/components/schemas/promotions-VoucherList"}}},"promotions-Quantity":{"description":"Quantity of redeemed items","type":"integer","example":2,"default":1},"promotions-SourceId":{"description":"The source of redemption. It should be unique to ensure that redemptions are successfully deduplicated when retried. Example: a concatenation of receipt ID and index of the discounted transaction line on the receipt.","type":"string","example":"3f0a1670-eb63-43f1-a6b8-895a74621964-3"},"promotions-OrderId":{"description":"Receipt ID for which the voucher was redeemed.","type":"string","example":"3f0a1670-eb63-43f1-a6b8-895a74621964"},"promotions-VoucherPool":{"type":"object","description":"Settings for assigning codes from a voucher pool when the promotion is activated. When this is used, a promotion can only be redeemed once per activation.","properties":{"enabled":{"type":"boolean","default":false,"description":"Enables automatic assignment of codes from the pool when the promotion is activated."},"uuid":{"type":"string","format":"uuid","description":"UUID of the voucher pool"},"transferable":{"type":"boolean","default":false,"description":"When `true`, the voucher can be redeemed by a different user than the one who activated the promotion."}}},"promotions-VoucherKey":{"type":"string","example":"code","description":"Type of voucher identifier","enum":["code"]},"promotions-VoucherValue":{"description":"Value of the selected identifier","type":"string","example":"434428563"},"promotions-VoucherRedeemOptions":{"type":"object","description":"Additional options of the operation","properties":{"quantity":{"$ref":"#/components/schemas/promotions-Quantity"},"sourceId":{"$ref":"#/components/schemas/promotions-SourceId"},"orderId":{"$ref":"#/components/schemas/promotions-OrderId"}}},"promotions-RedeemVoucherForProfile":{"type":"object","required":["profileKey","profileValue","voucherKey","voucherValue"],"properties":{"profileKey":{"$ref":"#/components/schemas/promotions-clientKey"},"profileValue":{"$ref":"#/components/schemas/promotions-clientKeyValue"},"voucherKey":{"$ref":"#/components/schemas/promotions-VoucherKey"},"voucherValue":{"$ref":"#/components/schemas/promotions-VoucherValue"},"options":{"$ref":"#/components/schemas/promotions-VoucherRedeemOptions"}}},"promotions-RedeemVouchersForProfileRequest":{"type":"array","description":"Vouchers to redeem","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/promotions-RedeemVoucherForProfile"}},"promotions-RedeemVouchersRequest":{"type":"array","description":"Vouchers to redeem","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/promotions-RedeemVoucher"}},"promotions-RedeemVoucher":{"required":["voucherKey","voucherValue"],"type":"object","properties":{"options":{"$ref":"#/components/schemas/promotions-VoucherRedeemOptions"},"voucherKey":{"$ref":"#/components/schemas/promotions-VoucherKey"},"voucherValue":{"$ref":"#/components/schemas/promotions-VoucherValue"}},"example":{"voucherKey":"code","voucherValue":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","options":{"quantity":1,"sourceId":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1","orderId":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9-1","lockIdentifier":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9"}}},"promotions-RedeemPromotionsRequest":{"required":["code","clientKey","clientKeyValue"],"type":"object","properties":{"code":{"type":"string","example":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","description":"Promotion code"},"clientKey":{"$ref":"#/components/schemas/promotions-clientKey"},"clientKeyValue":{"$ref":"#/components/schemas/promotions-clientKeyValue"},"quantity":{"description":"Quantity of redeemed items","type":"integer","example":2,"default":1},"sourceId":{"description":"The source of redemption. It should be unique for the source of promotion to ensure that redemptions are successfully deduplicated when retried. Example: a concatenation of receipt ID and index of the discounted transaction line on the receipt.","type":"string","example":"3f0a1670-eb63-43f1-a6b8-895a74621964-3"},"orderId":{"description":"Receipt ID for which the promotion was redeemed. It's required when using step promotions. The order ID will be used to check if requirements of granting a step promotion are fulfilled.","type":"string","example":"3f0a1670-eb63-43f1-a6b8-895a74621964"},"lockIdentifier":{"description":"Identifier of the \"promotion requested\" lock which will be released when the promotion is redeemed. This kind of lock blocks a profile from requesting new promotions and can be applied when using the [Get Profile promotions by a custom filter](#operation/GetClientPromotionsByACustomFilter) endpoint.","type":"string","example":"6561d87b-2697-46ad-8f9a-0550736b86e3"}},"example":{"code":"75d9090f-06ac-46a2-a0ce-4b8eb287efb9","clientKey":"clientId","clientKeyValue":"434428563"}},"promotions-promotionActivation":{"required":["key","value"],"type":"object","properties":{"key":{"type":"string","description":"Type of promotion identifier","enum":["uuid","code"]},"value":{"type":"string","description":"Value of the selected identifier"},"pointsToUse":{"nullable":true,"type":"integer","minimum":0,"description":"How many points should be converted to digital money and stored as ready to redeem in transactions in digital cashback promotions."}},"example":{"key":"code","value":"7893467834GG","pointsToUse":100}},"promotions-promotionActivationProcessSale":{"required":["key","value","pointsToUse"],"type":"object","properties":{"key":{"type":"string","description":"Type of promotion identifier","enum":["uuid","code"]},"value":{"type":"string","description":"Value of the selected identifier"},"pointsToUse":{"type":"integer","minimum":0,"description":"How many points should be converted to digital money and stored as ready to redeem in transactions in digital cashback promotions."}},"example":{"key":"code","value":"7893467834GG","pointsToUse":100}},"promotions-PromotionResponseMessage":{"type":"object","properties":{"message":{"type":"string","description":"Short summary of the response"}}},"promotions-duplicatePromotionRequest":{"type":"object","properties":{"uuid":{"type":"string","description":"Promotion UUID"},"code":{"type":"string","description":"Promotion code"}}},"promotions-operationId":{"type":"integer","description":"Operation ID","nullable":false},"promotions-clientDateTime":{"type":"string","format":"date-time","description":"Operation's start time"},"promotions-terminal":{"type":"object","description":"Data about the terminal that is the transaction's source","required":["storeId","posId"],"properties":{"storeId":{"type":"string","description":"ID of the store"},"posId":{"type":"integer","description":"ID of the point of sale (POS)"}}},"promotions-transactionMetric":{"type":"object","description":"Metadata of the transaction","required":["posTransactionId","beginDateTime","globalTransactionId"],"properties":{"posTransactionId":{"type":"integer","description":"ID of the transaction within the POS"},"beginDateTime":{"format":"date-time","description":"Time when the transaction starts"},"globalTransactionId":{"type":"string","description":"Global transaction ID","nullable":true}}},"promotions-finalValue":{"type":"string","description":"The total cost of all items in the basket, after discounts, including tax"},"promotions-promotionErrors":{"type":"array","description":"Array of promotion errors","items":{"$ref":"#/components/schemas/promotions-promotionError"}},"promotions-grantedDiscount":{"type":"object","required":["source","priceDiscount"],"properties":{"source":{"$ref":"#/components/schemas/promotions-discountSource"},"priceDiscount":{"type":"string","description":"The amount subtracted from `evidPrice`","pattern":"^\\d+\\.\\d{1,2}$","example":"12.45"}}},"promotions-transactionAdditionalItem":{"type":"object","required":["seqNo","type","code"],"properties":{"seqNo":{"type":"integer","description":"Sequential number of additional item"},"type":{"type":"string","description":"Type of the additional item","enum":["COUPON"]},"code":{"type":"string","description":"Code of the additional item"}}},"promotions-transactionItemWithGrants":{"type":"object","required":["seqNo","articleRef","quantity","evidPrice","finalPrice","finalValue","grantedDiscounts"],"properties":{"seqNo":{"$ref":"#/components/schemas/promotions-TransactionItemSeqNo"},"articleRef":{"$ref":"#/components/schemas/promotions-TransactionItemArticleRef"},"quantity":{"$ref":"#/components/schemas/promotions-TransactionItemQuantity"},"evidPrice":{"$ref":"#/components/schemas/promotions-TransactionItemEvidPrice"},"finalPrice":{"$ref":"#/components/schemas/promotions-TransactionItemFinalPrice"},"finalValue":{"$ref":"#/components/schemas/promotions-TransactionItemFinalValue"},"grantedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/promotions-grantedDiscount"},"description":"Array of granted discounts"}}},"promotions-transactionItemWithoutGrants":{"type":"object","required":["seqNo","articleRef","quantity","evidPrice","finalPrice","finalValue"],"properties":{"seqNo":{"$ref":"#/components/schemas/promotions-TransactionItemSeqNo"},"articleRef":{"$ref":"#/components/schemas/promotions-TransactionItemArticleRef"},"quantity":{"$ref":"#/components/schemas/promotions-TransactionItemQuantity"},"evidPrice":{"$ref":"#/components/schemas/promotions-TransactionItemEvidPrice"},"finalPrice":{"$ref":"#/components/schemas/promotions-TransactionItemFinalPrice"},"finalValue":{"$ref":"#/components/schemas/promotions-TransactionItemFinalValue"}}},"promotions-TransactionItemSeqNo":{"type":"integer","description":"Sequential number of transaction line item"},"promotions-TransactionItemArticleRef":{"type":"string","description":"Item's identifier in the product catalog"},"promotions-TransactionItemQuantity":{"type":"string","description":"Quantity of the product, provided to 3 decimal places","pattern":"^\\d+(\\.\\d{1,3})?$","example":"3.231"},"promotions-TransactionItemEvidPrice":{"type":"string","description":"Price per unit before discount, including tax","pattern":"^\\d+\\.\\d{1,2}$","example":"34.23"},"promotions-TransactionItemFinalPrice":{"type":"string","description":"Price per unit after discount, including tax","pattern":"^\\d+\\.\\d{1,2}$","example":"30.23"},"promotions-TransactionItemFinalValue":{"type":"string","description":"The total cost of the product: `finalValue = finalPrice * quantity`","pattern":"^\\d+\\.\\d{1,2}$","example":"123.23"},"promotions-paymentItem":{"type":"object","required":["seqNo","type","name","amount"],"properties":{"seqNo":{"type":"integer","description":"Sequential number of payment method"},"type":{"type":"integer","description":"Type of payment method (id in external dictionary)"},"name":{"type":"string","description":"Name of the payment method"},"amount":{"type":"string","description":"Amount of payment"},"hashCode":{"type":"string","description":"Hash code of payment method"}}},"promotions-paymentsReport":{"type":"object","description":"Payment information","required":["paymentItems"],"properties":{"paymentItems":{"type":"array","description":"Array of payment methods information","items":{"$ref":"#/components/schemas/promotions-paymentItem"}}}},"promotions-printout":{"type":"object","properties":{"source":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/promotions-discountSource"},"printoutType":{"type":"string","enum":["FREE_TEXT","COUPON"],"description":"Type of printout"},"printoutId":{"type":"string","description":"ID of printout in source domain"},"text":{"type":"string","description":"Printout information text. Default name of handbill configuration."},"variables":{"type":"array","items":{"$ref":"#/components/schemas/promotions-printoutVariable"}}}}}},"promotions-printoutVariable":{"type":"object","properties":{"type":{"type":"string","enum":["CODE"],"description":"Type of variable attached to printout"},"value":{"type":"string","description":"Value of the variable. Eg. code of coupon."}}},"promotions-processSaleReq":{"type":"object","required":["operationId","clientDateTime","terminal","transactionMetric","finalValue","transactionItems","transactionAdditionalItems"],"properties":{"operationId":{"$ref":"#/components/schemas/promotions-operationId"},"clientDateTime":{"$ref":"#/components/schemas/promotions-clientDateTime"},"terminal":{"$ref":"#/components/schemas/promotions-terminal"},"transactionMetric":{"$ref":"#/components/schemas/promotions-transactionMetric"},"finalValue":{"$ref":"#/components/schemas/promotions-finalValue"},"transactionItems":{"type":"array","items":{"$ref":"#/components/schemas/promotions-transactionItemWithoutGrants"},"description":"Array of transaction items"},"transactionAdditionalItems":{"type":"array","items":{"$ref":"#/components/schemas/promotions-transactionAdditionalItem"},"description":"Array of additional items in the transaction"},"promotionsToActivate":{"type":"array","items":{"$ref":"#/components/schemas/promotions-promotionActivationProcessSale"},"description":"Array of promotions to activate during the sale process"}}},"promotions-processCheckoutRes":{"type":"object","properties":{"responseCode":{"$ref":"#/components/schemas/promotions-responseCode"},"responseDescription":{"$ref":"#/components/schemas/promotions-responseDescription"},"operationId":{"$ref":"#/components/schemas/promotions-operationId"},"clientDateTime":{"$ref":"#/components/schemas/promotions-clientDateTime"},"terminal":{"$ref":"#/components/schemas/promotions-terminal"},"transactionGrantReport":{"type":"object","description":"Report of printouts related to the transaction","properties":{"printouts":{"type":"array","items":{"$ref":"#/components/schemas/promotions-printout"}}}}}},"promotions-processCheckoutReq":{"type":"object","required":["operationId","clientDateTime","terminal","transactionMetric","finalValue","transactionItems","transactionAdditionalItems","paymentsReport"],"properties":{"operationId":{"$ref":"#/components/schemas/promotions-operationId"},"clientDateTime":{"$ref":"#/components/schemas/promotions-clientDateTime"},"terminal":{"$ref":"#/components/schemas/promotions-terminal"},"transactionMetric":{"$ref":"#/components/schemas/promotions-transactionMetric"},"finalValue":{"$ref":"#/components/schemas/promotions-finalValue"},"transactionItems":{"type":"array","items":{"$ref":"#/components/schemas/promotions-transactionItemWithoutGrants"},"description":"Array of transaction items"},"transactionAdditionalItems":{"type":"array","items":{"$ref":"#/components/schemas/promotions-transactionAdditionalItem"},"description":"Array of additional items in the transaction"},"paymentsReport":{"$ref":"#/components/schemas/promotions-paymentsReport"}}},"promotions-processSaleRes":{"type":"object","properties":{"responseCode":{"$ref":"#/components/schemas/promotions-responseCode"},"responseDescription":{"$ref":"#/components/schemas/promotions-responseDescription"},"operationId":{"$ref":"#/components/schemas/promotions-operationId"},"clientDateTime":{"$ref":"#/components/schemas/promotions-clientDateTime"},"terminal":{"$ref":"#/components/schemas/promotions-terminal"},"transactionMetric":{"$ref":"#/components/schemas/promotions-transactionMetric"},"finalValue":{"$ref":"#/components/schemas/promotions-finalValue"},"promotionErrors":{"type":"array","items":{"$ref":"#/components/schemas/promotions-promotionErrors"}},"transactionItems":{"type":"array","items":{"$ref":"#/components/schemas/promotions-transactionItemWithGrants"},"description":"Array of processed transaction items"},"transactionAdditionalItem":{"type":"array","items":{"$ref":"#/components/schemas/promotions-transactionAdditionalItem"},"description":"Array of processed additional items, currently not used"},"transactionGrantReport":{"type":"array","description":"Report of printouts related to the transaction, currently not used","items":{}}}},"promotions-releaseLockRes":{"type":"object","properties":{"message":{"type":"string","example":"Lock release succeeded"}}},"promotions-createLockRes":{"type":"object","properties":{"callback":{"type":"string","description":"URI to call for lock release"}}},"promotions-promotionsSettingsBody":{"type":"object","properties":{"checkoutSettings":{"$ref":"#/components/schemas/promotions-checkoutSettings"},"enableCodeGeneration":{"$ref":"#/components/schemas/promotions-enableCodeGeneration"},"codePrefix":{"$ref":"#/components/schemas/promotions-codePrefix"},"blockTag":{"$ref":"#/components/schemas/promotions-blockTag"},"expression":{"$ref":"#/components/schemas/promotions-expression"},"promotionListSettings":{"$ref":"#/components/schemas/promotions-promotionListSettings"},"promotionAssignmentSettings":{"$ref":"#/components/schemas/promotions-promotionAssignmentSettings"},"restorePointsOnProfileDeactivation":{"$ref":"#/components/schemas/promotions-restorePointsOnProfileDeactivation"},"allowRedeemCompletionWhenBlocked":{"$ref":"#/components/schemas/promotions-allowRedeemCompletionWhenBlocked"},"saleSettings":{"$ref":"#/components/schemas/promotions-saleSettings"},"lockSettings":{"$ref":"#/components/schemas/promotions-lockSettings"},"transferSettings":{"$ref":"#/components/schemas/promotions-transferSettings"},"cashbackSettings":{"$ref":"#/components/schemas/promotions-cashbackSettings"}}},"promotions-handbillConfigUpdateRequest":{"type":"object","properties":{"channel":{"$ref":"#/components/schemas/promotions-handbillChannel"},"status":{"$ref":"#/components/schemas/promotions-handbillStatus"},"name":{"$ref":"#/components/schemas/promotions-handbillName"},"description":{"$ref":"#/components/schemas/promotions-handbillDescription"},"controlGroup":{"$ref":"#/components/schemas/promotions-handbillControlGroup"},"variants":{"$ref":"#/components/schemas/promotions-handbillVariants"}}},"promotions-handbillConfigCreateRequest":{"type":"object","required":["channel","status","name","description","controlGroup","variants"],"properties":{"channel":{"$ref":"#/components/schemas/promotions-handbillChannel"},"status":{"$ref":"#/components/schemas/promotions-handbillStatus"},"name":{"$ref":"#/components/schemas/promotions-handbillName"},"description":{"$ref":"#/components/schemas/promotions-handbillDescription"},"controlGroup":{"$ref":"#/components/schemas/promotions-handbillControlGroup"},"variants":{"$ref":"#/components/schemas/promotions-handbillVariants"}}},"promotions-handbillConfig":{"type":"object","description":"Details of a single handbill configuration","properties":{"uuid":{"$ref":"#/components/schemas/promotions-handbillUuid"},"createdAt":{"$ref":"#/components/schemas/promotions-objectCreatedAt"},"updatedAt":{"$ref":"#/components/schemas/promotions-objectUpdatedAt"},"channel":{"$ref":"#/components/schemas/promotions-handbillChannel"},"status":{"$ref":"#/components/schemas/promotions-handbillStatus"},"userId":{"$ref":"#/components/schemas/promotions-userId"},"origin":{"$ref":"#/components/schemas/promotions-handbillOrigin"},"name":{"$ref":"#/components/schemas/promotions-handbillName"},"description":{"$ref":"#/components/schemas/promotions-handbillDescription"},"controlGroup":{"$ref":"#/components/schemas/promotions-handbillControlGroup"},"variants":{"$ref":"#/components/schemas/promotions-handbillVariants"}}},"promotions-handbillConfigWithSimplifiedVariants":{"type":"object","description":"Details of a single handbill configuration","properties":{"uuid":{"$ref":"#/components/schemas/promotions-handbillUuid"},"createdAt":{"$ref":"#/components/schemas/promotions-objectCreatedAt"},"updatedAt":{"$ref":"#/components/schemas/promotions-objectUpdatedAt"},"channel":{"$ref":"#/components/schemas/promotions-handbillChannel"},"status":{"$ref":"#/components/schemas/promotions-handbillStatus"},"userId":{"$ref":"#/components/schemas/promotions-userId"},"origin":{"$ref":"#/components/schemas/promotions-handbillOrigin"},"name":{"$ref":"#/components/schemas/promotions-handbillName"},"description":{"$ref":"#/components/schemas/promotions-handbillDescription"},"controlGroup":{"$ref":"#/components/schemas/promotions-handbillControlGroup"},"variants":{"$ref":"#/components/schemas/promotions-handbillVariantsSimple"}}},"promotions-userId":{"type":"integer","description":"ID of the user who created this object or the last user who updated it, if applicable"},"promotions-handbillChannel":{"description":"Channel of the handbill.\n* CHECK_IN means that the promotions are offered before a purchase.\n* CHECK_OUT means that promotions are offered after a purchase, and can be used in a future transaction.\n* MOBILE is used to deliver promotions to a mobile application.","type":"string","enum":["MOBILE","CHECK_OUT","CHECK_IN"]},"promotions-handbillName":{"type":"string","description":"Name of the handbill configuration"},"promotions-promotionImportHash":{"type":"string","format":"uuid","nullable":true,"description":"Hash of the import"},"promotions-handbillDescription":{"type":"string","maxLength":65535,"description":"Description of the handbill configuration"},"promotions-handbillControlGroup":{"nullable":true,"description":"Details of the control group. A control group is the part of profiles who are not offered any promotions so their activity can be compared with promotion-enabled profiles to check a promotion's effectiveness.","type":"object","required":["name","percentage"],"properties":{"name":{"type":"string","description":"Name of the control group"},"percentage":{"$ref":"#/components/schemas/promotions-handbillVariantPercentage"}}},"promotions-handbillOrigin":{"type":"string","enum":["USER","PROFILE"],"description":"Informs if this object was created/updated by a User or a Workspace."},"promotions-handbillStatus":{"type":"string","description":"Status of the handbill","enum":["DRAFT","ACTIVE","INACTIVE"]},"promotions-handbillUuid":{"type":"string","format":"uuid","description":"UUID of the variant. Generated automatically."},"promotions-handbillVariantsSimple":{"type":"array","description":"Variants of the handbill configuration.","items":{"type":"object","description":"Handbill variant","properties":{"name":{"$ref":"#/components/schemas/promotions-handbillVariantName"},"uuid":{"$ref":"#/components/schemas/promotions-handbillVariantUuid"},"percentage":{"$ref":"#/components/schemas/promotions-handbillVariantPercentage"},"ai":{"$ref":"#/components/schemas/promotions-handbillVariantAi"}}}},"promotions-handbillVariants":{"type":"array","description":"Variants of the handbill configuration. If you do not want to use variants, send an empty array.","maxItems":10,"items":{"type":"object","description":"Handbill variant","required":["name","percentage","ai","limits","activity"],"properties":{"name":{"$ref":"#/components/schemas/promotions-handbillVariantName"},"uuid":{"$ref":"#/components/schemas/promotions-handbillVariantUuid"},"percentage":{"$ref":"#/components/schemas/promotions-handbillVariantPercentage"},"ai":{"$ref":"#/components/schemas/promotions-handbillVariantAi"},"limits":{"$ref":"#/components/schemas/promotions-handbillVariantLimits"},"activity":{"$ref":"#/components/schemas/promotions-handbillVariantActivity"},"printout":{"$ref":"#/components/schemas/promotions-handbillVariantPrintout"},"filterIds":{"type":"array","description":"An array of filter UUIDs","deprecated":true,"items":{"type":"string","format":"uuid"}},"types":{"$ref":"#/components/schemas/promotions-handbillVariantTypes"},"excludeByAvailableProducts":{"$ref":"#/components/schemas/promotions-handbillExcludeByAvailableProducts"},"slotFilters":{"$ref":"#/components/schemas/promotions-handbillVariantSlotFilters"},"distinctFilter":{"$ref":"#/components/schemas/promotions-handbillDistinctFilter"}}}},"promotions-handbillVariantName":{"type":"string","description":"Name of the variant"},"promotions-handbillVariantUuid":{"type":"string","format":"uuid","description":"UUID of the variant. Generated automatically. Do not send this field in create/update requests."},"promotions-handbillVariantAi":{"type":"object","description":"Additional configuration for the AI recommendations engine","required":["controlVariant"],"properties":{"controlVariant":{"type":"boolean","description":"When `true`, the promotions are assigned at random. When `false`, the promotions are assigned based on the AI recommendations settings: `varietyFactor`, `varietyGroupSize`,`redistributionFrequencyFactor`, `popularityBoosting`."},"varietyFactor":{"description":"Adjust the variety of returned promotions. The higher the number, the more variety. The choice of promotions is calculated by the AI.","type":"number","minimum":0,"maximum":1,"example":0.5},"varietyGroupSize":{"description":"Defines how many similar items may be recommended. This is calculated in according to `varietyFactor`.","type":"integer","minimum":1,"example":1},"redistributionFrequencyFactor":{"description":"Allows adjusting the frequency of promotion redistribution. The default value of 1 allows the model to decide how often to redistribute promotions. A value lower than 1 decreases redistribution frequency, a value higher than 1 increases it.","type":"number","minimum":0.5,"maximum":1.5,"example":0.5},"popularityBoosting":{"description":"Allows adjusting how important product popularity is for the promotions model. Higher values increase the importance.","type":"number","minimum":0,"maximum":1,"example":1}}},"promotions-handbillVariantLimits":{"type":"object","nullable":true,"description":"Daily redemption limits of this variant","properties":{"limitPerDay":{"type":"integer","description":"The maximum number of times each profile can redeem this handbill in a single day","example":6,"deprecated":true},"limitExceptions":{"type":"array","description":"Days of the week when the limits are different","nullable":true,"items":{"type":"object","required":["dayOfWeek","limitPerDay"],"properties":{"dayOfWeek":{"type":"integer","description":"Day of the week when the exception applies. \"1\" is Monday.","minimum":1,"maximum":7,"example":5},"limitPerDay":{"type":"integer","example":8,"description":"The maximum number of times each profile can redeem this promotion in the day defined for this exception."}}}},"limitsPerBasket":{"type":"array","description":"The minimum basket limits that should be met","nullable":true,"items":{"type":"object","required":["basketSize","basketValue","condition"],"properties":{"basketSize":{"type":"integer","description":"Minimum basket size","minimum":0,"example":12},"basketValue":{"type":"number","description":"Minimum basket value","minimum":0,"example":30.5},"condition":{"type":"string","description":"Condition if minimum values should be conjunction or alternative","enum":["AND","OR"]}}}},"limitExclusion":{"type":"array","description":"Items that should not be taken into consideration while calculating basket value and size","nullable":true,"items":{"type":"object","required":["catalogId"],"properties":{"catalogId":{"type":"number","description":"Catalog that the products and/or filters belong to","example":22424},"products":{"type":"array","description":"Products that should be excluded","nullable":true,"items":{"type":"string","description":"Product reference","example":"UGG-BB-PUR-06"}},"filters":{"type":"array","description":"Filter ids of products that should be excluded","nullable":true,"items":{"type":"string","description":"Filter ids","example":"7c1fbdf6-dd27-11ea-87d0-0242ac130003"}}}}}}},"promotions-handbillVariantActivity":{"type":"object","nullable":true,"description":"Defines how long the handbill promotions remain assigned to the profile after the handbill is generated.","properties":{"lastingType":{"type":"string","description":"Type of handbill expiration.","default":"RELATIVE","enum":["RELATIVE","CRON"]},"lasting":{"type":"object","description":"Defines a time period. Required if lastingType is `RELATIVE`.","required":["value","unit"],"properties":{"unit":{"description":"The time unit","enum":["HOURS","DAYS"]},"value":{"type":"integer","example":24,"description":"The amount of time units"}}},"cronWeekdays":{"type":"array","description":"Used when `\"lastingType\": \"CRON\"`. Array of week days when the handbill promotions expire","minItems":1,"items":{"type":"integer","minimum":0,"maximum":6,"description":"Day of the week in crontab notation (0 is Sunday, 6 is Saturday)"},"example":[0,1,6]},"cronTime":{"type":"string","description":"Used when `\"lastingType\": \"CRON\"`. Clock time in UTC when the handbill promotions expire, in HH:MM format.","pattern":"^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$","example":"12:34"},"lastingAt":{"type":"string","format":"date-time","description":"Used when `\"lastingType\": \"RELATIVE\"`. Time when the handbill expires."},"timeExclusions":{"type":"object","nullable":true,"required":["uuid"],"properties":{"uuid":{"type":"string","format":"uuid","example":"6a177f3e-748f-44d4-ac30-a457a5199685"}}}}},"promotions-handbillVariantPrintout":{"type":"object","description":"Details for printing the coupon","nullable":true,"required":["template"],"properties":{"template":{"type":"string","description":"Template in [Pug format](https://pugjs.org/api/getting-started.html). The template can contain references to variables in the definition of the promotion, for example `promotion.name`, `promotion.tags[1]`. You can also use the [Moment.js library](https://momentjs.com/). The `#{}` elements allow you to insert JS code with the scope limited to `promotion`, `moment`, and `JSON`.","example":"|#{promotion.name};#{promotion.discountType == 'EXACT_PRICE' ? 'Price':'Discount'} #{promotion.discountValue} #{promotion.discountType == 'PERCENT'? '%' : 'USD'};Valid for;#{moment.utc(coupon.createdAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')} - #{moment.utc(coupon.lastingAt).tz('Europe/Warsaw').format('DD.MM.YYYY HH:mm')};#{promotion.description};Discount for #{coupon.redeemLimit} items.;Single-use coupon. Get extra coupons with the app!"},"maxLineLength":{"type":"integer","description":"Maximum number of characters to print on a line","example":18},"newLineDelimiter":{"type":"string","description":"Line delimiter","example":";"}}},"promotions-handbillVariantTypes":{"type":"array","nullable":true,"description":"Array of promotions types which will be taken as promotion candidates to assign. When set to null, only promotions with HANDBILL type will be considered as candidates.  For type HANDBILL, promotions are assigned with lasting date calculated by `activity` settings in variant, so all get promotions endpoints consider those dates when filtering by `lastingOnly` flag. For other types than HANDBILL, promotions lasting date is only respected in `/get-for-client/handbill/:handbillUuid` endpoint. Other get promotions endpoints don't filter those promotions by `lastingOnly` flag.","items":{"type":"string","description":"Promotion type","enum":["MEMBERS_ONLY","HANDBILL","CUSTOM","GENERAL"]},"example":["MEMBERS_ONLY","HANDBILL"]},"promotions-handbillExcludeByAvailableProducts":{"description":"When `true`, promotions aren't generated for items which already belong to another assigned promotion.","type":"boolean","example":true,"default":true,"nullable":false},"promotions-handbillVariantSlotFilters":{"type":"object","description":"Slots to include in the coupon","nullable":true,"required":["order","slots"],"properties":{"order":{"type":"string","enum":["GIVEN","AI"],"description":"The type of slot ordering when they are returned, where:\n    `GIVEN` - slots are returned in the order they were created\n    `AI` - order of slots is changed by AI engine score"},"slots":{"type":"array","description":"Slots in the coupon. You can use them, for example, to create a slot that will only show promotions for a certain brand, and another for all the other brands. This is done by applying filters that include certain promotions.","maxItems":10,"items":{"type":"object","required":["filterId","limit"],"properties":{"filterId":{"description":"UUID of a filter with promotions","type":"string","format":"uuid"},"limit":{"description":"Number of promotions to be returned a in given slot","type":"number","minimum":1,"maximum":50,"example":5},"distinctFilter":{"$ref":"#/components/schemas/promotions-handbillDistinctFilter"}}}}}},"promotions-handbillDistinctFilter":{"type":"object","nullable":true,"description":"Distinct filter that limits how many promotions from each value of a given field (e.g. brand, category) can appear in the returned set. Rules are applied per field; at most 3 rules allowed, each `field` value must be unique across rules. `elastic: true` relaxes the filter when there are not enough qualifying promotions (may under-fill less); `elastic: false` is strict (may under-fill the slot). A variant-level `distinctFilter` and slot-level `distinctFilter` values are mutually exclusive (XOR): if the variant has a non-null `distinctFilter`, all slot `distinctFilter` values must be null/absent, and `slotFilters` must be present. `levelRangeModifier` is only meaningful when `field` is `category` — it widens or narrows the category level range used for grouping.","required":["filters","elastic"],"properties":{"filters":{"type":"array","description":"List of distinct-filter rules. Each rule targets one field. Field values must be unique across rules.","minItems":1,"maxItems":3,"items":{"type":"object","required":["field","maxNumItems"],"properties":{"field":{"type":"string","minLength":1,"description":"The promotion attribute to group by (e.g. `brand`, `category`).","example":"brand"},"maxNumItems":{"type":"integer","minimum":1,"description":"Maximum number of promotions allowed from each distinct value of this field.","example":2},"levelRangeModifier":{"type":"integer","description":"Only applicable when `field` is `category`. Adjusts the category level range used for grouping. Must not be present when `field` is not `category`.","example":1}}}},"elastic":{"type":"boolean","description":"When `true`, the filter is relaxed if not enough promotions qualify — the slot may be filled with additional promotions beyond the per-value limit. When `false`, the filter is strict — the slot may be under-filled if there are insufficient qualifying promotions.","example":true}}},"promotions-handbillVariantPercentage":{"type":"integer","minimum":0,"maximum":100,"description":"The size of the group, in relation to the entire group to which the promotion applies. The control group and the groups for each variant must sum up to 100%."},"promotions-objectCreatedAt":{"type":"string","format":"date-time","description":"Time when the object was created"},"promotions-objectUpdatedAt":{"type":"string","format":"date-time","description":"Time when the object was last updated"},"promotions-clientKey":{"type":"string","example":"clientId","description":"Type of profile identifier","enum":["externalId","clientId","email","phone","uuid"]},"promotions-clientKeyValue":{"description":"Value of the selected identifier","type":"string","example":"434428563"},"promotions-senderName":{"description":"Name of the points sender","type":"string"},"promotions-recipientName":{"description":"Name of the points recipient","type":"string"},"promotions-responseCode":{"type":"number","description":"Response code. 0 is the same as HTTP 200. Other HTTP codes are sent as usual."},"promotions-responseDescription":{"type":"string","description":"Description of the response. Used for diagnostics and troubleshooting."},"promotions-responseMeta":{"type":"object","description":"Optional metadata","properties":{"code":{"type":"integer","description":"HTTP code"},"limit":{"type":"integer","description":"The number of items per page"},"link":{"type":"array","description":"Links to other pages","items":{"type":"object","description":"Link to another page on the list","properties":{"rel":{"type":"string","enum":["first","last","next","prev"],"description":"The type of relationship to the current page"},"url":{"type":"string","description":"The URL of the page"}}}},"page":{"type":"integer","description":"The current page"},"totalCount":{"type":"integer","description":"The total number of items on all pages"},"totalPages":{"type":"integer","description":"The total number of pages"}}},"promotions-ResponseError":{"type":"string","description":"Summary of the error"},"promotions-ResponseErrorMessage":{"type":"string","description":"Error details"},"promotions-ErrorTimestamp":{"type":"string","description":"Time when the error occurred"},"promotions-ErrorCode":{"type":"integer","description":"HTTP code of the problem"},"promotions-ErrorObject":{"type":"object","title":"JSON content issue","properties":{"message":{"$ref":"#/components/schemas/promotions-ResponseError"},"error":{"description":"Details of the error","anyOf":[{"type":"array","description":"An array of objects with error details","items":{"type":"object","description":"Details of an error","properties":{"message":{"$ref":"#/components/schemas/promotions-ErrorV2Message"},"additionalProperties":{"description":"Additional information, if applicable"}}}},{"type":"string","description":"Description of the error"}]}}},"promotions-ErrorV2Timestamp":{"type":"string","format":"date-time","description":"Date and time when the error occurred","example":"2020-10-05T10:59:21.000Z"},"promotions-ErrorV2TraceId":{"type":"string","description":"TraceId of the request which resulted in the error","example":"8705651679b203e7"},"promotions-ErrorV2Message":{"type":"string","description":"Short description of the error","example":"Internal Error"},"promotions-ErrorV2HttpStatus":{"type":"number","description":"HTTP status of the error","example":500},"promotions-ErrorV2Code":{"type":"string","description":"Error code which helps identify the issue. See [API error reference](https://hub.synerise.com/api-reference/errors.html).","example":"ERR-001"},"promotions-OptionalErrorV2Code":{"type":"string","description":"Error code which helps identify the issue. See [API error reference](https://hub.synerise.com/api-reference/errors.html).","example":"ERR-001","nullable":true},"promotions-PromotionActivationErrorSchema":{"type":"object","description":"Details of an error","properties":{"errorCode":{"$ref":"#/components/schemas/promotions-OptionalErrorV2Code"},"message":{"$ref":"#/components/schemas/promotions-ResponseErrorMessage"}},"example":{"message":"Points not met limits for activation","name":"PointsNotMetError","errorCode":"ERR-042"}},"promotions-GenericErrorV2Schema":{"type":"object","description":"Details of an error","properties":{"timestamp":{"$ref":"#/components/schemas/promotions-ErrorV2Timestamp"},"traceId":{"$ref":"#/components/schemas/promotions-ErrorV2TraceId"},"errorCode":{"$ref":"#/components/schemas/promotions-ErrorV2Code"},"message":{"$ref":"#/components/schemas/promotions-ErrorV2Message"},"httpStatus":{"$ref":"#/components/schemas/promotions-ErrorV2HttpStatus"}}},"promotions-ClientNotFoundError":{"allOf":[{"$ref":"#/components/schemas/promotions-GenericErrorV2Schema"},{"description":"Profile not found","example":{"errorCode":"CLI-001","httpStatus":404,"message":"Profile not found","timestamp":"2020-10-05T10:59:21.000Z","traceId":"8705651679b203e7"}}]},"promotions-ProfileNotFoundErrorV1":{"description":"Profile not found","properties":{"message":{"$ref":"#/components/schemas/promotions-ResponseErrorMessage"}},"example":{"message":"Profile not found"}},"promotions-PromotionNotFoundErrorV1":{"description":"Promotion not found","properties":{"message":{"$ref":"#/components/schemas/promotions-ResponseErrorMessage"}},"example":{"message":"Promotion not found"}},"promotions-PromotionNotActivatedErrorV1":{"description":"Promotion not activated","properties":{"message":{"$ref":"#/components/schemas/promotions-ResponseErrorMessage"}},"example":{"message":"Promotion not activated"}},"promotions-PromotionRedeemLimitExceededErrorV1":{"description":"Promotion redeem limit exceeded","properties":{"message":{"$ref":"#/components/schemas/promotions-ResponseErrorMessage"}},"example":{"message":"Promotion redeem limit exceeded"}},"promotions-PromotionAlreadyRedeemedErrorV1":{"description":"Promotion already redeemed","properties":{"message":{"$ref":"#/components/schemas/promotions-ResponseErrorMessage"}},"example":{"message":"Promotion already redeemed"}},"promotions-LockNotFoundErrorV1":{"description":"Lock not found","properties":{"message":{"$ref":"#/components/schemas/promotions-ResponseErrorMessage"}},"example":{"message":"Lock not found"}},"promotions-ErrorV2InvalidBodySource":{"type":"object","properties":{"pointer":{"description":"JSON pointer to the object which was source of the error","example":"/exampleKey"}}},"promotions-InvalidDataErrorV2":{"allOf":[{"$ref":"#/components/schemas/promotions-GenericErrorV2Schema"},{"description":"Details of a body validation error","properties":{"errors":{"type":"array","items":{"type":"object","description":"Details of a validation error","properties":{"errorCode":{"$ref":"#/components/schemas/promotions-ErrorV2Message"},"source":{"$ref":"#/components/schemas/promotions-ErrorV2InvalidBodySource"}}}}},"example":{"errorCode":"ERR-042","httpStatus":400,"message":"Invalid data","timestamp":"2020-10-05T10:59:21.000Z","traceId":"8705651679b203e7"}}]},"promotions-ClientNotHaveRequiredPointsError":{"allOf":[{"$ref":"#/components/schemas/promotions-GenericErrorV2Schema"},{"description":"Profile does not have the required number of points","example":{"errorCode":"PRO-015","httpStatus":422,"message":"Profile does not have the required number of points","timestamp":"2020-10-05T10:59:21.000Z","traceId":"8705651679b203e7"}}]},"promotions-ClientPointsSenderNotInSegmentError":{"allOf":[{"$ref":"#/components/schemas/promotions-GenericErrorV2Schema"},{"description":"Point sender is not in the required segmentation","example":{"errorCode":"PRO-034","httpStatus":422,"message":"Point sender is not in the required segmentation","timestamp":"2020-10-05T10:59:21.000Z","traceId":"8705651679b203e7"}}]},"promotions-ClientPointsRecipientNotInSegmentError":{"allOf":[{"$ref":"#/components/schemas/promotions-GenericErrorV2Schema"},{"description":"Point recipient is not in required segmentation","example":{"errorCode":"PRO-035","httpStatus":422,"message":"Point recipient is not in required segmentation","timestamp":"2020-10-05T10:59:21.000Z","traceId":"8705651679b203e7"}}]},"promotions-ClientPointsLockErrorV2":{"allOf":[{"$ref":"#/components/schemas/promotions-GenericErrorV2Schema"},{"description":"Profile points are locked. Waiting for releasing lock for the profile","example":{"errorCode":"PRO-016","httpStatus":423,"message":"Profile points are locked. Waiting for releasing lock for the profile.","timestamp":"2020-10-05T10:59:21.000Z","traceId":"8705651679b203e7"}}]},"push-devices-service-Updated":{"type":"string","description":"Tokens updated before this date will be deleted.","format":"date-time"},"push-devices-service-WebPushCleanupRequest":{"oneOf":[{"type":"object","title":"By update time","required":["type","updated"],"properties":{"type":{"type":"string","enum":["BY_UPDATED_BEFORE"]},"updated":{"$ref":"#/components/schemas/push-devices-service-Updated"}}},{"type":"object","title":"By version","required":["type","version"],"properties":{"type":{"type":"string","enum":["BY_VERSION"]},"version":{"type":"string","example":"0.0.1","description":"Tokens with this service worker version will be deleted."}}}]},"push-devices-service-MobilePushCleanupRequest":{"type":"object","properties":{"type":{"type":"string","enum":["BY_UPDATED_BEFORE"]},"updated":{"$ref":"#/components/schemas/push-devices-service-Updated"}},"required":["type","updated"]},"push-devices-service-inBodyClientDeviceId":{"type":"string","description":"Unique Android or iOS device ID"},"push-devices-service-LinkaClientdeviceRequest":{"type":"object","required":["deviceId","type","registrationId"],"properties":{"deviceId":{"$ref":"#/components/schemas/push-devices-service-inBodyClientDeviceId"},"registrationId":{"type":"string","description":"Registration ID for [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/)"},"type":{"type":"string","description":"Device type","enum":["android","ios","windows"]},"bluetoothAddress":{"type":"string","description":"Bluetooth MAC address of the device"},"macAddress":{"type":"string","description":"MAC address of the network adapter"},"manufacturer":{"type":"string","description":"Manufacturer of the device"},"model":{"type":"string","description":"Model of the device"},"osVersion":{"type":"string","description":"Operating system of the device"},"product":{"type":"string","description":"Additional information about the OS on the device","example":"a51ul_htc_europe"},"screenHeight":{"type":"integer","format":"int32","description":"Screen height in pixels"},"screenWidth":{"type":"integer","format":"int32","description":"Screen width in pixels"},"publicKey":{"type":"string","description":"Public key used to encrypt push messages"}}},"push-devices-service-HTTP400":{"type":"object","properties":{"error":{"type":"string","description":"Summary of the error"},"status":{"type":"integer","format":"int32","description":"Status code"},"timestamp":{"type":"string","description":"Time when the message was sent"},"path":{"type":"string","description":"URL of the requested resource"},"message":{"type":"string","description":"Description of the problem"},"errors":{"type":"array","description":"Additional details of the errors, if applicable","items":{"$ref":"#/components/schemas/push-devices-service-Error"}}}},"push-devices-service-Error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","example":12082,"description":"A numeric identifier of the error type"},"field":{"type":"string","example":"countryCode","description":"Field in the request body that caused the error"},"message":{"type":"string","example":"Country Code must have 0 or 3 characters as per ISO format.","description":"A detailed description of the problem"},"rejectedValue":{"type":"string","example":"Poland","description":"The value that caused the error"}}},"query-rules-v2-Error":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"path":{"type":"string","description":"URL of the requested resource"}},"required":["timestamp","status","message"]},"query-rules-v2-PaginatedRules":{"type":"object","properties":{"data":{"type":"array","description":"A list of rules","items":{"$ref":"#/components/schemas/query-rules-v2-RuleWithStatus"}},"extras":{"type":"object","description":"Additional information","properties":{"statuses":{"type":"object","description":"The number of rules with each status. All rules are considered.","properties":{"Finished":{"type":"integer"},"Draft":{"type":"integer"},"Paused":{"type":"integer"},"Scheduled":{"type":"integer"},"Active":{"type":"integer"}}}}},"meta":{"$ref":"#/components/schemas/query-rules-v2-PaginationMeta"}}},"query-rules-v2-PaginationMeta":{"type":"object","description":"Optional pagination metadata (sent if `\"includeMeta\": true`)","properties":{"totalPages":{"type":"number","description":"The total number of pages"},"totalCount":{"type":"number","description":"The total number of campaigns"},"page":{"type":"number","description":"The current page"},"limit":{"type":"number","description":"The maximal number of items on a page"},"sortedBy":{"type":"string","description":"The column (attribute) that the campaigns were sorted by"},"ordering":{"type":"string","description":"Sorting order"},"code":{"type":"number","description":"HTTP response code"},"link":{"type":"array","description":"Links to neighboring pages, first page, and last page in pagination","items":{"type":"object","properties":{"url":{"description":"Page URL","type":"string"},"rel":{"type":"string","description":"Position of the linked page","enum":["first","next","prev","last"]}}}}}},"query-rules-v2-RuleWithStatus":{"type":"object","description":"Details of the rule","properties":{"status":{"description":"Status of the rule","type":"string"},"rule":{"type":"object","description":"Configuration of the rule","properties":{"id":{"$ref":"#/components/schemas/query-rules-v2-RuleId"},"name":{"$ref":"#/components/schemas/query-rules-v2-RuleName"},"author":{"$ref":"#/components/schemas/query-rules-v2-RuleAuthor"},"state":{"$ref":"#/components/schemas/query-rules-v2-RuleState"},"activeFrom":{"$ref":"#/components/schemas/query-rules-v2-RuleActiveFromDatetime"},"activeTo":{"$ref":"#/components/schemas/query-rules-v2-RuleActiveToDatetime"},"timezone":{"$ref":"#/components/schemas/query-rules-v2-RuleTimezoneSchema"},"updatedAt":{"$ref":"#/components/schemas/query-rules-v2-RuleUpdateDatetime"},"createdAt":{"$ref":"#/components/schemas/query-rules-v2-RuleCreatedDatetime"},"data":{"$ref":"#/components/schemas/query-rules-v2-RuleDataSchema"},"source":{"$ref":"#/components/schemas/query-rules-v2-RuleSource"}}}}},"query-rules-v2-RuleId":{"type":"integer","description":"ID of the rule"},"query-rules-v2-RuleName":{"type":"string","description":"Name of the rule"},"query-rules-v2-RuleMatchingType":{"type":"string","description":"Match logic of the rule","enum":["is","startsWith","endsWith","contains"]},"query-rules-v2-RuleAuthor":{"description":"The user who created the rule","type":"integer"},"query-rules-v2-RuleState":{"type":"string","description":"State of the rule","enum":["draft","active","paused","finished"]},"query-rules-v2-RuleSource":{"type":"string","description":"Whether the rule belongs to the index itself (`index`) or is inherited from its parent index (`parent`). Inherited rules are read-only on the child index.","enum":["index","parent"]},"query-rules-v2-RuleUpdateDatetime":{"type":"string","description":"Last update time in YYYY-MM-DD HH-MM-SS format"},"query-rules-v2-RuleCreatedDatetime":{"type":"string","description":"Creation time in YYYY-MM-DD HH-MM-SS format"},"query-rules-v2-RuleActiveToDatetime":{"type":"string","description":"Time when the rule becomes inactive, in YYYY-MM-DD HH-MM-SS format"},"query-rules-v2-RuleActiveFromDatetime":{"type":"string","description":"Time when the rules becomes active, in YYYY-MM-DD HH-MM-SS format"},"query-rules-v2-RuleTimezoneSchema":{"type":"string","description":"Timezone in `UTC[+/-]X` format, for example `UTC+4`, `UTC+0`, `UTC-3`"},"query-rules-v2-RuleDataSchema":{"type":"object","description":"This object contains the details of what the rule does","required":["conditions","queryConsequences","postQueryConsequences"],"properties":{"audience":{"type":"object","description":"Optional audience the rule will be applied to","properties":{"segmentationIds":{"type":"array","description":"Ids of segmentations to which client belongs","example":["34ab56cd-789be-22ee-11ab-123456789abc","12xy34z5-456b-33cc-7o52-987654321ece"],"items":{"type":"string"}}}},"conditions":{"type":"object","description":"Additional conditions","properties":{"patterns":{"type":"array","description":"Strings that trigger this rule when included in the query","example":["phone","notebook","mouse {color} {brand}"],"items":{"type":"string"}},"matchingType":{"$ref":"#/components/schemas/query-rules-v2-RuleMatchingType"},"contexts":{"type":"array","description":"Contexts for which the rule will be considered during matching","example":["listing","web","mobile"],"items":{"type":"string"}},"filters":{"type":"object","description":"You can configure a condition so that the rule only applies depending on the filters used in a search query.","properties":{"textFilters":{"$ref":"#/components/schemas/query-rules-v2-ConditionsTextFiltersSchema"},"rangeFilters":{"$ref":"#/components/schemas/query-rules-v2-ConditionsRangeFiltersSchema"},"datetimeFilters":{"$ref":"#/components/schemas/query-rules-v2-ConditionsDatetimeFiltersSchema"}}}}},"queryConsequences":{"type":"array","description":"An array of transformations to be performed on the query","items":{"type":"object","properties":{"type":{"type":"string","description":"The action to perform\n\n- `removeWord` removes a word from the query.\n- `replaceWord` replaces a word from the query with a string.\n- `replaceQuery` replaces the entire query.\n\n**IMPORTANT:**\n\nThese operations are performed on strings that match the pattern exactly. For example:\n\n1. The pattern is `foo bar`.\n1. The operation is set to `removeWord` and `word` is set to `foo`.\n1. The user searches for `foo bar bar foo`.\n\n**The result:** \"foo\" is removed from \"foo bar\" and the transformed query is now \"bar bar foo\".\n","enum":["removeWord","replaceWord","replaceQuery"]},"word":{"type":"string","description":"The word to replace or remove"},"replacement":{"type":"string","description":"The string that replaces the word/query"}}}},"postQueryConsequences":{"type":"object","description":"This object describes how the rule affects the search results","properties":{"hideHits":{"type":"array","description":"An array of items to hide from the results, identified by `itemId`","items":{"type":"string"}},"promoteHits":{"type":"array","description":"An array of items to show first in the results","items":{"type":"object","properties":{"id":{"description":"`productRetailerPartNo`","type":"string"},"position":{"description":"Item's position on the list of results","type":"integer"}}}},"promoteHitsPositionStrategy":{"$ref":"#/components/schemas/query-rules-v2-PositionStrategy"},"standardFilters":{"$ref":"#/components/schemas/query-rules-v2-RuleFilters"},"elasticFilters":{"$ref":"#/components/schemas/query-rules-v2-RuleFilters"},"boostFilters":{"$ref":"#/components/schemas/query-rules-v2-BoostFilters"},"topHitsFilters":{"$ref":"#/components/schemas/query-rules-v2-TopHitsFilters"},"distinctFilter":{"$ref":"#/components/schemas/query-rules-v2-DistinctFilter"},"sortBy":{"type":"object","description":"Sorting info","properties":{"attribute":{"type":"string","description":"Name of the attribute by which the data will be sorted"},"ordering":{"description":"Sorting order","type":"string","enum":["desc","asc"]}}},"customData":{"type":"string","description":"Custom JSON that will be returned with the search results","example":"{\"customLandingPage\": \"https://synerise.com/\"}"},"returnNoData":{"type":"boolean","description":"When set to `true`, forces the search result to be empty","example":false},"pinFacets":{"type":"array","description":"Forces specific facets to be included in the response, regardless of coverage score or\nautomatic facet selection. Each entry may optionally specify a 1-based `position` to pin\nthe facet at a specific slot in the response `facetsOrdering`.\n\nA pin without `position` is placed before any non-pinned facets (in input order).\nA pin with `position` greater than the final list size is appended at the tail; multiple\nsuch pins keep their relative ordering by ascending `position`.\nA facet that is also `hideFacets` is dropped (hide wins).\nA pin's attribute must exist in the index's facetable attributes; positions cannot exceed\nthe number of facetable attributes.\n","items":{"type":"object","required":["attribute"],"properties":{"attribute":{"type":"string","description":"Name of the facet attribute to pin.","example":"size"},"position":{"type":"integer","minimum":1,"maximum":100,"description":"Optional 1-based slot in `facetsOrdering`. Omit to pin without specifying a slot.\n","example":1}}},"example":[{"attribute":"size","position":1},{"attribute":"width","position":2},{"attribute":"gift_wrap"}]},"hideFacets":{"type":"array","description":"Forces specific facets to be excluded from the response, even if they would otherwise be\nselected by automatic facet selection or were explicitly requested by the API caller.\nHidden attributes are also stripped from `customFilteredFacets` for the matched request.\n","items":{"type":"string","description":"Facet attribute to hide."},"example":["material","fabric","sleeve_length"]},"scoringOverride":{"$ref":"#/components/schemas/query-rules-v2-ScoringOverride"}}}}},"query-rules-v2-ConditionsTextFiltersSchema":{"type":"object","description":"Condition filters for text attributes","example":{"color":{"values":["green","red"],"matchingType":"InUserFilters"}},"additionalProperties":{"$ref":"#/components/schemas/query-rules-v2-SingleTextFiltersSchema"}},"query-rules-v2-SingleTextFiltersSchema":{"type":"object","description":"Values and a matching type for a single text attribute. The name of this object must be the same as the name of the attribute.","properties":{"values":{"type":"array","description":"An array of strings to match the attribute value with","items":{"type":"string"}},"matchingType":{"$ref":"#/components/schemas/query-rules-v2-ConditionsFiltersMatchingType"}}},"query-rules-v2-ConditionsRangeFiltersSchema":{"type":"object","description":"Condition filters for range attributes","example":{"price":{"ranges":[{"rightEnd":{"value":20,"inclusive":true}}],"matchingType":"Exact"}},"additionalProperties":{"$ref":"#/components/schemas/query-rules-v2-SingleRangeFiltersSchema"}},"query-rules-v2-SingleRangeFiltersSchema":{"type":"object","description":"Ranges and a matching type for a single range attribute. The name of this object must be the same as the name of the attribute.","properties":{"ranges":{"type":"array","description":"An array of ranges to match the attribute value with.","items":{"type":"object","properties":{"leftEnd":{"description":"Lower boundary of the range. If not defined (this object is not sent at all), defaults to infinity.","allOf":[{"$ref":"#/components/schemas/query-rules-v2-RangeEndSchema"}]},"rightEnd":{"description":"Upper boundary of the range. If not defined (this object is not sent at all), defaults to infinity.","allOf":[{"$ref":"#/components/schemas/query-rules-v2-RangeEndSchema"}]}}}},"matchingType":{"$ref":"#/components/schemas/query-rules-v2-ConditionsFiltersMatchingType"}}},"query-rules-v2-ConditionsDatetimeFiltersSchema":{"type":"object","description":"Condition filters for datetime attributes","example":{"created":{"ranges":[{"rightEnd":{"value":"2024-01-01","inclusive":true}}],"matchingType":"Exact"}},"additionalProperties":{"$ref":"#/components/schemas/query-rules-v2-SingleDatetimeFiltersSchema"}},"query-rules-v2-SingleDatetimeFiltersSchema":{"type":"object","description":"Ranges and a matching type for a single datetime attribute. The name of this object must be the same as the name of the attribute.","properties":{"ranges":{"type":"array","description":"An array of ranges to match the attribute value with.","items":{"type":"object","properties":{"leftEnd":{"description":"Lower boundary of the range. If not defined (this object is not sent at all), defaults to infinity.","allOf":[{"$ref":"#/components/schemas/query-rules-v2-DatetimeEndSchema"}]},"rightEnd":{"description":"Upper boundary of the range. If not defined (this object is not sent at all), defaults to infinity.","allOf":[{"$ref":"#/components/schemas/query-rules-v2-DatetimeEndSchema"}]}}}},"matchingType":{"$ref":"#/components/schemas/query-rules-v2-ConditionsFiltersMatchingType"}}},"query-rules-v2-ConditionsFiltersMatchingType":{"type":"string","description":"Match logic of the filters for a given attribute. Condition filters and customer search filters are compared as mathematical sets.\n\n- `Exact`: the customer's search filters must be exactly the same as this condition filter.\n- `ContainsUserFilters`: this condition filter must contain all the customer's search filters (but can also contain other filters).\n- `InUserFilters`: the customer's search filter must contain all of this condition filter (but can also contain other filters)\n- `NonEmptyIntersectionWithUserFilters`: at least one of the customer's search filters must match a value from this condition filter.\n\n**Example:**:\n\n- The customer's filters are `color == \"green\" OR color == \"white\" OR color == \"red\"`.\n- The condition filter is `color == [\"green\",\"red\"]`.\n\nThe result is:\n- `Exact`: does not match, the sets are different.\n- `ContainsUserFilters`: does not match, some customer filters are not included in the condition filters\n- `InUserFilters`: matches, `\"green\"` and `\"red\"` are included in `[\"green\",\"white\",\"red\"]`.\n- `NonEmptyIntersectionWithUserFilters`: matches, there is at least one common element\n","enum":["Exact","ContainsUserFilters","InUserFilters","NonEmptyIntersectionWithUserFilters"]},"query-rules-v2-RangeEndSchema":{"type":"object","properties":{"value":{"type":"number","description":"Numerical value"},"inclusive":{"type":"boolean","description":"If TRUE, `<` becomes `<=` and `>` becomes `>=`."}}},"query-rules-v2-DatetimeEndSchema":{"type":"object","properties":{"value":{"type":"string","description":"ISO datetime value"},"inclusive":{"type":"boolean","description":"If TRUE, `<` becomes `<=` and `>` becomes `>=`."}}},"query-rules-v2-BoostFilters":{"type":"array","description":"Filters that boost the results","items":{"type":"object","properties":{"weight":{"type":"integer","description":"The boost percentage. Positive values boost scores of results that match\nthe provided filters. Negative values demotes scores of matching items.\n","minimum":-100,"maximum":100,"not":{"enum":[0]}},"filters":{"$ref":"#/components/schemas/query-rules-v2-RuleFilters"}}}},"query-rules-v2-TopHitsFilters":{"type":"array","description":"Filters that move a specified number of items to the front","items":{"type":"object","properties":{"hitsNumber":{"type":"integer","description":"Number of top-scoring items that match the provided filters\nand will be moved to the front of the results\n","minimum":1,"maximum":20},"positions":{"type":"array","description":"Optional 1-based result positions for the top-hits, aligned by index to the sub-query's score order. Omit for the default front-block-by-score behaviour. Must be unique, within [1, 50], and no more than `hitsNumber` entries.\n","items":{"type":"integer","minimum":1,"maximum":50}},"filters":{"$ref":"#/components/schemas/query-rules-v2-RuleFilters"}}}},"query-rules-v2-DistinctFilter":{"type":"object","required":["attribute","maxNumItems"],"description":"Distinct filter definition","properties":{"attribute":{"type":"string","description":"Name of the attribute for distinct filter"},"maxNumItems":{"type":"integer","description":"Max number of items having the same attribute value"},"categoryLevelModifier":{"type":"integer","description":"Category level modifier to use with `category` attribute"}}},"query-rules-v2-RuleFilters":{"type":"object","description":"Filters for the query","properties":{"textFilters":{"type":"array","description":"Text-type filters","items":{"type":"object","properties":{"attribute":{"type":"string","description":"Attribute to be filtered","example":"brand"},"mode":{"type":"string","description":"Information whether to include or exclude filtered results.\n\n- `include`: includes filtered results\n- `exclude`: excludes filtered results\n","enum":["include","exclude"],"example":"include"}},"oneOf":[{"properties":{"values":{"type":"array","description":"Values to be used during filtering. May contain both strings and patterns.","example":["A-Brand","B-Brand","{brand}"],"items":{"type":"string"}}}},{"properties":{"aggregateId":{"type":"string","description":"Uuid of an aggregate to be used during filtering.","example":"32be9640-37e5-3196-abb6-6dc192002dab"}}},{"properties":{"expressionId":{"type":"string","description":"Uuid of an expression to be used during filtering.","example":"ad29ff7a-7148-4a5c-8a2a-4491e3ae7e9d"}}}]}},"rangeFilters":{"type":"array","description":"Range-type filters","items":{"type":"object","properties":{"attribute":{"type":"string","description":"Attribute to be filtered","example":"price"},"operator":{"type":"string","description":"Operator to be used during filtering.\n\n- `gt`: greater than\n- `gte`: greater or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `eq`/`neq`: equal/not equal\n","enum":["gt","gte","lt","lte","eq","neq"]}},"oneOf":[{"properties":{"value":{"description":"Value to use during filtering","oneOf":[{"type":"string","description":"Placeholder value to use during filtering. The placeholder must be included in all of the patterns defined in the `conditions` object.","example":"{price}"},{"type":"number","format":"float","description":"Float value to use during filtering","example":19.99}]}}},{"properties":{"aggregateId":{"type":"string","description":"Uuid of an aggregate to be used during filtering.","example":"32be9640-37e5-3196-abb6-6dc192002dab"}}},{"properties":{"expressionId":{"type":"string","description":"Uuid of an expression to be used during filtering.","example":"ad29ff7a-7148-4a5c-8a2a-4491e3ae7e"}}}]}},"datetimeFilters":{"type":"array","description":"Range-type datetime filters","items":{"type":"object","properties":{"attribute":{"type":"string","description":"Attribute to be filtered","example":"created"},"operator":{"type":"string","description":"Operator to be used during filtering.\n\n- `gt`: greater than\n- `gte`: greater or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `eq`/`neq`: equal/not equal\n","enum":["gt","gte","lt","lte","eq","neq"]}},"oneOf":[{"properties":{"value":{"description":"Value to use during filtering","oneOf":[{"type":"string","description":"Placeholder value to use during filtering. The placeholder must be included in all of the patterns defined in the `conditions` object.","example":"{created}"},{"type":"string","description":"ISO datetime value to use during filtering","example":"2024-01-01T00:00:00Z"}]}}},{"properties":{"aggregateId":{"type":"string","description":"Uuid of an aggregate to be used during filtering.","example":"32be9640-37e5-3196-abb6-6dc192002dab"}}},{"properties":{"expressionId":{"type":"string","description":"Uuid of an expression to be used during filtering.","example":"ad29ff7a-7148-4a5c-8a2a-4491e3ae7e"}}},{"properties":{"relativeValue":{"$ref":"#/components/schemas/query-rules-v2-RelativeDatetime"}}}]}}}},"query-rules-v2-RelativeDatetime":{"type":"object","required":["value","unit"],"properties":{"value":{"type":"integer","description":"The numerical duration value."},"unit":{"type":"string","description":"The unit of duration.","enum":["seconds","minutes","hours","days"]}},"example":{"value":2,"unit":"days"}},"query-rules-v2-PositionStrategy":{"oneOf":[{"$ref":"#/components/schemas/query-rules-v2-ManualType"},{"$ref":"#/components/schemas/query-rules-v2-CustomType"},{"$ref":"#/components/schemas/query-rules-v2-AscendingType"}],"discriminator":{"propertyName":"type","mapping":{"manual":"#/components/schemas/query-rules-v2-ManualType","custom":"#/components/schemas/query-rules-v2-CustomType","ascending":"#/components/schemas/query-rules-v2-AscendingType"}},"example":{"type":"custom"}},"query-rules-v2-ManualType":{"type":"object","properties":{"type":{"type":"string","enum":["manual"],"example":"manual"}},"required":["type"],"additionalProperties":false},"query-rules-v2-CustomType":{"type":"object","properties":{"type":{"type":"string","enum":["custom"],"example":"custom"}},"required":["type"],"additionalProperties":false},"query-rules-v2-AscendingType":{"type":"object","properties":{"type":{"type":"string","enum":["ascending"],"example":"ascending"},"start":{"type":"integer","example":1},"step":{"type":"integer","example":2}},"required":["type","start","step"],"additionalProperties":false},"query-rules-v2-ScoringOverride":{"oneOf":[{"$ref":"#/components/schemas/query-rules-v2-RankingScoringOverride"},{"$ref":"#/components/schemas/query-rules-v2-TargetScoringOverride"}],"discriminator":{"propertyName":"type"}},"query-rules-v2-RankingScoringOverride":{"type":"object","required":["type","weights"],"properties":{"type":{"type":"string","enum":["ranking"]},"weights":{"type":"object","description":"Absolute per-signal ranking weights. Each supplied signal overrides the index-config value; omitted signals fall back to index config. At least one signal must be set.\n","properties":{"personalized":{"type":"number","minimum":0,"maximum":5},"pageVisitsPopularity":{"type":"number","minimum":0,"maximum":5},"transactionsPopularity":{"type":"number","minimum":0,"maximum":5},"pageVisits7DaysPopularity":{"type":"number","minimum":0,"maximum":5},"transactions7DaysPopularity":{"type":"number","minimum":0,"maximum":5},"revenueBoost":{"type":"number","minimum":0,"maximum":5},"conversionRateBoost":{"type":"number","minimum":0,"maximum":5}}}}},"query-rules-v2-TargetScoringOverride":{"type":"object","required":["type","optimizationTarget"],"properties":{"type":{"type":"string","enum":["target"]},"optimizationTarget":{"type":"string","enum":["ctr","cr","revenue","ndcg","margin"]}}},"recommendation-campaigns-CrossWorkspaceMode":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Specifies if campaign should support multibrand cross workspace segmentation."}}},"recommendation-campaigns-Slug":{"type":"string","description":"Unique identifier of the campaign. Can be used for fetching campaigns instead of the ID. Create meaningful, human-readable slugs for easier work with recommendation campaigns."},"recommendation-campaigns-Error":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"path":{"type":"string","description":"URL of the requested resource"}},"required":["timestamp","status","message"]},"recommendation-campaigns-BaseRecommendationsCampaignParameters":{"type":"object","description":"Parameters that apply to this campaign","properties":{"additionalResponseAttributes":{"type":"array","items":{"type":"string"},"description":"An array of additional response attributes."}}},"recommendation-campaigns-WithMetricsRecommendationsCampaignParameters":{"allOf":[{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"},{"type":"object","properties":{"boostMetric":{"type":"string","description":"ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results."},"sortMetric":{"type":"string","description":"ID of the metric to sort the results by."},"boostMetricStrength":{"type":"number","description":"How much influence the `boostMetric` has. Values less than 0 allow you to demote items that have high metric score, values greater than 0 allow you to promote items that have high metric score. A strength with a value of 0 does not change the scoring.","format":"float","minimum":-100,"maximum":100},"shuffleNumItems":{"$ref":"#/components/schemas/recommendation-campaigns-ShuffleNumItems"}}}]},"recommendation-campaigns-MetricsRecommendationsCampaignParameters":{"allOf":[{"$ref":"#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"}},"required":["sortMetric"]}]},"recommendation-campaigns-SetComplementRecommendationsCampaignParameters":{"allOf":[{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"},{"type":"object","properties":{"itemSimilarity":{"type":"integer","minimum":0,"maximum":5,"description":"Similarity between items in the cart and the recommended items. Higher values decrease the similarity."},"recommendationVariety":{"type":"number","format":"float","minimum":0,"maximum":0.9,"description":"Similarity between recommended items - higher values will result in more variety within the recommended item set."},"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"}}}]},"recommendation-campaigns-RecentInteractionsRecommendationsCampaignParameters":{"allOf":[{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"},{"type":"object","properties":{"aggregateId":{"type":"string","description":"Id of the aggregate which provides events as a base of recommendations."},"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"}}}]},"recommendation-campaigns-SectionRecommendationsCampaignParameters":{"allOf":[{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"},{"type":"object","properties":{"metadataCatalogId":{"type":"string"}}}]},"recommendation-campaigns-AttributeRecommendationsCampaignParameters":{"allOf":[{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"},{"type":"object","properties":{"metadataCatalogId":{"type":"string","description":"The id of catalog containing attributes metadata."}}}]},"recommendation-campaigns-RecommendationsCampaignFilterRules":{"type":"object","description":"Filters that apply to this campaign. If the filters contain an attribute used in the default filters of the recommendation model ([**Settings > AI Configuration**](https://help.synerise.com/docs/settings/configuration/ai-engine-configuration/engine-configuration-for-recommendations/#selecting-recommendation-types-and-default-filters)), that default filter is ignored.","properties":{"excludePurchasedItems":{"type":"boolean","description":"When true, the recommendation results will include only items that the profile hasn't purchased before."},"excludePurchasedItemsSinceDays":{"type":"number","format":"integer","description":"Limits the application of the `excludePurchasedItems` filter to a specified number of days."},"elasticExcludePurchasedItems":{"type":"boolean","description":"This is a setting for Elastic filters.<br>When true, the recommendation results will include only items that the profile hasn't purchased before."},"elasticExcludePurchasedItemsSinceDays":{"type":"number","format":"integer","description":"This is a setting for Elastic filters.<br>Limits the application of the `elasticExcludePurchasedItemsSinceDays` filter to a specified number of days."}}},"recommendation-campaigns-RecommendationsCampaignSlotFilterRules":{"type":"object","description":"Filters that apply to this campaign","properties":{"filters":{"type":"string","description":"Filtering string"},"elasticFilters":{"type":"string","description":"Filtering string for Elastic filter"}}},"recommendation-campaigns-ItemsCatalogId":{"type":"string","description":"Only items from this catalog will be recommended."},"recommendation-campaigns-DistinctFilter":{"type":"object","description":"Distinct filter allows to specify how many recommended items can have the same value of specified attributes.","properties":{"elastic":{"type":"boolean","description":"It allows to complete the recommended items with items which don't meet the distinct filter criteria."},"filters":{"type":"array","minItems":1,"maxItems":5,"description":"Array of distinct filters","items":{"type":"object","properties":{"field":{"type":"string","description":"Attribute name"},"maxNumItems":{"type":"number","format":"integer","description":"Max number of items with the same value of the attribute"},"levelRangeModifier":{"type":"number","format":"integer","description":"Parameter used (for the `category` field) to specify how many categories to cut off from the end"}},"required":["field","maxNumItems"]}}},"required":["elastic","filters"]},"recommendation-campaigns-Slots":{"type":"array","minLength":1,"description":"Recommendation slots. Must contain at least one slot with a non-empty `name`.","items":{"$ref":"#/components/schemas/recommendation-campaigns-Slot"}},"recommendation-campaigns-Slot":{"type":"object","description":"Slot allows you to define a separate recommendation frame with its filters and other parameters","properties":{"name":{"$ref":"#/components/schemas/recommendation-campaigns-SlotName"},"itemMin":{"$ref":"#/components/schemas/recommendation-campaigns-ItemMin"},"itemMax":{"$ref":"#/components/schemas/recommendation-campaigns-ItemMax"},"filterRules":{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationsCampaignSlotFilterRules"},"distinctFilter":{"$ref":"#/components/schemas/recommendation-campaigns-DistinctFilter"},"attribute":{"type":"object","description":"The attribute for rows grouping in the section and attribute recommendation campaign.","properties":{"name":{"description":"Name of attribute for rows grouping.","type":"string"},"levelRangeModifier":{"description":"Restricts the range of products in recommendations to a particular attribute level.","type":"integer"}}},"numRows":{"type":"integer","description":"The number of rows in the section recommendation campaign."},"numItems":{"type":"integer","description":"The number of products in each row in the section recommendation campaign."},"useDefaultDistinctFilters":{"type":"boolean","description":"Specify if slot should override distinctFilter and use defaultDistinctFiltersConfiguration specified for the feed instead."},"useDefaultItemFilters":{"type":"boolean","description":"Specify if slot should override item filters and use defaultItemFilters specified for the feed instead."}},"required":["name"]},"recommendation-campaigns-SlotName":{"type":"string","description":"Slot name"},"recommendation-campaigns-KeepSlotsOrder":{"type":"boolean","default":true,"description":"- When `true`, the `data` array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in `data` are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.\n- When `false`, the `data` array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.\n\nThe additional `extras.slots` object always shows slots and items as if this setting was `true`.\n\nIf you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.\n"},"recommendation-campaigns-PersonalizeSlotsOrder":{"type":"boolean","default":false,"description":"Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.\n\nIf you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.\n"},"recommendation-campaigns-ItemsSource":{"type":"object","description":"The source of item ID or IDs for the recommendation context. This parameter can be passed in all recommendations. In recommendations which don't use item context as part of the recommendation model, the context item can be used only to create filters.\n\nThe item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.\n\nAlternatively, you can pass the `itemId` or `itemsSource` parameter when making a request to generate a recommendation from this campaign. The parameter overrides the settings defined here.\n","properties":{"type":{"type":"string","enum":["aggregate","expression"],"description":"Type of the source of item ID or IDs for the recommendation context. \n\nIf the items' source type is 'aggregate', the aggregate result will be used as context items. If the items' source type is 'expression', the expression result will be used as context items.\n"},"id":{"type":"string","description":"ID of the items' source for the recommendation context. If the source's type is 'aggregate', this is the aggregate's ID. If the source's type is 'expression', this is the expression's ID.\n"}}},"recommendation-campaigns-ABTestInfo":{"type":"object","description":"Information whether campaign is part of an a/b test","properties":{"experimentId":{"type":"integer","description":"Experiment ID"},"variantId":{"type":"integer","description":"Variant ID"},"status":{"type":"string","enum":["NotStarted","Running","Paused","Finished"],"description":"Status"},"isBaseline":{"type":"boolean","description":"Information whether campaign is a baseline."}}},"recommendation-campaigns-BoostingStrategies":{"type":"array","description":"Recommendation boosting strategies","items":{"$ref":"#/components/schemas/recommendation-campaigns-BoostingStrategy"}},"recommendation-campaigns-BoostingStrategy":{"type":"object","description":"Boosting strategy allows you to promote or demote specific types of products in recommendation scoring","properties":{"name":{"type":"string","description":"Boosting strategy name"},"condition":{"type":"string","description":"The condition that indicates on which items the boost will be performed. The condition must comply with the rules of creating filters."},"strength":{"type":"number","description":"How much influence the strategy has. Values less than 1.0 allow you to degrade items that meet the condition, values greater than 1.0 allow you to promote items that meet the condition. A strength with a value of 1.0 does not change the scoring.","format":"float","minimum":0,"maximum":2,"default":1}},"required":["name","condition","strength"]},"recommendation-campaigns-PersonalizedBoostingStrength":{"type":"number","description":"How much influence the personalized scoring has. Greater values allow you to promote items that have high personalized score. A strength with a value of 0 does not change the scoring.","format":"float","minimum":0,"maximum":100,"default":0},"recommendation-campaigns-CampaignTitle":{"type":"string","description":"Campaign title"},"recommendation-campaigns-CampaignTypeSimilar":{"type":"string","description":"Campaign type","enum":["similar"]},"recommendation-campaigns-CampaignTypeCrossSell":{"type":"string","description":"Campaign type","enum":["cross-sell"]},"recommendation-campaigns-CampaignTypeComplementary":{"type":"string","description":"Campaign type","enum":["set-complement"]},"recommendation-campaigns-CampaignTypeLastViewed":{"type":"string","description":"Campaign type","enum":["last-viewed"]},"recommendation-campaigns-CampaignTypeMetrics":{"type":"string","description":"Campaign type","enum":["metrics"]},"recommendation-campaigns-CampaignTypePersonalized":{"type":"string","description":"Campaign type","enum":["personalized"]},"recommendation-campaigns-CampaignTypeVisuallySimilar":{"type":"string","description":"Campaign type","enum":["visually-similar"]},"recommendation-campaigns-CampaignTypeItemComparison":{"type":"string","description":"Campaign type","enum":["item-comparison"]},"recommendation-campaigns-CampaignTypeRecentInteractions":{"type":"string","description":"Campaign type","enum":["recent-interactions"]},"recommendation-campaigns-CampaignTypeSection":{"type":"string","description":"Campaign type","enum":["section"]},"recommendation-campaigns-CampaignTypeAttribute":{"type":"string","description":"Campaign type","enum":["attribute"]},"recommendation-campaigns-CampaignTypeNextInteraction":{"type":"string","description":"Campaign type","enum":["next-interaction"]},"recommendation-campaigns-CampaignTypeExternalItems":{"type":"string","description":"Campaign type","enum":["external-items"]},"recommendation-campaigns-CampaignDescription":{"type":"string","description":"Campaign description"},"recommendation-campaigns-EndDate":{"type":"string","description":"End date for the campaign"},"recommendation-campaigns-StartDate":{"type":"string","description":"Start date for the campaign"},"recommendation-campaigns-ShuffleNumItems":{"type":"integer","description":"When this parameter is provided, this many best item recommendations are provided. A number of them, no more than the value of `itemMax`, are chosen randomly for recommendation."},"recommendation-campaigns-ItemMin":{"type":"integer","description":"The minimal number of items in the campaign or the minimal number of attribute values in the attribute recommendation campaign."},"recommendation-campaigns-ItemMax":{"type":"integer","description":"The maximal number of items in the campaign or the maximal number of attribute values in the attribute recommendation campaign."},"recommendation-campaigns-State":{"type":"string","description":"Campaign status","enum":["draft","active","paused","deleted"]},"recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2":{"type":"object","properties":{"title":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTitle"},"slug":{"$ref":"#/components/schemas/recommendation-campaigns-Slug"},"description":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignDescription"},"startDate":{"$ref":"#/components/schemas/recommendation-campaigns-StartDate"},"endDate":{"$ref":"#/components/schemas/recommendation-campaigns-EndDate"},"state":{"$ref":"#/components/schemas/recommendation-campaigns-State"},"filterRules":{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationsCampaignFilterRules"},"itemsCatalogId":{"$ref":"#/components/schemas/recommendation-campaigns-ItemsCatalogId"},"slots":{"$ref":"#/components/schemas/recommendation-campaigns-Slots"},"keepSlotsOrder":{"$ref":"#/components/schemas/recommendation-campaigns-KeepSlotsOrder"},"personalizeSlotsOrder":{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizeSlotsOrder"},"boostingStrategies":{"$ref":"#/components/schemas/recommendation-campaigns-BoostingStrategies"},"itemsSource":{"$ref":"#/components/schemas/recommendation-campaigns-ItemsSource"}},"required":["title","type","itemsCatalogId","slots"]},"recommendation-campaigns-CrossSellRecommendationCampaignsCreateRequestV2":{"title":"Cross-sell","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeCrossSell"},"parameters":{"allOf":[{"$ref":"#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"}}}]}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"}]},"recommendation-campaigns-SetComplementRecommendationCampaignsCreateRequestV2":{"title":"Complementary","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeComplementary"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-SetComplementRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"}]},"recommendation-campaigns-LastViewedRecommendationCampaignsCreateRequestV2":{"title":"Last viewed","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeLastViewed"},"parameters":{"allOf":[{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"}}}]}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"}]},"recommendation-campaigns-PersonalizedRecommendationCampaignsCreateRequestV2":{"title":"Personalized","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypePersonalized"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"}]},"recommendation-campaigns-VisuallySimilarRecommendationCampaignsCreateRequestV2":{"title":"Visually similar","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeVisuallySimilar"},"parameters":{"allOf":[{"$ref":"#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"}}}]}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"}]},"recommendation-campaigns-SimilarRecommendationCampaignsCreateRequestV2":{"title":"Similar","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeSimilar"},"parameters":{"allOf":[{"$ref":"#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"}}}]}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"}]},"recommendation-campaigns-NextInteractionRecommendationCampaignsCreateRequestV2":{"title":"Next interaction","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeNextInteraction"},"parameters":{"allOf":[{"$ref":"#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"}}}]}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"}]},"recommendation-campaigns-ExternalItemsRecommendationCampaignCreateRequestV2":{"title":"External items","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeExternalItems"},"parameters":{"allOf":[{"$ref":"#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"}}}]}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"}]},"recommendation-campaigns-ItemComparisonRecommendationCampaignsCreateRequestV2":{"title":"Comparison","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeItemComparison"},"parameters":{"allOf":[{"$ref":"#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizedBoostingStrength"}}}]}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"}]},"recommendation-campaigns-MetricsRecommendationCampaignsCreateRequestV2":{"title":"Top items","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeMetrics"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-MetricsRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"}]},"recommendation-campaigns-RecentInteractionsRecommendationCampaignsCreateRequestV2":{"title":"Recent interactions","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeRecentInteractions"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"}]},"recommendation-campaigns-SectionRecommendationCampaignsCreateRequestV2":{"title":"Section","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeSection"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-SectionRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"}]},"recommendation-campaigns-AttributeRecommendationCampaignsCreateRequestV2":{"title":"Attribute","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeAttribute"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-AttributeRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsCreateRequestV2"}]},"recommendation-campaigns-SimpleRecommendationCampaignsV2":{"type":"array","items":{"type":"object","properties":{"campaignId":{"type":"string","description":"Campaign ID"},"title":{"type":"string","description":"Campaign title"},"type":{"type":"string","description":"Campaign type"}}}},"recommendation-campaigns-RecommendationCampaignUpdateFromAnotherCampaign":{"title":"Copy from another campaign","type":"object","properties":{"copyConfigurationFrom":{"type":"string","description":"Source campaign ID.\n\nWhen you copy from another campaign:\n- the following campaign data is NOT updated:\n  - `title`\n  - `state`\n  - `start_date`\n  - `end_date`\n  - `campaignId`\n  - `createdAt`\n- `modified_by_user_id` changes to the user who performed the update\n"}},"required":["copyConfigurationFrom"]},"recommendation-campaigns-RecommendationCampaignDefinitionV2":{"title":"Campaign definition","oneOf":[{"$ref":"#/components/schemas/recommendation-campaigns-SimilarRecommendationCampaignsDefinitionV2"},{"$ref":"#/components/schemas/recommendation-campaigns-MetricsRecommendationCampaignsDefinitionV2"},{"$ref":"#/components/schemas/recommendation-campaigns-CrossSellRecommendationCampaignsDefinitionV2"},{"$ref":"#/components/schemas/recommendation-campaigns-SetComplementRecommendationCampaignsDefinitionV2"},{"$ref":"#/components/schemas/recommendation-campaigns-LastViewedRecommendationCampaignsDefinitionV2"},{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizedRecommendationCampaignsDefinitionV2"},{"$ref":"#/components/schemas/recommendation-campaigns-VisuallySimilarRecommendationCampaignsDefinitionV2"},{"$ref":"#/components/schemas/recommendation-campaigns-ItemComparisonRecommendationCampaignsDefinitionV2"},{"$ref":"#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationCampaignsDefinitionV2"},{"$ref":"#/components/schemas/recommendation-campaigns-SectionRecommendationCampaignsDefinitionV2"},{"$ref":"#/components/schemas/recommendation-campaigns-AttributeRecommendationCampaignsDefinitionV2"},{"$ref":"#/components/schemas/recommendation-campaigns-NextInteractionRecommendationCampaignsDefinitionV2"},{"$ref":"#/components/schemas/recommendation-campaigns-ExternalItemsRecommendationCampaignsDefinitionV2"}],"discriminator":{"propertyName":"type","mapping":{"similar":"#/components/schemas/recommendation-campaigns-SimilarRecommendationCampaignsDefinitionV2","metrics":"#/components/schemas/recommendation-campaigns-MetricsRecommendationCampaignsDefinitionV2","cross-sell":"#/components/schemas/recommendation-campaigns-CrossSellRecommendationCampaignsDefinitionV2","set-complement":"#/components/schemas/recommendation-campaigns-SetComplementRecommendationCampaignsDefinitionV2","last-viewed":"#/components/schemas/recommendation-campaigns-LastViewedRecommendationCampaignsDefinitionV2","personalized":"#/components/schemas/recommendation-campaigns-PersonalizedRecommendationCampaignsDefinitionV2","visually-similar":"#/components/schemas/recommendation-campaigns-VisuallySimilarRecommendationCampaignsDefinitionV2","item-comparison":"#/components/schemas/recommendation-campaigns-ItemComparisonRecommendationCampaignsDefinitionV2","recent-interactions":"#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationCampaignsDefinitionV2","section":"#/components/schemas/recommendation-campaigns-SectionRecommendationCampaignsDefinitionV2","attribute":"#/components/schemas/recommendation-campaigns-AttributeRecommendationCampaignsDefinitionV2","next-interaction":"#/components/schemas/recommendation-campaigns-NextInteractionRecommendationCampaignsDefinitionV2","external-items":"#/components/schemas/recommendation-campaigns-ExternalItemsRecommendationCampaignsDefinitionV2"}}},"recommendation-campaigns-RecommendationCampaignUpdateRequest":{"oneOf":[{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"},{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationCampaignUpdateFromAnotherCampaign"}]},"recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2":{"type":"object","properties":{"campaignId":{"type":"string","description":"Campaign ID"},"title":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTitle"},"slug":{"$ref":"#/components/schemas/recommendation-campaigns-Slug"},"description":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignDescription"},"startDate":{"$ref":"#/components/schemas/recommendation-campaigns-StartDate"},"endDate":{"$ref":"#/components/schemas/recommendation-campaigns-EndDate"},"createdAt":{"type":"string","description":"Date when the campaign was created"},"updatedAt":{"type":"string","description":"Date when the campaign was last updated"},"state":{"$ref":"#/components/schemas/recommendation-campaigns-State"},"filterRules":{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationsCampaignFilterRules"},"itemsCatalogId":{"$ref":"#/components/schemas/recommendation-campaigns-ItemsCatalogId"},"additionalResponseAttributes":{"type":"array","description":"An array of addtional response attributes.","items":{"type":"string"}},"slots":{"$ref":"#/components/schemas/recommendation-campaigns-Slots"},"keepSlotsOrder":{"$ref":"#/components/schemas/recommendation-campaigns-KeepSlotsOrder"},"personalizeSlotsOrder":{"$ref":"#/components/schemas/recommendation-campaigns-PersonalizeSlotsOrder"},"boostingStrategies":{"$ref":"#/components/schemas/recommendation-campaigns-BoostingStrategies"},"itemsSource":{"$ref":"#/components/schemas/recommendation-campaigns-ItemsSource"},"abTest":{"$ref":"#/components/schemas/recommendation-campaigns-ABTestInfo"},"crossWorkspaceMode":{"$ref":"#/components/schemas/recommendation-campaigns-CrossWorkspaceMode"}},"required":["title","type","startDate","state","itemsCatalogId"]},"recommendation-campaigns-CrossSellRecommendationCampaignsDefinitionV2":{"title":"Cross-sell","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeCrossSell"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"}]},"recommendation-campaigns-SetComplementRecommendationCampaignsDefinitionV2":{"title":"Complementary","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeComplementary"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-SetComplementRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"}]},"recommendation-campaigns-LastViewedRecommendationCampaignsDefinitionV2":{"title":"Last viewed","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeLastViewed"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"}]},"recommendation-campaigns-PersonalizedRecommendationCampaignsDefinitionV2":{"title":"Personalized","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypePersonalized"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"}]},"recommendation-campaigns-VisuallySimilarRecommendationCampaignsDefinitionV2":{"title":"Visually similar","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeVisuallySimilar"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"}]},"recommendation-campaigns-SimilarRecommendationCampaignsDefinitionV2":{"title":"Similar","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeSimilar"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"}]},"recommendation-campaigns-NextInteractionRecommendationCampaignsDefinitionV2":{"title":"Next interaction","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeNextInteraction"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"}]},"recommendation-campaigns-ExternalItemsRecommendationCampaignsDefinitionV2":{"title":"External items","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeExternalItems"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"}]},"recommendation-campaigns-ItemComparisonRecommendationCampaignsDefinitionV2":{"title":"Comparison","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeItemComparison"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-WithMetricsRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"}]},"recommendation-campaigns-MetricsRecommendationCampaignsDefinitionV2":{"title":"Top items","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeMetrics"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-MetricsRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"}]},"recommendation-campaigns-RecentInteractionsRecommendationCampaignsDefinitionV2":{"title":"Recent interactions","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeRecentInteractions"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-RecentInteractionsRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"}]},"recommendation-campaigns-SectionRecommendationCampaignsDefinitionV2":{"title":"Section","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeSection"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-SectionRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"}]},"recommendation-campaigns-AttributeRecommendationCampaignsDefinitionV2":{"title":"Attribute","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendation-campaigns-CampaignTypeAttribute"},"parameters":{"$ref":"#/components/schemas/recommendation-campaigns-AttributeRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendation-campaigns-BaseRecommendationCampaignsDefinitionV2"}]},"recommendation-campaigns-RecommendationCampaignsResponseV2":{"type":"object","properties":{"meta":{"type":"object","description":"Pagination metadata","properties":{"totalPages":{"type":"number","description":"The total number of pages"},"totalCount":{"type":"number","description":"The total number of campaigns"},"page":{"type":"number","description":"The current page"},"limit":{"type":"number","description":"The maximal number of items on a page"},"sortedBy":{"type":"string","description":"The column (attribute) that the campaigns were sorted by"},"ordering":{"type":"string","description":"Sorting order"},"code":{"type":"number","description":"HTTP response code"},"link":{"type":"array","description":"Links to neighboring pages, first page, and last page in pagination","items":{"type":"object","properties":{"url":{"description":"Page URL","type":"string"},"rel":{"type":"string","description":"Position of the linked page","enum":["first","next","prev","last"]}}}}}},"data":{"type":"array","description":"Campaign details","items":{"$ref":"#/components/schemas/recommendation-campaigns-RecommendationCampaignDefinitionV2"}},"extras":{"type":"object","properties":{"states":{"type":"object","description":"Number of campaigns in particular state after applying filters","properties":{"active":{"type":"number"},"draft":{"type":"number"},"paused":{"type":"number"}}}}}}},"recommendation-campaigns-RecommendationStateChangeRequestV2":{"type":"object","properties":{"state":{"$ref":"#/components/schemas/recommendation-campaigns-State"},"ids":{"type":"array","minItems":1,"maxItems":10,"description":"An array of campaign IDs.","items":{"type":"string"}}},"required":["state","ids"]},"recommendation-campaigns-RecommendationStateChangeResponseV2":{"type":"array","description":"Array of updated campaigns IDs.","items":{"type":"string"}},"recommendations-api-materializer-Error":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"path":{"type":"string","description":"URL of the requested resource"}},"required":["timestamp","status","message"]},"recommendations-api-materializer-SlotError":{"type":"object","description":"Error details, if applicable","properties":{"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"}},"required":["status","error","message"]},"recommendations-api-materializer-RecommendationResponseSchemaV2-materializer":{"type":"object","properties":{"data":{"type":"array","description":"Recommended items","items":{"type":"object","properties":{"itemId":{"type":"string","description":"Item identifier"}},"required":["itemId"]}},"extras":{"type":"object","description":"Additional data","properties":{"correlationId":{"type":"string","description":"Correlation identifier of a recommendation request"},"contextItems":{"type":"array","description":"A list of context items provided in request","items":{"type":"object","properties":{"itemId":{"type":"string","description":"Item identifier (`itemId` in item catalog)"}},"additionalProperties":{},"required":["itemId"]}},"slots":{"type":"array","description":"A list of slots data","items":{"type":"object","properties":{"id":{"type":"integer","description":"Slot identifier. Matches the index (zero-based numbering) of the slot provided in request"},"name":{"type":"string","description":"Slot name provided in request"},"itemIds":{"type":"array","description":"A list of item ids that meet the slot criteria","items":{"type":"string","description":"Item identifier (`itemId` in item catalog)"}},"error":{"$ref":"#/components/schemas/recommendations-api-materializer-SlotError"}},"required":["id","itemIds"]}}},"required":["correlationId","slots"]}}},"recommendations-api-materializer-BasePostRecommendationsRequest":{"type":"object","properties":{"items":{"type":"array","description":"An array of item identifiers (`itemId` in the item feed) for the context. This could be, for example, the current basket, or the item that is currently being viewed.  \n\nThis overrides the `itemsSource` settings of the campaign definition.\n\nThis parameter can be passed in all recommendations. In recommendations which don't use the context item as part of the recommendation model, the context item can only be used to create filters.\n\nAlternatively, you can use the `itemsSource` object to get item IDs from an aggregate or expression. `items` and `itemsSource` can't be used at the same time.\n","items":{"type":"string","description":"`itemId` from the item feed"}},"itemsSource":{"type":"object","description":"Source of the Item ID or item IDs for the recommendation context.\n\nThis overrides the `itemsSource` settings of the campaign definition.\n\nThis parameter can be passed in all recommendations. In recommendations which don't use the context item as part of the recommendation model, the context item can only be used to create filters.\n\nThe item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.\n\nAlternatively, you can pass the `itemId` parameter to define context items directly. Only one of these options is allowed at the same time.\n","properties":{"type":{"$ref":"#/components/schemas/recommendations-api-materializer-RecommendationRequestItemsSourceType"},"id":{"$ref":"#/components/schemas/recommendations-api-materializer-RecommendationRequestItemsSourceId"}}},"itemsExcluded":{"type":"array","minItems":0,"description":"Items (identified by `itemId` in the item feed) that will be excluded from the generated recommendations. For example, items already added to the basket.","items":{"type":"string","description":"Items (identified by `itemId` in the item feed) that will be excluded from the generated recommendations. For example, items already added to the basket."}},"additionalFilters":{"type":"string","description":"<hr>\n<strong>IMPORTANT</strong>:\n\n- The `filtersJoiner` attribute is REQUIRED when `additionalFilters` is included. If `filtersJoiner` is missing, the additional filters do not work.  \n- Do NOT send multiple instances of this parameter.\n\n<hr>\n\nAdditional filters. These are merged with the campaign's own filters according to the logic in `filtersJoiner`.\n\nThis parameter must include all the additional filters as a single string, for example `additionalFilters=effectivePrice>300 AND effectivePrice<400` (the spaces are required).\n","example":"effectivePrice>300 AND effectivePrice<400"},"filtersJoiner":{"type":"string","enum":["AND","OR","REPLACE"],"description":"Defines the logic of merging `additionalFilters` with the campaign's existing filters.\n- `REPLACE` replaces the campaign's filters with your filters.\n- `AND` matches if both your filters and the campaign filters are met.\n- `OR` matches if at least one of the filters is met.\n"},"additionalElasticFilters":{"type":"string","description":"<hr>\n<strong>IMPORTANT</strong>:\n\n- The `elasticFiltersJoiner` attribute is REQUIRED when `additionalElasticFilters` is included. If `elasticFiltersJoiner` is missing, the additional filters do not work.  \n- Do NOT send multiple instances of this parameter.\n\n<hr>\n\nAdditional elastic filters. These are merged with the campaign's own elastic filters according to the logic in `elasticFiltersJoiner`.\n\nThis parameter must include all the additional filters as a single string, for example `additionalElasticFilters=effectivePrice>300 AND effectivePrice<400` (the spaces are required).\n","example":"effectivePrice>300 AND effectivePrice<400"},"elasticFiltersJoiner":{"type":"string","enum":["AND","OR","REPLACE"],"description":"Defines the logic of merging `additionalElasticFilters` with the campaign's existing elastic filters.\n- `REPLACE` replaces the campaign's filters with your filters.\n- `AND` matches if both your filters and the campaign filters are met.\n- `OR` matches if at least one of the filters is met.\n"},"displayAttributes":{"type":"array","minItems":0,"items":{"type":"string"},"description":"An array of item attributes which value will be returned in a recommendation response. The array will be merged together with the configuration of the recommendation."},"includeContextItems":{"type":"boolean","description":"When true, the recommendation response will include context items metadata."},"recommendedItemsFromExternalModel":{"type":"array","minItems":0,"items":{"type":"array","items":{"type":"string"}},"description":"Items provided by an external recommendation model to be returned as recommendation results.\n\nThis parameter is used with campaigns of type \"external-items\".\n"},"inventoryContext":{"$ref":"#/components/schemas/recommendations-api-materializer-InventoryContext"},"params":{"$ref":"#/components/schemas/recommendations-api-materializer-ParamsMaterializer"}}},"recommendations-api-materializer-PostRecommendationsRequest":{"allOf":[{"type":"object","properties":{"clientUUID":{"type":"string","description":"Profile UUID. This parameter is required for these recommendation types:\n  - Personalized\n  - Last seen\n  - Recent interactions\n  - Section\n  - Attribute\n\nThis parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters.\n"},"campaignId":{"type":"string","description":"Recommendation campaign ID for establishing the context"},"slug":{"type":"string","description":"Recommendation campaign slug for establishing the context"}}},{"$ref":"#/components/schemas/recommendations-api-materializer-BasePostRecommendationsRequest"}]},"recommendations-api-materializer-PostRecommendationsWithIdentifierValueRequest":{"allOf":[{"type":"object","required":["identifierValue"],"properties":{"identifierValue":{"type":"string","description":"Value of the identifier selected in the path attributes"}}},{"$ref":"#/components/schemas/recommendations-api-materializer-BasePostRecommendationsRequest"}]},"recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest":{"type":"object","properties":{"title":{"$ref":"#/components/schemas/recommendations-api-materializer-CampaignTitle"},"campaignId":{"$ref":"#/components/schemas/recommendations-api-materializer-CampaignId"},"filterRules":{"$ref":"#/components/schemas/recommendations-api-materializer-RecommendationsCampaignFilterRules"},"itemsCatalogId":{"$ref":"#/components/schemas/recommendations-api-materializer-ItemsCatalogId"},"slots":{"$ref":"#/components/schemas/recommendations-api-materializer-Slots"},"keepSlotsOrder":{"$ref":"#/components/schemas/recommendations-api-materializer-KeepSlotsOrder"},"personalizeSlotsOrder":{"$ref":"#/components/schemas/recommendations-api-materializer-PersonalizeSlotsOrder"},"boostingStrategies":{"$ref":"#/components/schemas/recommendations-api-materializer-BoostingStrategies"},"itemsSource":{"$ref":"#/components/schemas/recommendations-api-materializer-ItemsSource"}},"required":["type","itemsCatalogId","slots"]},"recommendations-api-materializer-CampaignTitle":{"type":"string","description":"Title of the campaign used in the preview.","default":"preview"},"recommendations-api-materializer-CampaignId":{"type":"string","description":"ID of the campaign used in the preview.","default":"preview"},"recommendations-api-materializer-PreviewCrossSellRecommendationCampaignsCreateRequest":{"title":"Cross-sell","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendations-api-materializer-CampaignTypeCrossSell"},"parameters":{"allOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"}}}]}}},{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"}]},"recommendations-api-materializer-PreviewSetComplementRecommendationCampaignsCreateRequest":{"title":"Complementary","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendations-api-materializer-CampaignTypeComplementary"},"parameters":{"$ref":"#/components/schemas/recommendations-api-materializer-SetComplementRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"}]},"recommendations-api-materializer-PreviewLastViewedRecommendationCampaignsCreateRequest":{"title":"Last viewed","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendations-api-materializer-CampaignTypeLastViewed"},"parameters":{"allOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"}}}]}}},{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"}]},"recommendations-api-materializer-PreviewPersonalizedRecommendationCampaignsCreateRequest":{"title":"Personalized","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendations-api-materializer-CampaignTypePersonalized"},"parameters":{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"}]},"recommendations-api-materializer-PreviewVisuallySimilarRecommendationCampaignsCreateRequest":{"title":"Visually similar","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendations-api-materializer-CampaignTypeVisuallySimilar"},"parameters":{"allOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"}}}]}}},{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"}]},"recommendations-api-materializer-PreviewSimilarRecommendationCampaignsCreateRequest":{"title":"Similar","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendations-api-materializer-CampaignTypeSimilar"},"parameters":{"allOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"}}}]}}},{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"}]},"recommendations-api-materializer-PreviewItemComparisonRecommendationCampaignsCreateRequest":{"title":"Comparison","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendations-api-materializer-CampaignTypeItemComparison"},"parameters":{"allOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"}}}]}}},{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"}]},"recommendations-api-materializer-PreviewMetricsRecommendationCampaignsCreateRequest":{"title":"Top items","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendations-api-materializer-CampaignTypeMetrics"},"parameters":{"$ref":"#/components/schemas/recommendations-api-materializer-MetricsRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"}]},"recommendations-api-materializer-PreviewRecentInteractionsRecommendationCampaignsCreateRequest":{"title":"Recent interactions","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendations-api-materializer-CampaignTypeRecentInteractions"},"parameters":{"$ref":"#/components/schemas/recommendations-api-materializer-RecentInteractionsRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"}]},"recommendations-api-materializer-PreviewSectionRecommendationCampaignsCreateRequest":{"title":"Section","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendations-api-materializer-CampaignTypeSection"},"parameters":{"$ref":"#/components/schemas/recommendations-api-materializer-SectionRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"}]},"recommendations-api-materializer-PreviewAttributeRecommendationCampaignsCreateRequest":{"title":"Attribute","allOf":[{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/recommendations-api-materializer-CampaignTypeAttribute"},"parameters":{"$ref":"#/components/schemas/recommendations-api-materializer-AttributeRecommendationsCampaignParameters"}}},{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationCampaignsPreviewRequest"}]},"recommendations-api-materializer-RecommendationRequestItemsSourceType":{"type":"string","enum":["aggregate","expression"],"description":"Type of the items' source."},"recommendations-api-materializer-PersonalizedBoostingStrength":{"type":"number","description":"How much influence the personalized scoring has. Greater values allow you to promote items that have high personalized score. A strength with a value of 0 does not change the scoring.","format":"float","minimum":0,"maximum":100,"default":0},"recommendations-api-materializer-BoostingStrategies":{"type":"array","description":"Recommendation boosting strategies","items":{"$ref":"#/components/schemas/recommendations-api-materializer-BoostingStrategy"}},"recommendations-api-materializer-BoostingStrategy":{"type":"object","description":"Boosting strategy allows you to promote or demote specific types of products in recommendation scoring","properties":{"name":{"type":"string","description":"Boosting strategy name"},"condition":{"type":"string","description":"The condition that indicates on which items the boost will be performed. The condition must comply with the rules of creating filters."},"strength":{"type":"number","description":"How much influence the strategy has. Values less than 1.0 allow you to degrade items that meet the condition, values greater than 1.0 allow you to promote items that meet the condition. A strength with a value of 1.0 does not change the scoring.","format":"float","minimum":0,"maximum":2,"default":1}},"required":["name","condition","strength"]},"recommendations-api-materializer-ItemsSource":{"type":"object","description":"The source of item ID or IDs for the recommendation context. This parameter can be passed in all recommendations. In recommendations which don't use item context as part of the recommendation model, the context item can be used only to create filters.\n\nThe item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.\n\nAlternatively, you can pass the `itemId` or `itemsSource` parameter when making a request to generate a recommendation from this campaign. The parameter overrides the settings defined here.\n","properties":{"type":{"type":"string","enum":["aggregate","expression"],"description":"Type of the source of item ID or IDs for the recommendation context. \n\nIf the items' source type is 'aggregate', the aggregate result will be used as context items. If the items' source type is 'expression', the expression result will be used as context items.\n"},"id":{"type":"string","description":"ID of the items' source for the recommendation context. If the source's type is 'aggregate', this is the aggregate's ID. If the source's type is 'expression', this is the expression's ID.\n"}}},"recommendations-api-materializer-RecommendationRequestItemsSourceId":{"type":"string","description":"ID of the items' source (aggregate or expression)"},"recommendations-api-materializer-ParamsMaterializer":{"type":"object","example":{"source":"mobile"},"description":"Extra parameters that will be added to the `recommendation.generated` event. The total size must not exceed 500 bytes.","additionalProperties":true},"recommendations-api-materializer-InventoryContext":{"description":"Inventory context used to evaluate inventory-related filters and boosting strategies.\nCan be either a single inventory context or\na multi-inventory context (set of channel IDs per inventory).\n","oneOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-SingleInventoryContext"},{"$ref":"#/components/schemas/recommendations-api-materializer-MultiInventoryContext"}]},"recommendations-api-materializer-SingleInventoryContext":{"type":"object","description":"Single inventory context.\n","properties":{"channelIds":{"type":"array","items":{"type":"string"},"description":"List of channel identifiers used to evaluate inventory-related filters and boosting strategies.\n"}},"required":["channelIds"]},"recommendations-api-materializer-RecommendationsCampaignFilterRules":{"type":"object","description":"Filters that apply to this campaign. If the filters contain an attribute used in the default filters of the recommendation model ([**Settings > AI Configuration**](https://help.synerise.com/docs/settings/configuration/ai-engine-configuration/engine-configuration-for-recommendations/#selecting-recommendation-types-and-default-filters)), that default filter is ignored.","properties":{"excludePurchasedItems":{"type":"boolean","description":"When true, the recommendation results will include only items that the profile hasn't purchased before."},"excludePurchasedItemsSinceDays":{"type":"number","format":"integer","description":"Limits the application of the `excludePurchasedItems` filter to a specified number of days."},"elasticExcludePurchasedItems":{"type":"boolean","description":"This is a setting for Elastic filters.<br>When true, the recommendation results will include only items that the profile hasn't purchased before."},"elasticExcludePurchasedItemsSinceDays":{"type":"number","format":"integer","description":"This is a setting for Elastic filters.<br>Limits the application of the `elasticExcludePurchasedItemsSinceDays` filter to a specified number of days."}}},"recommendations-api-materializer-ItemsCatalogId":{"type":"string","description":"Only items from this catalog will be recommended."},"recommendations-api-materializer-ItemMin":{"type":"integer","description":"The minimal number of items in the campaign or the minimal number of attribute values in the attribute recommendation campaign."},"recommendations-api-materializer-ItemMax":{"type":"integer","description":"The maximal number of items in the campaign or the maximal number of attribute values in the attribute recommendation campaign."},"recommendations-api-materializer-ShuffleNumItems":{"type":"integer","description":"When this parameter is provided, this many best item recommendations are provided. A number of them, no more than the value of `itemMax`, are chosen randomly for recommendation."},"recommendations-api-materializer-RecommendationsCampaignSlotFilterRules":{"type":"object","description":"Filters that apply to this campaign","properties":{"filters":{"type":"string","description":"Filtering string"},"elasticFilters":{"type":"string","description":"Filtering string for Elastic filter"}}},"recommendations-api-materializer-DistinctFilter":{"type":"object","description":"Distinct filter allows to specify how many recommended items can have the same value of specified attributes.","properties":{"elastic":{"type":"boolean","description":"It allows to complete the recommended items with items which don't meet the distinct filter criteria."},"filters":{"type":"array","minItems":1,"maxItems":5,"description":"Array of distinct filters","items":{"type":"object","properties":{"field":{"type":"string","description":"Attribute name"},"maxNumItems":{"type":"number","format":"integer","description":"Max number of items with the same value of the attribute"},"levelRangeModifier":{"type":"number","format":"integer","description":"Parameter used (for the `category` field) to specify how many categories to cut off from the end"}},"required":["field","maxNumItems"]}}},"required":["elastic","filters"]},"recommendations-api-materializer-CampaignTypeCrossSell":{"type":"string","description":"Campaign type","enum":["cross-sell"]},"recommendations-api-materializer-CampaignTypeSimilar":{"type":"string","description":"Campaign type","enum":["similar"]},"recommendations-api-materializer-CampaignTypeComplementary":{"type":"string","description":"Campaign type","enum":["set-complement"]},"recommendations-api-materializer-CampaignTypeLastViewed":{"type":"string","description":"Campaign type","enum":["last-viewed"]},"recommendations-api-materializer-CampaignTypeMetrics":{"type":"string","description":"Campaign type","enum":["metrics"]},"recommendations-api-materializer-CampaignTypePersonalized":{"type":"string","description":"Campaign type","enum":["personalized"]},"recommendations-api-materializer-CampaignTypeVisuallySimilar":{"type":"string","description":"Campaign type","enum":["visually-similar"]},"recommendations-api-materializer-CampaignTypeItemComparison":{"type":"string","description":"Campaign type","enum":["item-comparison"]},"recommendations-api-materializer-CampaignTypeRecentInteractions":{"type":"string","description":"Campaign type","enum":["recent-interactions"]},"recommendations-api-materializer-CampaignTypeSection":{"type":"string","description":"Campaign type","enum":["section"]},"recommendations-api-materializer-CampaignTypeAttribute":{"type":"string","description":"Campaign type","enum":["attribute"]},"recommendations-api-materializer-Slots":{"type":"array","minLength":1,"description":"Recommendation slots. Must contain at least one slot with a non-empty `name`.","items":{"$ref":"#/components/schemas/recommendations-api-materializer-Slot"}},"recommendations-api-materializer-Slot":{"type":"object","description":"Slot allows you to define a separate recommendation frame with its filters and other parameters","properties":{"name":{"$ref":"#/components/schemas/recommendations-api-materializer-SlotName"},"itemMin":{"$ref":"#/components/schemas/recommendations-api-materializer-ItemMin"},"itemMax":{"$ref":"#/components/schemas/recommendations-api-materializer-ItemMax"},"filterRules":{"$ref":"#/components/schemas/recommendations-api-materializer-RecommendationsCampaignSlotFilterRules"},"distinctFilter":{"$ref":"#/components/schemas/recommendations-api-materializer-DistinctFilter"},"attribute":{"type":"object","description":"The attribute for rows grouping in the section and attribute recommendation campaign.","properties":{"name":{"description":"Name of attribute for rows grouping.","type":"string"},"levelRangeModifier":{"description":"Restricts the range of products in recommendations to a particular attribute level.","type":"integer"}}},"numRows":{"type":"integer","description":"The number of rows in the section recommendation campaign."},"numItems":{"type":"integer","description":"The number of products in each row in the section recommendation campaign."}},"required":["name"]},"recommendations-api-materializer-SlotName":{"type":"string","description":"Slot name"},"recommendations-api-materializer-KeepSlotsOrder":{"type":"boolean","default":true,"description":"- When `true`, the `data` array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in `data` are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.\n- When `false`, the `data` array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.\n\nThe additional `extras.slots` object always shows slots and items as if this setting was `true`.\n\nIf you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.\n"},"recommendations-api-materializer-PersonalizeSlotsOrder":{"type":"boolean","default":false,"description":"Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.\n\nIf you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.\n"},"recommendations-api-materializer-BaseRecommendationsCampaignParameters":{"type":"object","description":"Parameters that apply to this campaign","properties":{"additionalResponseAttributes":{"type":"array","items":{"type":"string"},"description":"An array of additional response attributes."}}},"recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters":{"allOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"},{"type":"object","properties":{"boostMetric":{"type":"string","description":"ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results."},"sortMetric":{"type":"string","description":"ID of the metric to sort the results by."},"boostMetricStrength":{"type":"number","description":"How much influence the `boostMetric` has. Values less than 0 allow you to demote items that have high metric score, values greater than 0 allow you to promote items that have high metric score. A strength with a value of 0 does not change the scoring.","format":"float","minimum":-100,"maximum":100},"shuffleNumItems":{"$ref":"#/components/schemas/recommendations-api-materializer-ShuffleNumItems"}}}]},"recommendations-api-materializer-MetricsRecommendationsCampaignParameters":{"allOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-WithMetricsRecommendationsCampaignParameters"},{"type":"object","properties":{"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"}},"required":["sortMetric"]}]},"recommendations-api-materializer-SetComplementRecommendationsCampaignParameters":{"allOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"},{"type":"object","properties":{"itemSimilarity":{"type":"integer","minimum":0,"maximum":5,"description":"Similarity between items in the cart and the recommended items. Higher values decrease the similarity."},"recommendationVariety":{"type":"number","format":"float","minimum":0,"maximum":0.9,"description":"Similarity between recommended items - higher values will result in more variety within the recommended item set."},"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"}}}]},"recommendations-api-materializer-RecentInteractionsRecommendationsCampaignParameters":{"allOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"},{"type":"object","properties":{"aggregateId":{"type":"string","description":"Id of the aggregate which provides events as a base of recommendations."},"personalizedBoostingStrength":{"$ref":"#/components/schemas/recommendations-api-materializer-PersonalizedBoostingStrength"}}}]},"recommendations-api-materializer-SectionRecommendationsCampaignParameters":{"allOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"},{"type":"object","properties":{"metadataCatalogId":{"type":"string"}}}]},"recommendations-api-materializer-AttributeRecommendationsCampaignParameters":{"allOf":[{"$ref":"#/components/schemas/recommendations-api-materializer-BaseRecommendationsCampaignParameters"},{"type":"object","properties":{"metadataCatalogId":{"type":"string","description":"The id of catalog containing attributes metadata."}}}]},"recommendations-api-materializer-ClientUUID":{"description":"UUID of the client","type":"string","format":"uuid"},"recommendations-api-materializer-Item":{"type":"string","description":"ID of an entity in the item feed"},"recommendations-api-materializer-Items":{"type":"array","description":"A list of itemIds for building the context. Alternatively, you can use the `itemsSource` parameter to provide the context. Item context is required by these recommendation types: `similar`, `cross-sell`, `set-complement`, `visually-similar`, `item-comparison`. In other recommendation types, the item context is optional, but may be used by the model when scoring items.","items":{"$ref":"#/components/schemas/recommendations-api-materializer-Item"}},"recommendations-api-materializer-IncludeContextItems":{"type":"boolean","default":false,"description":"The recommendation results will include context items from the request."},"recommendations-api-materializer-ParamsReco":{"type":"object","example":{"source":"mobile"},"description":"Extra parameters that will be added to the `recommendation.generated` event. The total size must not exceed 500 bytes."},"recommendations-api-materializer-MultiInventoryContext":{"type":"object","description":"Multi-inventory context where each inventory can have its own set of channel IDs.\n","properties":{"inventoryCatalogs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/recommendations-api-materializer-InventoryContextDefinition"},"description":"Map of inventory ID to inventory context definition. Each inventory can have its own set of channel IDs.\n"}},"required":["inventoryCatalogs"]},"recommendations-api-materializer-InventoryContextDefinition":{"type":"object","description":"Context definition for a specific inventory.\n","properties":{"channelIds":{"type":"array","items":{"type":"string"},"description":"List of channel identifiers for this specific inventory.\n"}}},"recommendations-api-materializer-PreviewRecommendationContext":{"type":"object","properties":{"clientUUID":{"$ref":"#/components/schemas/recommendations-api-materializer-ClientUUID"},"items":{"$ref":"#/components/schemas/recommendations-api-materializer-Items"},"includeContextItems":{"$ref":"#/components/schemas/recommendations-api-materializer-IncludeContextItems"},"params":{"$ref":"#/components/schemas/recommendations-api-materializer-ParamsReco"},"inventoryContext":{"$ref":"#/components/schemas/recommendations-api-materializer-InventoryContext"}}},"recommendations-config-CrossWorkspaceMode":{"type":"object","description":"Cross-workspace mode configuration","properties":{"enabled":{"type":"boolean","description":"Whether cross-workspace mode is enabled"}}},"recommendations-config-CrossWorkspaceModeStatus":{"type":"object","description":"Cross-workspace mode status for a model","properties":{"state":{"type":"string","description":"Cross-workspace mode state.\n  - Disabled: cross-workspace mode is disabled.\n  - Events: cross-workspace events are enabled.\n  - Full: cross-workspace model training and events are enabled.\n","enum":["Disabled","Events","Full"]}},"required":["state"]},"recommendations-config-ModelEnabled":{"type":"boolean","description":"`true` when the model is enabled for this feed"},"recommendations-config-DefaultFilters":{"type":"array","deprecated":true,"description":"Default filters that apply to all recommendation requests from this feed and model. For syntax, see [https://hub.synerise.com/developers/iql/](https://hub.synerise.com/developers/iql/).\nThis field is kept in bidirectional sync with `defaultItemFiltersConfiguration`\n- When `defaultItemFiltersConfiguration` is provided and non-empty, `defaultFilters` is automatically derived from it (the `iqlExpression` values).\n- When only `defaultFilters` is provided, `defaultItemFiltersConfiguration` is automatically derived from it. \n- If both are provided, `defaultItemFiltersConfiguration` takes priority.\n","items":{"type":"string"}},"recommendations-config-Error":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"}},"required":["timestamp","status","message"]},"recommendations-config-SyneriseError":{"type":"object","properties":{"error":{"type":"string","description":"A description of the error"},"errorCode":{"type":"string","description":"Synerise error code. See [API error code reference](https://developers.synerise.com/errors.html)."},"httpStatus":{"type":"string","description":"HTTP code of the error"},"message":{"type":"string","description":"A description of the error"},"path":{"type":"string","description":"The path to the resource where the error occurred"},"status":{"type":"number","description":"Internal status"},"timestamp":{"type":"string","format":"date-time","description":"Date and time when the problem occurred."},"requestId":{"type":"string","description":"Unique ID for troubleshooting"},"traceId":{"type":"string","description":"Unique ID for troubleshooting"}}},"recommendations-config-ItemsCreatedAt":{"type":"string","format":"date-time","description":"Time of catalog creation, ISO 8601"},"recommendations-config-ItemsUpdatedAt":{"type":"string","format":"date-time","description":"Time of the last successful item update, ISO 8601"},"recommendations-config-PersonalizedPromotionsSchema":{"type":"object","description":"Personalized promotions configuration for this catalog. Only one catalog per workspace may have promotions\nenabled at a time.\n","properties":{"enabled":{"type":"boolean","description":"Whether the promotions data source is enabled for this catalog."}}},"recommendations-config-ModelsSchema":{"description":"Model configurations for this feed","type":"object","properties":{"complementToSet":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelSchema"},"complementary":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelSchema"},"lastViewed":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelSchema"},"metricsBased":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelSchema"},"personalized":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelSchema"},"section":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelSchema"},"attribute":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelSchema"},"similar":{"$ref":"#/components/schemas/recommendations-config-RecommendationModelWithTrainingSchema"},"visualSimilarity":{"$ref":"#/components/schemas/recommendations-config-VisualRecommendationModelSchema"},"itemComparison":{"$ref":"#/components/schemas/recommendations-config-RecommendationModelWithTrainingSchema"},"recentInteractions":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelSchema"}}},"recommendations-config-BasicRecommendationModelSchema":{"type":"object","properties":{"enabled":{"$ref":"#/components/schemas/recommendations-config-ModelEnabled"},"defaultFilters":{"$ref":"#/components/schemas/recommendations-config-DefaultFilters"},"defaultItemFiltersConfiguration":{"$ref":"#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration"},"defaultDistinctFiltersConfiguration":{"$ref":"#/components/schemas/recommendations-config-DefaultDistinctFiltersConfiguration"}}},"recommendations-config-RecommendationModelWithTrainingSchema":{"type":"object","properties":{"enabled":{"$ref":"#/components/schemas/recommendations-config-ModelEnabled"},"defaultFilters":{"$ref":"#/components/schemas/recommendations-config-DefaultFilters"},"defaultItemFiltersConfiguration":{"$ref":"#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration"},"defaultDistinctFiltersConfiguration":{"$ref":"#/components/schemas/recommendations-config-DefaultDistinctFiltersConfiguration"},"training":{"type":"object","description":"Training configuration, applicable in some models","properties":{"fields":{"type":"array","items":{"type":"string","example":"title"}}}}}},"recommendations-config-VisualRecommendationModelSchema":{"type":"object","properties":{"enabled":{"$ref":"#/components/schemas/recommendations-config-ModelEnabled"},"defaultFilters":{"$ref":"#/components/schemas/recommendations-config-DefaultFilters"},"defaultItemFiltersConfiguration":{"$ref":"#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration"},"training":{"type":"object","description":"Training configuration, applicable in some models","properties":{"imageLink":{"type":"string"},"additionalImageLinks":{"type":"string"},"availability":{"type":"string"}}}}},"recommendations-config-DisplayedAttributesSchema":{"description":"Attributes shown in the recommendation results","example":["brand","color","title"],"type":"array","items":{"type":"string"}},"recommendations-config-LinkAttributeSchema":{"description":"Name of the attribute which will be used as link to an item","type":"string"},"recommendations-config-LinkAttributesSchema":{"description":"Names of attributes which will be used as link to an item","type":"array","items":{"$ref":"#/components/schemas/recommendations-config-LinkAttributeSchema"}},"recommendations-config-DistinctAttributesSchema":{"description":"Names of attributes which can be used in distinct filters","type":"array","items":{"allOf":[{"type":"string"}]}},"recommendations-config-PreviewAttributesSchema":{"description":"Mapping of attributes which will be used for preview","type":"object","properties":{"title":{"type":"string","description":"The name of the attribute in the source catalog that stores the title."},"category":{"type":"string","description":"The name of the attribute in the source catalog that stores the category."},"imageLink":{"type":"string","description":"The name of the attribute in the source catalog that stores the item's image link."},"itemLink":{"type":"string","description":"The name of the attribute in the source catalog that stores the item's page link."},"price":{"type":"string","description":"The name of the attribute in the source catalog that stores the item's price."},"additionalAttributes":{"type":"object","description":"Other parameter mappings","additionalProperties":{"type":"string"}}}},"recommendations-config-RecommendationModelStateSchema":{"type":"object","description":"Current state of the model","properties":{"name":{"type":"string","description":"State name.\n  - ServingDisabled: the model wasn't enabled in the configuration.\n  - Active: the model is active and working.\n  - NotEnoughData: the model can't be trained because there aren't enough events in the database.\n  - TrainingInProgress: the model is currently being trained.\n  - TrainingDisabled: the model didn't receive any requests in 30 days and isn't scheduled for training. It can still accept requests and return a recommendation. If a request to the model is made, training is re-enabled.\n  - Inactive: the model didn't receive any requests for 60 days and was deactivated. It must be re-enabled in the configuration.\n","enum":["ServingDisabled","TrainingDisabled","TrainingInProgress","NotEnoughData","Active","Inactive"]},"cause":{"type":"string","description":"The cause of the transition into the current state","enum":["Inactivity"]},"changedAfterNumOfDays":{"type":"number","description":"The number of days after which a model was transitioned to the `TrainingDisabled` or `ServingDisabled` state."}},"required":["name"]},"recommendations-config-RecommendationRequirements":{"type":"object","description":"Model requirements","properties":{"lastCheckDate":{"type":"string","format":"date-time","description":"Date and time when the requirements were last checked."},"minimal":{"type":"array","description":"Minimum requirements of the model type","items":{"$ref":"#/components/schemas/recommendations-config-RecommendationSingleRequirement"}},"recommended":{"type":"array","description":"Recommended requirements of the model type","items":{"$ref":"#/components/schemas/recommendations-config-RecommendationSingleRequirement"}}}},"recommendations-config-DefaultDistinctFiltersConfiguration":{"description":"Default distinct filters configuration that can be applied to a specific campaign slot.","type":"object","properties":{"filters":{"description":"List of default distinct filters.","type":"array","items":{"$ref":"#/components/schemas/recommendations-config-DistinctFilterConfigEntry"}},"elastic":{"description":"Specify if default distinct filters are elastic.","type":"boolean"}}},"recommendations-config-DefaultItemFiltersConfiguration":{"description":"Default item filters configuration that apply to all recommendation campaigns.\nThis field is kept in bidirectional sync with `defaultFilters`.\n- When this field is provided and non-empty, it takes priority and `defaultFilters` is derived from the `iqlExpression` values.\n- When only `defaultFilters` is provided, this field is automatically populated from it. This format supports additional metadata such as `description` per filter entry.\n","type":"object","properties":{"filters":{"description":"List of individual default item filters.","type":"array","items":{"$ref":"#/components/schemas/recommendations-config-ItemFilterConfigEntry"}}}},"recommendations-config-DistinctFilterConfigEntry":{"type":"object","properties":{"field":{"type":"string","description":"Name of the attribute for distinct filter"},"levelRangeModifier":{"type":"integer","description":"Applies only when the attribute is `category`. Controls how many levels of the category chain are used for filtering.\n- A positive value `N` removes `N` levels from the right (lowest/deepest levels), always keeping at least one level.\n- A negative value `-N` keeps only the first `N` levels from the left (highest levels).\n- `0` (default) leaves the category chain unchanged.\nFor example, if the category is `A > B > C > D`\n- using `1` changes the category to `A > B > C`\n- using `2` changes the category to `A > B`\n- using `3` changes the category to `A`\n- using `-1` changes the category to `A`\n- using `-2` changes the category to `A > B`\n- using `-3` changes the category to `A > B > C`\n"},"maxNumItems":{"type":"integer","description":"The maximum number of items which can have the same attribute value"},"description":{"type":"string","maxLength":300,"description":"Human-readable description of the default distinct filter, cannot be longer than 300 characters."}}},"recommendations-config-ItemFilterConfigEntry":{"type":"object","properties":{"iqlExpression":{"type":"string","description":"IQL expression of item filters that will be applied to all recommendation campaigns"},"description":{"type":"string","maxLength":300,"description":"Human readable description of the item filter, cannot be longer than 300 characters."}}},"recommendations-config-RecommendationSingleRequirement":{"type":"object","properties":{"code":{"type":"string","description":"Unique code of the requirement"},"explanation":{"type":"string","description":"Explanation of the requirement, with variables that should be replaced with with a value from `values` to display a human-readable explanation."},"isSatisfied":{"type":"boolean","description":"`true` when the requirement is satisfied."},"values":{"type":"object","description":"Map of pairs (key, value) where keys in explanation field should be replaced with values. The keys correspond to the variables in in `description`, their names depend on the model type.","additionalProperties":{"type":"number"}}}},"recommendations-config-RecommendationFeedConfigurationWithModelsStateV3Schema":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/recommendations-config-RecommendationCatalogConfigurationV3Schema"},"modelsState":{"$ref":"#/components/schemas/recommendations-config-RecommendationCatalogModelsStateV3ArraySchema"}}},"recommendations-config-RecommendationCatalogConfigurationV3Schema":{"type":"object","description":"Configuration of the item feed","properties":{"displayedAttributes":{"$ref":"#/components/schemas/recommendations-config-DisplayedAttributesSchema"},"linkAttribute":{"$ref":"#/components/schemas/recommendations-config-LinkAttributeSchema"},"linkAttributes":{"$ref":"#/components/schemas/recommendations-config-LinkAttributesSchema"},"models":{"$ref":"#/components/schemas/recommendations-config-ModelsV3Schema"},"itemsCreatedAt":{"$ref":"#/components/schemas/recommendations-config-ItemsCreatedAt"},"itemsUpdatedAt":{"$ref":"#/components/schemas/recommendations-config-ItemsUpdatedAt"},"crossWorkspaceMode":{"$ref":"#/components/schemas/recommendations-config-CrossWorkspaceMode"}}},"recommendations-config-ModelsV3Schema":{"description":"Model configurations for this feed","type":"object","properties":{"complementToSet":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"},"complementary":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"},"lastViewed":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"},"metricsBased":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"},"personalized":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"},"section":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"},"attribute":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"},"similar":{"$ref":"#/components/schemas/recommendations-config-RecommendationModelWithTrainingV3Schema"},"visualSimilarity":{"$ref":"#/components/schemas/recommendations-config-VisualRecommendationModelV3Schema"},"itemComparison":{"$ref":"#/components/schemas/recommendations-config-RecommendationModelWithTrainingV3Schema"},"recentInteractions":{"$ref":"#/components/schemas/recommendations-config-BasicRecommendationModelV3Schema"}}},"recommendations-config-BasicRecommendationModelV3Schema":{"type":"object","properties":{"defaultFilters":{"$ref":"#/components/schemas/recommendations-config-DefaultFilters"},"defaultItemFiltersConfiguration":{"$ref":"#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration"},"defaultDistinctFiltersConfiguration":{"$ref":"#/components/schemas/recommendations-config-DefaultDistinctFiltersConfiguration"}}},"recommendations-config-RecommendationModelWithTrainingV3Schema":{"type":"object","properties":{"defaultFilters":{"$ref":"#/components/schemas/recommendations-config-DefaultFilters"},"defaultItemFiltersConfiguration":{"$ref":"#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration"},"defaultDistinctFiltersConfiguration":{"$ref":"#/components/schemas/recommendations-config-DefaultDistinctFiltersConfiguration"},"training":{"type":"object","description":"Training configuration, applicable in some models","properties":{"fields":{"type":"array","items":{"type":"string","example":"title"}}}}}},"recommendations-config-VisualRecommendationModelV3Schema":{"type":"object","properties":{"defaultFilters":{"$ref":"#/components/schemas/recommendations-config-DefaultFilters"},"defaultItemFiltersConfiguration":{"$ref":"#/components/schemas/recommendations-config-DefaultItemFiltersConfiguration"},"training":{"type":"object","description":"Training configuration, applicable in some models","properties":{"imageLink":{"type":"string"},"additionalImageLinks":{"type":"string"},"availability":{"type":"string"}}}}},"recommendations-config-RecommendationCatalogModelsStateV3ArraySchema":{"type":"array","description":"Models and their states","items":{"$ref":"#/components/schemas/recommendations-config-RecommendationModelV3Schema"}},"recommendations-config-RecommendationModelV3Schema":{"type":"object","properties":{"modelType":{"type":"string","description":"Model type"},"enabled":{"type":"boolean","description":"`true` when the model is enabled"},"state":{"$ref":"#/components/schemas/recommendations-config-RecommendationModelStateSchema"},"requirements":{"$ref":"#/components/schemas/recommendations-config-RecommendationRequirements"},"crossWorkspaceMode":{"$ref":"#/components/schemas/recommendations-config-CrossWorkspaceModeStatus"}},"required":["modelType","enabled","state"]},"recommendations-config-TrainingCustomEventsSchema":{"type":"object","properties":{"meta":{"type":"object","description":"Pagination metadata. Present only when the `includeMeta` query parameter is `true`.","properties":{"totalPages":{"type":"number","description":"The total number of pages"},"totalCount":{"type":"number","description":"The total number of events"},"page":{"type":"number","description":"The current page"},"limit":{"type":"number","description":"The maximal number of items on a page"},"code":{"type":"number","description":"HTTP response code"},"link":{"type":"array","description":"Links to neighboring pages, first page, and last page in pagination","items":{"type":"object","properties":{"url":{"description":"Page URL","type":"string"},"rel":{"type":"string","description":"Position of the linked page","enum":["first","next","prev","last"]}}}}}},"data":{"type":"array","description":"Custom events that can be used as model training inputs","items":{"$ref":"#/components/schemas/recommendations-config-TrainingCustomEventSchema"}}}},"recommendations-config-TrainingCustomEventSchema":{"type":"object","description":"A custom event definition retrieved from the params-collector service.","properties":{"id":{"type":"integer","format":"int64","description":"Internal identifier of the event"},"name":{"type":"string","description":"Event name (action name in the params-collector service)"},"businessProfileId":{"type":"integer","format":"int64","description":"ID of the business profile that owns the event"},"hidden":{"type":"boolean","description":"`true` when the event is hidden in the params-collector service"},"translation":{"type":"object","description":"Display translation of the event","properties":{"label":{"type":"string","description":"Human-readable label"},"type":{"type":"string","description":"Translation type"},"description":{"type":"string","description":"Optional description"}},"required":["label","type"]},"position":{"type":"integer","description":"Display order of the event"},"namespace":{"type":"string","description":"Namespace the event belongs to"},"ttl":{"type":"object","description":"Event time-to-live configuration","properties":{"type":{"type":"string","description":"TTL unit (for example `DAY`)"},"value":{"type":"integer","description":"TTL value in units specified by `type`"}},"required":["type","value"]},"createdAt":{"type":"string","format":"date-time","description":"Time when the event was created, ISO 8601"},"modifiedAt":{"type":"string","format":"date-time","description":"Time when the event was last modified, ISO 8601"},"count":{"type":"integer","format":"int64","description":"Total number of occurrences of this event"}},"required":["name","businessProfileId","hidden","translation","position","namespace","createdAt","modifiedAt"]},"recommendations-rust-all-RecommendationResponseSchemaV2":{"type":"object","properties":{"extras":{"type":"object","description":"Additional data","properties":{"correlationId":{"type":"string","description":"Correlation ID that allows you to link the \"item clicked\" events with the \"recommendation generated\" event that's created for each recommendation result."},"contextItems":{"type":"array","nullable":true,"description":"A list of context items provided in the request","items":{"type":"object","properties":{"itemId":{"type":"string","description":"Item identifier (`itemId` in item catalog)"}},"additionalProperties":true,"required":["itemId"]}},"campaignId":{"type":"string","description":"ID of the context campaign","nullable":true}}},"data":{"type":"array","description":"A list of recommended items","items":{"type":"object","properties":{"itemId":{"type":"string","description":"Item identifier (`itemId` in item catalog)"}},"additionalProperties":{},"required":["itemId"]}}}},"recommendations-rust-all-SlotsRecommendationResponseSchemaV2":{"allOf":[{"$ref":"#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"},{"type":"object","properties":{"extras":{"type":"object","properties":{"slots":{"type":"array","description":"A list of slots data","items":{"type":"object","properties":{"id":{"type":"integer","description":"Slot identifier. Matches the index (zero-based numbering) of the slot provided in request"},"name":{"type":"string","description":"Slot name provided in request"},"itemIds":{"type":"array","description":"A list of item ids that meet the slot criteria","items":{"type":"string","description":"Item identifier (`itemId` in item catalog)"}},"error":{"$ref":"#/components/schemas/recommendations-rust-all-Error"}},"required":["id"]}}},"required":["slots"]}}}]},"recommendations-rust-all-SectionsSlotsRecommendationResponseSchemaV2":{"allOf":[{"$ref":"#/components/schemas/recommendations-rust-all-RecommendationResponseSchemaV2"},{"type":"object","properties":{"extras":{"type":"object","properties":{"slots":{"type":"array","description":"A list of slots data","items":{"type":"object","properties":{"id":{"type":"integer","description":"Slot identifier. Matches the index (zero-based numbering) of the slot provided in request"},"name":{"type":"string","description":"Slot name provided in request"},"rows":{"type":"array","description":"A list of rows that groups items with the same attribute value","items":{"type":"object","properties":{"attributeValue":{"type":"string","description":"The attribute value used to group items in the row"},"itemIds":{"type":"array","description":"A list of item ids that meet the slot and row criteria","items":{"type":"string","description":"Item identifier (`itemId` in item catalog)"}},"metadata":{"type":"object","description":"Metadata catalog attributes","properties":{"itemId":{"type":"string","description":"Item identifier (`itemId` in item metadata catalog)"}},"additionalProperties":{},"required":["itemId"]}}}},"error":{"$ref":"#/components/schemas/recommendations-rust-all-Error"}},"required":["id"]}}},"required":["slots"]}}}]},"recommendations-rust-all-BaseBodySchemaV2":{"type":"object","properties":{"campaignId":{"type":"string","description":"The campaignId which will be passed as *utm_campaign* in a link to the recommended item.","default":"defaultCampaign"},"campaignName":{"type":"string","description":"The campaign name which will be included in the recommendation.generated event."},"catalogId":{"type":"string","description":"ID (_not_ name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed.","default":"default"},"clientUUID":{"type":"string","description":"Profile UUID. This parameter is required for these recommendation types:\n  - Personalized\n  - Last seen\n  - Recent interactions\n  - Section\n  - Attribute\n\nThis parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters.\n"},"contextItemIds":{"type":"array","description":"Item identifiers, equal to `itemId` from the *item feed*. They can be used to define the item context of the query.","items":{"type":"string","description":"Item identifier (`itemId` in item catalog)"}},"includeContextItems":{"type":"boolean","default":false,"description":"The recommendation results will include context items from the request."},"filterRules":{"$ref":"#/components/schemas/recommendations-rust-all-FilterRulesV2"},"displayAttributes":{"type":"string","description":"Attributes to be returned"},"abTestContext":{"$ref":"#/components/schemas/recommendations-rust-all-AbTestContext"},"params":{"$ref":"#/components/schemas/recommendations-rust-all-ParamsReco"},"inventoryContext":{"$ref":"#/components/schemas/recommendations-rust-all-InventoryContext"}}},"recommendations-rust-all-AbTestContext":{"type":"object","description":"A/B test context.","properties":{"experimentId":{"type":"integer","description":"Experiment ID which will be included in the `recommendation.generated` event."},"variantId":{"type":"string","description":"Campaign variant ID which will be included in the `recommendation.generated` event."},"requestedCampaignId":{"type":"string","description":"Requested campaign ID which will be included in the `recommendation.generated` event."}}},"recommendations-rust-all-SlotsBodySchemaV2":{"allOf":[{"$ref":"#/components/schemas/recommendations-rust-all-BaseBodySchemaV2"},{"type":"object","properties":{"keepSlotsOrder":{"type":"boolean","default":true,"description":"- When `true`, the `data` array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in `data` are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.\n- When `false`, the `data` array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.\n\nThe additional `extras.slots` object always shows slots and items as if this setting was `true`.\n\nIf you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.\n"},"personalizeSlotsOrder":{"type":"boolean","default":false,"description":"Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.\n\nIf you want to set `personalizeSlotsOrder` to `true`, `keepSlotsOrder` must also be `true`.\n"},"sortMetric":{"type":"string","description":"ID of the metric to sort the results by. The list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2)."},"boostingParameters":{"$ref":"#/components/schemas/recommendations-rust-all-BoostingParametersV2"},"boostingStrategies":{"type":"array","description":"Boosting strategies","items":{"$ref":"#/components/schemas/recommendations-rust-all-BoostingStrategyV2"}},"crossWorkspaceMode":{"$ref":"#/components/schemas/recommendations-rust-all-CrossWorkspaceMode"},"slots":{"type":"array","description":"Slot definitions. To apply default values and fetch all the results as a single slot, send `slots` as an array with one empty object.","minItems":1,"items":{"$ref":"#/components/schemas/recommendations-rust-all-SlotSchemaV2Rust"}}},"required":["slots"]}]},"recommendations-rust-all-SectionsSlotsBodySchemaV2":{"allOf":[{"$ref":"#/components/schemas/recommendations-rust-all-BaseBodySchemaV2"},{"type":"object","properties":{"metadataCatalogId":{"$ref":"#/components/schemas/recommendations-rust-all-MetadataCatalogId"},"slots":{"type":"array","description":"Slots data","items":{"$ref":"#/components/schemas/recommendations-rust-all-SectionSlotSchemaV2"}}},"required":["slots"]}]},"recommendations-rust-all-AttributesSlotsBodySchemaV2":{"allOf":[{"$ref":"#/components/schemas/recommendations-rust-all-BaseBodySchemaV2"},{"type":"object","properties":{"metadataCatalogId":{"$ref":"#/components/schemas/recommendations-rust-all-MetadataCatalogId"},"slots":{"type":"array","description":"Slots data","items":{"$ref":"#/components/schemas/recommendations-rust-all-AttributeSlotSchemaV2"}}},"required":["slots"]}]},"recommendations-rust-all-BoostingParametersV2":{"type":"object","description":"Result boosting parameters","properties":{"metric":{"type":"string","description":"ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results. The list of available metrics can be checked by using [this endpoint](https://developers.synerise.com/AnalyticsSuite/AnalyticsSuite.html#operation/ApiGetAvailableMetricsV2)."},"strength":{"type":"number","description":"How much influence the `boostMetric` has. Values less than 0 allow you to demote items that have high metric score, values greater than 0 allow you to promote items that have high metric score. A strength with a value of 0 does not change the scoring.","format":"float"},"personalizedBoostingStrength":{"type":"number","description":"How much influence the personalized scoring has. Greater values allow you to promote items that have high personalized score. A strength with a value of 0 does not change the scoring.","format":"float","minimum":0,"maximum":100,"default":0}}},"recommendations-rust-all-BoostingStrategyV2":{"type":"object","description":"Boosting strategy allows you to promote or demote specific types of products in recommendation scoring","properties":{"name":{"type":"string","description":"Boosting strategy name"},"condition":{"type":"string","description":"The condition that indicates on which items the boost will be performed. The condition must comply with the rules of creating filters."},"strength":{"type":"number","description":"How much influence the strategy has. Values less than 1.0 allow you to demote items that meet the condition, values greater than 1.0 allow you to promote items that meet the condition. A strength with a value of 1.0 does not change the scoring.","format":"float","minimum":0,"maximum":2,"default":1}},"required":["name","condition","strength"]},"recommendations-rust-all-CrossWorkspaceMode":{"type":"object","description":"Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available.","properties":{"enabled":{"type":"boolean","description":"Defines if cross-workspace mode is enabled."}}},"recommendations-rust-all-FilterRulesV2":{"type":"object","description":"Filter configuration","properties":{"excludePurchasedItems":{"$ref":"#/components/schemas/recommendations-rust-all-ExcludePurchasedItems"},"excludePurchasedItemsSinceDays":{"$ref":"#/components/schemas/recommendations-rust-all-ExcludePurchasedItemsSince"},"elasticExcludePurchasedItems":{"$ref":"#/components/schemas/recommendations-rust-all-ExcludePurchasedItems"},"elasticExcludePurchasedItemsSinceDays":{"$ref":"#/components/schemas/recommendations-rust-all-ExcludePurchasedItemsSince"}}},"recommendations-rust-all-SlotSchemaV2Rust":{"type":"object","properties":{"name":{"type":"string","description":"Slot name"},"minNumItems":{"$ref":"#/components/schemas/recommendations-rust-all-MinNumItems"},"maxNumItems":{"$ref":"#/components/schemas/recommendations-rust-all-MaxNumItems"},"shuffleNumItems":{"$ref":"#/components/schemas/recommendations-rust-all-ShuffleNumItemsRust"},"filters":{"$ref":"#/components/schemas/recommendations-rust-all-Filter"},"elasticFilters":{"$ref":"#/components/schemas/recommendations-rust-all-ElasticFilter"},"distinctFilter":{"$ref":"#/components/schemas/recommendations-rust-all-DistinctFilterReco"}}},"recommendations-rust-all-SectionSlotSchemaV2":{"type":"object","properties":{"name":{"type":"string","description":"Slot name"},"attribute":{"$ref":"#/components/schemas/recommendations-rust-all-Attribute"},"numRows":{"$ref":"#/components/schemas/recommendations-rust-all-NumRows"},"numItems":{"$ref":"#/components/schemas/recommendations-rust-all-NumItems"},"filters":{"$ref":"#/components/schemas/recommendations-rust-all-Filter"},"elasticFilters":{"$ref":"#/components/schemas/recommendations-rust-all-ElasticFilter"}},"required":["attribute","numRows","numItems"]},"recommendations-rust-all-AttributeSlotSchemaV2":{"type":"object","properties":{"name":{"type":"string","description":"Slot name"},"attribute":{"$ref":"#/components/schemas/recommendations-rust-all-Attribute"},"minNumItems":{"$ref":"#/components/schemas/recommendations-rust-all-MinNumItems"},"maxNumItems":{"$ref":"#/components/schemas/recommendations-rust-all-MaxNumItems"},"filters":{"$ref":"#/components/schemas/recommendations-rust-all-Filter"},"elasticFilters":{"$ref":"#/components/schemas/recommendations-rust-all-ElasticFilter"}},"required":["attribute"]},"recommendations-rust-all-MetricsBodySchemaV2":{"allOf":[{"$ref":"#/components/schemas/recommendations-rust-all-SlotsBodySchemaV2"},{"type":"object","required":["sortMetric","clientUUID"]}]},"recommendations-rust-all-MetadataCatalogId":{"type":"string","description":"ID of the catalog which stores attribute metadata"},"recommendations-rust-all-DistinctFilterReco":{"type":"object","description":"Distinct filters allow you to specify how many recommended items can have the same value of specified attributes.","properties":{"elastic":{"type":"boolean","description":"When TRUE, allows to complete the recommended items with items which don't meet the distinct filter criteria."},"filters":{"type":"array","minItems":1,"maxItems":5,"description":"Array of distinct filters","items":{"type":"object","properties":{"field":{"type":"string","description":"Attribute name"},"maxNumItems":{"type":"number","format":"integer","description":"Max number of items with the same value of the attribute"},"levelRangeModifier":{"type":"number","format":"integer","description":"Parameter used (for the `category` field) to specify how many categories to cut off from the end"}},"required":["field","maxNumItems"]}}},"required":["elastic","filters"]},"recommendations-rust-all-Attribute":{"type":"object","description":"The attribute for grouping rows in the section and attribute recommendations.","properties":{"name":{"description":"Name of the attribute","type":"string"},"levelRangeModifier":{"description":"Restricts the range of items in recommendations to a particular attribute level.","type":"integer"}},"required":["name"]},"recommendations-rust-all-NumRows":{"type":"integer","description":"The number of rows in the slot.","minimum":1,"maximum":10},"recommendations-rust-all-NumItems":{"type":"integer","description":"The number of items in each row in the slot.","minimum":1,"maximum":100},"recommendations-rust-all-MinNumItems":{"type":"integer","description":"The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error.","default":1,"minimum":1},"recommendations-rust-all-MaxNumItems":{"type":"integer","description":"The maximal number of returned item recommendations.","maximum":100,"default":5},"recommendations-rust-all-ShuffleNumItemsRust":{"type":"integer","description":"When this parameter is provided, this many best item recommendations are provided. A number of them, no more than the value of `maxItemNums`, are chosen randomly for recommendation.","minimum":1,"maximum":200},"recommendations-rust-all-Filter":{"type":"string","description":"This string defines the criteria that an item must meet in order to be considered for recommendation.  \nFor information on building filters, see [\"Items Query Language (IQL)\" in the Developer Guide](https://hub.synerise.com/developers/iql/).\n"},"recommendations-rust-all-ElasticFilter":{"description":"This string defines the criteria that an item must meet in order to be considered for recommendation. The Elastic filter may be dropped if not enough products meet the required criteria.\nFor information on building filters, see [\"Items Query Language (IQL)\" in the Developer Guide](https://hub.synerise.com/developers/iql/).\n","type":"string"},"recommendations-rust-all-ExcludePurchasedItems":{"description":"When true, the recommendation results will include only items that the Profile hasn't purchased before.  \n**IMPORTANT**: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation.\n","type":"boolean","default":false},"recommendations-rust-all-ExcludePurchasedItemsSince":{"description":"Limits the application of the `excludePurchasedItems` filter to a specified number of days.","type":"integer"},"recommendations-rust-all-Error":{"type":"object","description":"Details of an error, if applicable","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"path":{"type":"string","description":"URL of the requested resource"}},"required":["timestamp","status","message"]},"recommendations-rust-all-ParamsReco":{"type":"object","example":{"source":"mobile"},"description":"Extra parameters that will be added to the `recommendation.generated` event. The total size must not exceed 500 bytes."},"recommendations-rust-all-InventoryContext":{"description":"Inventory context used to evaluate inventory-related filters and boosting strategies.\nCan be either a single inventory context or\na multi-inventory context (set of channel IDs per inventory).\n","oneOf":[{"$ref":"#/components/schemas/recommendations-rust-all-SingleInventoryContext"},{"$ref":"#/components/schemas/recommendations-rust-all-MultiInventoryContext"}]},"recommendations-rust-all-SingleInventoryContext":{"type":"object","description":"Single inventory context.\n","properties":{"channelIds":{"type":"array","items":{"type":"string"},"description":"List of channel identifiers used to evaluate inventory-related filters and boosting strategies.\n"}},"required":["channelIds"]},"recommendations-rust-all-MultiInventoryContext":{"type":"object","description":"Multi-inventory context where each inventory can have its own set of channel IDs.\n","properties":{"inventoryCatalogs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/recommendations-rust-all-InventoryContextDefinition"},"description":"Map of inventory ID to inventory context definition. Each inventory can have its own set of channel IDs.\n"}},"required":["inventoryCatalogs"]},"recommendations-rust-all-InventoryContextDefinition":{"type":"object","description":"Context definition for a specific inventory.\n","properties":{"channelIds":{"type":"array","items":{"type":"string"},"description":"List of channel identifiers for this specific inventory.\n"}},"required":["channelIds"]},"sauth-OauthAuthBody":{"required":["accessToken","apiKey","uuid"],"type":"object","properties":{"accessToken":{"type":"string","description":"OAuth token"},"apiKey":{"type":"string","description":"Profile API key (same as for Profile login)"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"agreements":{"$ref":"#/components/schemas/sauth-Agreements"},"attributes":{"$ref":"#/components/schemas/sauth-Attributes"},"tags":{"$ref":"#/components/schemas/sauth-Tags"},"customId":{"type":"string","description":"If `mappedExternal` is set to FALSE in OAuth settings, this field is required."}}},"sauth-ClientRefreshRequest":{"type":"object","required":["apiKey"],"properties":{"apiKey":{"$ref":"#/components/schemas/sauth-ClientApiKey"}},"title":"ClientRefreshRequest"},"sauth-JWTtoken":{"type":"object","properties":{"token":{"type":"string","description":"[JWT](https://jwt.io/) token"}}},"sauth-JWTtokenV3":{"type":"object","properties":{"token":{"type":"string","description":"[JWT](https://jwt.io/) token"},"expiration":{"type":"integer","example":1649283173},"created":{"type":"integer","example":1649277173668},"origin":{"type":"string","example":"SYNERISE"},"customId":{"type":"string","example":"card123"},"realm":{"type":"string","example":"client"}}},"sauth-BanSettingsPayload":{"type":"object","properties":{"blockingForClientEnabled":{"type":"boolean","description":"When TRUE, first- and second-level bans are enabled. Permanent bans are always enabled."},"firstBanCollectingTime":{"type":"integer","format":"int32","description":"Time in seconds. If a Profile fails to log in too many times during this time, the account is banned. The number of login attempts is defined in `firstBanThreshold` and the duration is defined in `firstBanDuration`.\n\n**Note:** The timer starts at the first login attempt and is common for first-level, second-level, and permanent bans.\n"},"firstBanDuration":{"type":"integer","format":"int32","description":"Duration of the first-level ban in seconds. The first-level ban is applied to a Profile's identifier and cancelled after a successful password reset."},"firstBanThreshold":{"type":"integer","format":"int32","description":"The number of failed login attempts before the first-level ban is applied."},"secondBanCollectingTime":{"type":"integer","format":"int32","description":"Time in seconds. If a Profile fails to log in too many times during this time, the account is banned. The number of login attempts is defined in `secondBanThreshold` and the duration is defined in `secondBanDuration`.\n\n**Note:** The timer starts at the first login attempt and is common for first-level, second-level, and permanent bans.\n"},"secondBanDuration":{"type":"integer","format":"int32","description":"Duration of the second-level ban in seconds. The second-level ban is applied to a Profile's identifier and cancelled after a successful password reset."},"secondBanThreshold":{"type":"integer","format":"int32","description":"The number of failed login attempts before the second-level ban is applied."},"permanentBanCollectingTime":{"type":"integer","format":"int32","description":"Time in seconds. If a Profile fails to log in too many times during this time, the account is banned. The number of login attempts is defined in `permanentBanThreshold` and the duration is defined in `permanentBanDuration`.\n\n**Note:** The timer starts at the first login attempt and is common for first-level, second-level, and permanent bans.\n"},"permanentBanDuration":{"type":"integer","format":"int32","description":"Duration of the permanent ban in seconds. The permanent ban is applied to an IP address and cancelled after a successful password reset."},"permanentBanThreshold":{"type":"integer","format":"int32","description":"The number of failed login attempts before the permanent ban is applied."}}},"sauth-ClientActivationResendRequest":{"type":"object","properties":{"email":{"type":"string","description":"Email address"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"uuid":{"type":"string","description":"UUID of the Client"}}},"sauth-AuthenticationRequestV2_and_3":{"type":"object","required":["apiKey","identityProvider"],"properties":{"apiKey":{"$ref":"#/components/schemas/sauth-ClientApiKey"},"identityProvider":{"type":"string","description":"The identity provider.","enum":["SYNERISE","FACEBOOK","OAUTH","APPLE","GOOGLE","UNKNOWN"]},"identityProviderToken":{"$ref":"#/components/schemas/sauth-AuthIdentityProviderToken"},"email":{"$ref":"#/components/schemas/sauth-AuthClientEmail"},"customId":{"$ref":"#/components/schemas/sauth-AuthClientCustomId"},"password":{"$ref":"#/components/schemas/sauth-AuthClientPassword"},"uuid":{"$ref":"#/components/schemas/sauth-AuthClientUuid"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"agreements":{"$ref":"#/components/schemas/sauth-Agreements"},"attributes":{"$ref":"#/components/schemas/sauth-Attributes"},"tags":{"$ref":"#/components/schemas/sauth-Tags"}},"title":"AuthenticationRequestV2_and_3"},"sauth-ClientEmailChangeRequest":{"type":"object","properties":{"email":{"type":"string","description":"New email address"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"}}},"sauth-ClientPinActivationResendRequest":{"type":"object","properties":{"email":{"$ref":"#/components/schemas/sauth-inBodyClientEmail"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"}},"title":"ClientPinActivationResendRequest"},"sauth-PinCodeConfirmationRequest":{"type":"object","properties":{"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"email":{"$ref":"#/components/schemas/sauth-inBodyClientEmail"},"pinCode":{"type":"string","description":"The PIN code received by email"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"}}},"sauth-LogInAsClientRequestBody":{"type":"object","properties":{"apiKey":{"$ref":"#/components/schemas/sauth-ClientApiKey"},"email":{"type":"string","description":"Profile email"},"password":{"type":"string","description":"Profile password"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"deviceId":{"type":"string","description":"**Important:** deviceId is required during login if device control is enabled."}}},"sauth-ChangeClientPasswordRequestBody":{"type":"object","properties":{"oldPassword":{"type":"string","description":"Current password"},"password":{"type":"string","description":"New password"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"}}},"sauth-LogInAnonymouslyRequestBody":{"type":"object","properties":{"apiKey":{"$ref":"#/components/schemas/sauth-ClientApiKey"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"}}},"sauth-LogInAnonymouslyV2RequestBody":{"type":"object","properties":{"apiKey":{"$ref":"#/components/schemas/sauth-ClientApiKey"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"}}},"sauth-LogInAnonymouslyV3RequestBody":{"type":"object","required":["apiKey","uuid"],"properties":{"apiKey":{"$ref":"#/components/schemas/sauth-ClientApiKey"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"deviceId":{"type":"string","description":"Unique iOS or Android device identifier."}}},"sauth-ConfirmAClientAccountRequestBody":{"type":"object","description":"Activation token received by email","properties":{"token":{"description":"Activation token received by email","type":"string"}}},"sauth-AuthenticateWithAppleRequestBody":{"type":"object","properties":{"accessToken":{"type":"string","description":"Apple token"},"apiKey":{"$ref":"#/components/schemas/sauth-ClientApiKey"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"agreements":{"$ref":"#/components/schemas/sauth-Agreements"},"attributes":{"$ref":"#/components/schemas/sauth-Attributes"},"tags":{"$ref":"#/components/schemas/sauth-Tags"}}},"sauth-DeleteAppleClientRequestBody":{"type":"object","properties":{"accessToken":{"type":"string","description":"Apple access token"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"customId":{"$ref":"#/components/schemas/sauth-inBodyClientCustomId"}}},"sauth-LoginWithAppleWithoutRegistrationRequestBody":{"type":"object","properties":{"accessToken":{"type":"string","description":"Apple token"},"apiKey":{"$ref":"#/components/schemas/sauth-ClientApiKey"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"agreements":{"$ref":"#/components/schemas/sauth-Agreements"},"attributes":{"$ref":"#/components/schemas/sauth-Attributes"},"tags":{"$ref":"#/components/schemas/sauth-Tags"}}},"sauth-AuthenticateWithFacebookRequestBody":{"type":"object","properties":{"facebookToken":{"type":"string","description":"Facebook authentication token"},"apiKey":{"$ref":"#/components/schemas/sauth-ClientApiKey"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"agreements":{"$ref":"#/components/schemas/sauth-Agreements"},"attributes":{"$ref":"#/components/schemas/sauth-Attributes"},"tags":{"$ref":"#/components/schemas/sauth-Tags"}}},"sauth-AuthenticateWithFacebookWithoutRegistrationRequestBody":{"type":"object","properties":{"facebookToken":{"type":"string","description":"Facebook Authentication Token"},"apiKey":{"$ref":"#/components/schemas/sauth-ClientApiKey"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"agreements":{"$ref":"#/components/schemas/sauth-Agreements"},"attributes":{"$ref":"#/components/schemas/sauth-Attributes"},"tags":{"$ref":"#/components/schemas/sauth-Tags"}}},"sauth-DeleteAFacebookClientAccountRequestBody":{"type":"object","properties":{"facebookToken":{"type":"string","description":"Facebook authentication token"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"}}},"sauth-DeleteAccountV2RequestBody":{"type":"object","required":["password","identityProvider"],"properties":{"password":{"type":"string","description":"Profile password. Only applicable if the Profile is **not** authenticated by an external identity provider."},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"externalToken":{"type":"string","description":"External authorization token. Only applicable if the Profile is authenticated by an external identity provider."},"customId":{"type":"string","description":"Custom ID of the Profile, if applicable"},"identityProvider":{"type":"string","enum":["FACEBOOK","OAUTH","APPLE","SYNERISE"],"description":"Authorization provider"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"}}},"sauth-ConfirmClientEmailChangeRequestBody":{"type":"object","properties":{"token":{"type":"string","format":"uuid","example":"58acd5bd-8efd-47ed-b101-32eb56e13839","description":"Token received by email"},"newsletterAgreement":{"type":"boolean","description":"Permission to receive email newsletters"}}},"sauth-RequestClientEmailChangeRequestBody":{"type":"object","properties":{"email":{"type":"string","description":"New email address"},"password":{"type":"string","description":"Profile password"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"}}},"sauth-DeleteAccountV1RequestBody":{"type":"object","properties":{"password":{"type":"string","description":"Profile password"},"uuid":{"type":"string","description":"Profile UUID"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"}}},"sauth-DeleteOauthClientRequestBody":{"type":"object","properties":{"accessToken":{"type":"string","description":"OAuth access token"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"customId":{"$ref":"#/components/schemas/sauth-inBodyClientCustomId"}}},"sauth-RegisterAClientRequestBody":{"type":"object","properties":{"email":{"$ref":"#/components/schemas/sauth-inBodyClientEmail"},"password":{"type":"string","description":"Password for the Profile"},"phone":{"$ref":"#/components/schemas/sauth-inBodyClientPhone"},"customId":{"$ref":"#/components/schemas/sauth-inBodyClientCustomId"},"firstName":{"$ref":"#/components/schemas/sauth-inBodyClientFirstName"},"lastName":{"$ref":"#/components/schemas/sauth-inBodyClientLastName"},"displayName":{"$ref":"#/components/schemas/sauth-inBodyClientDisplayName"},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"avatarUrl":{"$ref":"#/components/schemas/sauth-inBodyClientAvatarUrl"},"whatsAppId":{"type":"string","description":"WhatsApp identifier of the Profile","maxLength":255},"birthDate":{"$ref":"#/components/schemas/sauth-inBodyClientBirthDate"},"company":{"$ref":"#/components/schemas/sauth-inBodyClientCompany"},"city":{"$ref":"#/components/schemas/sauth-inBodyClientCity"},"address":{"$ref":"#/components/schemas/sauth-inBodyClientAddress"},"zipCode":{"$ref":"#/components/schemas/sauth-inBodyClientZipCode"},"province":{"$ref":"#/components/schemas/sauth-inBodyClientProvince"},"countryCode":{"$ref":"#/components/schemas/sauth-inBodyClientCountryCode"},"sex":{"$ref":"#/components/schemas/sauth-inBodyClientSex"},"agreements":{"$ref":"#/components/schemas/sauth-Agreements"},"attributes":{"$ref":"#/components/schemas/sauth-Attributes"},"tags":{"$ref":"#/components/schemas/sauth-Tags"}}},"sauth-TemplateSettingsData":{"type":"object","properties":{"clientEmailChangeRequestMailSubject":{"type":"string","description":"Subject of the email change confirmation email. This is sent to the new address."},"clientEmailChangeRequestMailBody":{"nullable":true,"type":"string","description":"HTML body of the email change confirmation email. All `\"` characters must be escaped and all the code must be a single line. This is sent to the new address."},"clientEmailChangeRequestMailTemplateId":{"nullable":true,"type":"string","description":"ID of the email change confirmation email body template. This email is sent to the new address. If you use a template, it overrides the content sent in `clientEmailChangeRequestMailBody`."},"clientEmailChangeNotificationMailSubject":{"type":"string","description":"Subject of the email change notification email. This is sent to the current address."},"clientEmailChangeNotificationMailBody":{"nullable":true,"type":"string","description":"HTML body of the email change notification email. All `\"` characters must be escaped and all the code must be a single line. This is sent to the current address."},"clientEmailChangeNotificationMailTemplateId":{"nullable":true,"type":"string","description":"ID of the email change notification email template. This email is sent to the current address. If you use a template, it overrides the content sent in `clientEmailChangeNotificationMailBody`."}},"title":"TemplateSettingsData"},"sauth-ClientLogoutRequest":{"type":"object","properties":{"action":{"type":"string","enum":["LOGOUT","LOGOUT_WITH_SESSION_CLEARING"]}}},"sauth-DeviceControlSettingsPayload":{"type":"object","properties":{"deviceControlMode":{"type":"string","description":"Defines the type of device authorization.\n\n- OFF: No device authorization.\n- SOFT: The Profile is notified about logins from a new device, but the access is not blocked.\n- HARD: Login attempts from the new device are blocked until the Profile authorizes the device with the link or token received by email.\n- CONDITIONAL_BASED_ON_LOCATION: If a Profile logs in from a new device in Poland, they receive a notification (same as with SOFT setting). If the new device is outside of Poland, it must be authorized with a link or token received by email (same as with HARD setting). Other countries will be supported in the future.\n","enum":["OFF","SOFT","HARD","CONDITIONAL_BASED_ON_LOCATION"]},"hardMailBody":{"type":"string","description":"HTML body of the device authorization email for hard mode. All `\"` characters must be escaped and all the code must be a single line."},"hardMailTitle":{"type":"string","description":"Subject of the device authorization email for hard mode."},"hardTemplateId":{"type":"string","description":"ID of the device authorization email template for hard mode. If you use a template, it overrides the content sent in `hardMailBody`."},"softMailBody":{"type":"string","description":"HTML body of the device authorization email for soft mode. All `\"` characters must be escaped and all the code must be a single line."},"softMailTitle":{"type":"string","description":"Subject of the device authorization email for soft mode."},"softTemplateId":{"type":"string","description":"ID of the device authorization email template for soft mode. If you use a template, it overrides the content sent in `softMailBody`."},"deviceUnlockSuccessRedirectUrl":{"type":"string"},"deviceUnlockAlreadyConfirmedRedirectUrl":{"type":"string"}}},"sauth-AppleAuthSettingsPayload":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Defines if Sign in with Apple is enabled in this workspace."},"bundle":{"type":"string","description":"Name of your application package","example":"com.synerise.sdk.sample-swift"}}},"sauth-GenericClientEmailChangeRequest":{"type":"object","required":["email","uuid"],"properties":{"email":{"description":"New email address","type":"string"},"externalToken":{"type":"string","description":"External authorization token. Only applicable if the Profile is authenticated by an external identity provider."},"password":{"type":"string","description":"Profile password. Only applicable if the Profile is **not** authenticated by an external identity provider."},"uuid":{"$ref":"#/components/schemas/sauth-inBodyClientUuid"},"deviceId":{"$ref":"#/components/schemas/sauth-inBodyClientDeviceId"},"customId":{"type":"string","description":"Custom ID of the Profile, if applicable"}},"title":"GenericClientEmailChangeRequest"},"sauth-GeneralSettingsData":{"type":"object","required":["tokenLifetimeInSeconds"],"properties":{"tokenLifetimeInSeconds":{"$ref":"#/components/schemas/sauth-TokenLifetimeInSeconds"},"voucherPoolUuid":{"$ref":"#/components/schemas/sauth-VoucherPoolUuid"},"allowOverwriteCustomIdentify":{"$ref":"#/components/schemas/sauth-AllowOverwriteCustomIdentify"},"allowOverwriteExternalId":{"$ref":"#/components/schemas/sauth-AllowOverwriteExternalId"},"allowEmailChangeFromWebForm":{"$ref":"#/components/schemas/sauth-AllowEmailChangeFromWebForm"},"allowToPassCustomIdentifyWithVoucherPool":{"$ref":"#/components/schemas/sauth-AllowToPassCustomIdentifyWithVoucherPool"}},"title":"GeneralSettingsData"},"sauth-SyneriseAuthSettingsData":{"required":["enabled","registrationType"],"type":"object","properties":{"enabled":{"type":"boolean"},"registrationType":{"$ref":"#/components/schemas/sauth-RegistrationType"},"pinConfirmationType":{"type":"string","default":"ON_CONFLICT_WITH_EXTERNAL_ACCOUNT","enum":["EVERYONE","ON_CONFLICT_WITH_EXTERNAL_ACCOUNT"],"description":"Defines if PIN confirmation (if enabled) is required for all new accounts or only if there is a conflict with an existing account registered by using third-party Identity Providers."},"pinConfirmationLength":{"type":"integer","description":"The number of characters in the PIN","default":6},"pinConfirmationValidInSeconds":{"type":"integer","default":300,"description":"TTL of the PIN code before it expires and cannot be used"},"allowPinResendFromDifferentDeviceId":{"type":"boolean","default":false,"description":"When TRUE, a PIN email re-send can be requested from a different device than the last device that requested a PIN email.\n\n**NOTE:** Regardless of this setting, the activation request can only be sent from the last device that requested a PIN email.\n"},"confirmationRedirectLink":{"$ref":"#/components/schemas/sauth-ConfirmationRedirectLink"},"confirmationMailSubject":{"type":"string","description":"Subject of the account activation email"},"confirmationMailBody":{"nullable":true,"type":"string","description":"HTML body of the account activation email. All `\"` characters must be escaped and all the code must be a single line."},"confirmationMailTemplateId":{"nullable":true,"type":"string","description":"ID of the account activation email body template. If you use a template, it overrides the content sent in `confirmationMailBody`."},"passwordResetMailTemplateId":{"nullable":true,"type":"string","description":"ID of the password reset confirmation email body template"},"passwordResetMailSubject":{"type":"string","description":"Subject of the password reset confirmation email"},"passwordResetMailBody":{"nullable":true,"type":"string","description":"HTML body of the password reset confirmation email. All `\"` characters must be escaped and all the code must be a single line."},"pinConfirmationMailSubject":{"type":"string","description":"Subject of the email with the PIN needed to confirm an account."},"pinConfirmationMailBody":{"nullable":true,"type":"string","description":"HTML body of the email with the PIN needed to confirm an account. All `\"` characters must be escaped and all the code must be a single line. The PIN code is inserted using the `{{ pin_code }}` Jinjava insert."},"pinConfirmationMailTemplateId":{"nullable":true,"type":"string","description":"ID of the template for the email with the PIN needed to confirm an account. If you use a template, it overrides the content sent in `pinConfirmationMailBody`."},"maxLength":{"type":"integer","format":"int32","description":"Maximum length of the password"},"minLength":{"type":"integer","format":"int32","description":"Minimum length of the password"},"requireAtLeastOneLowercaseLetter":{"type":"boolean","description":"When TRUE, the password must include at least one lowercase letter.","default":false},"requireAtLeastOneNonAlphaNumericCharacter":{"type":"boolean","description":"When TRUE, the password must include at least one non-alphanumeric character.","default":false},"requireAtLeastOneNumber":{"type":"boolean","description":"When TRUE, the password must include at least one number.","default":false},"requireAtLeastOneUppercaseLetter":{"type":"boolean","description":"When TRUE, the password must include at least one uppercase letter.","default":false}}},"sauth-GoogleOauthSettingsPayload":{"required":["enabled"],"type":"object","properties":{"enabled":{"type":"boolean"}}},"sauth-FacebookOauthSettingsPayload":{"required":["enabled"],"type":"object","properties":{"enabled":{"type":"boolean"}}},"sauth-OauthSettingsRequest":{"anyOf":[{"type":"object","title":"Mode: SERVER","properties":{"enabled":{"type":"boolean"},"mode":{"$ref":"#/components/schemas/sauth-OauthMode"},"name":{"$ref":"#/components/schemas/sauth-OauthName"},"endpoint":{"$ref":"#/components/schemas/sauth-OauthEndpoint"},"headers":{"$ref":"#/components/schemas/sauth-OauthHeaders"},"mapping":{"$ref":"#/components/schemas/sauth-OauthMapping"},"mappedExternal":{"$ref":"#/components/schemas/sauth-OauthMappedExternal"},"syncDataOnLogin":{"$ref":"#/components/schemas/sauth-OauthSyncDataOnLogin"}}},{"type":"object","title":"Mode: JWT_TOKEN","properties":{"enabled":{"type":"boolean"},"mode":{"$ref":"#/components/schemas/sauth-OauthMode"},"name":{"$ref":"#/components/schemas/sauth-OauthName"},"jwkEndpoint":{"$ref":"#/components/schemas/sauth-OauthJwkEndpoint"},"mapping":{"$ref":"#/components/schemas/sauth-OauthMapping"},"mappedExternal":{"$ref":"#/components/schemas/sauth-OauthMappedExternal"},"syncDataOnLogin":{"$ref":"#/components/schemas/sauth-OauthSyncDataOnLogin"},"validation":{"$ref":"#/components/schemas/sauth-OauthValidation"}}}]},"sauth-OauthSettingsResponse":{"type":"object","properties":{"enabled":{"type":"boolean"},"mode":{"$ref":"#/components/schemas/sauth-OauthMode"},"endpoint":{"$ref":"#/components/schemas/sauth-OauthEndpoint"},"jwkEndpoint":{"$ref":"#/components/schemas/sauth-OauthJwkEndpoint"},"headers":{"$ref":"#/components/schemas/sauth-OauthHeaders"},"mapping":{"$ref":"#/components/schemas/sauth-OauthMapping"},"name":{"$ref":"#/components/schemas/sauth-OauthName"},"mappedExternal":{"$ref":"#/components/schemas/sauth-OauthMappedExternal"},"syncDataOnLogin":{"$ref":"#/components/schemas/sauth-OauthSyncDataOnLogin"},"validation":{"$ref":"#/components/schemas/sauth-OauthValidation"}}},"sauth-OauthName":{"type":"string","description":"Name of the integration"},"sauth-OauthMode":{"type":"string","enum":["JWT_TOKEN","SERVER"],"description":"The mode of authentication:\n\n- SERVER: Your OAuth server returns a token to the client device; the client device passes it to the Synerise backend; Synerise backend verifies the token with your OAuth backend\n- JWT_TOKEN: Your OAuth server returns a JWT to the client device; the client device passes it to the Synerise backend; the Synerise backends verifies it with the provided JWK. This mode requires fewer resources from your backend.\n"},"sauth-OauthJwkEndpoint":{"type":"string","description":"URL of the JWK when the `JWT_TOKEN` mode is selected.  \nIf you want to pass the token from your backend in the URL, use the `{{_snrs_access_token}}` insert.\n"},"sauth-OauthEndpoint":{"type":"string","description":"URL of the OAuth authorization endpoint when the `SERVER` mode is selected.  \nIf you want to pass the token from your backend in the URL, use the `{{_snrs_access_token}}` insert.\n"},"sauth-OauthHeaders":{"type":"object","description":"'Headers for the authorization request when `SERVER` mode is selected. For example, `\"X-Custom-Header\": \"someValue\"`  \nIf you want to pass the token from your backend in a header, use the `{{_snrs_access_token}}` insert'\n","example":{"Content-Type":"application/json","Authorization":"Bearer {{_snrs_access_token}}","Cache-control":"no-cache"},"additionalProperties":{"type":"string"}},"sauth-OauthMapping":{"type":"object","description":"A mapping of fields from the Synerise endpoint to your OAuth endpoint. For example, if your field is called `token` and its counterpart in Synerise is `accessToken`, the mapping is `\"accessToken\": \"token\"`","additionalProperties":{"type":"string"}},"sauth-OauthValidation":{"type":"object","description":"A validation mapping of fields from jwt token.","additionalProperties":{"type":"string"}},"sauth-OauthMappedExternal":{"type":"boolean","default":true,"description":"If set to FALSE, the authentication request must include the customer's `customId` in the body."},"sauth-OauthSyncDataOnLogin":{"type":"boolean","default":false,"description":"When set to TRUE, profile data from an external authentication provider is uploaded into the Synerise database every time the profile logs in. When FALSE, the data is saved only the first time a profile logs in, so that the amount of data is reduced in later authentication requests."},"sauth-ConditionalAuthenticationResponse":{"type":"object","properties":{"conditions":{"type":"array","description":"Reserved for future use.","items":{"type":"string"}},"status":{"type":"string","description":"Login status. Currently, only `SUCCESS` is used.","enum":["SUCCESS","UNAUTHORIZED","ACTIVATION_REQUIRED","REGISTRATION_REQUIRED","APPROVAL_REQUIRED","TERMS_ACCEPTANCE_REQUIRED","MFA_REQUIRED"]},"token":{"type":"string","description":"[JWT](https://jwt.io/) token"}},"title":"ConditionalAuthenticationResponse"},"sauth-ServerAuthenticationRequestV2_and_3":{"allOf":[{"type":"object","required":["ipAddress"],"properties":{"ipAddress":{"type":"string","description":"The IP address of the client device that is logging in."}}},{"$ref":"#/components/schemas/sauth-AuthenticationRequestV2_and_3"}]},"sauth-ConditionalAuthenticationResponseV3":{"type":"object","properties":{"conditions":{"type":"array","description":"Reserved for future use.","items":{"type":"string"}},"status":{"type":"string","description":"Login status. Currently, only `SUCCESS` is used.","enum":["SUCCESS","UNAUTHORIZED","ACTIVATION_REQUIRED","REGISTRATION_REQUIRED","APPROVAL_REQUIRED","TERMS_ACCEPTANCE_REQUIRED","MFA_REQUIRED"]},"token":{"type":"string","description":"[JWT](https://jwt.io/) token"},"expiration":{"type":"integer","example":1649283173},"created":{"type":"integer","example":1649277173668},"origin":{"type":"string","example":"SYNERISE"},"customId":{"type":"string","example":"card123"},"realm":{"type":"string","example":"client"}},"title":"ConditionalAuthenticationResponseV3"},"sauth-ClientApiKey":{"type":"string","description":"Profile (formerly \"Client\") API key"},"sauth-AuthIdentityProviderToken":{"type":"string","description":"Third-party authentication token used to authenticate with the Identity Provider. Required if `identityProvider` is different than `SYNERISE`."},"sauth-AuthClientEmail":{"type":"string","description":"Profile email. Required if `identityProvider` is `SYNERISE` and email is the unique identifier (default setting)."},"sauth-AuthClientPassword":{"type":"string","description":"Profile password. Required if `identityProvider` is `SYNERISE`."},"sauth-AuthClientUuid":{"type":"string","description":"Profile UUID. Required if `identityProvider` is `SYNERISE`."},"sauth-AuthClientCustomId":{"description":"Profile customId. Required if `identityProvider` is `SYNERISE` and customId is the unique identifier (see https://hub.synerise.com/docs/settings/configuration/non-unique-emails/)."},"sauth-inBodyClientCompany":{"type":"string","description":"Profile's company"},"sauth-inBodyClientBirthDate":{"type":"string","description":"Profile's date of birth"},"sauth-inBodyClientAvatarUrl":{"type":"string","nullable":true,"description":"URL of the Profile's avatar picture"},"sauth-inBodyClientDisplayName":{"type":"string","description":"Currently unused"},"sauth-inBodyClientLastName":{"type":"string","description":"Profile's last name"},"sauth-inBodyClientCustomId":{"type":"string","description":"Profile's custom ID"},"sauth-inBodyClientPhone":{"type":"string","description":"Phone number of the Profile. Can only include digits, spaces, and an optional `+` at the beginning","example":"+48111222333"},"sauth-inBodyClientEmail":{"type":"string","description":"Profile's email address"},"sauth-inBodyClientFirstName":{"type":"string","description":"Profile's first name"},"sauth-inBodyClientUuid":{"type":"string","description":"UUID of the Profile","example":"07243772-008a-42e1-ba37-c3807cebde8f"},"sauth-inBodyClientDeviceId":{"type":"string","description":"Unique Android or iOS device ID.\n\nWe recommend sending this attribute every time, to assign a web push registration to the device.\n\nRequired when any form of [unknown device control](https://hub.synerise.com/docs/settings/tool/iam-for-apps/access/#unknown-device-control) is enabled.\n"},"sauth-inBodyClientCity":{"type":"string","description":"Profile's city of residence"},"sauth-inBodyClientAddress":{"type":"string","description":"Profile's street address"},"sauth-inBodyClientZipCode":{"type":"string","description":"Profile's zip code"},"sauth-inBodyClientProvince":{"type":"string","description":"Profile's province of residence"},"sauth-inBodyClientCountryCode":{"type":"string","description":"Code of Profile's country of residence (Alpha-2 code according to ISO 3166-1)","example":"PL"},"sauth-inBodyClientSex":{"type":"string","description":"Profile's sex","enum":["FEMALE","MALE","NOT_SPECIFIED","OTHER"]},"sauth-Tags":{"type":"array","description":"Tags can be used to group Profile accounts.","items":{"type":"string"}},"sauth-Attributes":{"type":"object","description":"Custom attributes (with any names)\n\n<strong><span style=\"color:red\">WARNING<span></strong>: Some attributes cannot be sent in this object and will be ignored. Some of these are reserved for system use, and others must be sent as properties of the profile in the root object of the request body instead of inside the `attributes` object.\n\n<details><summary><span style=\"background:red;color:white\">Click to expand the list of reserved attributes</span></summary>\n<code>email</code><br><code>id</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br>\n<code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br>\n<code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br>\n<code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br>\n<code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br>\n<code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br>\n<code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br><code>receive_whatsapp_messages</code><br><code>whatsapp_id</code><br>\n<code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_country</code><br><code>geo_loc_isp</code><br>\n<code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>deletedAt</code><br><code>deleted_unique</code><br><code>status</code><br><code>recognized</code><br><code>previous_clients</code><br><code>testProfile</code><br>\n<code>apikey</code><br><code>apiKey</code><br><code>ApiKey</code><br><code>Apikey</code><br><code>tracker</code><br><code>snr_sdk_version</code><br>\n<code>eventCreateTime</code><br><code>correlationId</code>\n</details>\n","additionalProperties":{"description":"Can be numbers, strings, or booleans."}},"sauth-Agreements":{"description":"Marketing agreements of the Profile.\n\nYou can also pass the values as strings (`\"true\"`;`\"TRUE\"`;`\"True\"`/`\"false\"`;`\"FALSE\"`;`\"False\"`) or integers (`1` for true and `0` for false).","type":"object","properties":{"email":{"type":"boolean","description":"Permission to receive marketing information by email","default":true},"sms":{"type":"boolean","description":"Permission to receive marketing information by SMS","default":true},"push":{"type":"boolean","description":"Permission to receive push notifications","default":true},"bluetooth":{"type":"boolean","deprecated":true,"description":"This field is ignored.","default":false},"rfid":{"type":"boolean","deprecated":true,"description":"This field is ignored.","default":false},"wifi":{"type":"boolean","deprecated":true,"description":"This field is ignored.","default":false},"whatsApp":{"type":"boolean","description":"Permission to receive WhatsApp messages","default":false}},"example":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false}},"sauth-ConfirmClientpasswordresetRequest":{"required":["password","token"],"type":"object","properties":{"password":{"type":"string","description":"New password"},"token":{"type":"string","description":"Token received by email"}},"example":{"password":"testPass1!","token":"token_from_pass_reset_req"}},"sauth-RequestClientpasswordresetRequest":{"required":["email"],"type":"object","properties":{"email":{"type":"string","description":"Email address where the password reset link will be sent"}},"example":{"email":"testDoc@example.com"}},"sauth-ConfirmationRedirectLink":{"type":"string","default":null,"description":"Redirect URL of the confirmation link"},"sauth-RegistrationType":{"type":"string","description":"Defines the Profile account activation type.\n\n- REQUIRE_ACTIVATION: the account is inactive until the link in the confirmation email is accessed.\n- REQUIRE_EMAIL_CONFIRMATION: the account is active and can be used immediately, but must be confirmed using the link from the confirmation email.\n- AUTOMATIC: no activation is required\n- REQUIRE_PIN_CONFIRMATION: PIN code confirmation is required. To send the PIN by email, the email template must include the `{{pin_code}}` jinjava tag.\n","enum":["REQUIRE_ACTIVATION","REQUIRE_EMAIL_CONFIRMATION","REQUIRE_PIN_CONFIRMATION","AUTOMATIC"]},"sauth-TokenLifetimeInSeconds":{"type":"integer","format":"int64","default":0,"description":"The time in seconds before the authorization tokens expire. If set to `0` (default), the global Synerise setting is applied: 60 minutes."},"sauth-VoucherPoolUuid":{"type":"string","default":null,"description":"UUID of the voucher pool that stores `customId` values available for assignment to new Profiles, if applicable in your implementation."},"sauth-AllowOverwriteCustomIdentify":{"type":"boolean","default":false,"description":"When set to TRUE, customers' `customId` values may be modified. By default, the `customId` cannot be changed."},"sauth-AllowOverwriteExternalId":{"type":"boolean","default":false,"description":"When set to TRUE, a profile's `externalId` value may be modified.\n\nThis may be useful, for example, if someone deletes their account with an external authentication provider, and then registers a new account with the same email.\nThe external provider assigns a new ID and you need to allow overwriting the existing external ID in Synerise in order to link the existing profile in Synerise with the newly created account from the external provider.\n"},"sauth-AllowEmailChangeFromWebForm":{"type":"boolean","default":false,"description":"When set to TRUE, email change can be requested/confirmed using a web form."},"sauth-AllowToPassCustomIdentifyWithVoucherPool":{"type":"boolean","default":false,"description":"When set to TRUE, `customId` can be provided even if `voucher pool` is configured. In this case voucher will not be assigned."},"sauth-4xx-base":{"type":"object","properties":{"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"errors":{"type":"array","description":"An array of detailed error messages, if applicable","items":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"field":{"type":"string","description":"Name of the field that did not pass validation"},"message":{"type":"string","description":"Details of the problem"},"rejectedValue":{"description":"The value that did not pass validation","anyOf":[{"type":"string"},{"type":"number"},{"type":"integer"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object"}]}}}},"status":{"type":"integer","format":"int32","description":"Status code"},"timestamp":{"type":"string","description":"Time when the message was sent"},"path":{"type":"string","description":"URL of the requested resource"},"traceId":{"type":"string","description":"ID for debugging"}}},"schema-service-generateDocumentWithIdReq":{"type":"object","required":["identifierValue"],"properties":{"identifierValue":{"$ref":"#/components/schemas/schema-service-identifierValue"},"params":{"type":"object","description":"Additional parameters","additionalProperties":{"$ref":"#/components/schemas/schema-service-additionalPropertiesForGenerate"}}}},"schema-service-additionalPropertiesForGenerate":{"description":"If you are generating the resource with a context that doesn't have the data for inserts in the resource (for example, a document has a `{% customer param %}` insert, but you're authenticated with a workspace JWT, so the customer context can't be extracted from the JWT), you can include the parameters in the request body. If an insert can't be processed, the returned content is empty.\n\n**Usage example**: if the `{% customer firstName %}` insert is used in a document, you can pass its value by sending `\"customer.firstName\": \"Joe\"`\n\nBecause inserts are always encapsulated with quotation marks, inserts that return a number or a boolean value return it as a string.\n","anyOf":[{"type":"string"},{"type":"number"}]},"schema-service-DocumentGenerateResponse":{"type":"object","description":"Processed document","required":["id","slug","schema","content"],"properties":{"uuid":{"$ref":"#/components/schemas/schema-service-DocumentId"},"slug":{"$ref":"#/components/schemas/schema-service-DocumentSlug"},"schema":{"$ref":"#/components/schemas/schema-service-DocumentSchema"},"content":{"$ref":"#/components/schemas/schema-service-documentContentProcessed"}}},"schema-service-GenerateResponse":{"type":"object","required":["id","hash","priority","name","createdAt","updatedAt","audience","data","path"],"properties":{"id":{"$ref":"#/components/schemas/schema-service-screenViewId"},"hash":{"$ref":"#/components/schemas/schema-service-screenViewId"},"priority":{"$ref":"#/components/schemas/schema-service-screenViewPriority"},"name":{"$ref":"#/components/schemas/schema-service-screenViewName"},"createdAt":{"$ref":"#/components/schemas/schema-service-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/schema-service-UpdatedAt"},"audience":{"$ref":"#/components/schemas/schema-service-Audience"},"data":{"type":"object","description":"The JSON structure of the screen view, with inserts processed","properties":{"collection":{"type":"array","description":"By default, the `collection` property exists in each screen view, unless the default content was overwritten. This property's value is the output of the `{% screenviewcollection %}` insert. If you moved the insert into a different position in the JSON structure, its result (the array) will be stored at the position where you placed the insert (you can modify the screen definition so that the insert is under a key different than `collection`).","items":{"$ref":"#/components/schemas/schema-service-DocumentGenerateResponse"}}},"additionalProperties":{"description":"Other JSON entities included in the screen view's JSON structure."}},"path":{"type":"string","description":"Address of the screen view definition","example":"/v2/screen-views/f9215cb9-4a7e-410b-88cb-8bc40363cc10"}}},"schema-service-PreviewGroup":{"type":"object","required":["id","name","children"],"properties":{"id":{"$ref":"#/components/schemas/schema-service-groupUuid"},"name":{"$ref":"#/components/schemas/schema-service-groupName"},"children":{"type":"array","description":"An array of documents in the group","items":{"$ref":"#/components/schemas/schema-service-DocumentPreviewGroup"}}}},"schema-service-DocumentPreviewGroup":{"type":"object","description":"Details of a single document","required":["id","name","status","priority","children"],"properties":{"id":{"$ref":"#/components/schemas/schema-service-DocumentId"},"name":{"$ref":"#/components/schemas/schema-service-DocumentName"},"status":{"$ref":"#/components/schemas/schema-service-DocumentStatus"},"priority":{"$ref":"#/components/schemas/schema-service-DocumentPriority"},"children":{"type":"array","description":"Documents that are included in the body of this document","items":{"type":"object","description":"Details of a single document","required":["id","name","status","priority","children"],"properties":{"id":{"$ref":"#/components/schemas/schema-service-DocumentId"},"name":{"$ref":"#/components/schemas/schema-service-DocumentName"},"status":{"$ref":"#/components/schemas/schema-service-DocumentStatus"},"priority":{"$ref":"#/components/schemas/schema-service-DocumentPriority"},"children":{"type":"array","description":"Documents that are included in the body of this document. This is a recursive schema, `children` may have their own `children`.","items":{"type":"object","$ref":"#/components/schemas/schema-service-DocumentPreviewGroup"}}}}}}},"schema-service-GraphObject":{"type":"object","required":["id","type","children"],"properties":{"id":{"type":"string","description":"UUID of the screen view or document"},"type":{"type":"string","description":"Type of the entity","enum":["document","screenview"]},"name":{"type":"string","description":"Name of the screen view or document (not slug)"},"children":{"type":"array","description":"Screen views or documents that refer to this entity","items":{"$ref":"#/components/schemas/schema-service-GraphObject"}}}},"schema-service-UpdateDocumentRequest":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/schema-service-DocumentName"},"priority":{"$ref":"#/components/schemas/schema-service-DocumentPriority"},"content":{"$ref":"#/components/schemas/schema-service-documentContentRaw"},"schema":{"$ref":"#/components/schemas/schema-service-DocumentSchema"},"groupId":{"$ref":"#/components/schemas/schema-service-DocumentGroupId"},"audience":{"$ref":"#/components/schemas/schema-service-Audience"},"schedule":{"$ref":"#/components/schemas/schema-service-EntrySchedule"},"directoryId":{"$ref":"#/components/schemas/schema-service-directoryId"}}},"schema-service-CreateDocumentRequest":{"type":"object","required":["name","priority","content","slug","audience","directoryId"],"properties":{"name":{"$ref":"#/components/schemas/schema-service-documentName"},"priority":{"$ref":"#/components/schemas/schema-service-DocumentPriority"},"content":{"$ref":"#/components/schemas/schema-service-documentContentRaw"},"slug":{"$ref":"#/components/schemas/schema-service-DocumentSlug"},"schema":{"$ref":"#/components/schemas/schema-service-DocumentSchema"},"groupId":{"$ref":"#/components/schemas/schema-service-documentGroupId"},"audience":{"$ref":"#/components/schemas/schema-service-Audience"},"schedule":{"$ref":"#/components/schemas/schema-service-EntrySchedule"},"directoryId":{"$ref":"#/components/schemas/schema-service-directoryId"}}},"schema-service-EntrySchedule":{"type":"object","description":"Configuration of the schedule","properties":{"enabled":{"type":"boolean","description":"Defines if the schedule configuration is enabled. A schedule must be enabled in order to become active at the selected time."},"endDate":{"type":"string","format":"date-time","description":"Time when the schedule stops being active. If `endType` is NEVER, this field is null.","nullable":true},"endType":{"type":"string","description":"- NEVER: schedule never becomes inactive.\n\n- DATE: schedule becomes inactive at the time set by `endDate`.\n","enum":["NEVER","DATE"]},"parts":{"type":"array","description":"\nAn array of time rules that allow more granularity. All objects must match the period type set in `periodType` (for example, you **cannot mix** weekly and monthly conditions). \n\nIf `periodType` is ENTIRE, this array is empty.\n","items":{"$ref":"#/components/schemas/schema-service-EntryScheduleRepeatPart"}},"periodType":{"type":"string","description":"Defines when the schedule applies within its activity period.\n\n- ENTIRE: schedule is applied at all time since it becomes active until it becomes inactive.\n\n\n- WEEKLY: schedule is applied at specified days of the week (and optionally at specific times during those days)\n\n- MONTHLY: schedule is applied at specified days of the month (and optionally at specific times during those days)\n","enum":["ENTIRE","WEEKLY","MONTHLY"]},"startDate":{"type":"string","format":"date-time","description":"Time when the schedule becomes active. If `startType` is NOW, this field is null."},"startType":{"type":"string","enum":["NOW","SCHEDULED"]},"timezone":{"type":"string","example":"Europe/Warsaw","description":"Time zone according to the [tz database](https://en.wikipedia.org/wiki/Tz_database)"}}},"schema-service-EntryScheduleRepeatPart":{"type":"object","properties":{"startDay":{"type":"integer","format":"int32","example":1,"description":"If `periodType` is:\n\n\n- WEEKLY, the values are 1-7 (1 is Monday).\n\n- MONTHLY, the values are 1-31 (days of the month).\n\n**Note:**<br/>\nIf you want to define two time rules for a day (for example, the schedule is active on Monday at 06:00-07:00 and 15:00-16:00), create a separate object for each time period in the `parts` array.\n"},"startTime":{"type":"string","example":"08:18:03","description":"The hour when the schedule becomes active."},"endDay":{"type":"integer","format":"int32","example":1,"description":"Must be identical to `startDay`."},"endTime":{"type":"string","example":44283,"description":"The hour when the schedule becomes inactive."}}},"schema-service-DocumentScheduled":{"type":"boolean","description":"Informs if the document has a defined schedule. Documents scheduled to be published immediately after activation are considered to be scheduled, so only a draft document can have this property at `false`. Copied documents inherit the schedule of their source document."},"schema-service-CreateScreenViewRequest":{"type":"object","required":["priority","directoryId","content","audience","feedId"],"properties":{"priority":{"$ref":"#/components/schemas/schema-service-screenViewPriority"},"name":{"$ref":"#/components/schemas/schema-service-screenViewName"},"directoryId":{"$ref":"#/components/schemas/schema-service-directoryId"},"content":{"$ref":"#/components/schemas/schema-service-ScreenViewContent"},"audience":{"$ref":"#/components/schemas/schema-service-Audience"},"schedule":{"$ref":"#/components/schemas/schema-service-EntrySchedule"},"feedId":{"$ref":"#/components/schemas/schema-service-feedId"}}},"schema-service-feedId":{"type":"string","format":"uuid","description":"UUID of the feed where this screen view is assigned."},"schema-service-identifierValue":{"type":"string","description":"Value of the profile identifier selected in `identifierType` (profile ID is sent as a string)"},"schema-service-screenViewId":{"type":"string","format":"uuid","description":"UUID of the screen view"},"schema-service-screenViewVersion":{"type":"string","description":"Version of the screen view"},"schema-service-screenViewStatus":{"type":"string","enum":["DRAFT","ACTIVE","SCHEDULED","PAUSED","FINISHED"],"description":"Status of the screen view\n\n- DRAFT: a screen view that is a work in progress, not complete for activation\n- ACTIVE: a screen view that can be displayed to customers\n- SCHEDULED: a screen view scheduled to activate later\n- PAUSED: a screen view that is temporarily stopped and cannot be displayed\n- FINISHED: a screen view that is stopped and cannot be displayed\n"},"schema-service-screenViewParentVersion":{"type":"string","description":"If the current was created from another version, this is is the UUID of the parent version."},"schema-service-ScreenViewFeed":{"type":"object","required":["name","slug"],"properties":{"slug":{"$ref":"#/components/schemas/schema-service-FeedSlug"},"name":{"$ref":"#/components/schemas/schema-service-FeedName"}}},"schema-service-DocumentId":{"type":"string","format":"uuid","description":"UUID of the document"},"schema-service-DocumentSlugAsObject":{"type":"object","required":["slug"],"properties":{"slug":{"type":"string","description":"Slug of the document","example":"basket","pattern":"[a-z0-9]+(?:-[a-z0-9]+)*"}}},"schema-service-DocumentSlug":{"type":"string","description":"Slug of the document","example":"basket","pattern":"[a-z0-9]+(?:-[a-z0-9]+)*"},"schema-service-DocumentName":{"type":"string","description":"Name of the document"},"schema-service-DocumentSchema":{"type":"string","description":"Schema of the document (called \"Type\" in the Synerise Web Application)","example":"containers"},"schema-service-DocumentStatus":{"type":"string","enum":["DRAFT","ACTIVE","SCHEDULED","PAUSED","FINISHED"],"description":"Filter by status"},"schema-service-DocumentPriority":{"type":"integer","format":"int32","maximum":100,"description":"Priority of the document"},"schema-service-CreateRequest":{"type":"object","properties":{"name":{"type":"string","description":"If no name is provided, defaults to \"Unnamed document\" or Screen View Campaign\" (depending on what you are initializing)."},"directory":{"type":"string","format":"uuid","description":"If no directory is provided, the default directory is used."}}},"schema-service-DocumentMetadata":{"type":"object","description":"Data of the document","required":["docId","name","status","scheduled","authorId","directoryId"],"properties":{"docId":{"$ref":"#/components/schemas/schema-service-DocumentId"},"name":{"$ref":"#/components/schemas/schema-service-DocumentName"},"status":{"$ref":"#/components/schemas/schema-service-DocumentStatus"},"authorId":{"type":"integer","format":"int64","description":"ID of the user who created the document"},"directoryId":{"type":"string","format":"uuid","description":"UUID of the directory where the document is saved"},"scheduled":{"$ref":"#/components/schemas/schema-service-DocumentScheduled"},"createdAt":{"$ref":"#/components/schemas/schema-service-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/schema-service-UpdatedAt"},"deletedAt":{"$ref":"#/components/schemas/schema-service-DeletedAt"}}},"schema-service-DocumentContent":{"type":"object","description":"Content of the document","required":["priority","content","slug","schema"],"properties":{"priority":{"$ref":"#/components/schemas/schema-service-DocumentPriority"},"content":{"type":"object","description":"JSON structure of the document","additionalProperties":{"$ref":"#/components/schemas/schema-service-anyProp"}},"slug":{"$ref":"#/components/schemas/schema-service-DocumentSlug"},"schema":{"$ref":"#/components/schemas/schema-service-DocumentSchema"},"groupId":{"$ref":"#/components/schemas/schema-service-DocumentGroupId"}}},"schema-service-Audience":{"type":"object","description":"The profiles (clients) which have access to this resource","required":["targetType"],"properties":{"targetType":{"type":"string","description":"The method of defining the audience:\n- SEGMENT sets the audience to segmentations whose UUIDs are provided in `segments`\n- QUERY sets the audience to an analytics query provided in `query`\n- ALL sets the audience to all profiles in the database\n","enum":["SEGMENT","QUERY","ALL"]},"segments":{"type":"array","description":"An array of segmentation IDs. Used with `targetType: SEGMENT`","items":{"type":"string"}},"query":{"type":"string","description":"Stringified `analysis` object for the segmentation analytics engine. Used with `targetType: QUERY`. Refer to the [Analytics API Reference](https://developers.synerise.com/#operation/addSegmentationPOST_v2).","example":"{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}"}}},"schema-service-Group":{"type":"object","description":"Details of the document group","required":["id","bpId","name","createdAt"],"properties":{"id":{"$ref":"#/components/schemas/schema-service-DocumentGroupId"},"name":{"type":"string","description":"Name of the group"},"createdAt":{"type":"string","format":"date-time","description":"Date and time when the group was created"},"deletedAt":{"type":"string","format":"date-time","description":"Date and time when the group was deleted, if applicable","nullable":true},"nr":{"description":"The number of documents in this group with status other than FINISHED","type":"integer","format":"int32"}}},"schema-service-DocumentGroupId":{"type":"string","format":"uuid","example":"43c97b25-4a10-45d0-99b7-d472eea2bb24","description":"UUID of the group"},"schema-service-RenameDirectory":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"New name for the directory"}}},"schema-service-NewDirectory":{"type":"object","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/schema-service-DirectoryName"}}},"schema-service-PreviewDocumentByProfile":{"type":"object","required":["identifierValue","content"],"properties":{"identifierValue":{"$ref":"#/components/schemas/schema-service-identifierValue"},"content":{"$ref":"#/components/schemas/schema-service-documentContentRaw"},"params":{"type":"object","description":"Additional parameters","additionalProperties":{"$ref":"#/components/schemas/schema-service-additionalPropertiesForGenerate"}}}},"schema-service-Feed":{"type":"object","description":"Feeds are used to group screen views, similar to document groups.","required":["id","slug","name","createdAt","default"],"properties":{"id":{"type":"string","format":"uuid","description":"UUID of the screen view feed"},"slug":{"$ref":"#/components/schemas/schema-service-FeedSlug"},"name":{"$ref":"#/components/schemas/schema-service-FeedName"},"createdAt":{"$ref":"#/components/schemas/schema-service-CreatedAt"},"default":{"type":"boolean","description":"Informs if this is the default screen view feed"}}},"schema-service-FeedName":{"type":"string","description":"Name of the screen view feed"},"schema-service-FeedSlug":{"type":"string","description":"Unique slug of the screen view feed"},"schema-service-Directory":{"type":"object","description":"Details of the directory where the resource is assigned","required":["id","name","createdAt","default"],"properties":{"id":{"$ref":"#/components/schemas/schema-service-directoryId"},"name":{"$ref":"#/components/schemas/schema-service-DirectoryName"},"createdAt":{"type":"string","format":"date-time","description":"Date and time when the directory was created"},"default":{"type":"boolean","description":"`true` if this is the default directory"}}},"schema-service-DirectoryName":{"type":"string","description":"Name of the directory"},"schema-service-SchedulerRequest":{"type":"object","description":"Schedule object","properties":{"externalId":{"$ref":"#/components/schemas/schema-service-ScheduleExternalId"},"type":{"$ref":"#/components/schemas/schema-service-ScheduleType"},"schedule":{"$ref":"#/components/schemas/schema-service-EntrySchedule"}}},"schema-service-SchedulerResponse":{"type":"object","description":"Details of the schedule","properties":{"active":{"type":"boolean","description":"`true` if the conditions of the schedule match the current time. This is not related to document/screen view status."},"externalId":{"$ref":"#/components/schemas/schema-service-ScheduleExternalId"},"type":{"$ref":"#/components/schemas/schema-service-ScheduleType"},"finished":{"type":"boolean","description":"`true` if the conditions of the schedule mean it ended in the past. This is not related to document/screen view status."},"schedule":{"$ref":"#/components/schemas/schema-service-EntrySchedule"}}},"schema-service-ScheduleType":{"type":"string","description":"Type of the scheduled object","enum":["SCREENVIEW","DOCUMENT"]},"schema-service-ScheduleExternalId":{"type":"string","format":"uuid","description":"UUID of the screen view or document that the schedule applies to"},"schema-service-Document":{"type":"object","title":"Documents","required":["id","name","priority","status","scheduled","createdAt","updatedAt","author","content","audience"],"properties":{"id":{"$ref":"#/components/schemas/schema-service-DocumentId"},"name":{"$ref":"#/components/schemas/schema-service-DocumentName"},"priority":{"$ref":"#/components/schemas/schema-service-DocumentPriority"},"content":{"$ref":"#/components/schemas/schema-service-documentContentRaw"},"slug":{"$ref":"#/components/schemas/schema-service-DocumentSlug"},"schema":{"$ref":"#/components/schemas/schema-service-DocumentSchema"},"scheduled":{"$ref":"#/components/schemas/schema-service-DocumentScheduled"},"status":{"$ref":"#/components/schemas/schema-service-DocumentStatus"},"audience":{"$ref":"#/components/schemas/schema-service-Audience"},"author":{"$ref":"#/components/schemas/schema-service-Author"},"directory":{"$ref":"#/components/schemas/schema-service-Directory"},"group":{"$ref":"#/components/schemas/schema-service-Group"},"createdAt":{"$ref":"#/components/schemas/schema-service-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/schema-service-UpdatedAt"},"deletedAt":{"$ref":"#/components/schemas/schema-service-DeletedAt"}}},"schema-service-Author":{"type":"object","description":"Author of the resource","required":["id","name"],"properties":{"id":{"type":"integer","format":"int32","description":"ID of the author"},"name":{"type":"string","description":"Name of the author"},"avatar":{"type":"string","description":"URL of the author's avatar"}}},"schema-service-DocumentsListResponse":{"type":"object","required":["meta","data"],"properties":{"meta":{"$ref":"#/components/schemas/schema-service-Meta"},"data":{"type":"array","description":"Array of analytics","items":{"oneOf":[{"$ref":"#/components/schemas/schema-service-Document"}]}}}},"schema-service-ScreenViewsListResponse":{"type":"object","required":["meta","data"],"properties":{"meta":{"$ref":"#/components/schemas/schema-service-Meta"},"data":{"type":"array","description":"Array of analytics","items":{"oneOf":[{"$ref":"#/components/schemas/schema-service-screenView"}]}}}},"schema-service-Meta":{"type":"object","description":"Pagination metadata","properties":{"links":{"type":"array","description":"Links to the neighboring pages and the first page","items":{"$ref":"#/components/schemas/schema-service-Link"}},"limit":{"type":"integer","format":"int32","description":"Limit of items per page"},"count":{"type":"number","nullable":true,"description":"Currently unused"}}},"schema-service-Link":{"type":"object","required":["url","rel"],"properties":{"url":{"type":"string","description":"URL of the page, used for navigation"},"rel":{"type":"string","description":"The type of relation to the current page. `first` is always the first page.","enum":["first","prev","next"]}}},"schema-service-screenViewMetadata":{"type":"object","description":"Data of the screen view","properties":{"id":{"$ref":"#/components/schemas/schema-service-screenViewId"},"version":{"$ref":"#/components/schemas/schema-service-screenViewVersion"},"status":{"$ref":"#/components/schemas/schema-service-screenViewStatus"},"hash":{"$ref":"#/components/schemas/schema-service-hashId"},"parentVersion":{"$ref":"#/components/schemas/schema-service-screenViewParentVersion"},"authorId":{"type":"string","description":"ID of the user who created the screen view"},"businessProfileId":{"$ref":"#/components/schemas/schema-service-screenViewBpId"},"priority":{"$ref":"#/components/schemas/schema-service-screenViewPriority"},"name":{"$ref":"#/components/schemas/schema-service-screenViewName"},"description":{"$ref":"#/components/schemas/schema-service-screenViewDescription"},"isActive":{"$ref":"#/components/schemas/schema-service-screenViewActive"},"createdAt":{"$ref":"#/components/schemas/schema-service-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/schema-service-UpdatedAt"},"deletedAt":{"$ref":"#/components/schemas/schema-service-DeletedAt"}}},"schema-service-documentId":{"type":"object","required":["slug"],"properties":{"slug":{"type":"string","description":"Slug of the document"},"version":{"type":"string","description":"Version of the document"}}},"schema-service-ScreenViewContentLegacy":{"type":"object","description":"Content of the screen view. It's possible to create a screen view without any documents (`documents` and `groups` arrays are both empty in that case).","required":["json","documents","groups"],"properties":{"json":{"$ref":"#/components/schemas/schema-service-ScreenViewJsonContent"},"documents":{"type":"array","minItems":0,"description":"An array of [documents](https://help.synerise.com/docs/assets/documents/introduction-to-documents/). If `groups` is used or the SV contains no documents, this array must be empty.","items":{"$ref":"#/components/schemas/schema-service-documentId"}},"groups":{"type":"array","minItems":0,"description":"An array of [document groups](https://help.synerise.com/docs/assets/documents/introduction-to-documents/). If `documents` is used or the SV contains no documents, this array must be empty.","items":{"$ref":"#/components/schemas/schema-service-DocumentGroupId"}},"groupsOrder":{"type":"boolean","default":false,"description":"By default, group are ordered for display by their priority. When this field is set to `true`, they are displayed according to their order in the `groups` array instead."}}},"schema-service-BrickworksRecord":{"type":"object","description":"Object represents brickworks record id.","required":["schemaId","objectId"],"properties":{"schemaId":{"type":"string","format":"uuid"},"objectId":{"type":"string"}}},"schema-service-ScreenViewContent":{"type":"object","title":"With document groups","description":"Content of the screen view","required":["json","documents","groups"],"properties":{"json":{"$ref":"#/components/schemas/schema-service-ScreenViewJsonContent"},"documents":{"type":"array","description":"An array of [documents](https://help.synerise.com/docs/assets/documents/introduction-to-documents/). If `groups` is used, this array must be empty.","items":{"type":"string"}},"data":{"type":"array","description":"An array of documents or Brickworks records","items":{"oneOf":[{"$ref":"#/components/schemas/schema-service-DocumentSlugAsObject"},{"$ref":"#/components/schemas/schema-service-BrickworksRecord"}]}},"groups":{"type":"array","description":"An array of [document groups](https://help.synerise.com/docs/assets/documents/introduction-to-documents/), If `documents` is used, this array must be empty.","items":{"$ref":"#/components/schemas/schema-service-DocumentGroupId"}},"groupsOrder":{"type":"boolean","default":false,"description":"By default, group are ordered for display by their priority. When this field is set to `true`, they are displayed according to their order in the `groups` array instead."}}},"schema-service-ScreenViewJsonContent":{"type":"object","description":"JSON structure of the screen view. By default, a newly created screen view has the following `json` value:\n\n```\n\"collection\": \"{% screenviewcollection %}\"\n```\nThe `{% screenviewcollection %}` insert is used to pick and display the documents from the documents in `documents` or `groups`.\n\nIf this insert is not used, you must manually insert each document with `{% document slug%}`.\n","additionalProperties":{"$ref":"#/components/schemas/schema-service-anyProp"}},"schema-service-standardApiResponse":{"type":"object","required":["status","body"],"properties":{"status":{"type":"string","description":"Status of the request"},"body":{"type":"string","description":"Additional information, if applicable."}}},"schema-service-publishRequest":{"type":"object","required":["overwrite"],"properties":{"overwrite":{"description":"Currently unused","type":"boolean"}}},"schema-service-screenViewPriority":{"type":"integer","description":"Priority determines which screen view to show to a customer if their profile matches the conditions of more than one screen view. `1` is the highest priority.","default":99},"schema-service-screenViewActive":{"type":"boolean","description":"Defines if the screen view is active."},"schema-service-screenViewBpId":{"type":"integer","description":"ID of the workspace where this screen view is saved"},"schema-service-screenViewName":{"type":"string","description":"Name of the screen view"},"schema-service-screenViewDescription":{"type":"string","description":"Description of the screen view"},"schema-service-versionsOfScreenView":{"type":"object","properties":{"draft":{"$ref":"#/components/schemas/schema-service-screenViewMetadata"},"currentlyPublished":{"$ref":"#/components/schemas/schema-service-screenViewMetadata"},"previouslyPublished":{"$ref":"#/components/schemas/schema-service-paginatedScreenViewMetadata"}}},"schema-service-paginatedScreenViews":{"type":"object","required":["data","pagination"],"properties":{"data":{"type":"array","description":"A page of screen views","items":{"$ref":"#/components/schemas/schema-service-screenView"}},"pagination":{"$ref":"#/components/schemas/schema-service-pagination"}}},"schema-service-paginatedScreenViewMetadata":{"type":"object","description":"Paginated list of previously published screen views","required":["data","pagination"],"properties":{"data":{"type":"array","description":"A page of screen views","items":{"$ref":"#/components/schemas/schema-service-screenViewMetadata"}},"pagination":{"$ref":"#/components/schemas/schema-service-pagination"}}},"schema-service-versionedScreenViewKey":{"type":"object","properties":{"screenViewId":{"$ref":"#/components/schemas/schema-service-screenViewId"},"screenViewVersion":{"$ref":"#/components/schemas/schema-service-screenViewVersion"}}},"schema-service-screenViewAuthor":{"type":"object","description":"Information about the user who created this screen view","required":["id"],"properties":{"id":{"type":"integer","description":"ID of the user"},"name":{"type":"string","description":"Name of the user"},"avatar":{"type":"string","description":"URL of the author's avatar image"}}},"schema-service-UpdatedAt":{"type":"string","format":"date-time","description":"Last update time"},"schema-service-CreatedAt":{"type":"string","description":"Creation date","format":"date-time"},"schema-service-hashId":{"type":"string","description":"Hash ID of the version. Consists of the UUID of the screen view and and the version ID.","example":"bb6639b2-a98e-49d9-804f-ed6c0e2a0d2f:2019-12-05T08:22:10.094"},"schema-service-path":{"type":"string","description":"Url Path.","example":"/screenView"},"schema-service-DeletedAt":{"type":"string","format":"date-time","description":"Deletion time, if applicable","nullable":true},"schema-service-GenerateScreenViewResponse":{"type":"object","required":["id","version","hash","businessProfileId","name","priority","audience","createdAt","updatedAt","path","data"],"properties":{"id":{"$ref":"#/components/schemas/schema-service-screenViewId"},"version":{"$ref":"#/components/schemas/schema-service-screenViewVersion"},"parentVersion":{"$ref":"#/components/schemas/schema-service-screenViewParentVersion"},"name":{"$ref":"#/components/schemas/schema-service-screenViewName"},"priority":{"$ref":"#/components/schemas/schema-service-screenViewPriority"},"audience":{"$ref":"#/components/schemas/schema-service-Audience"},"createdAt":{"$ref":"#/components/schemas/schema-service-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/schema-service-UpdatedAt"},"hash":{"$ref":"#/components/schemas/schema-service-hashId"},"path":{"$ref":"#/components/schemas/schema-service-path"},"data":{"type":"object"}}},"schema-service-screenViewLegacy":{"type":"object","required":["id","businessProfileId","name","status","priority","scheduled","author","content","audience","createdAt","updatedAt","directory","feed"],"properties":{"id":{"$ref":"#/components/schemas/schema-service-screenViewId"},"version":{"$ref":"#/components/schemas/schema-service-screenViewVersion"},"parentVersion":{"$ref":"#/components/schemas/schema-service-screenViewParentVersion"},"businessProfileId":{"$ref":"#/components/schemas/schema-service-screenViewBpId"},"name":{"$ref":"#/components/schemas/schema-service-screenViewName"},"description":{"$ref":"#/components/schemas/schema-service-screenViewDescription"},"status":{"$ref":"#/components/schemas/schema-service-screenViewStatus"},"priority":{"$ref":"#/components/schemas/schema-service-screenViewPriority"},"scheduled":{"$ref":"#/components/schemas/schema-service-screenViewScheduled"},"author":{"$ref":"#/components/schemas/schema-service-screenViewAuthor"},"content":{"$ref":"#/components/schemas/schema-service-ScreenViewContentLegacy"},"audience":{"$ref":"#/components/schemas/schema-service-Audience"},"createdAt":{"$ref":"#/components/schemas/schema-service-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/schema-service-UpdatedAt"},"deletedAt":{"$ref":"#/components/schemas/schema-service-DeletedAt"},"directory":{"$ref":"#/components/schemas/schema-service-Directory"},"feed":{"$ref":"#/components/schemas/schema-service-Feed"}}},"schema-service-screenView":{"type":"object","required":["id","businessProfileId","name","status","priority","scheduled","author","content","audience","createdAt","updatedAt","directory","feed"],"properties":{"id":{"$ref":"#/components/schemas/schema-service-screenViewId"},"businessProfileId":{"$ref":"#/components/schemas/schema-service-screenViewBpId"},"name":{"$ref":"#/components/schemas/schema-service-screenViewName"},"description":{"$ref":"#/components/schemas/schema-service-screenViewDescription"},"status":{"$ref":"#/components/schemas/schema-service-screenViewStatus"},"priority":{"$ref":"#/components/schemas/schema-service-screenViewPriority"},"scheduled":{"$ref":"#/components/schemas/schema-service-screenViewScheduled"},"author":{"$ref":"#/components/schemas/schema-service-screenViewAuthor"},"content":{"$ref":"#/components/schemas/schema-service-ScreenViewContent"},"audience":{"$ref":"#/components/schemas/schema-service-Audience"},"createdAt":{"$ref":"#/components/schemas/schema-service-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/schema-service-UpdatedAt"},"deletedAt":{"$ref":"#/components/schemas/schema-service-DeletedAt"},"directory":{"$ref":"#/components/schemas/schema-service-Directory"},"feed":{"$ref":"#/components/schemas/schema-service-Feed"}}},"schema-service-pagination":{"type":"object","description":"Pagination metadata","required":["limit","page","pages","total"],"properties":{"limit":{"type":"integer","description":"The number of items per page"},"page":{"type":"integer","description":"The current page"},"pages":{"type":"integer","description":"The total number of pages"},"total":{"type":"integer","description":"The total number of items on all pages"}}},"schema-service-documentsResponse":{"type":"object","properties":{"data":{"type":"array","description":"A list of documents that match the request","items":{"$ref":"#/components/schemas/schema-service-documentView"}},"total":{"type":"integer","description":"The total number of documents that match the request"},"offset":{"type":"integer","description":"The current offset"},"limit":{"type":"integer","description":"The maximum number of items to retrieve for pagination"}}},"schema-service-documentView":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/schema-service-documentAuthor"},"content":{"$ref":"#/components/schemas/schema-service-documentContent"},"createdAt":{"$ref":"#/components/schemas/schema-service-CreatedAt"},"description":{"$ref":"#/components/schemas/schema-service-documentDescription"},"id":{"type":"integer","description":"Document ID. Generated automatically."},"isActive":{"$ref":"#/components/schemas/schema-service-documentIsActive"},"name":{"$ref":"#/components/schemas/schema-service-documentName"},"published":{"$ref":"#/components/schemas/schema-service-documentPublished"},"schema":{"$ref":"#/components/schemas/schema-service-DocumentSchema"},"slug":{"$ref":"#/components/schemas/schema-service-DocumentSlug"},"uuid":{"type":"string","format":"uuid","description":"Document UUID. Generated automatically."},"version":{"$ref":"#/components/schemas/schema-service-documentVersion"}}},"schema-service-screenViewScheduled":{"type":"boolean","description":"Informs if the screen view has a defined schedule. Screen views scheduled to be published immediately after activation are considered to be scheduled, so only a draft screen view can have this property at `false`. Copied screen views inherit the schedule of their source."},"schema-service-documentIsActive":{"type":"boolean","description":"Informs if the document is isActive","default":true},"schema-service-documentPublished":{"type":"boolean","description":"Publishing status","default":false},"schema-service-documentAuthor":{"type":"integer","description":"ID of the user who created this version of the document"},"schema-service-documentName":{"type":"string","description":"Document name"},"schema-service-documentDescription":{"type":"string","description":"Document description. Can be an empty string."},"schema-service-documentContent":{"type":"object","description":"JSON content of the document"},"schema-service-documentContentRaw":{"description":"Content of the document. It can contain inserts.","anyOf":[{"type":"object","example":{"someBoolean":true,"someString":"Lorem ipsum","aNestedDocument":"{% document exampleslug %}"},"additionalProperties":true},{"type":"string","example":"{% document exampleslug %}"}]},"schema-service-documentContentProcessed":{"description":"Content of the document","anyOf":[{"type":"object","description":"The processed JSON content of the document","additionalProperties":{"description":"JSON keys in the document and their values"},"example":{"someBoolean":true,"someString":"Lorem ipsum","aNestedDocument":{"uuid":"772d94f7-a604-409a-bfa9-24a64b8a5051","slug":"apple","schema":"fruit","content":{"color":"red"}}}},{"type":"string","description":"Processed string value of a document (for example, a small document which only includes an insert to return an expression result)"}]},"schema-service-documentGroupId":{"type":"string","format":"uuid","description":"UUID of a document group. Groups can be used to organize documents. When creating a screen view campaign, entire groups can be included instead of selecting each document separately."},"schema-service-directoryId":{"type":"string","format":"uuid","description":"UUID of a directory. Directories can be used to organize documents and screen views for display in the Synerise Web Application.\n- If you want to organize documents for screen view campaigns, use document groups instead.\n- If you want to organize screen views for display, use screen view feeds instead.\n"},"schema-service-documentVersion":{"type":"string","description":"Document version"},"schema-service-createDocumentReq":{"type":"object","required":["name","slug","schema","content","version","description"],"properties":{"slug":{"$ref":"#/components/schemas/schema-service-DocumentSlug"},"schema":{"$ref":"#/components/schemas/schema-service-DocumentSchema"},"name":{"$ref":"#/components/schemas/schema-service-documentName"},"description":{"$ref":"#/components/schemas/schema-service-documentDescription"},"content":{"$ref":"#/components/schemas/schema-service-documentContent"},"version":{"$ref":"#/components/schemas/schema-service-documentVersion"}}},"schema-service-previewReq":{"type":"object","required":["content"],"properties":{"content":{"$ref":"#/components/schemas/schema-service-documentContent"},"schema":{"$ref":"#/components/schemas/schema-service-DocumentSchema"}}},"schema-service-anyProp":{"description":"Any JSON entity or entities"},"schema-service-groupUuid":{"type":"string","format":"uuid","description":"UUID of a document group"},"schema-service-groupName":{"type":"string","description":"Group name"},"schema-service-ErrorSchemaService":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"errorCode":{"type":"string","description":"Code of the error, needed for troubleshooting\n\nSee error reference: [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)\n"},"status":{"type":"integer","description":"Error's HTTP status code"},"message":{"type":"string","description":"Description of the problem"}}},"schema-service-AuthError":{"type":"object","properties":{"timestamp":{"type":"string","description":"Time when the error occurred"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"status":{"type":"integer","format":"int32","description":"HTTP status code"}}},"synonyms-crud-Error":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"path":{"type":"string","description":"URL of the requested resource"}},"required":["timestamp","status","message"]},"synonyms-crud-PaginatedSynonyms":{"type":"object","properties":{"data":{"type":"array","description":"A list of synonyms","items":{"$ref":"#/components/schemas/synonyms-crud-SingleSynonym"}},"meta":{"$ref":"#/components/schemas/synonyms-crud-PaginationMeta"}}},"synonyms-crud-PaginationMeta":{"type":"object","description":"Optional pagination metadata (sent if `\"includeMeta\": true`)","properties":{"totalPages":{"type":"number","description":"The total number of pages"},"totalCount":{"type":"number","description":"The total number of campaigns"},"page":{"type":"number","description":"The current page"},"limit":{"type":"number","description":"The maximal number of items on a page"},"sortedBy":{"type":"string","description":"The column (attribute) that the campaigns were sorted by"},"ordering":{"type":"string","description":"Sorting order"},"code":{"type":"number","description":"HTTP response code"},"link":{"type":"array","description":"Links to neighboring pages, first page, and last page in pagination","items":{"type":"object","properties":{"url":{"description":"Page URL","type":"string"},"rel":{"type":"string","description":"Position of the linked page","enum":["first","next","prev","last"]}}}}}},"synonyms-crud-SingleSynonym":{"type":"object","description":"Details of a single synonym","properties":{"id":{"$ref":"#/components/schemas/synonyms-crud-SynonymId"},"type":{"$ref":"#/components/schemas/synonyms-crud-Type"},"word":{"$ref":"#/components/schemas/synonyms-crud-Word"},"synonyms":{"$ref":"#/components/schemas/synonyms-crud-Synonyms"},"createdAt":{"type":"string","description":"Creation timestamp"},"updatedAt":{"type":"string","description":"Last update timestamp"},"confidence":{"$ref":"#/components/schemas/synonyms-crud-Confidence"},"reason":{"$ref":"#/components/schemas/synonyms-crud-Reason"},"source":{"$ref":"#/components/schemas/synonyms-crud-SynonymSource"},"state":{"$ref":"#/components/schemas/synonyms-crud-SynonymState"}}},"synonyms-crud-BatchResponse":{"type":"object","properties":{"attemptedInserts":{"type":"integer","description":"The number of attempted insertions"},"actualInserts":{"type":"integer","description":"The number of successful insertions"},"errors":{"type":"array","description":"A list of errors","items":{"type":"string"}}}},"synonyms-crud-SynonymId":{"type":"integer","description":"Identifier of the synonym"},"synonyms-crud-Word":{"type":"string","description":"The phrase that the synonym relates to. If `type: synonyms`, do not send this value."},"synonyms-crud-Synonyms":{"type":"array","description":"A list of synonyms","items":{"type":"string"}},"synonyms-crud-Type":{"type":"string","description":"Type of the synonym.\n\n  - `oneway`: when the word is searched, the results show the results as if the synonyms were searched. Searching for the synonyms does NOT return results for the word or the other synonyms.\n  - `synonyms`: the `word` column is empty, all phrases in `synonym` return results for every other phrase in the list.\n","enum":["oneway","synonyms"],"default":"oneway"},"synonyms-crud-SynonymSource":{"type":"string","description":"Origin of the synonym","enum":["User","Agent","Import"],"default":"User"},"synonyms-crud-SynonymState":{"type":"string","description":"Current state of the synonym","enum":["New","Accepted","Pending","Rejected"],"default":"Accepted"},"synonyms-crud-Confidence":{"type":"number","format":"float","minimum":0,"maximum":1,"nullable":true,"description":"Confidence score of the synonym (0.0 to 1.0)"},"synonyms-crud-Reason":{"type":"string","nullable":true,"maxLength":1024,"description":"Reason or explanation for the synonym suggestion"},"tags-collector-CreatedAt-collector":{"type":"string","format":"date-time","description":"Creation time"},"tags-collector-DirectoryCreateRequest-collector":{"type":"object","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/tags-collector-DirectoryName-collector"},"params":{"$ref":"#/components/schemas/tags-collector-DirectoryParams-collector"},"type":{"$ref":"#/components/schemas/tags-collector-DirectoryTypeHash-collector"}}},"tags-collector-DirectoryDto-collector":{"type":"object","description":"Information about the directory where the tag is assigned. Can be `null`.","properties":{"createdAt":{"$ref":"#/components/schemas/tags-collector-CreatedAt-collector"},"hash":{"type":"string","description":"HashID of the directory"},"name":{"$ref":"#/components/schemas/tags-collector-DirectoryName-collector"},"params":{"$ref":"#/components/schemas/tags-collector-DirectoryParams-collector"},"type":{"$ref":"#/components/schemas/tags-collector-DirectoryTypeDto-collector"}}},"tags-collector-DirectoryName-collector":{"type":"string","description":"Name of the directory"},"tags-collector-DirectoryParams-collector":{"type":"object","description":"Free-form parameters","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"tags-collector-DirectoryTypeHash-collector":{"type":"string","description":"HashID of the directory type"},"tags-collector-DirectoryTypeCreateRequest-collector":{"type":"object","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/tags-collector-DirectoryTypeName-collector"}}},"tags-collector-DirectoryTypeDto-collector":{"type":"object","description":"Details of the directory type","properties":{"createdAt":{"$ref":"#/components/schemas/tags-collector-CreatedAt-collector"},"hash":{"$ref":"#/components/schemas/tags-collector-DirectoryTypeHash-collector"},"name":{"$ref":"#/components/schemas/tags-collector-DirectoryTypeName-collector"}}},"tags-collector-DirectoryTypeName-collector":{"type":"string","description":"Name of the directory type"},"tags-collector-DirectoryTypeUpdateRequest-collector":{"type":"object","properties":{"directoryTypeHash":{"type":"string","description":"HashID of the directory type"}}},"tags-collector-DirectoryUpdateRequest-collector":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/tags-collector-DirectoryName-collector"},"params":{"$ref":"#/components/schemas/tags-collector-DirectoryParams-collector"}}},"tags-collector-TagHash-collector":{"type":"string","description":"HashID of a tag"},"tags-collector-PaginatedDirectoryDto-collector":{"type":"object","description":"Details of the directory where the tag is assigned","properties":{"createdAt":{"$ref":"#/components/schemas/tags-collector-CreatedAt-collector"},"hash":{"type":"string","description":"Hash ID of the directory"},"name":{"$ref":"#/components/schemas/tags-collector-DirectoryName-collector"},"type":{"$ref":"#/components/schemas/tags-collector-DirectoryTypeDto-collector"}}},"tags-collector-PaginatedTagDto-collector":{"type":"object","properties":{"authorId":{"$ref":"#/components/schemas/tags-collector-UserId-collector"},"color":{"$ref":"#/components/schemas/tags-collector-TagColor-collector"},"createdAt":{"$ref":"#/components/schemas/tags-collector-CreatedAt-collector"},"description":{"type":"string","description":"Description of the tag"},"directory":{"$ref":"#/components/schemas/tags-collector-PaginatedDirectoryDto-collector"},"hash":{"$ref":"#/components/schemas/tags-collector-TagHash-collector"},"icon":{"$ref":"#/components/schemas/tags-collector-TagIcon-collector"},"priority":{"$ref":"#/components/schemas/tags-collector-TagPriority-collector"},"value":{"$ref":"#/components/schemas/tags-collector-TagValue-collector"}}},"tags-collector-PaginationInfo-collector":{"type":"object","description":"Pagination details","properties":{"limit":{"type":"integer","format":"int32","description":"Limit of items per page","default":10},"page":{"type":"integer","format":"int32","description":"Current page number","default":0},"pages":{"type":"integer","format":"int32","description":"Total number of pages"},"total":{"type":"integer","format":"int64","description":"Total number of items on all pages"}}},"tags-collector-TagColor-collector":{"type":"string","description":"Hex code of the tag color","nullable":true},"tags-collector-TagCreateRequest-collector":{"type":"object","required":["value","priority"],"properties":{"color":{"$ref":"#/components/schemas/tags-collector-TagColor-collector"},"description":{"$ref":"#/components/schemas/tags-collector-TagDescription-collector"},"directory":{"$ref":"#/components/schemas/tags-collector-TagDirectory-collector"},"icon":{"$ref":"#/components/schemas/tags-collector-TagIcon-collector"},"priority":{"$ref":"#/components/schemas/tags-collector-TagPriority-collector"},"value":{"$ref":"#/components/schemas/tags-collector-TagValue-collector"}}},"tags-collector-TagDescription-collector":{"type":"string","description":"Description of the tag"},"tags-collector-TagDirectory-collector":{"type":"string","description":"Hash ID of the directory where the tag is assigned","nullable":true},"tags-collector-TagDto-collector":{"type":"object","properties":{"authorId":{"$ref":"#/components/schemas/tags-collector-UserId-collector"},"color":{"$ref":"#/components/schemas/tags-collector-TagColor-collector"},"createdAt":{"$ref":"#/components/schemas/tags-collector-CreatedAt-collector"},"description":{"$ref":"#/components/schemas/tags-collector-TagDescription-collector"},"directory":{"$ref":"#/components/schemas/tags-collector-DirectoryDto-collector"},"hash":{"type":"string","description":"Hash ID of the tag"},"icon":{"$ref":"#/components/schemas/tags-collector-TagIcon-collector"},"priority":{"$ref":"#/components/schemas/tags-collector-TagPriority-collector"},"value":{"$ref":"#/components/schemas/tags-collector-TagValue-collector"}}},"tags-collector-TagIcon-collector":{"type":"string","description":"URL of the tag's icon","nullable":true},"tags-collector-TagPriority-collector":{"type":"integer","description":"Tag priority. Lower values mean higher priority.","default":0},"tags-collector-TagUpdateRequest-collector":{"type":"object","properties":{"color":{"$ref":"#/components/schemas/tags-collector-TagColor-collector"},"description":{"$ref":"#/components/schemas/tags-collector-TagDescription-collector"},"directory":{"$ref":"#/components/schemas/tags-collector-TagDirectory-collector"},"icon":{"$ref":"#/components/schemas/tags-collector-TagIcon-collector"},"priority":{"$ref":"#/components/schemas/tags-collector-TagPriority-collector"},"value":{"$ref":"#/components/schemas/tags-collector-TagValue-collector"}}},"tags-collector-TagValue-collector":{"type":"string","description":"Name of the tag"},"tags-collector-UserId-collector":{"type":"integer","description":"ID of the user who created the tag"},"tags-collector-PaginationResponse_PaginatedTagDto_":{"type":"object","properties":{"data":{"type":"array","description":"A list of tags on the retrieved page","items":{"$ref":"#/components/schemas/tags-collector-PaginatedTagDto-collector"}},"pagination":{"$ref":"#/components/schemas/tags-collector-PaginationInfo-collector"}}},"template-backend-TemplateId":{"type":"integer","format":"int64","description":"Template ID"},"template-backend-TemplateHashId":{"type":"string","description":"Template hashId (UUID)","example":"e0326a2d-7697-4ae9-b490-31f97041adcb"},"template-backend-BusinessProfileId":{"type":"integer","description":"Workspace ID","example":594},"template-backend-TemplateType":{"type":"string","description":"Template type","example":"EMAIL","default":null,"nullable":true,"enum":["SMS","MOBILE_PUSH","WEB_PUSH","DYNAMIC_CONTENT","LANDING_PAGE","EMAIL","SOCIAL_MEDIA","IN_APP",null]},"template-backend-Source":{"type":"integer","format":"int64","description":"Information about used editor. Currently accepted builder are\n- `LACK_OF_INFORMATION` = 0\n- `BEE_FREE_EDITOR` = 1\n- `DYNAMIC_CONTENT_CODE_EDITOR` = 2\n- `MAIL_EDITOR` = 3\n- `SMS_EDITOR` = 4\n- `WEB_PUSH_EDITOR` = 5\n- `MOBILE_SIMPLE_PUSH_VISUAL_EDITOR` = 6\n- `MOBILE_SILENT_PUSH_CODE_EDITOR` = 7\n- `FACEBOOK_POST_EDITOR` = 13\n- `IMPORT_FROM_ZIP` = 14\n- `IMPORT_FROM_URL` = 15\n- `GRAPES_EDITOR` = 16\n- `VISUAL_BUILDER` = 17\n- `LANDING_PAGE_ADVANCED_DRAG_AND_DROP` = 18\n- `WEB_BEE_FREE_EDITOR` = 19\n- `MOBILE_SIMPLE_PUSH_CODE_EDITOR` = 20\n- `LANDING_PAGE_CODE_EDITOR` = 21\n- `LANDING_PAGE_BASIC_DRAG_AND_DROP` = 22\n"},"template-backend-IncludeSafeArea":{"type":"boolean","description":"Define if in_app template should include safe area","default":false,"nullable":true},"template-backend-TemplateSubType":{"type":"string","description":"Template subtype. Currently accepted subtypes are\n- `BANNER` (can be used with mobile push)\n- `TOP_BAR`, `BOTTOM_BAR`, `MODAL` (can be used with in app notifications)\n- `null`.\n","example":"BANNER","nullable":true,"default":null,"enum":["BANNER","TOP_BAR","BOTTOM_BAR","MODAL",null]},"template-backend-TemplateContentType":{"type":"string","enum":["TEMPLATE","BLOCK"],"example":"TEMPLATE"},"template-backend-CreatedAt":{"type":"string","description":"Time of creation","format":"date-time","example":"2019-03-21T12:31:26Z"},"template-backend-UpdateAt":{"type":"string","description":"Time of last update","example":"2019-03-21T12:31:26Z"},"template-backend-ThumbnailUrl":{"type":"string","description":"URL of the template's thumbnail","example":"https://foo.bar"},"template-backend-Author":{"type":"integer","format":"int64","description":"Author ID","example":123},"template-backend-TemplateContent":{"type":"string","description":"Template content as a **stringified, escaped object**.\n\nThis includes HTML, JS, CSS, and other data, depending on the template type.\n","example":"{\"json\":\"\",\"html\":\"<p>some text</p>\",\"css\":\"p {\\n    font-weight: bold\\n}\",\"js\":\"console.log(\\\"test\\\")\",\"raw\":\"<html><head><style type=\\\"text/css\\\">p {\\n    font-weight: bold\\n}</style></head><body><p>some text</p></body></html>\",\"source\":2}"},"template-backend-TemplateName":{"type":"string","description":"Name of the template","default":null,"nullable":true},"template-backend-TemplateStatus":{"type":"string","description":"Approval status of the template. If approvals are disabled, the status is null.","nullable":true,"enum":["DRAFT","REVIEW","APPROVED","REJECTED"]},"template-backend-ParsedData":{"type":"object","properties":{"links":{"type":"object"}}},"template-backend-ParsedContent":{"type":"string"},"template-backend-FunctionType":{"type":"string","description":"Function type","example":"Password Change"},"template-backend-DirectoryIdForSave":{"type":"string","format":"uuid","description":"UUID of the directory where the template will be saved","example":"e0326a2d-7697-4ae9-b490-31f97041adcb"},"template-backend-TemplateOverviewResponse":{"type":"object","required":["id","hashId","name","businessProfileId","type","subtype","contentType","createdAt","updatedAt","directory","thumbnailUrl","author","status","source"],"properties":{"id":{"$ref":"#/components/schemas/template-backend-TemplateId"},"hashId":{"$ref":"#/components/schemas/template-backend-TemplateHashId"},"name":{"$ref":"#/components/schemas/template-backend-TemplateName"},"businessProfileId":{"$ref":"#/components/schemas/template-backend-BusinessProfileId"},"type":{"$ref":"#/components/schemas/template-backend-TemplateType"},"subtype":{"$ref":"#/components/schemas/template-backend-TemplateSubType"},"contentType":{"$ref":"#/components/schemas/template-backend-TemplateContentType"},"createdAt":{"$ref":"#/components/schemas/template-backend-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/template-backend-UpdateAt"},"directory":{"$ref":"#/components/schemas/template-backend-DirectoryResponse"},"thumbnailUrl":{"$ref":"#/components/schemas/template-backend-ThumbnailUrl"},"author":{"$ref":"#/components/schemas/template-backend-Author"},"status":{"$ref":"#/components/schemas/template-backend-TemplateStatus"},"source":{"$ref":"#/components/schemas/template-backend-Source"}}},"template-backend-TemplateDetailsResponse":{"type":"object","required":["id","hashId","businessProfileId","name","templateContent","type","subtype","thumbnailUrl","directory","createdAt","updatedAt","parsedData","parsedContent","functionType","author","status","source"],"properties":{"id":{"$ref":"#/components/schemas/template-backend-TemplateId"},"hashId":{"$ref":"#/components/schemas/template-backend-TemplateHashId"},"businessProfileId":{"$ref":"#/components/schemas/template-backend-BusinessProfileId"},"name":{"$ref":"#/components/schemas/template-backend-TemplateName"},"templateContent":{"$ref":"#/components/schemas/template-backend-TemplateContent"},"type":{"$ref":"#/components/schemas/template-backend-TemplateType"},"subtype":{"$ref":"#/components/schemas/template-backend-TemplateSubType"},"contentType":{"$ref":"#/components/schemas/template-backend-TemplateContentType"},"thumbnailUrl":{"$ref":"#/components/schemas/template-backend-ThumbnailUrl"},"directory":{"$ref":"#/components/schemas/template-backend-DirectoryResponse"},"createdAt":{"$ref":"#/components/schemas/template-backend-CreatedAt"},"updatedAt":{"$ref":"#/components/schemas/template-backend-UpdateAt"},"parsedData":{"$ref":"#/components/schemas/template-backend-ParsedData"},"parsedContent":{"$ref":"#/components/schemas/template-backend-ParsedContent"},"functionType":{"$ref":"#/components/schemas/template-backend-FunctionType"},"author":{"$ref":"#/components/schemas/template-backend-Author"},"status":{"$ref":"#/components/schemas/template-backend-TemplateStatus"},"source":{"$ref":"#/components/schemas/template-backend-Source"},"includeSafeArea":{"$ref":"#/components/schemas/template-backend-IncludeSafeArea"}}},"template-backend-TemplateResponse":{"type":"object","required":["html","css","date"],"properties":{"html":{"nullable":true,"type":"string","description":"Template content in HTML"},"css":{"nullable":true,"type":"string","description":"Template CSS"},"date":{"$ref":"#/components/schemas/template-backend-CreatedAt"}}},"template-backend-DirectoryResponse":{"type":"object","description":"Details of the directory that includes this template","required":["hashId","name","readOnly","createdAt","default","type"],"properties":{"hashId":{"type":"string","format":"uuid","example":"e0326a2d-7697-4ae9-b490-31f97041adcb","description":"Directory hashId (UUID)"},"name":{"type":"string","description":"Name of the directory"},"readOnly":{"type":"boolean","example":true,"description":"`true` when the directory is read-only"},"createdAt":{"$ref":"#/components/schemas/template-backend-CreatedAt"},"type":{"nullable":true,"type":"string","description":"Directory type","example":"EMAIL"},"contentType":{"$ref":"#/components/schemas/template-backend-TemplateContentType"},"default":{"type":"boolean","example":true,"description":"When `true`, this template belongs to one of the default folders"},"predefined":{"type":"boolean","example":true}}},"template-backend-TemplateCreateRequest":{"type":"object","required":["content","directory","source"],"properties":{"name":{"$ref":"#/components/schemas/template-backend-TemplateName"},"type":{"$ref":"#/components/schemas/template-backend-TemplateType"},"subtype":{"$ref":"#/components/schemas/template-backend-TemplateSubType"},"contentType":{"$ref":"#/components/schemas/template-backend-TemplateContentType"},"directory":{"$ref":"#/components/schemas/template-backend-DirectoryIdForSave"},"content":{"$ref":"#/components/schemas/template-backend-TemplateContent"},"source":{"$ref":"#/components/schemas/template-backend-Source"},"includeSafeArea":{"$ref":"#/components/schemas/template-backend-IncludeSafeArea"},"hidden":{"type":"boolean","description":"Define if the template is hidden","default":false,"nullable":true},"temporal":{"type":"boolean","description":"Define if template can be deleted if was not used in any place","default":false,"nullable":true}}},"template-backend-FunctionTemplateCreateRequest":{"type":"object","required":["directory","content","functionType"],"properties":{"name":{"type":"string","description":"Template name","example":"name","default":null},"content":{"type":"string","description":"Template content","example":"<html><h1>Content</h1></html>"},"functionType":{"$ref":"#/components/schemas/template-backend-FunctionType"},"directory":{"$ref":"#/components/schemas/template-backend-DirectoryIdForSave"}}},"template-backend-DefaultTemplateDetailsResponse":{"type":"object","required":["id","hashId","businessProfileId","type","subtype","functionType","thumbnailUrl","createdAt","createdBy"],"properties":{"id":{"$ref":"#/components/schemas/template-backend-TemplateId"},"hashId":{"$ref":"#/components/schemas/template-backend-TemplateHashId"},"businessProfileId":{"$ref":"#/components/schemas/template-backend-BusinessProfileId"},"type":{"$ref":"#/components/schemas/template-backend-TemplateType"},"subtype":{"$ref":"#/components/schemas/template-backend-TemplateSubType"},"functionType":{"nullable":true,"type":"string","description":"Function type","example":"Password Change"},"thumbnailUrl":{"$ref":"#/components/schemas/template-backend-ThumbnailUrl"},"createdAt":{"$ref":"#/components/schemas/template-backend-CreatedAt"},"createdBy":{"$ref":"#/components/schemas/template-backend-Author"}}},"template-backend-TemplateUpdateRequest":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/template-backend-TemplateName"},"content":{"$ref":"#/components/schemas/template-backend-TemplateContent"},"includeSafeArea":{"$ref":"#/components/schemas/template-backend-IncludeSafeArea"}}},"template-backend-MoveTemplatesRequest":{"type":"object","required":["templateHashIds","directoryHash"],"properties":{"templateHashIds":{"type":"array","description":"List of templates to move, identified by hashIds (UUIDs)","items":{"type":"string","format":"uuid","example":"2ede34f8-1c27-4131-bfb1-5c88856882e1"}},"directoryHash":{"type":"string","description":"UUID of the directory where the template will be moved","example":"2ede34f8-1c27-4131-bfb1-5c88856882e1"}}},"template-backend-DirectoryCreateRequest":{"type":"object","required":["type","name"],"properties":{"name":{"type":"string","description":"Name of the directory"},"type":{"$ref":"#/components/schemas/template-backend-TemplateType"},"readOnly":{"type":"boolean","description":"Define if the directory is read-only","default":false},"contentType":{"$ref":"#/components/schemas/template-backend-TemplateContentType"}}},"template-backend-PreviewHashId":{"type":"string","description":"Preview hashId (UUID)","example":"e0326a2d-7697-4ae9-b490-31f97041adcb"},"template-backend-Html":{"type":"string","description":"Html of the preview"},"template-backend-Css":{"type":"string","description":"Css of the preview"},"template-backend-Js":{"type":"string","description":"Js of the preview"},"template-backend-PreviewCreateRequest":{"type":"object","required":["html","css","js"],"properties":{"html":{"$ref":"#/components/schemas/template-backend-Html"},"css":{"$ref":"#/components/schemas/template-backend-Css"},"js":{"$ref":"#/components/schemas/template-backend-Js"},"previewContext":{"$ref":"#/components/schemas/template-backend-PreviewContext"}}},"template-backend-PreviewContext":{"type":"object","required":["campaignId","variantId"],"properties":{"campaignId":{"type":"string"},"variantId":{"type":"string"}}},"template-backend-PreviewUpdateRequest":{"type":"object","required":["html","css","js"],"properties":{"html":{"$ref":"#/components/schemas/template-backend-Html"},"css":{"$ref":"#/components/schemas/template-backend-Css"},"js":{"$ref":"#/components/schemas/template-backend-Js"},"previewContext":{"$ref":"#/components/schemas/template-backend-PreviewContext"}}},"template-backend-PreviewGetResponse":{"type":"object","required":["html","css","js"],"properties":{"html":{"$ref":"#/components/schemas/template-backend-Html"},"css":{"$ref":"#/components/schemas/template-backend-Css"},"js":{"$ref":"#/components/schemas/template-backend-Js"},"previewContext":{"$ref":"#/components/schemas/template-backend-PreviewContext"}}},"template-backend-PreviewResponse":{"type":"object","required":["id","html","css","js"],"properties":{"id":{"$ref":"#/components/schemas/template-backend-PreviewHashId"},"html":{"$ref":"#/components/schemas/template-backend-Html"},"css":{"$ref":"#/components/schemas/template-backend-Css"},"js":{"$ref":"#/components/schemas/template-backend-Js"},"previewContext":{"$ref":"#/components/schemas/template-backend-PreviewContext"}}},"uauth-Error":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Time when the error occurred"},"status":{"type":"integer","description":"Status code"},"error":{"type":"string","description":"Summary of the error"},"message":{"type":"string","description":"Description of the problem"},"path":{"type":"string","description":"URL of the requested resource"}}},"uauth-BusinessProfileAuthenticationRequest":{"required":["apiKey"],"type":"object","properties":{"apiKey":{"type":"string","description":"Workspace API key\n\n<span style=\"color:red\"><strong>WARNING:</strong></span> Workspace API keys can be used to access all customer data and manage the workspace. They should only be used for server-to-server communication in integrations. **DO NOT use workspace API keys in your mobile applications or websites**.\n","example":"64c09614-1b2a-42f7-804d-f647243eb1ab"}}},"uauth-TokenResponse":{"type":"object","properties":{"token":{"type":"string","description":"[JWT](https://jwt.io) token"}}},"uauth-ApiConsumer":{"type":"object","description":"Details of the authenticated user","properties":{"type":{"type":"string","enum":["USER"]},"businessProfileId":{"type":"integer","description":"ID of the selected workspace"},"name":{"type":"string","description":"The user's login"},"id":{"type":"integer","description":"ID of the user"},"authorities":{"type":"array","description":"A list of permissions","items":{"type":"string"}},"roles":{"type":"string","description":"IDs of the roles assigned to the user"}}},"uauth-AuthenticationResponse":{"required":["consumer"],"type":"object","properties":{"consumer":{"$ref":"#/components/schemas/uauth-ApiConsumer"},"mfaMethods":{"type":"array","items":{"type":"string","enum":["TOTP_AUTHENTICATOR","EMAIL","SMS"]}},"authorizationError":{"$ref":"#/components/schemas/uauth-AuthorizationError"},"multiFactorCodeSent":{"$ref":"#/components/schemas/uauth-MultiFactorSendCodeResponse"},"defaultMfaMethod":{"type":"string","enum":["TOTP_AUTHENTICATOR","EMAIL","SMS"]},"forcedToSetMfa":{"type":"boolean"}}},"uauth-AuthorizationError":{"type":"string","enum":["USER_FORCED_TO_CHANGE_PASSWORD"]},"uauth-BusinessProfileGuid":{"type":"string","description":"UUID of the workspace"},"uauth-BusinessProfileId":{"type":"integer","description":"ID of the workspace"},"uauth-BusinessProfileAccessRestriction":{"type":"string","enum":["OFF","PASS","FAIL","ENFORCED"]},"uauth-BusinessProfileInvitationResponse":{"type":"object","properties":{"success":{"type":"array","items":{"type":"string"},"description":"List of successfully invited email addresses"},"fail":{"type":"array","items":{"$ref":"#/components/schemas/uauth-BusinessProfileInvitationFail"},"description":"List of failed invitations"}}},"uauth-BusinessProfileInvitationFail":{"type":"object","properties":{"email":{"type":"string"},"cause":{"type":"string"}}},"uauth-BusinessProfileInvitationRequest":{"type":"object","properties":{"email":{"$ref":"#/components/schemas/uauth-UserEmail"},"firstName":{"$ref":"#/components/schemas/uauth-UserFirstName"},"lastName":{"$ref":"#/components/schemas/uauth-UserLastName"},"roles":{"$ref":"#/components/schemas/uauth-UserRoles"}}},"uauth-BusinessProfileBulkInvitationRequest":{"type":"object","properties":{"invitations":{"type":"array","description":"An array of users to invite","items":{"$ref":"#/components/schemas/uauth-BusinessProfileInvitationRequest"}}}},"uauth-BusinessProfilePasswordSettingsData":{"type":"object","properties":{"attempts":{"$ref":"#/components/schemas/uauth-PasswordAttempts"},"block":{"$ref":"#/components/schemas/uauth-PasswordBlock"},"businessProfileId":{"$ref":"#/components/schemas/uauth-BusinessProfileId"},"different":{"$ref":"#/components/schemas/uauth-PasswordDifferent"},"digits":{"$ref":"#/components/schemas/uauth-PasswordDigits"},"expiration":{"$ref":"#/components/schemas/uauth-PasswordExpiration"},"lowerLetters":{"$ref":"#/components/schemas/uauth-PasswordLowerLetters"},"maxIdleTime":{"$ref":"#/components/schemas/uauth-PasswordMaxIdleTime"},"maxLength":{"$ref":"#/components/schemas/uauth-PasswordMaxLength"},"minLength":{"$ref":"#/components/schemas/uauth-PasswordMinLength"},"nextChange":{"$ref":"#/components/schemas/uauth-PasswordNextChange"},"specialChars":{"$ref":"#/components/schemas/uauth-PasswordSpecialChars"},"upperLetters":{"$ref":"#/components/schemas/uauth-PasswordUpperLetters"}}},"uauth-CurrentBusinessProfileResponse":{"type":"object","properties":{"selected":{"type":"boolean"},"data":{"$ref":"#/components/schemas/uauth-BusinessProfileWithLabelsResponse"}}},"uauth-MarkUserFavoriteBusinessProfile":{"type":"object","properties":{"businessProfileGuid":{"type":"string"},"favorite":{"type":"boolean"}}},"uauth-BusinessProfileWithLabelsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"logo":{"type":"string"},"businessProfileGuid":{"type":"string"},"created":{"type":"string","format":"date-time"},"subdomain":{"type":"string"},"ipRestriction":{"$ref":"#/components/schemas/uauth-BusinessProfileAccessRestriction"},"mfaRestriction":{"$ref":"#/components/schemas/uauth-BusinessProfileAccessRestriction"},"labels":{"type":"array","items":{"type":"string"}},"emailAttributeName":{"type":"string"},"organizationGuid":{"type":"string"},"businessProfileGroup":{"$ref":"#/components/schemas/uauth-BusinessProfileGroupSimpleResponse"}}},"uauth-BusinessProfileGroupSimpleResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"profileIdentifier":{"type":"string"}}},"uauth-BusinessProfileResponse":{"type":"object","properties":{"businessProfileGuid":{"$ref":"#/components/schemas/uauth-BusinessProfileGuid"},"logo":{"type":"string","description":"URL of the logo"},"name":{"type":"string","description":"Name of the workspace"},"id":{"type":"integer","description":"ID of the workspace"},"created":{"type":"string","format":"date-time","description":"Creation date"},"subdomain":{"type":"string","description":"Sub-domain of the workspace"},"ipRestricted":{"type":"boolean","description":"Informs if the workspace has IP access restrictions."},"mfaRequired":{"type":"boolean","description":"Informs if the workspace is only accessible to users with multi-factor authentication enabled."}}},"uauth-BusinessProfileUserSpecific":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/uauth-BusinessProfileId"},"ipRestriction":{"$ref":"#/components/schemas/uauth-BusinessProfileAccessRestriction"},"mfaRestriction":{"$ref":"#/components/schemas/uauth-BusinessProfileAccessRestriction"},"favorite":{"type":"boolean"}}},"uauth-ChangePasswordRequest":{"type":"object","properties":{"currentPassword":{"type":"string","description":"The current password"},"newPassword":{"type":"string","description":"The new password"}}},"uauth-ChangePasswordResponse":{"type":"object","properties":{"status":{"type":"string","enum":["OK"]}}},"uauth-InvitationResponse":{"type":"object","properties":{"email":{"$ref":"#/components/schemas/uauth-UserEmail"},"firstName":{"$ref":"#/components/schemas/uauth-UserFirstName"},"lastName":{"$ref":"#/components/schemas/uauth-UserLastName"}}},"uauth-InvitationUpdateRequest":{"type":"object","properties":{"firstName":{"$ref":"#/components/schemas/uauth-UserFirstName"},"lastName":{"$ref":"#/components/schemas/uauth-UserLastName"},"roles":{"$ref":"#/components/schemas/uauth-UserRoles"}}},"uauth-OptionalInvitationToken":{"type":"string","description":"Invitation token, received from another user"},"uauth-PasswordResetConfirmation":{"type":"object","properties":{"token":{"$ref":"#/components/schemas/uauth-PasswordResetToken"},"password":{"type":"string","description":"The new password"}}},"uauth-PasswordResetRequest":{"required":["email"],"type":"object","properties":{"email":{"$ref":"#/components/schemas/uauth-UserEmail"}}},"uauth-PasswordResetToken":{"type":"string","description":"Password reset token received by email"},"uauth-PasswordSettingsData":{"type":"object","properties":{"attempts":{"$ref":"#/components/schemas/uauth-PasswordAttempts"},"block":{"$ref":"#/components/schemas/uauth-PasswordBlock"},"different":{"$ref":"#/components/schemas/uauth-PasswordDifferent"},"digits":{"$ref":"#/components/schemas/uauth-PasswordDigits"},"expiration":{"$ref":"#/components/schemas/uauth-PasswordExpiration"},"lowerLetters":{"$ref":"#/components/schemas/uauth-PasswordLowerLetters"},"maxIdleTime":{"$ref":"#/components/schemas/uauth-PasswordMaxIdleTime"},"maxLength":{"$ref":"#/components/schemas/uauth-PasswordMaxLength"},"minLength":{"$ref":"#/components/schemas/uauth-PasswordMinLength"},"nextChange":{"$ref":"#/components/schemas/uauth-PasswordNextChange"},"specialChars":{"$ref":"#/components/schemas/uauth-PasswordSpecialChars"},"upperLetters":{"$ref":"#/components/schemas/uauth-PasswordUpperLetters"}}},"uauth-PermissionGroupDetailsDTO":{"type":"object","description":"This schema is **recursive**: the `children` array can include more groups, which include more groups, etc.","properties":{"id":{"type":"integer","description":"ID of the group","format":"int64"},"name":{"$ref":"#/components/schemas/uauth-PermissionGroupName"},"slug":{"$ref":"#/components/schemas/uauth-PermissionGroupSlug"},"path":{"type":"string","description":"Permission group path (uses names)","example":"Ancestor Group < Parent Group < This Group"},"left":{"type":"integer","format":"int32","description":"Used by the frontend"},"right":{"type":"integer","description":"Used by the frontend"},"deep":{"type":"integer","description":"Used by the frontend"},"canCreate":{"type":"boolean","description":"When TRUE, the `create` permission exists in this group."},"canRead":{"type":"boolean","description":"When TRUE, the `read` permission exists in this group."},"canUpdate":{"type":"boolean","description":"When TRUE, the `update` permission exists in this group."},"canDelete":{"type":"boolean","description":"When TRUE, the `delete` permission exists in this group."},"canExecute":{"type":"boolean","description":"When TRUE, the `execute` permission exists in this group."},"create":{"type":"boolean","description":"When TRUE, the `create` permission is enabled."},"read":{"type":"boolean","description":"When TRUE, the `read` permission is enabled."},"update":{"type":"boolean","description":"When TRUE, the `update` permission is enabled."},"delete":{"type":"boolean","description":"When TRUE, the `delete` permission is enabled."},"execute":{"type":"boolean","description":"When TRUE, the `execute` permission is enabled."},"createDisabled":{"type":"boolean","description":"When TRUE, the `create` permission cannot be changed."},"readDisabled":{"type":"boolean","description":"When TRUE, the `read` permission cannot be changed."},"updateDisabled":{"type":"boolean","description":"When TRUE, the `update` permission cannot be changed."},"deleteDisabled":{"type":"boolean","description":"When TRUE, the `delete` permission cannot be changed."},"executeDisabled":{"type":"boolean","description":"When TRUE, the `execute` permission cannot be changed."},"children":{"type":"array","description":"An array of rule groups in this group. This schema is **recursive**: the `children` array can include more groups, which include more groups, etc.","items":{"$ref":"#/components/schemas/uauth-PermissionGroupDetailsDTO"}}}},"uauth-ReactUserEditRequest":{"type":"object","properties":{"firstName":{"$ref":"#/components/schemas/uauth-UserFirstName"},"lastName":{"$ref":"#/components/schemas/uauth-UserLastName"},"avatar":{"$ref":"#/components/schemas/uauth-AvatarUrl"},"phone":{"$ref":"#/components/schemas/uauth-UserPhone"},"language":{"$ref":"#/components/schemas/uauth-UserLanguage"},"organizationRole":{"$ref":"#/components/schemas/uauth-UserOrganizationRole"},"introduction":{"$ref":"#/components/schemas/uauth-UserIntroduction"},"confirmed":{"$ref":"#/components/schemas/uauth-UserConfirmed"},"mailAccountId":{"$ref":"#/components/schemas/uauth-UserMailAccountId"},"description":{"$ref":"#/components/schemas/uauth-UserDescription"},"dateFormatNotation":{"type":"string","enum":["US","EU"]},"timeFormatNotation":{"type":"string","enum":["US","EU"]},"numberFormatNotation":{"type":"string","enum":["US","EU"]}}},"uauth-ReactOtherUserEditRequest":{"required":["roles"],"allOf":[{"$ref":"#/components/schemas/uauth-ReactUserEditRequest"},{"type":"object","properties":{"roles":{"$ref":"#/components/schemas/uauth-UserRoles"}}}]},"uauth-ReactUserProlongAccessRequest":{"type":"object","properties":{"expirationDate":{"type":"string","description":"New access expiration time (ISO 8601, UTC time unless timezone is specified)","format":"date-time"}}},"uauth-ActivationRequest":{"type":"object","properties":{"ids":{"type":"array","description":"An array of user IDs","items":{"$ref":"#/components/schemas/uauth-UserIdInteger"}}}},"uauth-ReactUserResponse":{"type":"object","properties":{"avatar":{"$ref":"#/components/schemas/uauth-AvatarUrl"},"confirmed":{"$ref":"#/components/schemas/uauth-UserConfirmed"},"created":{"$ref":"#/components/schemas/uauth-UserCreated"},"description":{"$ref":"#/components/schemas/uauth-UserDescription"},"displayName":{"$ref":"#/components/schemas/uauth-UserDisplayName"},"email":{"$ref":"#/components/schemas/uauth-UserEmail"},"firstName":{"$ref":"#/components/schemas/uauth-UserFirstName"},"id":{"$ref":"#/components/schemas/uauth-UserIdInteger"},"introduction":{"$ref":"#/components/schemas/uauth-UserIntroduction"},"isTheSameUserAsLoggedIn":{"$ref":"#/components/schemas/uauth-IsTheSameUserAsLoggedIn"},"language":{"$ref":"#/components/schemas/uauth-UserLanguage"},"lastLogin":{"$ref":"#/components/schemas/uauth-UserLastLogin"},"lastName":{"$ref":"#/components/schemas/uauth-UserLastName"},"mailAccountId":{"$ref":"#/components/schemas/uauth-UserMailAccountId"},"organizationRole":{"$ref":"#/components/schemas/uauth-UserOrganizationRole"},"phone":{"$ref":"#/components/schemas/uauth-UserPhone"},"roles":{"$ref":"#/components/schemas/uauth-UserRoles"},"status":{"$ref":"#/components/schemas/uauth-UserStatus"},"superAdmin":{"$ref":"#/components/schemas/uauth-UserSuperAdmin"},"updated":{"$ref":"#/components/schemas/uauth-UserUpdated"},"isMfaEnabled":{"$ref":"#/components/schemas/uauth-UserIsMfaEnabled"},"passwordLastModificationDate":{"$ref":"#/components/schemas/uauth-UserPasswordLastModificationDate"},"dateFormatNotation":{"type":"string","enum":["US","EU"]},"timeFormatNotation":{"type":"string","enum":["US","EU"]},"numberFormatNotation":{"type":"string","enum":["US","EU"]}}},"uauth-ReactUsersListing":{"type":"object","properties":{"data":{"type":"array","description":"A list of users","items":{"$ref":"#/components/schemas/uauth-ReactUsersListingEntry"}},"meta":{"$ref":"#/components/schemas/uauth-PaginationMeta"}}},"uauth-ReactUsersListingEntry":{"type":"object","properties":{"avatar":{"$ref":"#/components/schemas/uauth-AvatarUrl"},"created":{"$ref":"#/components/schemas/uauth-UserCreated"},"displayName":{"$ref":"#/components/schemas/uauth-UserDisplayName"},"email":{"$ref":"#/components/schemas/uauth-UserEmail"},"firstName":{"$ref":"#/components/schemas/uauth-UserFirstName"},"id":{"$ref":"#/components/schemas/uauth-UserIdInteger"},"lastLogin":{"$ref":"#/components/schemas/uauth-UserLastLogin"},"lastName":{"$ref":"#/components/schemas/uauth-UserLastName"},"roleNames":{"$ref":"#/components/schemas/uauth-UserRoleNames"},"roles":{"$ref":"#/components/schemas/uauth-UserRoles"},"status":{"$ref":"#/components/schemas/uauth-UserStatus"},"updated":{"$ref":"#/components/schemas/uauth-UserUpdated"}}},"uauth-PaginationMeta":{"type":"object","description":"Metadata of the request","properties":{"pagination":{"$ref":"#/components/schemas/uauth-PaginationMetaPagination"}}},"uauth-PaginationMetaPagination":{"type":"object","description":"Pagination metadata","properties":{"limit":{"type":"integer","format":"int32","description":"The number of entries per page"},"page":{"type":"integer","format":"int32","description":"Page number, starting with `0`"},"pages":{"type":"integer","format":"int32","description":"The total number of pages"},"total":{"type":"integer","format":"int32","description":"The total number of entries on all pages"}}},"uauth-ResendConfirmationPayload":{"type":"object","properties":{"email":{"$ref":"#/components/schemas/uauth-UserEmail"}}},"uauth-RoleDataRequest":{"type":"object","required":["name","group"],"properties":{"group":{"$ref":"#/components/schemas/uauth-RoleGroupId"},"name":{"$ref":"#/components/schemas/uauth-RoleName"},"description":{"$ref":"#/components/schemas/uauth-RoleDescription"}}},"uauth-RoleDescription":{"type":"string","description":"Description of the role"},"uauth-RoleName":{"type":"string","description":"The name of the role"},"uauth-RoleId":{"type":"integer","format":"int64","description":"ID of the role"},"uauth-RoleGroupId":{"type":"integer","format":"int64","description":"ID of the group that includes this role"},"uauth-PermissionGroupName":{"type":"string","description":"Name of the permission group"},"uauth-PermissionGroupSlug":{"type":"string","description":"Slug of the permission group"},"uauth-RoleGroupName":{"type":"string","description":"Name of the role group"},"uauth-RoleGroupDescription":{"type":"string","description":"Description of the role group"},"uauth-RoleGroupDataRequest":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/uauth-RoleGroupName"},"description":{"$ref":"#/components/schemas/uauth-RoleGroupDescription"}}},"uauth-RoleGroupResponse":{"type":"object","properties":{"data":{"type":"array","description":"An array of roles in the group","items":{"$ref":"#/components/schemas/uauth-RoleGroupRoleResponse"}},"description":{"$ref":"#/components/schemas/uauth-RoleGroupDescription"},"editable":{"type":"boolean","description":"Defines if the role group can be edited."},"id":{"type":"integer","format":"int64","description":"ID of the role group"},"name":{"$ref":"#/components/schemas/uauth-RoleGroupName"}}},"uauth-RoleGroupRoleResponse":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/uauth-RoleGroupRoleUserResponse"},"description":{"$ref":"#/components/schemas/uauth-RoleDescription"},"editable":{"type":"boolean","description":"Informs if the role is editable"},"group":{"$ref":"#/components/schemas/uauth-RoleGroupId"},"id":{"$ref":"#/components/schemas/uauth-RoleId"},"name":{"$ref":"#/components/schemas/uauth-RoleName"},"updated":{"type":"string","format":"date-time","description":"Date and time of the last update"}}},"uauth-RoleGroupRoleUserResponse":{"type":"object","description":"Details of the role's creator","properties":{"avatar":{"$ref":"#/components/schemas/uauth-AvatarUrl"},"displayName":{"$ref":"#/components/schemas/uauth-UserDisplayName"},"firstName":{"$ref":"#/components/schemas/uauth-UserFirstName"},"id":{"$ref":"#/components/schemas/uauth-UserIdInteger"},"lastName":{"$ref":"#/components/schemas/uauth-UserLastName"}}},"uauth-RoleFullResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/uauth-RoleId"},"name":{"$ref":"#/components/schemas/uauth-RoleName"},"businessProfileId":{"$ref":"#/components/schemas/uauth-BusinessProfileId"},"shownAsResource":{"type":"boolean","description":"Deprecated field","deprecated":true},"manageable":{"type":"boolean","description":"Defines if the role can be modified."},"pii":{"type":"boolean","description":"Indicates if the role has access to personally identifiable information"},"group":{"type":"integer","format":"int64","description":"ID of the role group this role belongs to"},"author":{"$ref":"#/components/schemas/uauth-RoleGroupRoleUserResponse"},"editable":{"type":"boolean","description":"Informs if the role is editable"},"description":{"type":"string","description":"Description of the role"}}},"uauth-RoleResponse":{"type":"object","properties":{"businessProfileId":{"$ref":"#/components/schemas/uauth-BusinessProfileId"},"id":{"$ref":"#/components/schemas/uauth-RoleId"},"manageable":{"type":"boolean","description":"Defines if the role can be modified."},"name":{"$ref":"#/components/schemas/uauth-RoleName"},"shownAsResource":{"type":"boolean","description":"Deprecated field","deprecated":true},"pii":{"type":"boolean","description":"Indicates if the role has access to personally identifiable information"}}},"uauth-MyAccountUserResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"displayName":{"type":"string"},"avatar":{"type":"string"},"phone":{"type":"string"},"language":{"$ref":"#/components/schemas/uauth-UserLanguage"},"organizationRole":{"type":"string"},"introduction":{"type":"string"},"confirmed":{"type":"boolean"},"mailAccountId":{"type":"integer","format":"int32"},"superAdmin":{"type":"boolean"},"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"},"lastLogin":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["ACTIVE","PENDING","EXPIRED","INACTIVE"]},"roles":{"type":"array","items":{"type":"integer","format":"int64"}},"isTheSameUserAsLoggedIn":{"type":"boolean"},"description":{"type":"string"},"isMfaEnabled":{"type":"boolean"},"passwordLastModificationDate":{"type":"string","format":"date-time"},"canBeEdited":{"type":"boolean"},"dateFormatNotation":{"type":"string","enum":["US","EU"]},"timeFormatNotation":{"type":"string","enum":["US","EU"]},"numberFormatNotation":{"type":"string","enum":["US","EU"]},"mfaTokenExpirationHours":{"type":"integer","format":"int32"},"defaultMfaMethod":{"$ref":"#/components/schemas/uauth-MultiFactorMethod"},"labels":{"type":"array","items":{"type":"string"}}}},"uauth-UserAuthenticationRequest":{"required":["password","username"],"type":"object","properties":{"username":{"type":"string","description":"The login (email address) of the user"},"password":{"type":"string","description":"The user's password"},"deviceId":{"type":"string","description":"Identifier of user's current device"},"externalProviderToken":{"type":"string"},"externalProviderType":{"type":"string","enum":["GOOGLE"]},"organizationName":{"type":"string","description":"Optional organization name for login context"}}},"uauth-UserAutoCompleteResponse":{"type":"object","properties":{"avatarUrl":{"$ref":"#/components/schemas/uauth-AvatarUrl"},"displayName":{"$ref":"#/components/schemas/uauth-UserDisplayName"},"email":{"$ref":"#/components/schemas/uauth-UserEmail"},"userId":{"$ref":"#/components/schemas/uauth-UserIdInteger"}}},"uauth-IpPolicySettings":{"type":"object","properties":{"enabled":{"type":"boolean","description":"When TRUE, the policy is active and only the included addresses are allowed to connect."},"enableSupportSubnets":{"type":"boolean","description":"When TRUE, the IP addresses used by Synerise for service work are added to the allowlist. These addresses depend on the configuration.","default":true},"ipPolicy":{"$ref":"#/components/schemas/uauth-IpPolicy"}}},"uauth-UserRegistrationRequest":{"required":["email","password"],"type":"object","properties":{"email":{"$ref":"#/components/schemas/uauth-UserEmail"},"password":{"$ref":"#/components/schemas/uauth-UserPassword"},"invitationToken":{"$ref":"#/components/schemas/uauth-OptionalInvitationToken"},"externalProviderToken":{"type":"string"},"externalProviderType":{"type":"string","enum":["GOOGLE"]}}},"uauth-MultiFactorAuthInitResponse":{"type":"object","properties":{"url":{"type":"string","description":"URL of the QR code"},"secret":{"type":"string","description":"Multifactor authentication secret"}}},"uauth-MultiFactorSendCodeResponse":{"type":"object","properties":{"method":{"$ref":"#/components/schemas/uauth-MultiFactorMethod"},"status":{"$ref":"#/components/schemas/uauth-MultiFactorSendCodeStatus"},"nextTryInSeconds":{"type":"integer","format":"int32"}}},"uauth-MultiFactorSendCodeStatus":{"type":"string","enum":["OK","LIMIT_REACHED","ERROR"]},"uauth-MultiFactorAuthConfirmResponse":{"type":"object","properties":{"backupCode":{"type":"string","description":"Code used to recover the account if the device with the token generator is lost. Store the code in a secure way."}}},"uauth-MultiFactorAuthConfirmRequest":{"type":"object","required":["verificationCode"],"properties":{"verificationCode":{"type":"string","description":"Multi-factor verification code"}}},"uauth-MultiFactorMethod":{"type":"string","enum":["TOTP_AUTHENTICATOR","EMAIL"]},"uauth-MultiFactorAuthVerificationRequest":{"type":"object","required":["verificationCode"],"properties":{"verificationCode":{"type":"string","description":"Multi-factor verification code"},"deviceId":{"type":"string"},"externalProviderToken":{"type":"string"},"externalProviderType":{"type":"string","enum":["GOOGLE"]},"organizationName":{"type":"string","description":"Optional organization name for login context"}}},"uauth-ManagedDomainRequest":{"type":"object","required":["domain"],"properties":{"domain":{"$ref":"#/components/schemas/uauth-ManagedDomainDomain"}}},"uauth-ManagedDomainVerificationRequest":{"type":"object","required":["domain","verificationMethod"],"properties":{"domain":{"$ref":"#/components/schemas/uauth-ManagedDomainDomain"},"verificationMethod":{"$ref":"#/components/schemas/uauth-ManagedDomainVerificationMethod"}}},"uauth-ManagedDomainDomain":{"type":"string","description":"Domain name","example":"synerise.com"},"uauth-ManagedDomainVerificationMethod":{"type":"string","enum":["TXT_RECORD","FILE_CHECK","INTERNAL","NONE"],"description":"Verification method. The verification string can be retrieved by using [this method](#operation/initializeManagedDomainUsingPOST).\n\n- TXT_RECORD: the verification string needs to be added to your DNS as a TXT record.\n- FILE_CHECK: the site must include an HTML file whose name is the verification string. The file does not need any content.\n- INTERNAL; NONE - currently not used\n"},"uauth-ManagedDomainResponse":{"type":"object","properties":{"id":{"type":"number","format":"int64","description":"ID of the managed domain"},"domain":{"$ref":"#/components/schemas/uauth-ManagedDomainDomain"},"created":{"type":"string","format":"date-time","description":"Creation time"},"verificationMethod":{"$ref":"#/components/schemas/uauth-ManagedDomainVerificationMethod"},"verificationStatus":{"type":"string","description":"Verification status","enum":["VERIFIED","NOT_VERIFIED"]},"updated":{"type":"string","format":"date-time","description":"Time of last update"},"managedByProfile":{"$ref":"#/components/schemas/uauth-BusinessProfileId"},"usersCount":{"type":"number","format":"int64","description":"Number of users who belong to the domain"}}},"uauth-ManagedDomainCodeResponse":{"type":"object","properties":{"verificationCode":{"type":"string","description":"Verification code","format":"uuid"},"businessProfileId":{"$ref":"#/components/schemas/uauth-BusinessProfileId"}}},"uauth-ManagedDomainListing":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/uauth-PaginationMeta"},"data":{"type":"array","description":"An array of domains managed by the workspace","items":{"$ref":"#/components/schemas/uauth-ManagedDomainResponse"}}}},"uauth-UserDisplayName":{"type":"string","description":"User's display name"},"uauth-UserEmail":{"type":"string","description":"User's email address"},"uauth-UserIdInteger":{"type":"integer","format":"int64","description":"User ID"},"uauth-AvatarUrl":{"type":"string","description":"URL of the user's avatar"},"uauth-UserFirstName":{"type":"string","description":"First name of the user"},"uauth-UserLastName":{"type":"string","description":"Last name of the user"},"uauth-UserConfirmed":{"type":"boolean","description":"Informs if the account is confirmed"},"uauth-UserCreated":{"type":"string","format":"date-time","description":"Account creation date"},"uauth-UserDescription":{"type":"string","description":"User's description"},"uauth-UserIntroduction":{"type":"string","description":"User's introduction"},"uauth-IsTheSameUserAsLoggedIn":{"type":"boolean","description":"Informs if the user who made the request is the same as the subject of the request"},"uauth-UserLanguage":{"type":"string","enum":["pl","es","pt","en-GB","en-US"],"description":"User's interface language"},"uauth-UserLastLogin":{"type":"string","format":"date-time","description":"Last login time"},"uauth-UserMailAccountId":{"type":"integer","description":"Unused field"},"uauth-UserOrganizationRole":{"type":"string","description":"User's role in the organization"},"uauth-UserPhone":{"type":"string","description":"User's phone number"},"uauth-UserRoles":{"type":"array","description":"An array of roles (IDs) assigned to the user in the currently selected workspace","items":{"type":"integer","format":"int64"}},"uauth-UserStatus":{"type":"string","description":"Account status","enum":["ACTIVE","PENDING"]},"uauth-UserSuperAdmin":{"type":"boolean","description":"Informs if the user is a super admin"},"uauth-UserUpdated":{"type":"string","format":"date-time","description":"Last update time"},"uauth-UserIsMfaEnabled":{"type":"boolean","description":"Informs if multi-factor authentication for the user is active"},"uauth-UserPasswordLastModificationDate":{"type":"string","format":"date-time","description":"Date and time of last password change"},"uauth-UserRoleNames":{"type":"array","description":"An array of roles (names) assigned to the user in the currently selected workspace","items":{"type":"string"}},"uauth-UserPassword":{"type":"string","description":"Account password"},"uauth-PasswordAttempts":{"type":"integer","format":"int32","description":"The number of failed sign-in attempts after which an account is blocked"},"uauth-PasswordBlock":{"type":"integer","format":"int32","description":"The number of days after which an account is blocked after the password expires."},"uauth-PasswordDifferent":{"type":"integer","format":"int32","description":"Defines how many previous passwords are compared.\n\nFor example, if set to 3, the new password must be different than the 3 last passwords.\n"},"uauth-PasswordDigits":{"type":"integer","format":"int32","description":"The minimum number of digits in a password"},"uauth-PasswordExpiration":{"type":"integer","format":"int32","description":"The number of days after which the passwords expire"},"uauth-PasswordLowerLetters":{"type":"integer","format":"int32","description":"The minimum number of lower-case letters in a password"},"uauth-PasswordMaxIdleTime":{"type":"integer","format":"int32","description":"Time (in seconds) after which an idle user is signed out"},"uauth-PasswordMaxLength":{"type":"integer","format":"int32","description":"The maximum number of characters in a password"},"uauth-PasswordMinLength":{"type":"integer","format":"int32","description":"The minimum number of characters in a password"},"uauth-PasswordNextChange":{"type":"integer","format":"int32","description":"Currently not used"},"uauth-PasswordSpecialChars":{"type":"integer","format":"int32","description":"The minimum number of special characters in a password"},"uauth-PasswordUpperLetters":{"type":"integer","format":"int32","description":"The minimum number of upper-case letters in a password"},"uauth-IpPolicy":{"type":"array","description":"List of allowed IPv4 addresses","items":{"type":"string","description":"IP address"}},"uploader-service-ttlInMinutes":{"description":"Defines the amount of time (expressed in minutes) the file or files are available. If this parameter is not sent, the default time to live of the files is 30 days.","type":"number"},"uploader-service-identifierValue":{"description":"Contains the value of a customer identifier a file is dedicated for. The type of the value is defined in the path parameters of the endpoint (`identifierType`). If `id` is used, it must be sent as a string.","type":"string","example":"1234"},"uploader-service-parameters":{"description":"Custom parameters of the files.","type":"object","additionalProperties":true},"uploader-service-FileRequest":{"type":"object","required":["id","businessProfileId","clientId","ttlInMinutes","params","createdAt"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique ID of the file or batch of files"},"businessProfileId":{"type":"number","format":"int32","description":"ID of the workspace where the file or files are stored"},"clientId":{"type":"number","format":"int64","example":1234,"description":"ID of the profile to which the file or files are assigned"},"ttlInMinutes":{"$ref":"#/components/schemas/uploader-service-ttlInMinutes"},"params":{"$ref":"#/components/schemas/uploader-service-parameters"},"createdAt":{"type":"string","format":"date-time","description":"Date and time when the file or files were created"}}},"uploader-service-AddFile":{"type":"object","required":["files","ttlInMinutes","identifierValue","parameters"],"properties":{"files":{"type":"array","description":"Up to 5 files can be sent at once. The order in the array is reflected in the generated `attachment.upload` event, and the files from the event can then be accessed by their index in the array.","items":{"$ref":"#/components/schemas/uploader-service-InputFile"}},"ttlInMinutes":{"$ref":"#/components/schemas/uploader-service-ttlInMinutes"},"identifierValue":{"$ref":"#/components/schemas/uploader-service-identifierValue"},"parameters":{"$ref":"#/components/schemas/uploader-service-parameters"}}},"uploader-service-InputFile":{"type":"object","required":["content","mimetype","filename","extension"],"properties":{"content":{"type":"string","description":"The file encoded into base64.","example":"77u/dGhpcyBpcyBqdXN0IGFuIGV4YW1wbGUgZmlsZQ=="},"mimetype":{"type":"string","description":"The media type, in the type/type format, for example `text/csv`","example":"text/csv"},"filename":{"type":"string","description":"The name of the file","example":"myexamplefile"},"extension":{"type":"string","description":"The extension of the uploaded file","example":"csv"}}},"uploader-service-FileInfo":{"type":"object","properties":{"author":{"description":"Name of the user who uploaded the file","type":"string"},"canEdit":{"description":"Defines if the file can be edited","type":"boolean"},"canRemove":{"description":"Defines if the file can be deleted","type":"boolean"},"created":{"description":"Creation date","type":"string"},"filename":{"description":"Name of the file","type":"string"},"id":{"description":"ID of the file","type":"string"},"uuid":{"type":"string","description":"UUID of the file, without dashes"},"isStarred":{"type":"boolean","description":"Informs if the file is starred."},"mimetype":{"type":"string","description":"The MIME type of the file.","enum":["image/png","image/jpeg","image/jpg","image/gif","video/mp4","application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel"]},"path":{"$ref":"#/components/schemas/uploader-service-Path"},"size":{"type":"number","description":"Size of the file in bytes"},"storageId":{"type":"string","description":"Name of the container where the file is stored"},"updated":{"type":"string","description":"Year of last update"},"url":{"type":"string","description":"URL of the file"},"user_id":{"type":"number","description":"ID of the user who uploaded the file"}}},"uploader-service-FileDataV2":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/uploader-service-AuthorV2"},"permissions":{"type":"object","properties":{"canEdit":{"type":"boolean"},"canRemove":{"type":"boolean"}}},"createdAt":{"description":"Creation date","type":"string"},"filename":{"description":"Name of the file","type":"string"},"id":{"description":"ID of the file","type":"string"},"uuid":{"type":"string","description":"UUID of the file, without dashes"},"isStarred":{"type":"boolean","description":"Informs if the file is starred."},"mimetype":{"type":"string","description":"The MIME type of the file.","enum":["image/png","image/jpeg","image/jpg","image/gif","video/mp4","application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel"]},"path":{"$ref":"#/components/schemas/uploader-service-Path"},"size":{"type":"number","description":"Size of the file in bytes"},"storageId":{"type":"string","description":"Name of the container where the file is stored"},"updatedYear":{"type":"integer","description":"Year of last update"},"url":{"type":"string","description":"URL of the file"}}},"uploader-service-AuthorV2":{"type":"object","description":"Author of a file.","properties":{"id":{"type":"number"},"email":{"type":"string"},"displayName":{"type":"string"},"avatar":{"type":"string"}},"required":["id","email","displayName"]},"uploader-service-Path":{"type":"object","description":"Paths to different versions of the resource. Some MIME types only have `origin`.","properties":{"large":{"type":"string","description":"Path to the large version of the file"},"origin":{"type":"string","description":"Path to the original file"},"thumb":{"type":"string","description":"Path to the thumbnail"}}},"uploader-service-UploadResult":{"type":"object","properties":{"result":{"type":"object","description":"Information about the result","properties":{"files":{"type":"array","description":"File information","items":{"$ref":"#/components/schemas/uploader-service-FileInfo"}},"storageId":{"type":"string","description":"Name of the container where the file is stored"}}}}},"uploader-service-FileUuids":{"description":"File UUIDs, without dashes (stringified JSON array) <br/>Example:<br/>`[\"0ac106beb55c401bac8bc8244e367512\",\"03dc506041e24c3cae284fd3f6611082\"]`","type":"string"},"uploader-service-Error":{"type":"object","properties":{"details":{"type":"string"},"errorCode":{"type":"string"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/uploader-service-Error"}},"field":{"type":"string"},"help":{"type":"string"},"httpStatus":{"type":"number"},"message":{"type":"string"},"source":{"type":"string"},"timestamp":{"type":"string"},"traceId":{"type":"string"}}},"vouchers-voucherActionRequestAsProfileReq":{"required":["poolUuid","clientUuid"],"type":"object","properties":{"poolUuid":{"$ref":"#/components/schemas/vouchers-inBodyPoolUuid"},"clientUuid":{"$ref":"#/components/schemas/vouchers-inBodyClientUuid"}}},"vouchers-voucherActionRequestByClientIdentifierAsProfileReq":{"required":["poolUuid","clientIdentifierValue"],"type":"object","properties":{"poolUuid":{"$ref":"#/components/schemas/vouchers-inBodyPoolUuid"},"clientIdentifierValue":{"$ref":"#/components/schemas/vouchers-inBodyClientIdentifierValue"}}},"vouchers-voucherActionRequestAsClientReq":{"required":["poolUuid"],"type":"object","properties":{"poolUuid":{"$ref":"#/components/schemas/vouchers-inBodyPoolUuid"},"clientUuid":{"$ref":"#/components/schemas/vouchers-deprecatedInBodyClientUuid"}}},"vouchers-voucherRedeemReq":{"required":["code"],"type":"object","properties":{"code":{"type":"string","description":"Voucher code\nMust match the pattern: `^.{0,36}$`\n","example":"code123","nullable":false}}},"vouchers-voucherCode":{"type":"string","description":"Voucher code\nMust match the pattern: `^.{0,36}$`\n","example":"code123","nullable":true},"vouchers-voucher-HTTP400Res":{"required":["message","error"],"type":"object","properties":{"message":{"type":"string","description":"Description of the problem","example":"Out of scope. Pool is empty."},"error":{"type":"array","items":{"$ref":"#/components/schemas/vouchers-errorObj"},"description":"Details of the problem"}}},"vouchers-errorObj":{"type":"object","properties":{"field":{"type":"string","description":"Name of the field that cause the problem (if applicable)","example":"code"},"message":{"type":"string","example":"code must be unique","description":"Details of the problem"},"validatorKey":{"type":"string","example":"not_unique","description":"System ID of the problem (if applicable)"}}},"vouchers-voucherResponseMessage":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"Details of the response"}}},"vouchers-bulkCreateResponse":{"properties":{"message":{"type":"string","default":"Create object with success"},"data":{"type":"object","properties":{"vouchersCreated":{"type":"integer","description":"Number of created vouchers","example":3},"duplicatedCodes":{"type":"array","items":{"type":"string","example":"code123"},"description":"Codes which are duplicated (already exists for given workspace) and was ignored while creating vouchers"}}}}},"vouchers-redeemAt":{"type":"string","format":"date-time","description":"Time when the voucher was redeemed. Defaults to current time when redeeming.","nullable":true},"vouchers-expireIn":{"type":"string","format":"date-time","description":"Date when the voucher expires.","nullable":true},"vouchers-assignedAt":{"type":"string","format":"date-time","description":"Time when the voucher was assigned. Defaults to current time when assigning.","nullable":true},"vouchers-createdAt":{"type":"string","format":"date-time","description":"Time when the voucher was created."},"vouchers-updatedAt":{"type":"string","format":"date-time","description":"Time when the voucher was last updated."},"vouchers-voucherStatus":{"type":"string","description":"Voucher status","enum":["ASSIGNED","UNASSIGNED","REDEEMED","CANCELED"],"example":"ASSIGNED"},"vouchers-voucherRedeemedStatus":{"type":"string","default":"REDEEMED"},"vouchers-getOrAssignAndGetVoucherDataRes":{"type":"object","description":"Details of the voucher","properties":{"code":{"$ref":"#/components/schemas/vouchers-voucherCode"},"expireIn":{"$ref":"#/components/schemas/vouchers-expireIn"},"redeemAt":{"$ref":"#/components/schemas/vouchers-redeemAt"},"assignedAt":{"$ref":"#/components/schemas/vouchers-assignedAt"},"createdAt":{"$ref":"#/components/schemas/vouchers-createdAt"},"updatedAt":{"$ref":"#/components/schemas/vouchers-updatedAt"}}},"vouchers-inBodyPoolUuid":{"type":"string","description":"UUID of the voucher pool","example":"faec32b0-c343-4362-ba32-c6148c649da4"},"vouchers-inBodyClientUuid":{"type":"string","description":"UUID of the Profile","example":"07243772-008a-42e1-ba37-c3807cebde8f"},"vouchers-inBodyClientIdentifierValue":{"description":"Value of the profile identifier. For example `clientIdentifierValue=custom_identify_1234`","oneOf":[{"type":"string","maxLength":100,"example":"custom_identify_1234"},{"type":"integer","format":"int64","maxLength":100,"example":1234}]},"vouchers-deprecatedInBodyClientUuid":{"deprecated":true,"type":"string","nullable":true,"description":"UUID of the Profile. This field is ignored.","example":"17243772-008a-42e1-ba37-c3807cebde8f"},"vouchers-inBodyClientId":{"type":"integer","description":"ID of the Profile"},"vouchers-data":{"required":["uuid","poolUuid","createdAt","updatedAt"],"type":"object","description":"Details of the voucher","properties":{"uuid":{"type":"string","description":"UUID of the voucher"},"poolUuid":{"$ref":"#/components/schemas/vouchers-inBodyPoolUuid"},"clientId":{"$ref":"#/components/schemas/vouchers-inBodyClientId"},"createdAt":{"type":"string","format":"date-time","description":"Time when the voucher was created"},"updatedAt":{"type":"string","format":"date-time","description":"Time when the voucher was last updated"}}},"vouchers-voucherData":{"required":["poolUuid"],"type":"object","properties":{"poolUuid":{"$ref":"#/components/schemas/vouchers-inBodyPoolUuid"},"clientUuid":{"$ref":"#/components/schemas/vouchers-inBodyClientUuid"},"clientId":{"$ref":"#/components/schemas/vouchers-inBodyClientId"},"code":{"$ref":"#/components/schemas/vouchers-voucherCode"},"expireIn":{"$ref":"#/components/schemas/vouchers-expireIn"},"redeemAt":{"$ref":"#/components/schemas/vouchers-redeemAt"},"assignedAt":{"$ref":"#/components/schemas/vouchers-assignedAt"},"status":{"$ref":"#/components/schemas/vouchers-voucherStatus"},"createdAt":{"$ref":"#/components/schemas/vouchers-createdAt"},"updatedAt":{"$ref":"#/components/schemas/vouchers-updatedAt"}}},"vouchers-voucherDataRedeemed":{"type":"object","properties":{"poolUuid":{"$ref":"#/components/schemas/vouchers-inBodyPoolUuid"},"clientUuid":{"$ref":"#/components/schemas/vouchers-inBodyClientUuid"},"clientId":{"$ref":"#/components/schemas/vouchers-inBodyClientId"},"code":{"$ref":"#/components/schemas/vouchers-voucherCode"},"expireIn":{"$ref":"#/components/schemas/vouchers-expireIn"},"redeemAt":{"$ref":"#/components/schemas/vouchers-redeemAt"},"assignedAt":{"$ref":"#/components/schemas/vouchers-assignedAt"},"status":{"$ref":"#/components/schemas/vouchers-voucherRedeemedStatus"},"createdAt":{"$ref":"#/components/schemas/vouchers-createdAt"},"updatedAt":{"$ref":"#/components/schemas/vouchers-updatedAt"}}},"vouchers-bulkCreateVouchersReq":{"required":["poolUuid","codeList"],"type":"object","properties":{"poolUuid":{"$ref":"#/components/schemas/vouchers-inBodyPoolUuid"},"codeList":{"type":"string","description":"A list of unique voucher codes, separated by semicolons","example":"3845734682364756454534;384574634564545456;567868678345234346748"}}},"vouchers-poolDataRes":{"type":"object","properties":{"uuid":{"$ref":"#/components/schemas/vouchers-poolUuid"},"name":{"$ref":"#/components/schemas/vouchers-poolName"},"description":{"$ref":"#/components/schemas/vouchers-poolDescription"},"barcodeType":{"$ref":"#/components/schemas/vouchers-poolBarcodeType"},"voucherPrefix":{"$ref":"#/components/schemas/vouchers-voucherPrefix"},"poolLimit":{"$ref":"#/components/schemas/vouchers-poolLimit"},"redeemedLimitPerClient":{"$ref":"#/components/schemas/vouchers-redeemedLimitPerClient"},"startAt":{"$ref":"#/components/schemas/vouchers-poolStartAt"},"expireIn":{"$ref":"#/components/schemas/vouchers-poolExpireIn"},"userId":{"$ref":"#/components/schemas/vouchers-userId"},"assignedCount":{"$ref":"#/components/schemas/vouchers-assignedCount"},"activeCount":{"$ref":"#/components/schemas/vouchers-activeCount"},"countAt":{"$ref":"#/components/schemas/vouchers-countAt"},"lastingTime":{"$ref":"#/components/schemas/vouchers-lastingTime"}}},"vouchers-poolName":{"type":"string","description":"Name of the voucher pool"},"vouchers-poolDescription":{"type":"string","description":"A description of the pool"},"vouchers-poolLimit":{"type":"integer","default":0,"description":"Maximum number of vouchers to store in the pool"},"vouchers-poolBarcodeType":{"type":"string","description":"The type of codes in the pool","enum":["NONE","UPC","EAN-13","CODE-39","CODE-128","ISBN","ISSN","QR-CODE"],"default":"NONE"},"vouchers-voucherPrefix":{"type":"string","default":"0","description":"A prefix added to each voucher in the pool"},"vouchers-redeemedLimitPerClient":{"type":"integer","default":0,"description":"Maximum number of times that one Profile can retrieve a voucher from this pool"},"vouchers-poolStartAt":{"type":"string","format":"date-time","description":"Time when the pool starts functioning. Defaults to current time."},"vouchers-poolExpireIn":{"type":"string","format":"date-time","description":"Time when the pool stops functioning. Defaults to current time. Must be later than `startAt`."},"vouchers-poolUuid":{"type":"string","description":"UUID of the voucher pool","example":"8465c240-d38e-42f8-af29-b9fa1ed05115"},"vouchers-poolData":{"type":"object","description":"Voucher pool details","properties":{"uuid":{"$ref":"#/components/schemas/vouchers-poolUuid"},"name":{"$ref":"#/components/schemas/vouchers-poolName"},"barcodeType":{"$ref":"#/components/schemas/vouchers-poolBarcodeType"},"description":{"$ref":"#/components/schemas/vouchers-poolDescription"},"voucherPrefix":{"$ref":"#/components/schemas/vouchers-voucherPrefix"},"poolLimit":{"$ref":"#/components/schemas/vouchers-poolLimit"},"redeemedLimitPerClient":{"$ref":"#/components/schemas/vouchers-redeemedLimitPerClient"},"startAt":{"$ref":"#/components/schemas/vouchers-poolStartAt"},"expireIn":{"$ref":"#/components/schemas/vouchers-poolExpireIn"},"lastingTime":{"$ref":"#/components/schemas/vouchers-lastingTime"},"userId":{"$ref":"#/components/schemas/vouchers-userId"},"assignedCount":{"$ref":"#/components/schemas/vouchers-assignedCount"},"activeCount":{"$ref":"#/components/schemas/vouchers-activeCount"},"countAt":{"$ref":"#/components/schemas/vouchers-countAt"}}},"vouchers-createAVoucherPoolReq":{"required":["name","expireIn"],"type":"object","properties":{"name":{"$ref":"#/components/schemas/vouchers-poolName"},"barcodeType":{"$ref":"#/components/schemas/vouchers-poolBarcodeType"},"description":{"$ref":"#/components/schemas/vouchers-poolDescription"},"voucherPrefix":{"$ref":"#/components/schemas/vouchers-voucherPrefix"},"poolLimit":{"$ref":"#/components/schemas/vouchers-poolLimit"},"redeemedLimitPerClient":{"$ref":"#/components/schemas/vouchers-redeemedLimitPerClient"},"startAt":{"$ref":"#/components/schemas/vouchers-poolStartAt"}}},"vouchers-paginationMeta":{"type":"object","description":"Optional metadata","properties":{"link":{"type":"array","description":"Links to other pages","items":{"type":"object","description":"Link to another page on the list","properties":{"rel":{"type":"string","enum":["first","last","next","prev"],"description":"The type of relationship to the current page"},"url":{"type":"string","description":"The URL of the page"}}}},"totalCount":{"type":"integer","description":"The total number of items on all pages"},"totalPages":{"type":"integer","description":"The total number of pages"},"page":{"type":"integer","description":"The current page"},"limit":{"type":"integer","description":"The number of items per page"},"code":{"type":"integer","description":"HTTP code"}}},"vouchers-listVouchersSuccessRes":{"required":["data"],"type":"object","properties":{"data":{"type":"array","description":"An array of vouchers","items":{"$ref":"#/components/schemas/vouchers-voucherData"}},"meta":{"$ref":"#/components/schemas/vouchers-paginationMeta"}}},"vouchers-getVouchersCountRes":{"required":["data"],"type":"object","properties":{"data":{"type":"object","properties":{"assignedCount":{"type":"integer","format":"int32","example":130,"description":"Number of assigned vouchers"},"activeCount":{"type":"integer","format":"int32","example":130,"description":"Number of active vouchers"},"countAt":{"type":"string","format":"date-time","description":"Time when the calculation was made"}}}}},"vouchers-vouchersDataList":{"type":"object","properties":{"data":{"type":"array","description":"An array of vouchers","items":{"$ref":"#/components/schemas/vouchers-voucherData"}}}},"vouchers-lastingTime":{"type":"integer","format":"int32","description":"Lasting time of the voucher"},"vouchers-userId":{"type":"integer","format":"int32","description":"ID of the User who created the pool"},"vouchers-assignedCount":{"type":"integer","format":"int32","description":"Number of assigned vouchers. **To refresh the counter, use [this endpoint](#operation/getVouchersCount).**"},"vouchers-activeCount":{"type":"integer","format":"int32","description":"Number of active vouchers. **To refresh the counter, use [this endpoint](#operation/getVouchersCount).**"},"vouchers-countAt":{"type":"string","format":"date-time","description":"Time when the pool starts functioning. Defaults to current time."}},"responses":{"activities-api-EventResponse":{"description":"Events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/activities-api-PaginatedEvents"}}}},"analytics-genericError":{"description":"See error message for details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/analytics-Error"}}}},"api-service-400-apiv4":{"description":"Bad request: input data missing or malformed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"timestamp":"2018-06-07T07:28:26.078+00:00","status":400,"error":"Bad Request","message":"Version header content is invalid","path":"/path_of_the_endpoint"}}}},"api-service-401-apiv4":{"description":"Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"error":"Bad Request","status":400,"timestamp":"2020-10-29T13:08:16.235Z","path":"/exampleEndpoint","message":"Some fields did not pass validation","errors":[{"code":120,"field":"exampleField","message":"120","rejectedValue":"exampleValue"}]}}}},"api-service-403-apiv4":{"description":"Forbidden; insufficient permissions (when PII protection is enabled, PII permissions are required in addition to the permissions listed in the method description)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"timestamp":"2018-06-07T07:29:27.489+00:00","status":403,"error":"Forbidden","message":"Forbidden","path":"/path_of_the_endpoint"}}}},"api-service-404-pii":{"description":"Profile not found or access blocked by PII protection settings","content":{"application/json":{"schema":{"type":"string","description":"Description of the problem. If the access is blocked by insufficient PII permissions, the message is the same as when the profile doesn't exist.","example":"Client 5005535044 not found"}}}},"api-service-415-apiv4":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api-service-HTTP400-apiv4"},"example":{"timestamp":"2018-06-07T07:27:23.136+00:00","status":415,"error":"Unsupported Media Type","message":"Content type 'application/xml' not supported","path":"/path_of_the_endpoint"}}}},"automation-brain-SimpleError":{"description":"See error message for details","content":{"text/plain":{"schema":{"type":"string","description":"Description of the problem"}}}},"automation-brain-genericError":{"description":"See error message for details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-Error"}}}},"automation-brain-400":{"description":"Bad request: input data missing or malformed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-HTTP400"}}}},"automation-brain-401":{"description":"Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-HTTP400"}}}},"automation-brain-403":{"description":"Forbidden; insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-HTTP400"}}}},"automation-brain-404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automation-brain-HTTP400"}}}},"brickworks-service-GenericError":{"description":"See error message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-ObjectsError"}}}},"brickworks-service-GenericBadRequestError":{"description":"Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-ObjectsError"}}}},"brickworks-service-GenericUnauthorizedError":{"description":"Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-GatewayError"}}}},"brickworks-service-GenericForbiddenError":{"description":"Forbidden; insufficient permissions. See error message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-GatewayError"}}}},"brickworks-service-GenericNotFoundError":{"description":"Resource not found. See error message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-ObjectsError"}}}},"brickworks-service-GenericConflictError":{"description":"The request could not be completed due to a conflict with the current state of the resource. See error message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-ObjectsError"}}}},"brickworks-service-GenericUnprocessableContentError":{"description":"The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-ObjectsError"}}}},"brickworks-service-GeneratedObject":{"description":"Processed content of a record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-GeneratedObject"}}}},"brickworks-service-207Response":{"description":"Some operations failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/brickworks-service-207ResponseBody"}}}},"business-profile-service-4xx-bpservice":{"description":"Request failed. See response for details.","content":{"application/json":{"schema":{"type":"object","required":["message","timestamp"],"properties":{"httpStatus":{"$ref":"#/components/schemas/business-profile-service-ErrorStatus"},"errorCode":{"$ref":"#/components/schemas/business-profile-service-ErrorCode"},"timestamp":{"$ref":"#/components/schemas/business-profile-service-ErrorTimestamp"},"message":{"$ref":"#/components/schemas/business-profile-service-ErrorMessage"},"traceId":{"type":"string","description":"Trace ID for troubleshooting"},"errors":{"$ref":"#/components/schemas/business-profile-service-ErrorErrorsArray"}}}}}},"business-profile-service-401-bpservice":{"description":"Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business-profile-service-AuthError"}}}},"business-profile-service-403-bpservice":{"description":"Unauthorized: insufficient permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/business-profile-service-AuthError"}}}},"catalogs-400generic":{"description":"A problem occurred. See the error message for details.","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"string","description":"Time when the error occurred"},"errorCode":{"type":"string","description":"Error code. See [API error code reference](https://developers.synerise.com/errors.html)."},"httpStatus":{"type":"integer","description":"HTTP code of the error"},"message":{"type":"string","description":"A summary of the problem"},"traceId":{"type":"string","nullable":true,"description":"Trace ID for troubleshooting, if applicable"}}}}}},"catalogs-400":{"description":"Invalid or insufficient data","content":{"text/plain":{"schema":{"type":"string"}}}},"catalogs-401":{"description":"Unauthorized: token missing/expired/invalid; invalid API key; etc.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/catalogs-ErrorResponse"}}}},"catalogs-403":{"description":"Forbidden: insufficient permissions; wrong consumer scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/catalogs-ErrorResponse"}}}},"catalogs-404":{"description":"Entity not found","content":{"text/plain":{"schema":{"type":"string"}}}},"crm-404-pii":{"description":"Resource not found or access blocked by PII protection settings","content":{"text/plain":{"schema":{"type":"string","description":"Description of the problem"}}}},"items-search-FullTextSearchResponse200":{"description":"Search result","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/items-search-FullTextSearchResponse"},{"$ref":"#/components/schemas/items-search-SuggestionResponse"}]}}}},"items-search-FullTextSearchResponse200WithExplanation":{"description":"Search result","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/items-search-FullTextSearchResponseWithExplanation"},{"$ref":"#/components/schemas/items-search-SuggestionResponseWithExplanation"}]}}}},"items-search-AutocompleteSearchResponse200":{"description":"Search result","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/items-search-AutocompleteResponse"},{"$ref":"#/components/schemas/items-search-SuggestionResponse"}]}}}},"items-search-AutocompleteSearchResponse200WithExplanation":{"description":"Search result","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/items-search-AutocompleteResponseWithExplanation"},{"$ref":"#/components/schemas/items-search-SuggestionResponseWithExplanation"}]}}}},"items-search-ListingResponse200":{"description":"Listing result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-ListingResponse"}}}},"items-search-ListingResponse200WithExplanation":{"description":"Listing result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-ListingResponseWithExplanation"}}}},"items-search-QueryClassificationResponse200":{"description":"Query classification result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-QueryClassificationResponse"}}}},"items-search-SearchableAttributesMatchResponse200":{"description":"Searchable attributes match result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-SearchableAttributesMatchResponse"}}}},"morph-401":{"description":"Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/morph-HttpErrorDetails"}}}},"morph-403":{"description":"Forbidden; insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/morph-HttpErrorDetails"}}}},"morph-BadRequest":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/morph-HttpErrorDetails"},"example":{"error":"Bad Request","status":400,"timestamp":"2021-01-04T16:15:51.703Z","message":"Message describing issue with provided request"}}}},"promotions-PromotionImportBatchPartialError":{"description":"Some items failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionImportBatchPartialErrorResponse"}}}},"promotions-PromotionCreated":{"description":"Promotion created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Status of the operation"}}}}}},"promotions-PromotionUpdated":{"description":"Promotion updated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Status of the operation"}}}}}},"promotions-400":{"description":"Request body invalid/malformed/missing elements","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/promotions-ErrorObject"},{"type":"object","title":"JSON structure issue","properties":{"message":{"$ref":"#/components/schemas/promotions-ResponseError"},"code":{"type":"string","description":"String-type code of the error"}}}]}}}},"promotions-Promotion404":{"description":"Profile, promotion, or related resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-ErrorObject"}}}},"promotions-WaitingForProfileLockReleaseError":{"description":"Waiting for profile lock release","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-ErrorObject"}}}},"promotions-PromotionDeactivationForbiddenError":{"description":"Promotion deactivation is forbidden due to promotion setup.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-ErrorObject"}}}},"promotions-ProfilePromotionsBlockedError":{"description":"Profile promotions blocked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-ErrorObject"}}}},"promotions-PromotionActivate412":{"description":"Already activated/Already redeemed/Activation limit reached/Promotion not started/Promotion expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-ErrorObject"}}}},"promotions-PromotionActivate422":{"description":"Global Activation limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-ErrorObject"}}}},"promotions-ProcessSale428":{"description":"Property discountSourceType in sale settings is not defined","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-ErrorObject"}}}},"promotions-Validation422":{"description":"Request payload failed schema validation","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":422},"error":{"type":"string","example":"Unprocessable Entity"},"message":{"type":"string","example":"validation failed"}}}}}},"promotions-500":{"description":"General error"},"promotions-401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/promotions-ErrorCode"},"error":{"$ref":"#/components/schemas/promotions-ResponseError"},"message":{"$ref":"#/components/schemas/promotions-ResponseErrorMessage"},"timestamp":{"$ref":"#/components/schemas/promotions-ErrorTimestamp"}}}}}},"promotions-403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/promotions-ErrorCode"},"error":{"$ref":"#/components/schemas/promotions-ResponseError"},"message":{"$ref":"#/components/schemas/promotions-ResponseErrorMessage"},"timestamp":{"$ref":"#/components/schemas/promotions-ErrorTimestamp"}}}}}},"promotions-404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/promotions-ErrorCode"},"error":{"$ref":"#/components/schemas/promotions-ResponseError"},"message":{"$ref":"#/components/schemas/promotions-ResponseErrorMessage"},"timestamp":{"$ref":"#/components/schemas/promotions-ErrorTimestamp"}}}}}},"promotions-ClientNotFoundError":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Profile not found"}}}},"promotions-ClientNotFoundErrorResponseV2":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-ClientNotFoundError"}}}},"promotions-InvalidDataErrorResponseV2":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-InvalidDataErrorV2"}}}},"promotions-ClientPointsLockErrorResponseV2":{"description":"Profile points lock error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-ClientPointsLockErrorV2"}}}},"promotions-LockAlreadyExistsError":{"description":"Lock already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-PromotionResponseMessage"},"example":{"message":"Lock already exits"}}}},"promotions-VouchersRedeemedResponse":{"description":"Vouchers redeemed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Status of the operation"},"data":{"$ref":"#/components/schemas/promotions-VoucherList"}}}}}},"promotions-VouchersRedeemedResponseWithErrors":{"description":"Some vouchers couldn't be redeemed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotions-VouchersListWithErrors"}}}},"push-devices-service-4xx":{"description":"See error message for details","content":{"application/json":{"schema":{"type":"object","properties":{"httpStatus":{"type":"integer","description":"HTTP status of the error"},"errorCode":{"type":"string","description":"Code of the error. See [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)"},"timestamp":{"type":"string","format":"date/time","description":"Time when the error occurred"},"message":{"type":"string","description":"Short summary of the error"},"traceId":{"type":"string","description":"Trace ID for debugging"}}}}}},"push-devices-service-401":{"description":"Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/push-devices-service-HTTP400"},"example":{"error":"Bad Request","status":400,"timestamp":"2020-10-29T13:08:16.235Z","path":"/exampleEndpoint","message":"Some fields did not pass validation","errors":[{"code":120,"field":"exampleField","message":"120","rejectedValue":"exampleValue"}]}}}},"push-devices-service-403":{"description":"Forbidden; insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/push-devices-service-HTTP400"},"example":{"timestamp":"2018-06-07T07:29:27.489+00:00","status":403,"error":"Forbidden","message":"Forbidden","path":"/path_of_the_endpoint"}}}},"push-devices-service-415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/push-devices-service-HTTP400"},"example":{"timestamp":"2018-06-07T07:27:23.136+00:00","status":415,"error":"Unsupported Media Type","message":"Content type 'application/xml' not supported","path":"/path_of_the_endpoint"}}}},"recommendations-api-materializer-404cannotGenerate":{"description":"No recommendations could be generated for the specified campaign and context.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-api-materializer-Error"}}}},"recommendations-api-materializer-429toManyRequestsError":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\").","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-api-materializer-Error"}}}},"recommendations-api-materializer-500error":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-api-materializer-Error"}}}},"recommendations-config-400":{"description":"Bad request: input data missing or malformed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-config-SyneriseError"}}}},"recommendations-config-401":{"description":"Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-config-Error"}}}},"recommendations-config-403":{"description":"Forbidden; insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-config-Error"}}}},"recommendations-config-500":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-config-Error"}}}},"recommendations-rust-all-404-no-recommendation":{"description":"No recommendations could be generated for the specified profile and filters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-Error"}}}},"recommendations-rust-all-500-error-occurred":{"description":"An error occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/recommendations-rust-all-Error"}}}},"sauth-403-login":{"description":"Authentication failed, see error message for details","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/sauth-4xx-base"},{"type":"object","properties":{"errorCode":{"type":"string","description":"Error code, if applicable.\n  - `SAU-302`: Email confirmation by hash code (activation link) required\n  - `SAU-303`: Email confirmation by PIN code required\n"}}}]}}}},"sauth-400-malformed":{"description":"Request body malformed/invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"}}}},"sauth-401-unauthorized":{"description":"JWT missing, expired, or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"}}}},"sauth-403-invalid-credentials-in-body":{"description":"Invalid credentials in request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"}}}},"sauth-403-forbidden":{"description":"Insufficient permissions or wrong JWT scope (for example, profile token where a workspace token was required)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"}}}},"sauth-406-account-locked":{"description":"Account is locked, password reset required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2021-09-15T10:01:16.203120Z","status":406,"error":"Banned","message":"Log in has been blocked","path":"/v2/auth/login/client","traceId":"61b4aa7c0cb1167a"}}}},"sauth-423-device-control-enabled":{"description":"Device control is enabled, device must be authorized (link sent by email)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sauth-4xx-base"},"example":{"timestamp":"2021-09-15T10:01:16.203120Z","status":423,"error":"Locked","message":"Device login blocked","path":"/v2/auth/login/client","traceId":"61b4aa7c0cb1167a"}}}},"schema-service-genericError":{"description":"See error message for details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-ErrorSchemaService"}}}},"schema-service-processedDocumentJsonResponse":{"description":"Processed document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-documentContentProcessed"}}}},"schema-service-rawDocumentJsonResponse":{"description":"Details of the document (content isn't processed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-Document"}}}},"schema-service-401":{"description":"Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-AuthError"}}}},"schema-service-403":{"description":"Forbidden; insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-AuthError"}}}},"schema-service-404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-ErrorSchemaService"}}}},"uauth-423":{"description":"Access denied by IP policy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/uauth-Error"}}}}},"requestBodies":{"ai-stats-RecoStatsRequest":{"description":"Request for recommendation campaigns stats.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaignIds":{"type":"array","minItems":1,"items":{"type":"string"},"description":"List of campaign IDs for which the statistics are requested. Must not be empty."},"from":{"type":"string","format":"date","description":"Upper bound of the interval for which the statistics will be retrieved.  \nMust be provided with `to`, otherwise the filter is treated as unspecified.  \nIf not specified, the interval is last 7 days.\n"},"to":{"type":"string","format":"date","description":"Lower bound of the interval for which the statistics will be retrieved.  \nMust be provided with `from`, otherwise the filter is treated as unspecified.  \nIf not specified, the interval is last 7 days.\n"},"timeZone":{"type":"string","description":"Time zone identifier.","default":"UTC","example":"Europe/Warsaw"}},"required":["campaignIds"]}}}},"api-service-CreateClient-apiv4":{"description":"\nIn the request body, you must provide at least one of those identifiers: \n- `email`  \n  If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, email is NOT an identifier.\n- `phone`  \n  Phone is treated as an identifier only if no other identifier is provided. If this is the case and non-unique emails are disabled, an anonymous profile is created with a randomized email placeholder.\n- `customId`\n- `uuid`\n","content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/components/schemas/api-service-CreateClientRequestBody-apiv4"}]}}}},"items-search-ListingJsonBody":{"description":"Request for item listing","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-ListingRequest"}}}},"items-search-ExplainListingJsonBody":{"description":"Request for item listing with explanation","required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/items-search-ListingRequest"},{"type":"object","properties":{"crossWorkspaceMode":{"$ref":"#/components/schemas/items-search-CrossWorkspaceMode"}}}]}}}},"items-search-FullTextSearchJsonBody":{"description":"Request for performing full-text search","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-FullTextSearchRequest"}}}},"items-search-ExplainFullTextSearchJsonBody":{"description":"Request for performing full-text search with explanation","required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/items-search-FullTextSearchRequest"},{"type":"object","properties":{"crossWorkspaceMode":{"$ref":"#/components/schemas/items-search-CrossWorkspaceMode"}}}]}}}},"items-search-AutocompleteJsonBody":{"description":"Request for performing an autocomplete search","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-AutocompleteRequest"}}}},"items-search-ExplainAutocompleteJsonBody":{"description":"Request for performing an autocomplete search with explanation","required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/items-search-AutocompleteRequest"},{"type":"object","properties":{"crossWorkspaceMode":{"$ref":"#/components/schemas/items-search-CrossWorkspaceMode"}}}]}}}},"items-search-VisualSearchJsonBody":{"description":"Request for performing visual search","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-VisualSearchRequest"}},"multipart/form-data":{"schema":{"type":"object","properties":{"image":{"type":"string","format":"binary","description":"Uploaded image to be used in the visual search"},"params":{"type":"object","description":"Parameters of the search","properties":{"page":{"$ref":"#/components/schemas/items-search-PaginationPage"},"limit":{"$ref":"#/components/schemas/items-search-PaginationLimit"},"sortBy":{"$ref":"#/components/schemas/items-search-PaginationSortBy"},"ordering":{"$ref":"#/components/schemas/items-search-PaginationOrdering"},"includeMeta":{"$ref":"#/components/schemas/items-search-PaginationIncludeMeta"},"clientUUID":{"$ref":"#/components/schemas/items-search-ClientUUID"},"correlationId":{"$ref":"#/components/schemas/items-search-CorrelationId"},"searchId":{"$ref":"#/components/schemas/items-search-SearchId"},"sortByMetric":{"$ref":"#/components/schemas/items-search-SortByMetric"},"sortByGeoPoints":{"$ref":"#/components/schemas/items-search-SortByGeoPoint"},"filterGeoPoints":{"$ref":"#/components/schemas/items-search-FilterGeoPoints"},"filterAroundRadius":{"$ref":"#/components/schemas/items-search-FilterAroundRadius"},"filterAnchor":{"$ref":"#/components/schemas/items-search-FilterAnchor"},"filters":{"$ref":"#/components/schemas/items-search-Filters"},"facets":{"$ref":"#/components/schemas/items-search-Facets"},"facetsSize":{"$ref":"#/components/schemas/items-search-FacetsSize"},"maxValuesPerFacet":{"$ref":"#/components/schemas/items-search-MaxValuesPerFacet"},"caseSensitiveFacetValues":{"$ref":"#/components/schemas/items-search-CaseSensitiveFacetValues"},"includeFacets":{"$ref":"#/components/schemas/items-search-IncludeFacets"},"facetsOrderBy":{"$ref":"#/components/schemas/items-search-FacetsOrdering"},"context":{"$ref":"#/components/schemas/items-search-Context"},"displayAttributes":{"$ref":"#/components/schemas/items-search-DisplayAttributes"},"ignoreQueryRules":{"$ref":"#/components/schemas/items-search-IgnoreQueryRules"},"excludeQueryRules":{"$ref":"#/components/schemas/items-search-ExcludeQueryRules"},"params":{"$ref":"#/components/schemas/items-search-Params"}}}}}}}},"items-search-ExplainVisualSearchJsonBody":{"description":"Request for performing visual search with explanation","required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/items-search-VisualSearchRequest"},{"type":"object","properties":{"crossWorkspaceMode":{"$ref":"#/components/schemas/items-search-CrossWorkspaceMode"}}}]}}}},"items-search-QueryClassificationJsonBody":{"description":"Request for query classification","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"$ref":"#/components/schemas/items-search-SearchQuery"},"clientUUID":{"$ref":"#/components/schemas/items-search-ClientUUID"},"config":{"$ref":"#/components/schemas/items-search-QueryClassificationConfig"}}}}}},"items-search-config-PutSearchConfigJsonBody":{"description":"Request for posting search configuration","required":true,"content":{"application/json":{"schema":{"type":"object","required":["indexName","itemsCatalogId","language","searchableAttributes","enabled"],"properties":{"indexName":{"$ref":"#/components/schemas/items-search-config-IndexNameSchema"},"description":{"$ref":"#/components/schemas/items-search-config-IndexDescriptionSchema"},"itemsCatalogId":{"$ref":"#/components/schemas/items-search-config-ItemsCatalogIdSchema"},"language":{"$ref":"#/components/schemas/items-search-config-LanguageSchema"},"enabled":{"$ref":"#/components/schemas/items-search-config-EnabledSchema"},"ignoreUnavailableItems":{"$ref":"#/components/schemas/items-search-config-IgnoreUnavailableItemsSchema"},"scoring":{"$ref":"#/components/schemas/items-search-config-ScoringSchema"},"suggestions":{"$ref":"#/components/schemas/items-search-config-Suggestions"},"tokenizer":{"$ref":"#/components/schemas/items-search-config-Tokenizer"},"analyzers":{"$ref":"#/components/schemas/items-search-config-Analyzers"},"attributesWithoutPrefixSearch":{"$ref":"#/components/schemas/items-search-config-AttributesWithoutPrefixSearchSchema"},"attributesWithoutTypoTolerance":{"$ref":"#/components/schemas/items-search-config-AttributesWithoutTypoToleranceSchema"},"valuesWithoutTypoTolerance":{"$ref":"#/components/schemas/items-search-config-ValuesWithoutTypoToleranceSchema"},"typoToleranceOnNumericValues":{"$ref":"#/components/schemas/items-search-config-TypoToleranceOnNumericValuesSchema"},"searchableAttributes":{"$ref":"#/components/schemas/items-search-config-SearchableAttributesSchema"},"displayableAttributes":{"$ref":"#/components/schemas/items-search-config-DisplayableAttributesSchema"},"facetableAttributes":{"$ref":"#/components/schemas/items-search-config-FacetableAttributesSchema"},"filterableAttributes":{"$ref":"#/components/schemas/items-search-config-FilterableAttributesSchema"},"sortableAttributes":{"$ref":"#/components/schemas/items-search-config-SortableAttributesSchema"},"distinctFilterAttributes":{"$ref":"#/components/schemas/items-search-config-DistinctFilterAttributesSchema"},"recentSearches":{"$ref":"#/components/schemas/items-search-config-RecentSearchesConfig"},"reranking":{"$ref":"#/components/schemas/items-search-config-RerankingSchema"},"optimization":{"$ref":"#/components/schemas/items-search-config-OptimizationSchema"},"geoSearch":{"$ref":"#/components/schemas/items-search-config-GeoSearchSchema"},"queryRules":{"$ref":"#/components/schemas/items-search-config-QueryRulesSchema"}}}}}},"items-search-config-SuggestionIndexConfigBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"indexName":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexNameSchema"},"description":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexDescriptionSchema"},"author":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexAuthorSchema"},"enabled":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexEnabledSchema"},"sources":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexSourcesSchema"},"denylist":{"$ref":"#/components/schemas/items-search-config-SuggestionIndexDenylistSchema"}},"required":["indexName","enabled","sources"]}}}},"items-search-recent-DeletedSearchBody":{"description":"Request for deleting search query","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/items-search-recent-DeletedSearch"}}}},"query-rules-v2-postRuleBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/query-rules-v2-RuleName"},"author":{"$ref":"#/components/schemas/query-rules-v2-RuleAuthor"},"activeFrom":{"$ref":"#/components/schemas/query-rules-v2-RuleActiveFromDatetime"},"activeTo":{"$ref":"#/components/schemas/query-rules-v2-RuleActiveToDatetime"},"timezone":{"$ref":"#/components/schemas/query-rules-v2-RuleTimezoneSchema"},"data":{"$ref":"#/components/schemas/query-rules-v2-RuleDataSchema"}}}}},"description":"Request for posting a new rule or updating an existing one","required":true},"recommendations-config-PatchRecommendationConfigV3JsonBody":{"description":"Request for updating AI Engine configuration","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"distinctAttributes":{"$ref":"#/components/schemas/recommendations-config-DistinctAttributesSchema"},"previewAttributes":{"$ref":"#/components/schemas/recommendations-config-PreviewAttributesSchema"},"displayedAttributes":{"$ref":"#/components/schemas/recommendations-config-DisplayedAttributesSchema"},"linkAttributes":{"$ref":"#/components/schemas/recommendations-config-LinkAttributesSchema"},"models":{"$ref":"#/components/schemas/recommendations-config-ModelsSchema"},"crossWorkspaceMode":{"$ref":"#/components/schemas/recommendations-config-CrossWorkspaceMode"},"personalizedPromotions":{"$ref":"#/components/schemas/recommendations-config-PersonalizedPromotionsSchema"}}}}}},"schema-service-createDocumentReq":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema-service-createDocumentReq"}}}},"schema-service-generateDocumentReq":{"content":{"application/json":{"schema":{"type":"object","example":{"customer.firstName":"Joe"},"additionalProperties":{"$ref":"#/components/schemas/schema-service-additionalPropertiesForGenerate"}}}}},"synonyms-crud-PostSynonymBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/synonyms-crud-Type"},"word":{"$ref":"#/components/schemas/synonyms-crud-Word"},"synonyms":{"$ref":"#/components/schemas/synonyms-crud-Synonyms"},"confidence":{"$ref":"#/components/schemas/synonyms-crud-Confidence"},"reason":{"$ref":"#/components/schemas/synonyms-crud-Reason"},"source":{"$ref":"#/components/schemas/synonyms-crud-SynonymSource"},"state":{"$ref":"#/components/schemas/synonyms-crud-SynonymState"}},"required":["synonyms"]}}},"description":"Request for creating new synonym","required":true},"synonyms-crud-CsvBody":{"description":"\nThe CSV has three columns: \n- `word`: the phrase to replace with a synonym\n- `synonyms`: the synonyms of the word (if more than one, the list is comma-separated and enclosed with `\"\"`)\n- `type`: the relation type:\n  - `oneway`: when the word is searched, the results show the results as if the synonyms were searched. Searching for the synonyms does NOT return results for the word or the other synonyms.\n  - `synonyms`: the `word` column is empty, all phrases in `synonym` return results for every other phrase in the list.\n","required":true,"content":{"text/csv":{"schema":{"type":"object","properties":{"word":{"$ref":"#/components/schemas/synonyms-crud-Word"},"synonyms":{"$ref":"#/components/schemas/synonyms-crud-Synonyms"},"type":{"$ref":"#/components/schemas/synonyms-crud-Type"}}},"example":"word,synonyms,type\ndog,\"doggy,puppy\",oneway\nsmall horse,pony,oneway\n,\"cat,kitten,kitty,tabby cat\",synonyms\n"},"multipart/form-data":{"schema":{"type":"object","properties":{"synonyms":{"type":"string","format":"binary","description":"Uploaded CSV file to be used in synonyms update"}}}}}},"tags-collector-HashArray-collector":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string","description":"Hash ID of a tag"}}}},"required":true}}},"x-tagGroups":[{"name":"Authorization","tags":["Authorization","Authorization (deprecated)"]},{"name":"Data Management","tags":["Events","AI Events","Activities","Catalogs","Asset tags","Tags","Profile management","Analytics: Expressions","Analytics: Aggregates"]},{"name":"Profile Management","tags":["Profile registration","Profile account management","Profile devices"]},{"name":"Identity and Access Management","tags":["Settings","Access control","User management","Access groups","User account management","Directory"]},{"name":"AI Recommendations","tags":["Recommendation campaigns","Recommendation statistics","Recommendations"]},{"name":"AI Search","tags":["Search","Visual Search","Listing","Synonyms","Search Configuration","Suggestions Configuration","Query Rules","Search Stats"]},{"name":"Loyalty and Engagement","tags":["Promotions","Vouchers","Handbills","Screen views","Promotions points","Promotion settings","Promotion locks","Screen views (legacy)"]},{"name":"AI Suite","tags":["Time Optimizer","Item filters"]},{"name":"Asset Management","tags":["Documents","Uploader","Documents (legacy)"]},{"name":"Campaigns","tags":["Templates","Template directories"]},{"name":"Automation","tags":["Workflows","Workflow schedules","Control Center","Data Processing Job Logs"]},{"name":"Organizations","tags":["Consumption","Organization workspaces"]},{"name":"Analytics Suite","tags":["Analytics: Funnels","Analytics: Histograms","Analytics: Metrics","AI: Metrics","Analytics: Reports","Analytics: Sankeys","Analytics: Segmentations","Analytics: Trends","Analytics: Management"]},{"name":"Brickworks","tags":["Brickworks: Schemas","Brickworks: Records","Brickworks: Content generation","Brickworks: External sources","Brickworks: Record versions"]}]}