{
 "openapi": "3.1.0",
 "info": {
  "title": "Object Fields (Platform)",
  "version": "20261030b",
  "description": "The fields of each custom object. A field has a type, optional limits, and may be required, unique, searchable or sensitive (kept out of reports, search and anything an AI assistant is shown). A field is retired by default: it disappears from the screens and its values stay; Purge drops the column and its values. A field's key and type cannot be changed."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "custom-object-fields": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "object_id": {
      "type": "string",
      "format": "uuid",
      "description": "Object",
      "readOnly": true
     },
     "field_key": {
      "type": "string",
      "description": "Key",
      "readOnly": true
     },
     "label": {
      "type": "string",
      "description": "Label",
      "readOnly": true
     },
     "help": {
      "type": "string",
      "description": "Help text",
      "readOnly": true
     },
     "data_type": {
      "type": "string",
      "description": "Type",
      "enum": [
       "text",
       "textarea",
       "number",
       "integer",
       "money",
       "percent",
       "date",
       "datetime",
       "boolean",
       "select",
       "multiselect",
       "reference",
       "url",
       "email"
      ],
      "readOnly": true
     },
     "options": {
      "type": "object",
      "description": "Choices",
      "readOnly": true
     },
     "ref_target": {
      "type": "string",
      "description": "Points at",
      "readOnly": true
     },
     "is_required": {
      "type": "boolean",
      "description": "Required",
      "readOnly": true
     },
     "is_unique": {
      "type": "boolean",
      "description": "Unique",
      "readOnly": true
     },
     "is_searchable": {
      "type": "boolean",
      "description": "Searchable",
      "readOnly": true
     },
     "is_sensitive": {
      "type": "boolean",
      "description": "Sensitive",
      "readOnly": true
     },
     "min_value": {
      "type": "string",
      "format": "decimal",
      "description": "Smallest value",
      "readOnly": true
     },
     "max_value": {
      "type": "string",
      "format": "decimal",
      "description": "Largest value",
      "readOnly": true
     },
     "max_length": {
      "type": "integer",
      "description": "Longest text",
      "readOnly": true
     },
     "default_value": {
      "type": "string",
      "description": "Default value",
      "readOnly": true
     },
     "show_in_list": {
      "type": "boolean",
      "description": "Show on the list",
      "readOnly": true
     },
     "sort_order": {
      "type": "integer",
      "description": "Order",
      "readOnly": true
     },
     "is_active": {
      "type": "boolean",
      "description": "On",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated 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
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/platform/custom-object-fields": {
   "get": {
    "summary": "list custom-object-fields",
    "operationId": "list_custom_object_fields_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post object fields",
    "operationId": "action_custom_object_fields_1_4",
    "description": "Body keys: objectId, object_id",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/custom-object-fields/{id}": {
   "get": {
    "summary": "get custom-object-fields",
    "operationId": "get_custom_object_fields_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put object fields",
    "operationId": "action_custom_object_fields_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete object fields",
    "operationId": "action_custom_object_fields_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/custom-object-fields/choices/{kind}": {
   "get": {
    "summary": "Choices",
    "operationId": "action_custom_object_fields_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/custom-object-fields/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_custom_object_fields_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"
     }
    }
   }
  }
 }
}