{
 "openapi": "3.1.0",
 "info": {
  "title": "Supplier · Bank Details (Supply Chain)",
  "version": "20261030b",
  "description": "Where the money goes. Changing any identifier resets the verification — an emailed \"we have changed our bank\" is the commonest fraud there is."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "supplier-bank-accounts": {
    "type": "object",
    "required": [
     "supplier_id",
     "account_name",
     "bank_name"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "supplier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Supplier"
     },
     "site_id": {
      "type": "string",
      "format": "uuid",
      "description": "Payment site"
     },
     "account_name": {
      "type": "string",
      "description": "Account name"
     },
     "bank_name": {
      "type": "string",
      "description": "Bank"
     },
     "branch": {
      "type": "string",
      "description": "Branch"
     },
     "country": {
      "type": "string",
      "description": "Country"
     },
     "currency": {
      "type": "string",
      "description": "Currency"
     },
     "account_number_cipher": {
      "type": "string",
      "description": "Account number cipher",
      "readOnly": true
     },
     "account_last4": {
      "type": "string",
      "description": "Last four digits"
     },
     "iban_cipher": {
      "type": "string",
      "description": "Iban cipher",
      "readOnly": true
     },
     "iban_last4": {
      "type": "string",
      "description": "IBAN last four"
     },
     "swift_bic": {
      "type": "string",
      "description": "SWIFT / BIC"
     },
     "routing_number": {
      "type": "string",
      "description": "Routing number"
     },
     "routing_scheme": {
      "type": "string",
      "description": "Routing scheme",
      "enum": [
       "aba",
       "sort_code",
       "ifsc",
       "bsb",
       "clabe",
       "iban",
       "other"
      ]
     },
     "intermediary_bank": {
      "type": "string",
      "description": "Intermediary bank"
     },
     "intermediary_swift": {
      "type": "string",
      "description": "Intermediary swift"
     },
     "is_primary": {
      "type": "boolean",
      "description": "Primary account"
     },
     "verification_status": {
      "type": "string",
      "description": "Verification",
      "enum": [
       "unverified",
       "pending",
       "verified",
       "failed",
       "expired"
      ]
     },
     "verified_by": {
      "type": "string",
      "format": "uuid",
      "description": "Verified by"
     },
     "verified_on": {
      "type": "string",
      "format": "date",
      "description": "Verified on"
     },
     "verification_method": {
      "type": "string",
      "description": "Verified by",
      "enum": [
       "callback",
       "bank_letter",
       "penny_test",
       "portal",
       "in_person",
       "third_party"
      ]
     },
     "last_changed_on": {
      "type": "string",
      "format": "date",
      "description": "Last changed on",
      "readOnly": true
     },
     "last_changed_by": {
      "type": "string",
      "format": "uuid",
      "description": "Last changed by",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "effective_from": {
      "type": "string",
      "format": "date",
      "description": "In force from"
     },
     "effective_to": {
      "type": "string",
      "format": "date",
      "description": "Until"
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "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
     },
     "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
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/scm/supplier-bank-accounts": {
   "get": {
    "summary": "list supplier-bank-accounts",
    "operationId": "list_supplier_bank_accounts_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create supplier-bank-accounts",
    "operationId": "create_supplier_bank_accounts_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/supplier-bank-accounts/{id}": {
   "get": {
    "summary": "get supplier-bank-accounts",
    "operationId": "get_supplier_bank_accounts_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change supplier-bank-accounts",
    "operationId": "change_supplier_bank_accounts_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete supplier-bank-accounts",
    "operationId": "delete_supplier_bank_accounts_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/supplier-bank-accounts/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_supplier_bank_accounts_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"
     }
    }
   }
  }
 }
}