Platform - BevvyTech/BrewskiDocs GitHub Wiki

Platform Settings & Flags

Method Path Description
GET /platform/settings Fetch one or more platform-wide configuration entries.
POST /platform/settings Upsert platform settings in bulk (super/support operators only).

GET /platform/settings

  • Auth: Bearer token. Caller must belong to a team with role su or support.
  • Query Parameters
    • keys (optional string, comma-separated) – limits the response to specific keys.
  • Response 200:
    {
      "settings": {
        "notice_strip_enable": true,
        "notice_strip_text": "Shipping delays expected due to bank holidays.",
        "notice_strip_link": "https://shop.brewskiapp.com/notices/shipping-delays"
      }
    }
  • Notes
    • Omit keys to receive every stored platform setting.
    • Missing keys are returned as null when keys is provided.
    • Keys are limited to 128 characters and must match [a-z0-9_.-]+.

POST /platform/settings

  • Auth: Bearer token with su or support team membership.
  • Body:
    {
      "settings": [
        { "key": "notice_strip_enable", "value": true },
        { "key": "notice_strip_text", "value": "Shipping delays expected due to bank holidays." },
        { "key": "notice_strip_link", "value": "https://shop.brewskiapp.com/notices/shipping-delays" }
      ]
    }
  • Response 200:
    {
      "settings": {
        "notice_strip_enable": true,
        "notice_strip_text": "Shipping delays expected due to bank holidays.",
        "notice_strip_link": "https://shop.brewskiapp.com/notices/shipping-delays"
      }
    }
  • Notes
    • Up to 25 key/value pairs are accepted per request; value: null clears the setting.
    • Requests that reference unknown keys create them automatically.
    • Keys use the same validation as the GET endpoint; attempts with disallowed characters are rejected with 400.
    • Every write runs inside a single transaction so either all settings apply or none do.
⚠️ **GitHub.com Fallback** ⚠️