{
 "openapi": "3.1.0",
 "info": {
  "title": "GL Interface Mappings (HRMS)",
  "version": "20261030b",
  "description": "Which target account (and property, segments) each payroll amount goes to. The most specific rule wins: a code before *, then each dimension it names, then priority."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "gl-mappings": {
    "type": "object",
    "required": [
     "interface_id",
     "source_kind",
     "target_account"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "interface_id": {
      "type": "string",
      "format": "uuid",
      "description": "Interface"
     },
     "source_kind": {
      "type": "string",
      "description": "Amount",
      "enum": [
       "Earnings (wage expense)",
       "Employer taxes (expense)",
       "Employer benefit costs (expense)",
       "Employee taxes withheld (liability)",
       "Employee deductions (liability)",
       "Employer taxes owed (liability)",
       "Employer benefit costs owed (liability)",
       "Net pay owed (liability)"
      ]
     },
     "source_code": {
      "type": "string",
      "description": "Earning, tax or deduction code"
     },
     "cost_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Cost center"
     },
     "department": {
      "type": "string",
      "description": "Department"
     },
     "location_id": {
      "type": "string",
      "format": "uuid",
      "description": "Property / site"
     },
     "fund_id": {
      "type": "string",
      "format": "uuid",
      "description": "Fund"
     },
     "grant_id": {
      "type": "string",
      "format": "uuid",
      "description": "Grant"
     },
     "program_id": {
      "type": "string",
      "format": "uuid",
      "description": "Program"
     },
     "job_id": {
      "type": "string",
      "format": "uuid",
      "description": "Job / class"
     },
     "target_account": {
      "type": "string",
      "description": "Target account"
     },
     "target_property": {
      "type": "string",
      "description": "Target property"
     },
     "segment_1": {
      "type": "string",
      "description": "Segment 1"
     },
     "segment_2": {
      "type": "string",
      "description": "Segment 2"
     },
     "description": {
      "type": "string",
      "description": "Description"
     },
     "priority": {
      "type": "integer",
      "description": "Priority"
     },
     "is_active": {
      "type": "boolean",
      "description": "Active"
     },
     "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/hrms/gl-mappings": {
   "get": {
    "summary": "list gl-mappings",
    "operationId": "list_gl_mappings_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create gl-mappings",
    "operationId": "create_gl_mappings_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/gl-mappings/{id}": {
   "get": {
    "summary": "get gl-mappings",
    "operationId": "get_gl_mappings_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change gl-mappings",
    "operationId": "change_gl_mappings_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete gl-mappings",
    "operationId": "delete_gl_mappings_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/gl-mappings/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_gl_mappings_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"
     }
    }
   }
  }
 }
}