Update Widget


                https://api.ocamba.com/v2/adex/widgets/{id}
            

Updates the specific Widget by setting the values of the parameters passed


Name
Description
idstringrequired
Unique identifier for the object defined as a path parameter.


Example: 12345

Name
Description
contentstring
The widget content. This is the place where you can put HTML content with replacable fragments(macros). Where HTML page is rendered, placeholders are replaced with real macro values.

macros[ widget-macro ]
The array of macro objects.
Macro
Name
Description
namestring
The macro name.


Example: TITLE

requirednumber (int)
Acceptable values are - 0/1.


Example: 1

typestring
At this time only text macros are supported.


Example: text

namestringrequired
The widget name.


Example: My first widget

204 - No Content
Arrow

tip
1 If you don't know the widget id, list the widgets to find it.
note
1 Updatable fields are - name, content and macros.

200 Arrow
{
  "name": "HTML Widget",
  "content": "<html>\n<head>\n<meta name=\"viewport\" content=\"width=device-width, minimum-scale=0.1\">\n<title>widget</title>\n<style>\n.widget{width:320px;}\n.widget > article{display:inline-block;position:relative;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;}\n.widget > article > span {position:absolute;top:1px;right:1px;z-index:2;display: flex;background-color:#fff}\n.widget > article > span > a > i{margin:0 0 0 1px;width:16px;height:16px;display:block;}\n.widget > article > a{z-index:1;text-decoration:none;color:unset;}\n.widget > article > a > img{display: block;max-width: 100%;height: auto;}\n.widget > article > a > section {padding:8px 0 0 0;display:block;}\n.widget > article > a > section > h1{padding:0;margin:0;font-size:20px;font-weight:600;color:#000;text-align:left;line-height:1;display:block;}\n.widget > article > a > section > h1:hover{text-decoration:underline;}\n.widget > article > a > section > h2{padding:8px 0 0 0;margin:0;font-size:12px;font-weight:600;color:#000;text-align:left;line-height:1;display:block;opacity:0.4;}\n.widget > article > a > section > h3{padding:8px 0 0 0;margin:0;font-size:12px;font-weight:400;color:#0a6735;text-align:left;line-height:1;display:block;}\n.ico-clsa {background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImJhc2ljIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBhdGggZmlsbD0iIzQ4OEZDRCIgZD0iTTgsMTVjLTMuOSwwLTctMy4xLTctN3MzLjEtNyw3LTdzNywzLjEsNyw3UzExLjksMTUsOCwxNXogTTEzLjcsOGMwLTMuMi0yLjYtNS43LTUuNy01LjdTMi4zLDQuOSwyLjMsOHMyLjYsNS43LDUuNyw1LjdTMTMuNywxMS4yLDEzLjcsOHoiLz48cGF0aCBmaWxsPSIjNDg4RkNEIiBkPSJNMTEsNWMwLjIsMC4yLDAuMiwwLjYsMCwwLjhMOC44LDhsMi4xLDIuMWMwLjIsMC4yLDAuMiwwLjYsMCwwLjhjLTAuMiwwLjItMC42LDAuMi0wLjgsMEw4LDguOEw1LjksMTFjLTAuMiwwLjItMC42LDAuMi0wLjgsMHMtMC4yLTAuNiwwLTAuOEw3LjIsOEw1LDUuOUM0LjgsNS42LDQuOCw1LjMsNSw1czAuNi0wLjIsMC44LDBMOCw3LjJMMTAuMSw1QzEwLjQsNC44LDEwLjcsNC44LDExLDV6Ii8+PC9zdmc+);}\n</style>\n</head>\n<body>\n<div class=\"widget\">\n <article>\n  <span><a><i class=\"ico-clsa\"></i></a></span>\n  <a href=\"${LANDING_URL}\">\n   <img src=\"${IMAGE}\">\n   <section>\n    <h1>${TITLE}</h1>\n    <span>${SPONSORED}</span>\n    <h2>${DESCRIPTION}</h2>\n   </section>\n  </a>\n </article>\n</div>\n</body>\n</html>",
  "macros": [
      {
          "name": "LANDING_URL",
          "type": "text",
          "required": "1"
      },
      {
          "name": "IMAGE",
          "type": "text",
          "required": "1"
      },
      {
          "name": "TITLE",
          "type": "text",
          "required": "1"
      },
      {
          "name": "SPONSORED",
          "type": "text",
          "required": "0"
      },
      {
          "name": "DESCRIPTION",
          "type": "text",
          "required": "0"
      }
  ]
}