# Replace Automatic Decisions

Source: https://www.digiparser.com/docs/api/replaceAutomaticDecisions

Api

# Replace Automatic Decisions

Server URL`loading...`

PUT

/`api`/`v1`/`parsers`/`{parserId}`/`automatic-decisions`

Send

Authorization

Path

Body

Atomically replace both automatic decision policies. Auto-reject has priority. Code rules are not supported.

## [Authorization](#authorization)

`bearerAuth`

authorization<token>

Your API key. Include it directly in the Authorization header as the API key value (e.g., 'authorization: your-api-key-here')

In: `header`

## [Path Parameters](#path-parameters)

parserId\*string

The ID of the parser

Format`uuid`

## [Request Body](#request-body)

`application/json`

version\*integer

Value in`1`

autoReject\*object

Evaluated first. A match prevents auto-approve and human review.

autoApprove\*object

Evaluated only when auto-reject does not match.

\[key: string\]?never

## [Response Body](#response-body)

### 200

`application/json`

### 400

`application/json`

cURL

JavaScript

Go

Python

Java

C#

```
curl -X PUT "https://api.digiparser.com/api/v1/parsers/d1458cd7-8692-488f-8b3f-0fddade05f9c/automatic-decisions" \  -H "Content-Type: application/json" \  -d '{    "version": 1,    "autoReject": {      "enabled": true,      "ruleLogic": "and",      "rules": [        {}      ]    },    "autoApprove": {      "enabled": true,      "ruleLogic": "and",      "rules": [        {}      ]    }  }'
```

200400

```
{
  "version": 1,
  "autoReject": {
    "enabled": true,
    "ruleLogic": "and",
    "rules": [
      {
        "id": "string",
        "type": "simple",
        "field": "string",
        "condition": "extracted_value",
        "operator": "string",
        "value": "string"
      }
    ]
  },
  "autoApprove": {
    "enabled": true,
    "ruleLogic": "and",
    "rules": [
      {
        "id": "string",
        "type": "simple",
        "field": "string",
        "condition": "extracted_value",
        "operator": "string",
        "value": "string"
      }
    ]
  }
}
```

```
{
  "error": true,
  "message": "Parser ID mismatch"
}
```