POST /api/branding
実行中のアクティビティのブランドを変更します。
ブランドはstartで設定し、この呼び出しであとから変更します。送ったフィールドだけが変わり、空のフィールドは保存済みの値のままです。スマートフォンには何も送られず、この呼び出しは請求されません。アプリは次にアクティビティを読み込んだときに新しいブランドを表示します。
アクティビティIDで指定
1 2 3 4 5 6 7 8 9 10 11 12
curl -X POST https://api.webliveactivity.com/api/branding \ -H 'Content-Type: application/json' \ -H 'x-api-key: wla_your_key' \ -d '{ "activityId": "act-8f2cqa4mx7rd", "widgetContainerId": "acme-orders", "brand": { "title": "Order #1234 (updated)", "name": "Acme v2", "description": "Now with faster delivery" } }'
グループで指定
1 2 3 4 5 6 7 8 9 10 11
curl -X POST https://api.webliveactivity.com/api/branding \ -H 'Content-Type: application/json' \ -H 'x-api-key: wla_your_key' \ -d '{ "group": "order-tracker", "widgetContainerId": "acme-orders", "brand": { "logo": "https://acme.example/seasonal-logo.png", "color": "#E8372C" } }'
コンテナで指定
widgetContainerIdだけを送ると(activityIdやgroupなし)、コンテナ内のすべてのアクティビティのブランドを変更します。
1 2 3 4 5 6 7 8 9 10
curl -X POST https://api.webliveactivity.com/api/branding \ -H 'Content-Type: application/json' \ -H 'x-api-key: wla_your_key' \ -d '{ "widgetContainerId": "acme-orders", "brand": { "logo": "https://acme.example/logo-v2.png", "color": "#06C167" } }'
レスポンス
{ ok, targeted, unknown }を返します。ブランドを変更したアクティビティの数と、見つからなかったIDです。
1 2 3 4 5
{ "ok": true, "targeted": 12, "unknown": [] }
例
ブランドの全項目の更新
1回の呼び出しでブランドのすべてのフィールドを指定します。
1 2 3 4 5 6 7 8 9 10 11 12 13
curl -X POST https://api.webliveactivity.com/api/branding \ -H 'Content-Type: application/json' \ -H 'x-api-key: wla_your_key' \ -d '{ "widgetContainerId": "acme-orders", "brand": { "title": "Acme Fresh Order", "name": "Acme Fresh", "logo": "https://fresh.acme.example/logo.png", "description": "Fresh groceries, delivered fast", "color": "#2ECC71" } }'
すでに画面に表示されているカードのブランド名は、カードが再起動したときにだけ変わります。カードの色を変えるには、updateでstate.accentColorHexを送ります。









