{
 "openapi": "3.1.0",
 "info": {
  "title": "Network Connections (EHR)",
  "version": "20261030b",
  "description": "Surescripts, clearinghouses and HL7 partners: the transport, the identities in the envelope and the control numbers. Credentials are sealed and never shown again. With no live connection the sandbox answers."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "interop-connections": {
    "type": "object",
    "required": [
     "code",
     "name",
     "kind"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "code": {
      "type": "string",
      "description": "Code"
     },
     "name": {
      "type": "string",
      "description": "Name"
     },
     "kind": {
      "type": "string",
      "description": "Kind",
      "enum": [
       "surescripts",
       "clearinghouse",
       "hl7"
      ]
     },
     "transport": {
      "type": "string",
      "description": "Transport",
      "enum": [
       "sandbox",
       "https",
       "sftp",
       "mllp",
       "file"
      ]
     },
     "endpoint_url": {
      "type": "string",
      "description": "Endpoint address"
     },
     "host": {
      "type": "string",
      "description": "Host"
     },
     "port": {
      "type": "integer",
      "description": "Port"
     },
     "username": {
      "type": "string",
      "description": "User name"
     },
     "secret_sealed": {
      "type": "string",
      "description": "Secret sealed",
      "readOnly": true
     },
     "client_cert_pem": {
      "type": "string",
      "description": "Client cert pem",
      "readOnly": true
     },
     "client_key_sealed": {
      "type": "string",
      "description": "Client key sealed",
      "readOnly": true
     },
     "ca_cert_pem": {
      "type": "string",
      "description": "Ca cert pem",
      "readOnly": true
     },
     "submitter_id": {
      "type": "string",
      "description": "Submitter id (ISA06)"
     },
     "submitter_name": {
      "type": "string",
      "description": "Submitter name"
     },
     "receiver_id": {
      "type": "string",
      "description": "Receiver id (ISA08)"
     },
     "receiver_name": {
      "type": "string",
      "description": "Receiver name"
     },
     "usage_indicator": {
      "type": "string",
      "description": "Test or production",
      "enum": [
       "T",
       "P"
      ]
     },
     "isa_control_seq": {
      "type": "string",
      "format": "decimal",
      "description": "Isa control seq",
      "readOnly": true
     },
     "gs_control_seq": {
      "type": "string",
      "format": "decimal",
      "description": "Gs control seq",
      "readOnly": true
     },
     "account_id": {
      "type": "string",
      "description": "Network account id"
     },
     "portal_id": {
      "type": "string",
      "description": "Portal id"
     },
     "settings": {
      "type": "object",
      "description": "Settings",
      "readOnly": true
     },
     "is_default": {
      "type": "boolean",
      "description": "Default for its kind"
     },
     "is_active": {
      "type": "boolean",
      "description": "Active"
     },
     "last_used_at": {
      "type": "string",
      "format": "date-time",
      "description": "Last used at",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/ehr/interop-connections": {
   "get": {
    "summary": "list interop-connections",
    "operationId": "list_interop_connections_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create interop-connections",
    "operationId": "create_interop_connections_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/ehr/interop-connections/{id}": {
   "get": {
    "summary": "get interop-connections",
    "operationId": "get_interop_connections_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change interop-connections",
    "operationId": "change_interop_connections_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete interop-connections",
    "operationId": "delete_interop_connections_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/ehr/interop-connections/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_interop_connections_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/ehr/interop-connections/{id}/credentials": {
   "post": {
    "summary": "Credentials",
    "operationId": "action_interop_connections_0_6",
    "description": "Body keys: secret, clientKeyPem, clientCertPem, caCertPem",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}