---
title: "POST /api/v1/document/document-fields/{uid}/pre_delete/"
method: POST
path: "/api/v1/document/document-fields/{uid}/pre_delete/"
tags: ["document", "v1"]
---

# POST /api/v1/document/document-fields/{uid}/pre_delete/

`POST /api/v1/document/document-fields/{uid}/pre_delete/`

Get info about related objects for ready-to-delete document type.

## Path parameters

- `uid` string, required

## Request body

- DocumentFieldDetail
  - `uid` string, uuid
  - `document_type` string, nullable, required
  - `code` string, required — Field codes must be lowercase, should start with a Latin letter, and contain only Latin letters, digits, underscores. Field codes must be unique to every Document Type.
  - `long_code` string
  - `title` string, required
  - `description` string, nullable
  - `type` 'address' | 'amount' | 'boolean' | 'choice' | 'company' | 'date' | 'date_recurring' | 'datetime' | 'duration' | 'float' | 'geography' | 'int' | 'linked_documents' | 'money' | 'multi_choice' | 'percent' | 'person' | 'ratio' | 'related_info' | 'string' | 'string_no_word_wrap' | 'text'
  - `text_unit_type` 'sentence' | 'paragraph' | 'section'
  - `value_detection_strategy` 'disabled' | 'use_regexps_only' | 'regexp_table' | 'use_formula_only' | 'regexps_and_text_based_ml' | 'text_based_ml_only' | 'formula_and_fields_based_ml' | 'fields_based_ml_only' | 'fields_based_prob_ml_only' | 'python_coded_field' | 'field_based_regexps' | 'mlflow_model'
  - `python_coded_field` 'generic.EarliestDate' | 'generic.LatestDate' | 'generic.MaxCurrency' | 'generic.Parties' | 'similarity.SimilarDocuments', nullable
  - `classifier_init_script` string, nullable
  - `formula` string, nullable
  - `convert_decimals_to_floats_in_formula_args` boolean — Floating point field values are represented in Python Decimal type to avoid rounding problems in machine numbers representations. Use this checkbox for converting them to Python float type before calculating the formula. Float: 0.1 + 0.2 = 0.30000000000000004. Decimal: 0.1 + 0.2 = 0.3.
  - `value_regexp` string, nullable — This regular expression is run on the sentence found by a Field Detector and extracts a specific string value from a Text Unit. The first matching group is used if the regular expression returns multiple matching groups. This is only applicable to string fields.
  - `depends_on_fields` string
  - `confidence` 'High' | 'Medium' | 'Low', nullable
  - `requires_text_annotations` boolean
  - `read_only` boolean
  - `category` string
  - `family` integer, nullable
  - `default_value` object, nullable — When populated, this default value is displayed in the user interface’s annotator sidebar for the associated field. If not populated, the Field Value remains empty by default. Please wrap entries with quotes, example: “landlord”. This is only applicable to Choice and Multichoice fields.
  - `choices` string
  - `allow_values_not_specified_in_choices` boolean
  - `stop_words` object, nullable
  - `metadata` object, nullable
  - `training_finished` boolean
  - `dirty` boolean
  - `order` integer
  - `trained_after_documents_number` integer
  - `hidden_always` boolean
  - `hide_until_python` string, nullable
  - `hide_until_js` string, nullable
  - `detect_limit_unit` 'NONE' | 'UNIT' — Choose to add an upward limit to the amount of document text ContraxSuite will search for this Document Field. For example, you can choose to only search the first 10 paragraphs of text for the value required (this often works best for values like “Company,” “Execution Date,” or “Parties,” all of which typically appear in the first few paragraphs of a contract).
  - `detect_limit_count` integer — Specify the maximum range for a bounded search. Field detection begins at the top of the document and continues until this Nth "Detect limit unit" element.
  - `display_yes_no` boolean — Checking this box will display “Yes” if Related Info text is found, and display “No” if no text is found.
  - `value_aware` string
  - `created_by` integer, nullable
  - `modified_by` integer, nullable, required
  - `created_date` string, date-time
  - `modified_date` string, date-time
  - `vectorizer_stop_words` string, nullable — Stop words for vectorizers user in field-based ML field detection. These stop words are excluded from going into the feature vector part build based on this field. In addition to these words the standard sklearn "english" word list is used. Format: each word on new line
  - `unsure_choice_value` string, nullable — Makes sense for machine learning strategies with "Unsure" category. The strategy will return this value if probabilities of all other categories appear lower than the specified threshold.
  - `unsure_thresholds_by_value` object, nullable — Makes sense for machine learning strategies with "Unsure" category. The strategy will return concrete result (one of choice values) only if the probability of the detected value is greater than this threshold. Otherwise the strategy returns None or the choice value specified in "Unsure choice value" field. Format: { "value1": 0.9, "value2": 0.5, ...}. Default: 0.9
  - `mlflow_model_uri` string, nullable — MLFlow model URI understandable by the MLFlow artifact downloading routines.
  - `mlflow_detect_on_document_level` boolean — If true - whole document text will be sent to the MLFlow model and the field value will be returned for the whole text with no annotations. If false - each text unit will be sent separately.

## Response `200`

- object

## Changes

- **2020-12-11** `0957c4a7ae3d` — 3 breaking, 33 info
  - added the new required request property `modified_by` (media type: application/json)
  - added the new required request property `modified_by` (media type: application/x-www-form-urlencoded)
  - added the new required request property `modified_by` (media type: multipart/form-data)
  - added the new optional request property `created_by` (media type: application/json)
  - …32 more

[Change history](https://skmtc.dev/lexpredict/apis/contraxsuite-api/changes/api/v1/document/document-fields/:uid/pre_delete/post.md)

---

[API](https://skmtc.dev/lexpredict/apis/contraxsuite-api.md) · [All operations](https://skmtc.dev/lexpredict/apis/contraxsuite-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lexpredict/contraxsuite-api/revisions/0957c4a7ae3d/schema)
