{
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "",
    "title": "AIsa Connect",
    "version": "1",
    "x-aisa-capabilities": {
      "idempotency": "Idempotency-Key",
      "max_price": "X-AISA-Max-Price-USD",
      "quote": {
        "header": "X-AISA-Cost-Mode",
        "value": "quote"
      }
    },
    "x-aisa-catalogs": {
      "aisa-connector": {
        "description": "",
        "title": "AIsa Connect",
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          }
        },
        "x-aisa-document": {
          "facts_hash": "b83047fcbad985ec640307ba4d7ee6b8b135df80af28491269fd477fef52cd1d",
          "generator_version": "3",
          "protocol_version": "1",
          "schema_version": "1"
        },
        "x-aisa-plans": {
          "builder": 1.0,
          "display_plan": "payg",
          "payg": 1.0,
          "similarweb_payg": 1.0,
          "team": 1.0,
          "version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb"
        }
      }
    },
    "x-aisa-configured-paths": [],
    "x-aisa-document": {
      "composer_version": "29",
      "document_hash": "sha256:ffeb1bcabe16d8324da561333e97d1833d996b21d740c005325ad0c624ff0b8f",
      "facts_hash": "b83047fcbad985ec640307ba4d7ee6b8b135df80af28491269fd477fef52cd1d",
      "generator_version": "3",
      "protocol_version": "1",
      "response_pending": [],
      "schema_version": "1"
    },
    "x-aisa-plans": {
      "builder": 1.0,
      "display_plan": "payg",
      "payg": 1.0,
      "similarweb_payg": 1.0,
      "team": 1.0,
      "version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb"
    },
    "x-aisa-provider": "aisa-connector"
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "openapi": "3.1.0",
  "paths": {
    "/apis/v1/connector/actions/run": {
      "post": {
        "description": "Runs one action as one of your end users, on connectionId or on the end user's newest active connection of the action's app. The input is checked against the action's input schema before anything is sent; the action is sent once and never retried. Send an Idempotency-Key to retry safely.\n\n<!-- aisa-pricing:start -->\n公开参考价格：每次成功请求 $0.0003 USD。 最终费用以账户适用价格及实际结算为准。\n<!-- aisa-pricing:end -->",
        "operationId": "post_aisa_connector_apis_v1_connector_actions_run",
        "parameters": [
          {
            "description": "A retry with the same key never runs the action again and is never charged again: it answers the first run's result, or idempotency_conflict while the first run is still in progress. AIsa never retries a run for you.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 191,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "actionKey": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "connectionId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "externalUserId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "input": {}
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "connectionId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "output": {},
                    "runId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Run an action",
        "x-aisa-capabilities": {
          "capability": "connector.run_action@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "connector:write"
        },
        "x-aisa-catalog-id": "aisa-connector",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-connector/post_aisa_connector_apis_v1_connector_actions_run",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "customer_micros_usd": 300,
          "customer_pricing_ref": "connector.run_action.v1.pricing@1",
          "description": "Charged once per action run that succeeded, at the price per run shown here: AIsa's own cost for the run. This is the price on every plan; no plan multiplier applies. A run that did not succeed is never charged: refused before it is sent (invalid input, no connection, reconnect required, unknown action, rate limited), failed in the app, failed in AIsa or the app integration, or with an unknown outcome. Every run answers its charge in X-AISA-Customer-Cost-Micros-USD. Reading the catalog, connecting and listing connections are free.",
          "kind": "fixed_request",
          "unit": "connector_run"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "2089d89c0bca59fd0e523ddaa7cd66a8391747fb14795aa33aad589ccdc32459"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_connector_apis_v1_connector_actions_run",
          "path": "/apis/v1/connector/actions/run"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/connector/actions/{actionKey}": {
      "get": {
        "description": "One action, by key (<app>.<name>).\n\n<!-- aisa-pricing:start -->\n不收费。\n<!-- aisa-pricing:end -->",
        "operationId": "get_aisa_connector_apis_v1_connector_actions_actionkey",
        "parameters": [
          {
            "in": "path",
            "name": "actionKey",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "app": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "inputSchema": {},
                    "key": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "operationType": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "outputSchema": {},
                    "requiredScopes": {
                      "items": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get an action",
        "x-aisa-capabilities": {
          "capability": "connector.get_action@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "connector:read"
        },
        "x-aisa-catalog-id": "aisa-connector",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-connector/get_aisa_connector_apis_v1_connector_actions_actionkey",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "No AIsa charge applies to this operation.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "061fd8ad719bf897360411f46916ebb8ffd719ea0e0ed5f0ecd983aa31198899"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_connector_apis_v1_connector_actions_actionkey",
          "path": "/apis/v1/connector/actions/{actionKey}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/connector/apps": {
      "get": {
        "description": "The apps your end users can connect. q searches names, aliases and categories. authTypes says how each connects: oauth2 through the hosted page (GET /connect/{app}), api_key or custom_credential with POST /connect/{app}/credentials, with the fields the app's documentation names (Shopify's are apiKey and shopDomain).\n\n<!-- aisa-pricing:start -->\n不收费。\n<!-- aisa-pricing:end -->",
        "operationId": "get_aisa_connector_apis_v1_connector_apps",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "aliases": {
                            "items": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "authTypes": {
                            "items": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "categories": {
                            "items": {
                              "properties": {
                                "id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "documentationUrl": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "homepageUrl": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "iconUrl": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "key": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List apps",
        "x-aisa-capabilities": {
          "capability": "connector.list_apps@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "connector:read"
        },
        "x-aisa-catalog-id": "aisa-connector",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-connector/get_aisa_connector_apis_v1_connector_apps",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "No AIsa charge applies to this operation.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "404e976a4dc3402732d65180ba56cfd1ba4fe81763a68a288609399f9fd2b5c0"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_connector_apis_v1_connector_apps",
          "path": "/apis/v1/connector/apps"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/connector/apps/{app}/actions": {
      "get": {
        "description": "The actions an app offers, each with its operation type (read, write or destructive) and the JSON Schema of its input.\n\n<!-- aisa-pricing:start -->\n不收费。\n<!-- aisa-pricing:end -->",
        "operationId": "get_aisa_connector_apis_v1_connector_apps_app_actions",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "app": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "inputSchema": {},
                          "key": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "operationType": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "outputSchema": {},
                          "requiredScopes": {
                            "items": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          }
                        },
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List the actions of an app",
        "x-aisa-capabilities": {
          "capability": "connector.list_actions@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "connector:read"
        },
        "x-aisa-catalog-id": "aisa-connector",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-connector/get_aisa_connector_apis_v1_connector_apps_app_actions",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "No AIsa charge applies to this operation.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "3d0c848b3557f7b76d9e7ddf4639a5e1b72a33a5c4c4672d3b4255fa57515b2a"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_connector_apis_v1_connector_apps_app_actions",
          "path": "/apis/v1/connector/apps/{app}/actions"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/connector/connect/sessions/{sessionId}": {
      "get": {
        "description": "A connect session you started: its state and, once completed, the connection it made.\n\n<!-- aisa-pricing:start -->\n不收费。\n<!-- aisa-pricing:end -->",
        "operationId": "get_aisa_connector_apis_v1_connector_connect_sess_bfc4e5",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "app": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "connectionId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "isUserFixable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "expiresAt": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "state": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get a connect session",
        "x-aisa-capabilities": {
          "capability": "connector.get_connect_session@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "connector:read"
        },
        "x-aisa-catalog-id": "aisa-connector",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-connector/get_aisa_connector_apis_v1_connector_connect_sess_bfc4e5",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "No AIsa charge applies to this operation.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "5a5d87fa6caf1245c63c30b1e1936798e1a80714407abf5d1c93c1f77d3fbbaf"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_connector_apis_v1_connector_connect_sess_bfc4e5",
          "path": "/apis/v1/connector/connect/sessions/{sessionId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/connector/connect/{app}": {
      "get": {
        "description": "Starts connecting an app account through the AIsa hosted page for one of your end users. Send the end user to connectUrl, then poll the connect session. connectionId reauthorizes one of the end user's connections in place.\n\n<!-- aisa-pricing:start -->\n不收费。\n<!-- aisa-pricing:end -->",
        "operationId": "get_aisa_connector_apis_v1_connector_connect_app",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your id for the end user the account belongs to.",
            "in": "query",
            "name": "externalUserId",
            "required": true,
            "schema": {
              "maxLength": 250,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "description": "Where the browser goes when the flow ends; it must be on your redirect allowlist.",
            "in": "query",
            "name": "redirectUrl",
            "required": false,
            "schema": {
              "format": "uri",
              "type": "string"
            }
          },
          {
            "description": "One of the end user's connections to reauthorize.",
            "in": "query",
            "name": "connectionId",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "connectSessionId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "connectUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "expiresAt": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Connect an app account",
        "x-aisa-capabilities": {
          "capability": "connector.start_connect@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "connector:write"
        },
        "x-aisa-catalog-id": "aisa-connector",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-connector/get_aisa_connector_apis_v1_connector_connect_app",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "No AIsa charge applies to this operation.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "55fd66cd7c9fd5c7c99d4a51ebbbc7a5228acab221a2c14c1e294365ab1a0fce"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_connector_apis_v1_connector_connect_app",
          "path": "/apis/v1/connector/connect/{app}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/connector/connect/{app}/credentials": {
      "post": {
        "description": "Connects an app account with credentials the end user brings, named as the app names them. Send them in credentials; apiKey is shorthand for credentials.apiKey, so an app that takes only a key needs only apiKey, and Shopify takes {\"apiKey\": \"<Admin API access token>\", \"credentials\": {\"shopDomain\": \"<shop>.myshopify.com\"}}. A missing required field or a field the app does not take is refused with invalid_request; credentials the app rejects are connect_failed. The app checks them before the connection is made; AIsa neither stores nor returns them.\n\n<!-- aisa-pricing:start -->\n不收费。\n<!-- aisa-pricing:end -->",
        "operationId": "post_aisa_connector_apis_v1_connector_connect_app_0fbeef",
        "parameters": [
          {
            "in": "path",
            "name": "app",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "apiKey": {
                    "description": "The app's API key; shorthand for credentials.apiKey. Send it once.",
                    "maxLength": 4096,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "credentials": {
                    "additionalProperties": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": "The credentials the app takes (for its api_key or custom_credential auth type), as strings.",
                    "maxProperties": 16,
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "externalUserId": {
                    "description": "Your id for the end user the account belongs to.",
                    "maxLength": 250,
                    "minLength": 1,
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "app": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "connectedAt": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "externalUserId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "scopes": {
                      "items": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Connect an app account with credentials",
        "x-aisa-capabilities": {
          "capability": "connector.connect_with_credentials@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "connector:write"
        },
        "x-aisa-catalog-id": "aisa-connector",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-connector/post_aisa_connector_apis_v1_connector_connect_app_0fbeef",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "No AIsa charge applies to this operation.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "d53f709c893e8c2f528a8a6ed08328526e0c5e752296a45a042d11a5e65335ac"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_connector_apis_v1_connector_connect_app_0fbeef",
          "path": "/apis/v1/connector/connect/{app}/credentials"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/connector/connections": {
      "get": {
        "description": "Your end users' live connections, newest first.\n\n<!-- aisa-pricing:start -->\n不收费。\n<!-- aisa-pricing:end -->",
        "operationId": "get_aisa_connector_apis_v1_connector_connections",
        "parameters": [
          {
            "in": "query",
            "name": "externalUserId",
            "required": false,
            "schema": {
              "maxLength": 250,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "app",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "app": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "connectedAt": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "externalUserId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "scopes": {
                            "items": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "status": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "updatedAt": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List connections",
        "x-aisa-capabilities": {
          "capability": "connector.list_connections@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "connector:read"
        },
        "x-aisa-catalog-id": "aisa-connector",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-connector/get_aisa_connector_apis_v1_connector_connections",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "No AIsa charge applies to this operation.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "5a7dae247046ade94a18d53668b935075868acedc746318c39081afe79da8d5b"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_connector_apis_v1_connector_connections",
          "path": "/apis/v1/connector/connections"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/connector/connections/{connectionId}": {
      "delete": {
        "description": "Removes the connected account from the app integration and marks the connection disconnected.\n\n<!-- aisa-pricing:start -->\n不收费。\n<!-- aisa-pricing:end -->",
        "operationId": "delete_aisa_connector_apis_v1_connector_connectio_b41217",
        "parameters": [
          {
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "app": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "connectedAt": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "externalUserId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "scopes": {
                      "items": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Disconnect a connection",
        "x-aisa-capabilities": {
          "capability": "connector.disconnect_connection@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "connector:write"
        },
        "x-aisa-catalog-id": "aisa-connector",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-connector/delete_aisa_connector_apis_v1_connector_connectio_b41217",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "No AIsa charge applies to this operation.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "49d76ab60ead8ff4911f8fe521d6a345c9af96883b9c9ab1b9fea4f47eb308ea"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_connector_apis_v1_connector_connectio_b41217",
          "path": "/apis/v1/connector/connections/{connectionId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "One of your end users' connections.\n\n<!-- aisa-pricing:start -->\n不收费。\n<!-- aisa-pricing:end -->",
        "operationId": "get_aisa_connector_apis_v1_connector_connections__b41217",
        "parameters": [
          {
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "app": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "connectedAt": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "externalUserId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "scopes": {
                      "items": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "updatedAt": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get a connection",
        "x-aisa-capabilities": {
          "capability": "connector.get_connection@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "connector:read"
        },
        "x-aisa-catalog-id": "aisa-connector",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-connector/get_aisa_connector_apis_v1_connector_connections__b41217",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "No AIsa charge applies to this operation.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "3b6b26755d40460eda123e09cdb3bf5539bf9f162adcee2d2a7afa89eedc0fac"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_connector_apis_v1_connector_connections__b41217",
          "path": "/apis/v1/connector/connections/{connectionId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ]
}
