---
category: [Administration & Integrations, Administration & Integrations/Workday API, Platform and Product Extensions, Platform and Product Extensions/Integration]
keyword: [Extend, Integrate, REST API]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Concept: Validate Only Mode for REST APIs
layout: subsection
---

The validate-only mode enables you to validate a REST API request without taking any action or persisting any data in the tenant. The validate-only mode applies to these methods:

-   POST
-   PUT
-   PATCH
-   DELETE


To enable the validate-only mode, specify this HTTP header in your REST API request:

```
x-validate-only: 1
```

The validate-only mode performs these validations:

-   Operation security.
-   Display option violations.
-   Field-level security.
-   Instance set constraints.
-   Prompt resource constraints.
-   Currency constraints.
-   Optional field configuration constraints.
-   Processing options, representation content, and header validations.


When the request encounters validation errors, the request returns a non-successful HTTP response code (Example: 400) and the error messages. Correct the errors in the request and resend it.

When the request passes all validations, the request returns the 200 HTTP response code. To process the updates and persist the data in the tenant, resend the request without the `x-validate-only` header or set it to zero. Example:

```
x-validate-only: 0
```

## <a id="section_1"></a>Example

This example submits a PUT request with the `x-validate-only` header set to `1`. The response displays a sample validation error.

Sample request:

```
PUT https://api.workday.com/expense/v1/entries/4d718d459cce01000c6fb285efa20000
```

Header:

<table><thead><tr><th>Name</th><th>Value</th></tr></thead><tbody><tr><td>x-validate-only</td><td>1</td></tr></tbody></table><br/>

Sample request body:

```
{
   "amount": {
      "currency": "USD",
      "value": "1000"
   }
}
```

Sample response:

```
{
  "error": "invalid request: validation errors",
  "errors": [
    {
      "code": "A6",
      "error": "Value required in field",
      "field": "date",
      "path": "date"
    }
  ]
}
```

