{
 "openapi": "3.1.0",
 "info": {
  "title": "Carriers & Recordkeepers (HRMS)",
  "version": "20261030b",
  "description": "Who is sent what: an insurer (Aflac, Prudential ...) its 834 enrollment file, a 401(k) or 457 recordkeeper (Vanguard, Nationwide ...) its contribution file after each payroll, in its own layout, and how it is delivered."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "benefit-carriers": {
    "type": "object",
    "required": [
     "code",
     "name"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "code": {
      "type": "string",
      "description": "Code"
     },
     "name": {
      "type": "string",
      "description": "Name"
     },
     "carrier_kind": {
      "type": "string",
      "description": "Kind",
      "enum": [
       "insurance",
       "retirement"
      ]
     },
     "file_format": {
      "type": "string",
      "description": "File it takes",
      "enum": [
       "ANSI X12 834 enrollment (005010X220A1)",
       "Contribution and loan file (CSV, after payroll)",
       "Eligibility file (CSV)"
      ]
     },
     "isa_sender_qual": {
      "type": "string",
      "description": "ISA sender qualifier"
     },
     "isa_sender_id": {
      "type": "string",
      "description": "ISA sender id"
     },
     "isa_receiver_qual": {
      "type": "string",
      "description": "ISA receiver qualifier"
     },
     "isa_receiver_id": {
      "type": "string",
      "description": "ISA receiver id"
     },
     "gs_sender_id": {
      "type": "string",
      "description": "Gs sender id"
     },
     "gs_receiver_id": {
      "type": "string",
      "description": "Gs receiver id"
     },
     "usage_indicator": {
      "type": "string",
      "description": "Test or production",
      "enum": [
       "T",
       "P"
      ]
     },
     "isa_control_last": {
      "type": "integer",
      "description": "Isa control last",
      "readOnly": true
     },
     "sponsor_name": {
      "type": "string",
      "description": "Plan sponsor (N1 P5)"
     },
     "sponsor_tax_id": {
      "type": "string",
      "description": "Sponsor EIN"
     },
     "insurer_name": {
      "type": "string",
      "description": "Insurer (N1 IN)"
     },
     "insurer_tax_id": {
      "type": "string",
      "description": "Insurer tax id"
     },
     "master_policy_no": {
      "type": "string",
      "description": "Master policy / group number"
     },
     "line_codes": {
      "type": "object",
      "description": "Insurance line codes (JSON)"
     },
     "layout": {
      "type": "object",
      "description": "Columns (JSON)"
     },
     "delimiter": {
      "type": "string",
      "description": "Delimiter"
     },
     "include_header": {
      "type": "boolean",
      "description": "Header row"
     },
     "date_format": {
      "type": "string",
      "description": "Dates",
      "enum": [
       "YYYY-MM-DD",
       "MM/DD/YYYY",
       "YYYYMMDD"
      ]
     },
     "plan_number": {
      "type": "string",
      "description": "Recordkeeper plan number"
     },
     "deduction_map": {
      "type": "object",
      "description": "Deduction codes by source (JSON)"
     },
     "auto_after_post": {
      "type": "boolean",
      "description": "Build the file when a payroll run is posted"
     },
     "delivery_method": {
      "type": "string",
      "description": "Delivered by",
      "enum": [
       "Download and upload to the carrier portal",
       "HTTPS to the carrier’s endpoint",
       "SFTP"
      ]
     },
     "endpoint_url": {
      "type": "string",
      "description": "Endpoint (https://)"
     },
     "sftp_host": {
      "type": "string",
      "description": "SFTP host"
     },
     "sftp_port": {
      "type": "integer",
      "description": "SFTP port"
     },
     "sftp_user": {
      "type": "string",
      "description": "SFTP user"
     },
     "sftp_path": {
      "type": "string",
      "description": "SFTP folder"
     },
     "credential_sealed": {
      "type": "string",
      "description": "Credential sealed",
      "readOnly": true
     },
     "file_name_pattern": {
      "type": "string",
      "description": "File name"
     },
     "contact_email": {
      "type": "string",
      "description": "Carrier contact"
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "is_active": {
      "type": "boolean",
      "description": "Active"
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "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
     },
     "sftp_host_key_sha256": {
      "type": "string",
      "description": "Pinned host key (SHA256)"
     },
     "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/hrms/benefit-carriers": {
   "get": {
    "summary": "list benefit-carriers",
    "operationId": "list_benefit_carriers_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create benefit-carriers",
    "operationId": "create_benefit_carriers_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/benefit-carriers/{id}": {
   "get": {
    "summary": "get benefit-carriers",
    "operationId": "get_benefit_carriers_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change benefit-carriers",
    "operationId": "change_benefit_carriers_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete benefit-carriers",
    "operationId": "delete_benefit_carriers_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/benefit-carriers/fields": {
   "get": {
    "summary": "Fields",
    "operationId": "action_benefit_carriers_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/benefit-carriers/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_benefit_carriers_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/hrms/benefit-carriers/{id}/plans": {
   "post": {
    "summary": "Plans",
    "operationId": "action_benefit_carriers_0_6",
    "description": "Body keys: planCodes, plans",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/benefit-carriers/{id}/credential": {
   "post": {
    "summary": "Credential",
    "operationId": "action_benefit_carriers_0_6",
    "description": "Body keys: secret",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/benefit-carriers/{id}/host-key": {
   "post": {
    "summary": "Host key",
    "operationId": "action_benefit_carriers_0_6",
    "description": "Body keys: pin, expect",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}