get_view_default

Get the view in force

read entity tenant-private since 2026-10-01

Answers which saved view a screen opens with for the caller (mode sales: the Sales catalog), and why: the view they opened (view_id), else their own default, else the org default an org admin set, else none, the four fixed keys (market, size, type, condition) with nothing split. It answers the view's capability and args, ready to call, and both defaults while the caller may open them. A default whose view the caller can no longer open is passed over.

Contract

shape
entity
authority
read
evidence
none
subscription
false
permission
any one of: org.member (carried by the caller's role template in the org `org_id`); a deactivated caller is refused first
idempotency
safe
emits
none
MCP tool
get_view_default
REST
POST https://api.containertradehq.com/v1/cap/get_view_default

Idempotency: a read: calling again changes nothing

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 saved view the caller opened, which is in force over any default.

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

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

Surfaces

DesktopF
MobileF
APIF
MCPF
VoiceD4
PushN
OneBoxN
OutboundN
  • Voice: degraded: visualization
  • Push: emits nothing
  • OneBox: no document originates a saved view
  • Outbound: a read emits nothing

Events

None emitted.

Related

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