set_org_view_default

Set the org default view

act entity tenant-private since 2026-10-01

Sets the org's default view for a screen (mode sales: the Sales catalog), which every member opens with unless they set their own. Org admins only. Leave out view_id to reset to the four fixed keys. The view must be shared org-read or org-write (view_not_shared otherwise). Answers the view now in force for the caller, as get_view_default does.

Contract

shape
entity
authority
act
evidence
none
subscription
false
permission
any one of: org.admin (carried by the caller's role template in the org `org_id`); a deactivated caller is refused first
idempotency
natural
emits
none
MCP tool
set_org_view_default
decision_set
approve, reject
REST
POST https://api.containertradehq.com/v1/cap/set_org_view_default

Through MCP this call returns an approval request first; see Approvals.

Idempotency: keyed by the contract's own inputs: the same inputs replay the first call's result

Inputs

nametyperequiredvalidation
org_idorg_idrequiredtradehq-org-id; 1 to 20 characters
The org whose views they are.
modeone_ofrequiredone of sales
Which screen's default: sales, the Sales catalog.
view_idtextoptional1 to 64 characters
The shared saved view every member opens with. Leave out to reset to the four fixed keys.

Response

  • mode · string · The mode: sales, the Sales catalog.
  • in_force · string · Which view applies: opened (the saved view the caller opened), mine (their own default), org (the org default an org admin set) or fixed (none: the four fixed keys alone).
  • view_id · stringnull · The view in force; null when fixed.
  • title · stringnull · Its title; null when fixed.
  • capability · string · The capability the screen calls: the view's, or the mode's own when fixed.
  • args · object · The arguments in force: the view's, or when fixed nothing split, every source and cards.
  • grouped_by · string[] · The keys every group is grouped by, whatever view is in force: market, size, type and condition.
  • default_id · stringnull · The default in force, when it is mine or org; null when opened or fixed.
  • user_id · stringnull · Whose default is in force: the caller's when mine; null when org, opened or fixed.
  • set_by · stringnull · Who set the default in force (the org admin, for the org's); null when opened or fixed.
  • set_at · stringnull · When the default in force was set; null when opened or fixed.
  • my_default_view_id · stringnull · The caller's own default, while they may open it; null when none (reset to the org default).
  • org_default_view_id · stringnull · The org default, while the caller may open it; null when none (reset to the fixed keys).
Full JSON Schema
{
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "sales"
      ],
      "description": "The mode: sales, the Sales catalog.",
      "x-data-class": "operational"
    },
    "in_force": {
      "type": "string",
      "enum": [
        "opened",
        "mine",
        "org",
        "fixed"
      ],
      "description": "Which view applies: opened (the saved view the caller opened), mine (their own default), org (the org default an org admin set) or fixed (none: the four fixed keys alone).",
      "x-data-class": "operational"
    },
    "view_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The view in force; null when fixed.",
      "x-data-class": "operational"
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "Its title; null when fixed.",
      "x-data-class": "operational"
    },
    "capability": {
      "type": "string",
      "enum": [
        "list_inventory",
        "summarize_catalog",
        "list_catalog"
      ],
      "description": "The capability the screen calls: the view's, or the mode's own when fixed.",
      "x-data-class": "operational"
    },
    "args": {
      "type": "object",
      "properties": {
        "filters": {
          "type": "object",
          "description": "The list's filters input, as the capability declares it."
        },
        "q": {
          "type": "string",
          "description": "The list's q input."
        },
        "sort": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "description": "One of the called capability's sort keys."
              },
              "dir": {
                "type": "string",
                "enum": [
                  "asc",
                  "desc"
                ],
                "description": "Leave out for the key's own direction."
              }
            },
            "required": [
              "key"
            ],
            "additionalProperties": false
          },
          "description": "The list's sort input: one key and its direction."
        },
        "fields": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list's fields input."
        },
        "limit": {
          "type": "integer",
          "description": "The list's limit input."
        },
        "split_by": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A Sales catalog view's split_by, in the order the attributes were switched on (summarize_catalog's input)."
        },
        "slice": {
          "type": "string",
          "enum": [
            "owned",
            "partner",
            "supplier",
            "all"
          ],
          "description": "A Sales catalog view's source slice: owned, partner, supplier or all."
        },
        "layout": {
          "type": "string",
          "enum": [
            "cards",
            "rows"
          ],
          "description": "A Sales catalog view's layout: cards or rows."
        }
      },
      "additionalProperties": false,
      "description": "The arguments in force: the view's, or when fixed nothing split, every source and cards.",
      "x-data-class": "operational"
    },
    "grouped_by": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The keys every group is grouped by, whatever view is in force: market, size, type and condition.",
      "x-data-class": "operational"
    },
    "default_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The default in force, when it is mine or org; null when opened or fixed.",
      "x-data-class": "operational"
    },
    "user_id": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "maxLength": 20,
      "pattern": "^[A-Za-z0-9_-]{1,20}$",
      "format": "tradehq-user-id",
      "description": "Whose default is in force: the caller's when mine; null when org, opened or fixed.",
      "x-data-class": "operational"
    },
    "set_by": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "maxLength": 20,
      "pattern": "^[A-Za-z0-9_-]{1,20}$",
      "format": "tradehq-user-id",
      "description": "Who set the default in force (the org admin, for the org's); null when opened or fixed.",
      "x-data-class": "operational"
    },
    "set_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the default in force was set; null when opened or fixed.",
      "x-data-class": "operational"
    },
    "my_default_view_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The caller's own default, while they may open it; null when none (reset to the org default).",
      "x-data-class": "operational"
    },
    "org_default_view_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The org default, while the caller may open it; null when none (reset to the fixed keys).",
      "x-data-class": "operational"
    }
  },
  "required": [
    "mode",
    "in_force",
    "view_id",
    "title",
    "capability",
    "args",
    "grouped_by",
    "default_id",
    "user_id",
    "set_by",
    "set_at",
    "my_default_view_id",
    "org_default_view_id"
  ],
  "additionalProperties": false
}

Refusals

  • unknown_view · 422 · the org has no view by that id that the caller may read
  • view_not_shared · 422 · an org default is a view every member can open: shared org-read or org-write

The platform refusals apply to every call: version, authentication, authority, validation and rate limits, each in the same envelope.

Surfaces

DesktopF
MobileF
APIF
MCPF*
VoiceD2
PushN
OneBoxN
OutboundN
  • MCP: approval required
  • Voice: degraded: confirmation
  • Push: emits nothing
  • OneBox: no document originates a saved view
  • Outbound: crosses to no counterparty

Events

None emitted.

Related

create_api_key, create_service_account, delete_view, get_api_usage, get_view, get_view_default, list_saved_views, pin_view, save_view, set_my_view_default, share_view