Skip to Content
iAdvizeDocs

Correct what a connector's tools do with an order

Sets or clears a member's correction of each tool's order class, like the order select of the connector's page. The order lookup gate reads the class: a tool that reads orders goes to after-sales agents only, and only when its schema requires an order number and an email. A correction holds while the tool keeps its name, description and input schema, and never lets a tool with an order-number field through without a required email. Records a `connector.tool_classification_changed` audit entry. Refused while a holdout runs on a site whose live version uses the connector.

PUT
/api/v1/connectors/{connectorId}/tool-order-classes

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

A WorkOS org-scoped API key, created from the dashboard's organization settings page. Identifies the tenant every read and write is scoped to. Missing, malformed, unknown, revoked, expired, or non-organization-owned keys all return 401 (no distinction, so the response can't be used to probe which keys or org ids exist).

Path Parameters

connectorId*string

The connector id (prefixed conn_), from the site's connector list or the subject of a connector_unavailable or catalog_empty alert. A connector id that isn't yours, or that was deleted, is a 404.

Request Body

application/json
  1. body
classes*

Per tool name, the order class to set, or null to clear the member's correction. Between 1 and 100 tools the connector has recorded.

Response Body

The connector.

application/json
  1. response
data*

A connector of a site: an MCP server the site's agents can call. Every secret (token, secret header values) appears as a flag and is never returned.

Example Request
curl -X PUT 'https://example.com/api/v1/connectors/string/tool-order-classes' \  -H 'Content-Type: application/json' \  -d '{  "classes": {    "guest_order": "reads"  }}'
Example Response
{  "data": {    "id": "conn_01kvnwmagvf27rc9cze5rm9e1r",    "siteId": "site_01kvnwmagvf27rc9cze5rm9e1s",    "type": "adobe_commerce",    "name": "Adobe Commerce",    "url": "https://mcp.example-store.com/mcp",    "authMode": "token",    "connection": null,    "tokenSet": false,    "headers": [],    "settings": null,    "markets": [],    "tools": [      {        "name": "product_search",        "description": "Search the product catalog.",        "enabled": true,        "orderClass": "none",        "orderClassCorrected": false,        "orderGate": {          "status": "offered",          "reason": null        }      },      {        "name": "guest_order",        "description": "Look up a guest's order by its number, email and last name.",        "enabled": true,        "orderClass": "reads",        "orderClassCorrected": true,        "orderGate": {          "status": "after_sales_only",          "reason": null        }      }    ],    "disabledTools": [],    "orderCheck": {      "state": "off",      "reasons": []    },    "lastCheckedAt": "2026-11-19T10:00:00.000Z",    "lastAnsweredAt": "2026-11-19T10:00:00.000Z",    "dashboardUrl": "https://iadvize.ai/dashboard/sites/site_01kvnwmagvf27rc9cze5rm9e1s/connectors/conn_01kvnwmagvf27rc9cze5rm9e1r",    "createdAt": "2026-11-19T10:00:00.000Z",    "updatedAt": "2026-11-19T10:00:00.000Z"  }}

Refresh a connector's tools

Reads the tool list from the connector's server again, like the refresh of the connector's page: it lists the tools of each of the connector's endpoints, with no catalog search, and succeeds when any endpoint answers. When every endpoint answers, the listed tools replace the stored ones, so a tool the server no longer offers leaves the connector. When only some answer, the stored tools are kept and the listed ones are added: nothing is removed until a refresh reaches the whole connector. A tool seen for the first time is switched on or off by its type's default-tool rule; known tools keep their state. If a tool switch or a conversation changes the connector's tools while the refresh saves, it tries once more, then answers `connector_tools_changed` (409) with nothing saved. It records no audit entry, as in the dashboard.

Disconnect an OAuth connector

Disconnects an `oauth` connector, as Disconnect on its dashboard page: its sign-in with the vendor is erased, the vendor is asked to revoke it, and an open `connector_unavailable` alert on it is resolved. The agent stops calling the connector until a member signs in again from `connection.connectUrl`, in a browser: no API call can sign in. Its switched-off tools are kept. Records a `connector.oauth_disconnected` audit entry, attributed to the API key. A connector that is not connected is answered as it is, with nothing recorded. Refused while a holdout test runs on a site whose live version uses the connector.