{
 "openapi": "3.1.0",
 "info": {
  "title": "Payroll Tax Registrations (HRMS)",
  "version": "20261030b",
  "description": "One per obligation, not one per authority: an income-tax withholding account and an unemployment account with the same state are different registrations with different numbers, different rates and different due dates."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "payroll-tax-registrations": {
    "type": "object",
    "required": [
     "code",
     "name",
     "country",
     "obligation_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"
     },
     "name_local": {
      "type": "string",
      "description": "Local name"
     },
     "country": {
      "type": "string",
      "description": "Country"
     },
     "level": {
      "type": "string",
      "description": "Level"
     },
     "region_code": {
      "type": "string",
      "description": "Region or state code"
     },
     "authority_name": {
      "type": "string",
      "description": "Authority"
     },
     "authority_code": {
      "type": "string",
      "description": "Authority code"
     },
     "obligation_kind": {
      "type": "string",
      "description": "Obligation"
     },
     "registration_no": {
      "type": "string",
      "description": "Registration number"
     },
     "employer_rate_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Employer rate (%)"
     },
     "employee_rate_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Employee rate (%)"
     },
     "wage_base_cap": {
      "type": "string",
      "format": "decimal",
      "description": "Wage base cap"
     },
     "wage_base_period": {
      "type": "string",
      "description": "Cap applies per",
      "enum": [
       "pay_period",
       "month",
       "quarter",
       "year"
      ]
     },
     "deposit_frequency": {
      "type": "string",
      "description": "Deposits"
     },
     "deposit_due_days": {
      "type": "integer",
      "description": "Deposit due (days after period end)"
     },
     "return_frequency": {
      "type": "string",
      "description": "Returns"
     },
     "return_due_day": {
      "type": "integer",
      "description": "Return due (days after period end)"
     },
     "return_form": {
      "type": "string",
      "description": "Return form"
     },
     "annual_form": {
      "type": "string",
      "description": "Annual form"
     },
     "lookback_determines_schedule": {
      "type": "boolean",
      "description": "Schedule set by a lookback"
     },
     "lookback_threshold": {
      "type": "string",
      "format": "decimal",
      "description": "Lookback threshold"
     },
     "filing_portal": {
      "type": "string",
      "description": "Portal"
     },
     "filing_method": {
      "type": "string",
      "description": "Filed by",
      "enum": [
       "portal",
       "api",
       "file_upload",
       "bank",
       "paper",
       "agent"
      ]
     },
     "effective_from": {
      "type": "string",
      "format": "date",
      "description": "From"
     },
     "effective_to": {
      "type": "string",
      "format": "date",
      "description": "To"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "enum": [
       "pending",
       "active",
       "suspended",
       "closed"
      ]
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "is_active": {
      "type": "boolean",
      "description": "Active"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "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/hrms/payroll-tax-registrations": {
   "get": {
    "summary": "list payroll-tax-registrations",
    "operationId": "list_payroll_tax_registrations_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create payroll-tax-registrations",
    "operationId": "create_payroll_tax_registrations_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-tax-registrations/{id}": {
   "get": {
    "summary": "get payroll-tax-registrations",
    "operationId": "get_payroll_tax_registrations_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change payroll-tax-registrations",
    "operationId": "change_payroll_tax_registrations_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete payroll-tax-registrations",
    "operationId": "delete_payroll_tax_registrations_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-tax-registrations/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_payroll_tax_registrations_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"
     }
    }
   }
  }
 }
}